[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Element Operations

Subsections

Parent and Category

Parent(a) : FldNumElt -> FldNum
Category(a) : FldNumElt -> Cat
Type(a) : FldNumElt -> Cat
ExtendedType(a) : FldNumElt -> Cat

Arithmetic

The table below lists the generic arithmetic functions on number field elements. Note that automatic coercion ensures that the binary operations +, -, *, and / may be applied to an element of a number field and an element of one of its orders; the result will be a number field element.

+ a : FldNumElt -> FldNumElt
- a : FldNumElt -> FldNumElt

a + b : FldNumElt, FldNumElt -> FldNumElt
a - b : FldNumElt, FldNumElt -> FldNumElt
a * b : FldNumElt, FldNumElt -> FldNumElt
a / b : FldNumElt, FldNumElt -> FldNumElt
a ^ k : FldNumElt, RngIntElt -> FldNumElt

Sqrt(a) : FldNumElt -> FldNumElt
SquareRoot(a) : FldNumElt -> FldNumElt
Returns the square root of the number field element a if it exists in the field containing a.
Root(a, n) : FldNumElt, RngIntElt -> FldNumElt
Returns the n-th root of the number field element a if it exists in the field containing a.
IsPower(a, k) : FldNumElt, RngIntElt -> BoolElt, FldNumElt
IsSquare(a) : FldNumElt -> BoolElt, FldNumElt
Return true if the number field element a is a kth power, (respectively square) and the root if so.
Denominator(a) : FldNumElt -> RngIntElt
Returns the denominator of the number field element a, that is the least common multiple of the denominators of the coefficients of a.
Numerator(a) : FldNumElt -> RngIntElt
Returns the numerator of the number field element a, that is the element multiplied by its denominator.
Qround(E, M): FldNumElt, RngIntElt -> FldNumElt
    ContFrac: BoolElt                   Default: true
Finds an approximation of the number field element E where the denominator is bounded by the integer M. If ContFrac is true, the approximation is computed by applying the continued fraction algorithm to the coefficients of E viewed over Q.

Equality and Membership

Elements may also be tested for whether they lie in an ideal of an order. See Section Predicates on Ideals.

a eq b : FldNumElt, FldNumElt -> BoolElt
a ne b : FldNumElt, FldNumElt -> BoolElt

a in F : FldNumElt, FldNum -> BoolElt

Predicates on Elements

In addition to the generic predicates IsMinusOne, IsZero and IsOne, the predicates IsIntegral and IsPrimitive are defined on elements of number fields.

IsZero(a) : FldNumElt -> BoolElt
IsOne(a) : FldNumElt -> BoolElt

IsMinusOne(a) : FldNumElt -> BoolElt
IsUnit(a) : FldNumElt -> BoolElt

IsNilpotent(a) : FldNumElt -> BoolElt
IsIdempotent(a) : FldNumElt -> BoolElt

IsZeroDivisor(a) : FldNumElt -> BoolElt
IsRegular(a) : FldNumElt -> BoolElt

IsIrreducible(a) : FldNumElt -> BoolElt
IsPrime(a) : FldNumElt -> BoolElt

IsIntegral(a) : FldNumElt -> BoolElt, RngIntElt
Returns true if the element a of a number field F is contained in the ring of integers of F, false otherwise. We use the minimal polynomial to determine the answer, which means that the calculation of the maximal order is not triggered if it is not known yet. A denominator d such that d * a is integral is also returned on request.
IsPrimitive(a) : FldNumElt -> BoolElt
Returns true if the element a of the number field F generates F over its coefficient field.
IsTotallyPositive(a) : FldNumElt -> BoolElt
Returnes true iff all real embeddings of the number field element a are positive. For elements in absolute fields this is equivalent to all real conjugates being positive.

Finding Special Elements

Generators of fields can be retrieved.

K . 1 : FldNum -> FldNumElt
Return the image αof x in G[x]/f where f is the first defining polynomial of the number field K and G is the base field of K.

In case of simple extensions this will be a primitive element.

PrimitiveElement(K) : FldNum -> FldNumElt
Returns a primitive element for the simple number field K, that is an element whose minimal polynomial has the same degree as the field. For a simple number field K this is K.1 , while for non-simple fields a random element with this property is returned.
Generators(K): FldNum -> FldNumElt
The set of generators of the number field K over its coefficient field, that is a set containing a root of each defining polynomial is returned.
GeneratorsOverBaseRing(K) : FldNum -> FldNumElt
A set of generators of the number field K over Q.
GeneratorsSequence(K): FldNum -> [FldNumElt]
The sequence of generators of the number field K over its coefficient field, that is a sequence containing a root of each defining polynomial is returned.
GeneratorsSequenceOverBaseRing(K) : FldNum -> [FldNumElt]
A sequence of generators of the number field K over Q.
Generators(K, k) : FldAlg, FldAlg -> [FldAlgElt]
Generators(K, Q) : FldAlg, FldRat -> [FldAlgElt]
A sequence of generators of the number field K over k is returned. That is a sequence containing a root of each defining polynomial for K and its subfield down to the level of k is returned.

Real and Complex Valued Functions

The functions here return (sequences of) real or complex numbers. The precision of these numbers is governed by the appropriate or field's internal precision. See Section Special Options for more information.

AbsoluteValues(a) : FldNumElt -> [FldComElt]
Return a sequence of length r1 + r2 of the real absolute values of the conjugates of the number field element a. The first r1 values are the absolute values of the real embeddings of the element, the next r2 are the lengths of the complex embeddings with their weight factors. That is, if the real conjugates of a are wi, for 1≤i≤r1, and the complex conjugates of a are xi+- i yi (for 1≤i≤r2), then AbsoluteValues returns [|w1|, ..., |wr1|, Sqrt(x_(r1 + 1)2 + yr1 + 12/2), ... Sqrt(x_(r1 + r2)2 + yr1 + r22/2)].
AbsoluteLogarithmicHeight(a) : FldNumElt -> FldComElt
Let P be the minimal polynomial of the number field element a over Z, with leading coefficient a0 and roots α1, ..., αn. Then the absolute logarithmic height is defined to be h(α) = (1/n) log(a0j=1n max(1, |αj|)).

Conjugates(a) : FldNumElt -> [ FldComElt ]
The real and complex conjugates of the given algebraic number a, as a sequence of n complex numbers. The r1 real conjugates appear first, and are followed by r2 pairs of complex conjugates. The field should be an absolute extension. The ordering of the conjugates is consistent for elements of the same field (or even for elements of different fields that have the same defining polynomial).
Conjugate(a, k) : FldNumElt, RngIntElt -> FldComElt
Equivalent to Conjugates(a)[k].
Conjugate(a, l) : FldNumElt, [RngIntElt] -> FldComElt
Let l := [l1, ..., ln] be a sequence of positive integers and assume that the number field K, the parent of a is given as a tower with n steps, Q⊆K1⊆ ... ⊆Kn = K. This function computes the image of a in C or R under the embedding determined by l, that is under embedding obtained by extending the l1 embedding of K1 to K2, then extending the l2nd of those embeddings to K3 and so on.
Length(a) : FldNumElt -> FldReElt
Return the T2-norm of the number field element a, which is a real number. This equals the sum of the (complex) norms of the conjugates of a.
Logs(a) : FldNumElt -> [FldReElt]
Return the sequence of length r1 + r2 of logarithms of the absolute values of the conjugates of a number field element a != 0.
CoefficientHeight(E) : FldNumElt -> RngIntElt
Computes the coefficient height of the number field element E, that is for an element of an absolute field it returns the maximum of the denominator and the largest coefficient wrt. to the basis of the parent. For elements in relative extensions, it returns the maximal coefficient height of all the coefficients wrt. the basis of the parent.

This function indicates in some way the difficulty of operations involving this element.

CoefficientLength(E) : FldNumElt -> RngIntElt
Computes the coefficient length of the number field element E, that is for an element of an absolute field it returns the sum of the denominator and the absolute values of all coefficients wrt. to the basis of the parent. For elements in relative extensions, it returns the sum of the coefficient length of all the coefficients wrt. the basis of the parent.

This function gives an indication on the amount of memory occupied by this element.

Norm, Trace, and Minimal Polynomial

The norm, trace and minimal polynomial of number field elements can be calculated both with respect to the coefficient ring and to Z or Q.

Norm(a) : FldNumElt -> FldNumElt
Norm(a, R) : FldNumElt, Rng -> RngElt
The relative norm NL/F(a) over F of the element a of the number field L where F is the field over which L is defined as an extension. If R is given the norm is calculated over R. In this case, R must occur as a coefficient ring somewhere in the tower under L.
AbsoluteNorm(a) : FldNumElt -> FldRatElt
NormAbs(a) : FldNumElt -> FldRatElt
The absolute norm NL/Q(a) over Q of the element a of the number field L.
Trace(a) : FldNumElt -> FldNumElt
Trace(a) : FldNumElt -> FldRatElt
Trace(a, R) : FldNumElt, Rng -> RngElt
The relative trace TrL/F(a) over F of the element a of the number field L where F is the field over which L is defined as an extension. If R is given the trace is computed over R. In this case, R must occur as a coefficient ring somewhere in the tower under L.
AbsoluteTrace(a) : FldNumElt -> FldRatElt
TraceAbs(a) : FldNumElt -> FldRatElt
The absolute trace TrL/Q(a) over Q of the element a of the number field L.
CharacteristicPolynomial(a) : FldNumElt -> RngUPolElt
CharacteristicPolynomial(a, R) : FldNumElt, Rng -> RngUPolElt
Given an element a from a number field L, returns the characteristic polynomial of the element over R if given or the subfield F otherwise where F is the field over which L is defined as an extension.
AbsoluteCharacteristicPolynomial(a) : FldNumElt -> RngUPolElt
Given an element a from a number field, this function returns the characteristic polynomial of a over Q.
MinimalPolynomial(a) : FldNumElt -> RngUPolElt
MinimalPolynomial(a, R) : FldNumElt, Rng -> RngUPolElt
Given an element a from a number field L, returns the minimal polynomial of the element over R if given otherwise the subfield F where F is the field over which L is defined as an extension.
AbsoluteMinimalPolynomial(a) : FldNumElt -> RngUPolElt
Given an element a from a number field, this function returns the minimal polynomial of the element as a polynomial over Q.
RepresentationMatrix(a) : FldNumElt -> NumMatElt
RepresentationMatrix(a, R) : FldNumElt, Rng -> NumMatElt
Return the representation matrix of the number field element a, that is, the matrix which represents the linear map wrt to the field basis, given by multiplication by a. The ith row of the representation matrix gives the coefficients of awi with respect to the basis w1, ..., wn.

If R is given the matrix is over R and with respect to the basis of the order or field over R.

AbsoluteRepresentationMatrix(a) : FldNumElt -> NumMatElt
Return the representation matrix of the number field element a relative to the Q-basis of the field constructed using products of the basis elements, where a is an element of the relative number field L.

Let Li := ∑Li - 1 ωi, j, L := Ln and L0 := Q. Then the representation matrix is computed with respect to the Q-basis (∏j ωij, j)i ∈I consisting of products of basis elements of the different levels.


Example FldNum_NormsEtc (H34E13)

We create the norm, trace, minimal polynomial and representation matrix of the element α/2 in the quartic field Q(α).

> R<x> := PolynomialRing(Integers());
> K<y> := NumberField(x^4-420*x^2+40000);
> z := y/2;
> Norm(z), Trace(z);
2500 0
> MinimalPolynomial(z);
ext<Q|>.1^4 - 105*ext<Q|>.1^2 + 2500
> RepresentationMatrix(z);
[     0    1/2      0      0]
[     0      0    1/2      0]
[     0      0      0    1/2]
[-20000      0    210      0]
The awkwardness of the printing of the minimal polynomial above can be overcome by providing a parent for the polynomial, keeping in mind that it is a univariate polynomial over the rationals:

> P<t> := PolynomialRing(RationalField());
> MinimalPolynomial(z);
t^4 - 105*t^2 + 2500

Other Functions

Elements can be represented by sequences and have a product representation.

ElementToSequence(a) : FldNumElt -> [ FldNumElt ]
Eltseq(a) : FldNumElt -> [ FldNumElt ]
For an element a of a number field F, a sequence of coefficients of length degree of F with respect to the basis is returned.
Eltseq(E, k) : FldNumElt, FldNum -> [RngElt]
Eltseq(E, k) : FldNumElt, Rng -> [RngElt]
For an algebraic number E∈K and a ring k which occurs somewhere in the defining tower for K, return the list of coefficients of E over k, that is, apply Eltseq to E and to its coefficients until the list is over k.
Flat(e) : FldNumElt -> [ FldRatElt]
The coefficients of the number field element e wrt. to the canonical Q basis for its field. This is performed by iterating Eltseq until the coefficients are rational numbers. The coefficients obtained match the coefficients wrt. to AbsoluteBasis.
a[i] : FldNumElt, RngIntElt -> FldRatElt
a[i] : FldNumElt, RngIntElt -> FldNumElt
The coefficient of the ith basis element in the number field element a.
ProductRepresentation(a) : FldNumElt -> [ FldNumElt ], [ RngIntElt ]
Return sequences P and E such that the product of elements in P to the corresponding exponents in E is the algebraic number a.
ProductRepresentation(P, E) : [ FldNumElt ], [ RngIntElt ] -> FldNumElt
PowerProduct(P, E) : [FldNumElt], [RngIntElt] -> FldNumElt
Return the number field element a of the universe of the sequence P such that a is the product of elements of P to the corresponding exponents in the sequence E.
 [Next][Prev] [Right] [Left] [Up] [Index] [Root]

Version: V2.19 of Mon Dec 17 14:40:36 EST 2012