The table below lists the generic arithmetic functions on algebraic field and order elements. Note that automatic coercion ensures that the binary operations +, -, *, and / may be applied to an element of an algebraic field and an element of one of its orders; the result will be an algebraic field element. Since division of order elements does not generally result in an order element, the operation / applied to two elements of an order returns an element in the field of fractions of the order; similarly if the exponent k in a^k is negative.
For finding the value of an element mod an ideal or the inverse of an element mod an ideal see Section Ideal Arithmetic.
The quotient of w by v; v must divide w exactly. (v and w must be elements of the same order.)
Given a non-negative integer n and an integer m greater than 1, this function returns the modular power a^n mod m.
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.
Return true if a is a kth power, (respectively square) and the root if so.
Returns the denominator of a, the least common multiple of the denominators of the coefficients of a.
Elements may also be tested for whether they lie in an ideal of an order. See Section Predicates on Ideals.
In addition to the generic predicates IsMinusOne, IsZero and IsOne, the predicates IsIntegral and IsPrimitive are defined on elements of algebraic fields and orders.
Returns true if the element a of an algebraic field F or of an order in F is contained in the ring of integers of F, false otherwise. This is vacuously true for order elements. 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.
Returns true if the element a of the algebraic field F or one of its orders O generates F.
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.
Generators of fields can be retrieved.
Return the image alpha of x in G[x]/f where f is the first defining polynomial of K and G is the base field of K.In case of simple extensions this will be a primitive element.
Returns a primitive element for the simple algebraic field, that is an element whose minimal polynomial has the same degree as the field. For a number field K this is K.1 but for a field of fractions this is F!K.1 where K is the number field of F.
The functions here return (sequences of) real or complex numbers. The precision of these numbers is governed by the appropriate order's or field's internal precision. See Section Special Options for more information.
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(1, |alpha_j|)).
Returns 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.
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); 42025 > Discriminant(O); 42025Thus, the new discriminant function returns a complex approximation to the built-in function Discriminant, giving the above result for the maximal order O of the previous example.
Here is an alternative way of getting the T_2 norm returned by Length, using the complex Norm function, together with the Conjugates function.
> norm := func< a | &+[ Norm(Conjugates(a)[i]) : \ > i in [1 .. Degree(Parent(a))] ] >;
The norm, trace and minimal polynomial of order and algebraic field elements can be calculated both with respect to the coefficient ring and to Z or Q.
The relative norm N_(L/F)(a) over F of the element a of L where F is the field or order over which L is defined as an extension. If R is given the norm is calculated over R.
The absolute norm N_(L/Q)(a) over Q of the element a of L (or one of its orders).
The relative trace Tr_(L/F)(a) over F of the element a of L where F is the field or order over which L is defined as an extension. If R is given the trace is computed over R.
The absolute trace Tr_(L/Q)(a) over Q of the element a of L (or one of its orders).
Given an element a from an algebraic field or order L, returns the characteristic polynomial of the element over R if given or the subfield or suborder F otherwise where F is the field or order over which L is defined as an extension.
Given an element a from an algebraic 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 an algebraic field or order L, returns the minimal polynomial of the element over R if given otherwise the subfield or suborder F where F is the field or order over which L is defined as an extension.
Given an element a from an algebraic 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.
Elements can be represented by sequences and matrices. Valuation can also be calculated.
For an element a of an algebraic field F, a sequence of coefficients of length degree of F with respect to the basis is returned. For an element of an order O, the sequence of coefficients of the element with respect to the basis of O are returned.Note however that the universe of the sequence if always a field since in general in relative extensions integral coefficients cannot be achieved.
The coefficients of e wrt. to the canonical Q basis for its field. This is performed by iterating Eltseq until the coefficients are rational numbers.
The coefficient of the ith basis element in a.
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 basis for the order; if a is an algebraic field element, the basis for the field is used. The ith row of the representation matrix gives the coefficients of aw_i with respect to the basis w_1, ..., w_n.If R is given the matrix is over R and with respect to the basis of the order or field over R.
Return the representation matrix of 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 L_i := sum L_(i - 1) omega_(i, j), L := L_n and L_0 := Q. Then the representation matrix is computed with respect to the Q-basis (prod_j omega_(i_j, j))_(i in I) consisting of products of basis elements of the different levels.
> 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
Given a prime ideal I and an element w of an order or algebraic field, this function returns the valuation v_I(w) of w with respect to I; this valuation will be a non-negative integer. Ideals are discussed in Section Ideals and Quotients.
The factorization of the order or algebraic field element a into prime ideals.
For an element a in a maximal order return a sequence containing (up to units) all the elements which divide a. The elements of the sequence will be generators for all principal ideals returned by Divisors(Parent(a)*a).
The index of the module Z[a] in O where a lies in O, an order over Z. If a is not a primitive element the index is infinite.[Next][Prev] [Right] [Left] [Up] [Index] [Root]