Algebraic Number Fields

The Wolfram Language provides representation of algebraic numbers as Root objects. A Root object contains the minimal polynomial of the algebraic number and the root numberan integer indicating which of the roots of the minimal polynomial the Root object represents. This allows for unique representation of arbitrary complex algebraic numbers. A disadvantage is that performing arithmetic operations in this representation is quite costly. That is why the Wolfram Language requires the use of an additional function, RootReduce, in order to simplify arithmetic expressions. Restricting computations to be within a fixed finite algebraic extension of the rationals, BERJAYA, allows a more convenient representation of its elements as polynomials in BERJAYA.

AlgebraicNumber[θ,{c0,c1,,cn}]represent the algebraic number BERJAYA in BERJAYA

Representation of algebraic numbers as elements of a finite extension of rationals.

If BERJAYA is an algebraic integer with a minimal polynomial of degree BERJAYA, and BERJAYA, , BERJAYA are rational numbers, then AlgebraicNumber[θ,{c0,,cl}] is an inert numeric object:
N can be used to find a numeric approximation of an AlgebraicNumber object:

For any algebraic number BERJAYA and any list of rational numbers BERJAYA, , BERJAYA, AlgebraicNumber[θ,{c0,,cl}] evaluates to AlgebraicNumber[ξ,{d0,,dm}], where BERJAYA is an algebraic integer such that BERJAYA for some factor BERJAYA of the leading coefficient of the minimal polynomial of BERJAYA, BERJAYA is the degree of the minimal polynomial of BERJAYA, and

BERJAYA
AlgebraicNumber automatically makes the generator of the extension an algebraic integer and the coefficient list equal in length to the degree of the extension:
AlgebraicNumber objects representing rational numbers reduce automatically to numbers:
Adding or multiplying AlgebraicNumber objects that explicitly belong to the same field (i.e. have the same first elements), adding or multiplying a rational number and an AlgebraicNumber object, or raising an AlgebraicNumber object to an integer power yields an AlgebraicNumber object:
RootReduce transforms AlgebraicNumber objects to Root objects:
ToNumberField[a,θ]express the algebraic number a in the number field generated by θ
ToNumberField[{a1,a2,},θ]express the ai in the field generated by θ
ToNumberField[{a1,a2,}]express the ai in a common extension field generated by a single algebraic number

Representing arbitrary algebraic numbers as elements of algebraic number fields.

