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, / is not implemented for two elements of an order; also, the exponent k in a^k must be non-negative. It is not possible to perform the binary operations on elements of different orders.
Given an element a of a number field K, this returns the sequence of rational numbers that are the coefficients of a with respect to the powers of the primitive element of K (in ascending order).
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 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 such that v^n=w; 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. When Magma is started up, real and complex fields of 20 decimal digits precision are created, and by default the resulting values given here will reside in these structures.
The precision used internally
by the KANT functions will be significantly larger if necessary.
AbsoluteValues(a) : FldNumElt -> [FldReElt]
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 pm 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)].
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.
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 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)); > print disc(O); 42024.999999999987 > print 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 absolute norm N_(L/Q)(a) from L to Q of the element a of L (or one of its orders).
The relative norm N_(L/K)(a) from L to K of the element a of L; here K must be the field 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).
The relative trace Tr_(L/K)(a) from L to K of the element a of L; here K must be the field 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.
Given an element a from a number field L, return the minimal polynomial of the element over the subfield K; here K must be the field over which L is defined as an extension.
Given a number field element a belonging to the number field K return the minimum polynomial of a as a polynomial over its ground field G.
Given a number field element a belonging to the number field K return the absolute minimum polynomial of a as a polynomial over Q.
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.
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, which is a non-negative integer.
> R<x> := PolynomialRing(Integers()); > K<y> := NumberField(x^4-420*x^2+40000); > z := y/2; > print Norm(z), Trace(z); 2500 0 > print MinimalPolynomial(z); $.1^4 - 105*$.1^2 + 2500 > print 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()); > print MinimalPolynomial(z); t^4 - 105*t^2 + 2500