The table below lists the generic arithmetic functions on number field and order elements. Note that automatic coercion ensures that the binary operations +, -, *, and / may be performed on an element of a number field and an element of one of its orders; the result will be a number field element. Since division of order elements does not generally result in an order element, / for two elements of an order returns an element of the field of fractions of the order; also, the exponent k in a^k must be non-negative.
The quotient of w by v; v must divide w exactly. (v and w must be elements of the same order.)
Returns the square root of a if it exists in the order or field containing a.
Returns the n-th root of a if it exists in the order or field containing a.
Besides the generic predicates IsMinusOne, IsZero and IsOne, the predicates IsIntegral and IsPrimitive are defined on elements of number fields and orders. It is also possible to test for powers.
True if the element a of number field K or of an order in K is contained in the ring of integers of K, false otherwise. (This is vacuously true for order elements.) (This function uses the minimal polynomial to get the answer, which means that the calculation of the maximal order is not triggered in case it is not known yet.)
True if the element a of the number field K or one of its orders O is a primitive element of K.
Returns true if and only if the order element w is a unit of finite order.
Given an element w in an order O and an integer n>1, this function returns true if and only if there exists an element v in O such that w=v^n; if true, such an element v is returned as well.
Given an element w in an order O and an integer n greater than 0, this function returns true if and only if there exists an element v in O, and a unit u of O such that v^n=uw; if true is returned, such an element v is returned as well.
Given an element w in an order O and an integer n greater than 0, this function returns true if and only if there exists an element v in O, and a torsion unit t of O such that v^n=tw; if true is returned, such an element v is returned as well.
Return a generator (primitive element) for the number field K=G(alpha) over the ground field G. This is the image alpha of x in G[x]/f where f is the defining polynomial of K.
Returns a primitive element for the number field, usually K.1.
Given an order O, this function returns an order element that is a primitive element for its field of fractions having small length (that is, small T_2 norm -- see the Length function for a definition). With the number field K as an argument, a short primitive element in the equation order is returned.The element returned will often be the shortest primitive element of the order, but this is not guaranteed.
The functions here return (sequences of) real or complex numbers.
The precision of these numbers is governed by the appropriate order's
internal precision (the equation order is a field is being used).
See the section on special options for more information.
AbsoluteValues(a) : FldNumElt -> [FldPrElt]
Return a sequence (of length r_1 + r_2) of the real absolute values of the conjugates of a. The first r_1 values are the absolute values of the real embeddings of the element, the next r_2 are the lengths of the complex embeddings with their weight factors. That is, if the real conjugates of a are w_i, for 1 <= i <= r_1, and the complex conjugates of a are x_i+- y_i i (for 1 <= i <= r_2), then AbsoluteValues returns [|w_1|, ..., |w_(r_1)|, sqrt(x_(r_1 + 1)^2 + y_(r_1 + 1)^2/2), ... sqrt(x_(r_1 + r_2)^2 + y_(r_1 + r_2)^2/2)].
Let P be the minimal polynomial of a over Z, with leading coefficient a_0 and roots alpha_1, ..., alpha_n. Then the absolute logarithmic height is defined to be h(alpha) = (1/n) log(a_0 prod_(j=1)^(n) max(a, |alpha_j|)).
Return all conjugates of a as a sequence (of length n) of complex numbers. The r_1 real conjugates appear first, and are followed by r_2 pairs of complex conjugates.
Equivalent to Conjugates(a)[k].
Return the T_2-norm of a, which is a real number. This equals the sum of the (complex) norms of the conjugates of a (as normalized by the Conjugates function).
Return the sequence (of length r_1 + r_2) of logarithms of the absolute values of the conjugates of a number field or order element a != 0.
> disc := func< O | Determinant( MatrixAlgebra(ComplexField(20), Degree(O) ) > ! [ Conjugates(Basis(O)[i])[j] : i, j in [1..Degree(O)] ] )^2 >; > R<x> := PolynomialRing(Integers()); > O := MaximalOrder(NumberField(x^4 - 420*x^2 + 40000)); > disc(O); 42024.999999999987 > Discriminant(O); 42025Thus the new discriminant returns a (complex) approximation to the built in Discriminant function, giving the above result for the maximal order O of the previous example.
Here is an alternative way to get the T_2 norm returned by Length, using the complex Norm function, and the Conjugates.
> norm := func< a | &+[ Norm(Conjugates(a)[i]) : i in [1..Degree(Parent(a))] ] >;
The relative norm N_(L/K)(a) from L to K of the element a of L; here K must be the field or order over which L is defined as an extension.
The absolute norm N_(L/Q)(a) from L to Q of the element a of L (or one of its orders).
The relative trace Tr_(L/K)(a) from L to K of the element a of L; here K must be the field or order over which L is defined as an extension.
The absolute trace Tr_(L/Q)(a) from L to Q of the element a of L (or one of its orders).
Given an element a from a number field or order L, return the characteristic polynomial of the element over the subfield or suborder K; here K must be the field or order over which L is defined as an extension.
Given an element a from a number field or one of its orders, this function returns the characteristic polynomial of the element. For field elements the polynomial will have coefficients in the rational field, for order elements the coefficients will be in the ring of integers.
Given an element a from a number field or order L, return the minimal polynomial of the element over the subfield or suborder K; here K must be the field or order over which L is defined as an extension.
Given an element a from a number field or one of its orders, this function returns the minimal polynomial of the element. For field elements the polynomial will have coefficients in the rational field, for order elements the coefficients will be in the ring of integers.
Return the representation matrix of a, that is, the matrix which represents the linear map given by multiplication by a. If a is an order element, this matrix is with respect to the (absolute) basis for the order; if a is a number field element, the (possibly relative) power basis for the field is used. The ith column of the representation matrix gives the coefficients of aw_i with respect to the basis w_1, ..., w_n.
Return the representation matrix of a relative to Q, where a is an element of the relative number field L. If a is an order element, the representation matrix is relative to Z instead.
Given a prime ideal I and an element w of an order O, this function returns the valuation v_I(w) of w with respect to I; this valuation will be a non-negative integer.
> R<x> := PolynomialRing(Integers()); > K<y> := NumberField(x^4-420*x^2+40000); > z := y/2; > Norm(z), Trace(z); 2500 0 > MinimalPolynomial(z); $.1^4 - 105*$.1^2 + 2500 > RepresentationMatrix(z); [ 0 0 0 -20000] [ 1/2 0 0 0] [ 0 1/2 0 210] [ 0 0 1/2 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