This is documentation for Mathematica 5.2, which was
based on an earlier version of the Wolfram Language.

NumberTheory`AlgebraicNumberFields`

This package introduces functions for computation within finite algebraic extensions of rationals. For more information on the notions and algorithms used, see for instance H. Cohen, A Course In Computational Algebraic Number Theory, Springer-Verlag, 1993.

Mathematica provides representation of algebraic numbers as Root objects. A Root object contains the minimal polynomial of the algebraic number and the root number--an 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 Mathematica requires the use of an additional function, RootReduce, in order to simplify arithmetic expressions. If we restrict ourselves to computations within a fixed finite algebraic extension, (), of rationals, we can use a more convenient representation of elements of (), namely as polynomials in .

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

If f is a monic irreducible polynomial function of degree l with integer coefficients, and are rational numbers, then is an inert numeric object.

N can be used to find a numeric approximation of an Algebraic object.

For any f and k for which = Root[f, k] evaluates to an algebraic number, and for any list of rational numbers , evaluates to , such that = Root[g, n] d , where d is a factor of the leading coefficient of the minimal polynomial of , such that is an algebraic integer, m is the degree of g, and

Algebraic automatically makes the polynomial defining the extension monic and the coefficient list equal in length to the degree of the extension.

If the polynomial f specified in Algebraic is reducible, we get the field extension specified by the irreducible factor of f whose root is Root[f, k].

Algebraic objects representing rational numbers reduce automatically to numbers.

Adding or multiplying Algebraic objects that explicitly belong to the same field (i.e. have the same first and third elements), adding or multiplying a rational number and an Algebraic object, or raising an Algebraic object to an integer power yields an Algebraic object.

RootReduce transforms Algebraic objects to Root objects.

Functions for representing arbitrary algebraic numbers as elements of algebraic number fields.

ToCommonField can be used to find a common finite extension of rationals containing the given algebraic numbers.

This represents as an element of the field generated by Root[4].

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

Suppose we 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 Algebraic object to a Root object is fast as well.

Options of ToCommonField.

With the default option setting, SmallestField -> False ToCommonField does not check whether Algebraic objects in the input generate their number fields, and therefore it may find a common field that is not the smallest possible.

Here the first Algebraic object is equal to so it does not generate the 4th degree field (Root[4]) it is represented in. However the common field found by ToCommonField contains the whole field (Root[4]).

Setting SmallestField -> True makes ToCommonField find the smallest field possible.

Functions for computing algebraic number properties.

The minimal polynomial of an algebraic number a is the lowest degree polynomial f with integer coefficients and the smallest positive leading coefficient, such that f(a) ⩵ 0.

This gives the minimal polynomial of expressed as a pure function.

This gives the minimal polynomial of expressed as a polynomial in x.

An algebraic number is an algebraic integer iff its MinimalPolynomial is monic.

This shows that is an algebraic integer.

This shows that is not an algebraic integer.

This gives the smallest positive integer n for which n 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.

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

This gives the norm of .

An algebraic number a is an algebraic unit iff both a and 1/a are algebraic integers, or equivalently, iff AlgebraicNumberNorm[a] is 1 or -1.

This shows that GoldenRatio is an algebraic unit.

This shows that is not an algebraic unit.

An algebraic number a is a root of unity iff for some integer n.

This shows that is a root of unity.

Functions for computing properties of elements of algebraic number fields.

If a is Algebraic[f, coeffs, k], then NumberFieldCharacteristicPolynomial[a, x] is equal to , where d is the extension degree of (Root[f, k])/(a).

NumberFieldCharacteristicPolynomial of , represented as an element of an extension of rationals of degree 4, is the square of MinimalPolynomial of .

NumberFieldTrace[a] is the sum of all roots of NumberFieldCharacteristicPolynomial[a]. If a is Algebraic[f, coeffs, k], then NumberFieldTrace[a] is equal to , where d is the extension degree of (Root[f, k])/(a).

NumberFieldTrace of , represented as an element of an extension of rationals of degree 4, is twice the AlgebraicNumberTrace of .

NumberFieldNorm[a] is the product of all roots of NumberFieldCharacteristicPolynomial[a]. If a is Algebraic[f, coeffs, k], then NumberFieldNorm[a] is equal to , where d is the extension degree of (Root[f, k])/(a).

NumberFieldNorm of , represented as an element of an extension of rationals of degree 4, is the square of AlgebraicNumberNorm of .

Functions of computing properties of algebraic number fields.

An integral basis of an algebraic number field K is a list of algebraic numbers forming a basis of the -module of algebraic integers of K. is an integral basis of an algebraic number field K iff K are algebraic integers, and every algebraic integer z K can be uniquely represented as

with integer coefficients .

This gives an integral basis of the field generated by the first root of .

Here is an integral basis of ).

This gives the roots of unity in the field generated by the fourth root of .

Here are all roots of unity in the field ).

is a list of fundamental units of an algebraic number field K iff K are algebraic units, and every algebraic unit u K can be uniquely represented as

with a root of unity and integer exponents .

Here is a set of fundamental units of the field generated by the third root of .

This gives a fundamental unit of the quadratic field ).

This gives a set of representatives of classes of elements of norm 9 in the field generated by the first root of .

Here is a set of representatives of classes of elements of norm 2 in the field ).

This shows that the polynomial has 1 real root and 2 conjugate pairs of complex roots.

This shows that the field ) has 12 real embeddings and 6 conjugate pairs of complex embeddings.

The discriminant of a number field K is the discriminant of an integral basis of K (i.e. the determinant of the matrix with elements ). The value of the determinant does not depend on the choice of integral basis.

Here is the discriminant of ).

This gives the discriminant of the field generated by a root of the polynomial . The value of the discriminant does not depend on the choice of the root.

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

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

Here is the regulator of ).

This gives the regulator of the field generated by a root of the polynomial . The value of the regulator does not depend on the choice of the root.