ToNumberField can be used to find a common finite extension of rationals containing the given algebraic numbers:
This represents BERJAYA as an element of the field generated by Root[1-10 #12+#14&,4]:

Arithmetic within a fixed finite extension of rationals is much faster than arithmetic within the field of all complex algebraic numbers.

Suppose you need to find the value of rational function f with {x,y,z} replaced by algebraic numbers {a,b,c}:
A direct computation of the value of f at {a,b,c} using RootReduce takes a rather long time:
A faster alternative is to do the computation in a common algebraic number field containing {a,b,c}:
Arithmetic within the common number field is much faster:
Converting the resulting AlgebraicNumber object to a Root object is fast as well:

ToNumberField[{a1,a2,}] is equivalent to ToNumberField[{a1,a2,},Automatic], and does not necessarily use the smallest common field extension. ToNumberField[{a1,a2,},All] always uses the smallest common field extension.

Here the first AlgebraicNumber object is equal to BERJAYA so it does not generate the 4 th-degree field BERJAYA (Root[1-10 #12+#14&,4]) it is represented in. However, the common field found by ToNumberField contains the whole field BERJAYA (Root[1-10 #12+#14&,4]):
Specifying the second argument All makes ToNumberField find the smallest field possible:
MinimalPolynomial[a]give a pure function representation of the minimal polynomial over the integers of the algebraic number a
MinimalPolynomial[a,x]give the minimal polynomial of the algebraic number a as a polynomial in x
AlgebraicIntegerQ[a]give True if the algebraic number a is an algebraic integer and False otherwise
AlgebraicNumberDenominator[a]give the smallest positive integer n such that na is an algebraic integer
AlgebraicNumberTrace[a]give the trace of the algebraic number a
AlgebraicNumberNorm[a]give the norm of the algebraic number a
AlgebraicUnitQ[a]give True if the algebraic number a is an algebraic unit and False otherwise
RootOfUnityQ[a]give True if the algebraic number a is a root of unity and False otherwise

Functions for computing algebraic number properties.

The minimal polynomial of an algebraic number BERJAYA is the lowest-degree polynomial BERJAYA with integer coefficients and the smallest positive leading coefficient, such that BERJAYA.

This gives the minimal polynomial of BERJAYA expressed as a pure function:
This gives the minimal polynomial of Root[#15-2 #1+7&,1]2+1 expressed as a polynomial in x:

An algebraic number is an algebraic integer if and only if its MinimalPolynomial is monic.

This shows that BERJAYA is an algebraic integer:
This shows that BERJAYA is not an algebraic integer:
This gives the smallest positive integer BERJAYA for which BERJAYA is an algebraic integer:

The trace of an algebraic number a is the sum of all roots of MinimalPolynomial[a].

This gives the trace of BERJAYA:

The norm of an algebraic number a is the product of all roots of MinimalPolynomial[a].

This gives the norm of BERJAYA:

An algebraic number BERJAYA is an algebraic unit if and only if both BERJAYA and BERJAYA are algebraic integers, or equivalently, if and only if AlgebraicNumberNorm[a] is BERJAYA or BERJAYA.

This shows that GoldenRatio is an algebraic unit:
This shows that AlgebraicNumber[Root[#13-4#1+17&,1],{1,2,3}] is not an algebraic unit:

An algebraic number BERJAYA is a root of unity if and only if BERJAYA for some integer BERJAYA.

This shows that BERJAYA is a root of unity:
MinimalPolynomial[s,x,Extension->a]
give the characteristic polynomial of the algebraic number s over the field BERJAYA
MinimalPolynomial[s,x,Extension->Automatic]
give the characteristic polynomial of the AlgebraicNumber object s over the number field generated by its first argument
AlgebraicNumberTrace[a,Extension->θ]
give the trace of the algebraic number a over the field BERJAYA
AlgebraicNumberTrace[a,Extension->Automatic]
give the trace of the AlgebraicNumber object a over the number field generated by its first argument
AlgebraicNumberNorm[a,Extension->θ]
give the norm of the algebraic number a over the field BERJAYA
AlgebraicNumberNorm[a,Extension->Automatic]
give the norm of the AlgebraicNumber object a over the number field generated by its first argument

Functions for computing properties of elements of algebraic number fields.

If a is AlgebraicNumber[θ,coeffs], then MinimalPolynomial[a,x,Extension->Automatic] is equal to MinimalPolynomial[a,x]d, where d is the extension degree of BERJAYA.

The characteristic polynomial of BERJAYA, represented as an element of an extension of rationals of degree 4, is the square of MinimalPolynomial of BERJAYA:

The trace of an algebraic number is the sum of all roots of its characteristic polynomial. If a is AlgebraicNumber[θ,coeffs], then AlgebraicNumberTrace[a,Extension->Automatic] is equal to d AlgebraicNumberTrace[a], where d is the extension degree of BERJAYA.

The trace of BERJAYA, represented as an element of an extension of rationals of degree 4, is twice the AlgebraicNumberTrace of BERJAYA:

The norm of an algebraic number is the product of all roots of its characteristic polynomial. If a is AlgebraicNumber[θ,coeffs], then AlgebraicNumberNorm[a,Extension->Automatic] is equal to AlgebraicNumberNorm[a]d, where d is the extension degree of BERJAYA.

The norm of BERJAYA, represented as an element of an extension of rationals of degree 4, is the square of AlgebraicNumberNorm of BERJAYA:
NumberFieldIntegralBasis[a]give an integral basis for the field BERJAYA generated by the algebraic number a
NumberFieldRootsOfUnity[a]give the roots of unity for the field BERJAYA generated by the algebraic number a
NumberFieldFundamentalUnits[a]give a list of fundamental units for the field BERJAYA generated by the algebraic number a
NumberFieldNormRepresentatives[a,m]
give a list of representatives of classes of algebraic integers of norm ±m in the field BERJAYA generated by the algebraic number a
NumberFieldSignature[a]give the signature of the field BERJAYA generated by the algebraic number a
NumberFieldDiscriminant[a]give the discriminant of the field BERJAYA generated by the algebraic number a
NumberFieldRegulator[a]give the regulator of the field BERJAYA generated by the algebraic number a
NumberFieldClassNumber[a]give the class number of a number field BERJAYA generated by an algebraic number a

Functions of computing properties of algebraic number fields.

An integral basis of an algebraic number field BERJAYA is a list of algebraic numbers forming a basis of the BERJAYAmodule of the algebraic integers of BERJAYA. The set BERJAYA is an integral basis of an algebraic number field BERJAYA if and only if BERJAYA are algebraic integers, and every algebraic integer BERJAYA can be uniquely represented as

BERJAYA

with integer coefficients BERJAYA.

Here is an integral basis of BERJAYA:
This gives an integral basis of the field generated by the first root of 533+429 #1+18 #12+#13&:
NumberFieldIntegralBasis allows specifying the number field by giving a polynomial and a root number:
This gives the roots of unity in the field generated by Root[9-2 #2+#4&,4]:
Here are all roots of unity in the field BERJAYA:

BERJAYA is a list of fundamental units of an algebraic number field BERJAYA if and only if BERJAYA are algebraic units, and every algebraic unit BERJAYA can be uniquely represented as

BERJAYA

with a root of unity BERJAYA and integer exponents BERJAYA.

Here is a set of fundamental units of the field generated by the third root of #14-10 #12+1&:
This gives a fundamental unit of the quadratic field BERJAYA:
This gives a set of representatives of classes of elements of norm 9 in the field generated by the first root of #12-7&:
Here is a set of representatives of classes of elements of norm 2 in the field BERJAYA:
This shows that the polynomial #5+#4+#3+#2+1& has 1 real root and 2 conjugate pairs of complex roots:
This shows that the field BERJAYA has 12 real embeddings and 6 conjugate pairs of complex embeddings:

The discriminant of a number field BERJAYA is the discriminant of an integral basis BERJAYA of BERJAYA (i.e. the determinant of the matrix with elements AlgebraicNumberTrace[ai aj,Extension->Automatic]). The value of the determinant does not depend on the choice of integral basis.

Here is the discriminant of BERJAYA:
This gives the discriminant of the field generated by a root of the polynomial #5+#4+#3+#2+1&. The value of the discriminant does not depend on the choice of the root; hence, NumberFieldDiscriminant allows specifying just the polynomial:

The regulator of a number field BERJAYA is the lattice volume of the image of the group of units of BERJAYA under the logarithmic embedding

BERJAYA

where BERJAYA, , BERJAYA are the real embeddings of BERJAYA in BERJAYA, and BERJAYA, , BERJAYA are one of each conjugate pair of the complex embeddings of BERJAYA in BERJAYA.

Here is the regulator of BERJAYA:
This gives the regulator of the field generated by a root of the polynomial #13-3 #12+1&. The value of the regulator does not depend on the choice of the root; hence, NumberFieldRegulator allows specifying just the polynomial:
This gives the class number of BERJAYA