[Next][Prev] [Right] [Left] [Up] [Index] [Root]
Subsections
Parent(a) : FldAlgElt -> FldAlg
Parent(w) : RngOrdElt -> RngOrd
Category(a) : FldAlgElt -> Cat
Category(w) : RngOrdElt -> Cat
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.
+ a : FldAlgElt -> FldAlgElt
+ w : RngOrdElt -> RngOrdElt
- a : FldAlgElt -> FldAlgElt
- w : RngOrdElt -> RngOrdElt
a + b : FldAlgElt, FldAlgElt -> FldAlgElt
w + v : RngOrdElt, RngOrdElt -> RngOrdElt
a - b : FldAlgElt, FldAlgElt -> FldAlgElt
w - v : RngOrdElt, RngOrdElt -> RngOrdElt
a * b : FldAlgElt, FldAlgElt -> FldAlgElt
w * v : RngOrdElt, RngOrdElt -> RngOrdElt
a / b : FldAlgElt, FldAlgElt -> FldAlgElt
w / v : RngOrdElt, RngOrdElt -> FldOrdElt
a ^ k : FldAlgElt, RngIntElt -> FldAlgElt
w ^ k : RngOrdElt, RngIntElt -> RngOrdElt
The quotient of the order element w by the order element 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 an mod m of the order element
a.
Sqrt(a) : FldAlgElt -> FldAlgElt
SquareRoot(a) : RngOrdElt -> RngOrdElt
SquareRoot(a) : FldAlgElt -> FldAlgElt
Returns the square root of the element a if it exists in the order or field containing
a.
Root(a, n) : FldAlgElt, RngIntElt -> FldAlgElt
Returns the n-th root of the element a if it exists in the order or field containing
a.
IsPower(a, k) : RngOrdElt, RngIntElt -> BoolElt, RngOrdElt
IsSquare(a) : FldAlgElt -> BoolElt, FldAlgElt
IsSquare(a) : RngOrdElt -> BoolElt, RngOrdElt
Return true if the element a is a kth power,
(respectively square) and the root in the order or field containing a if so.
Denominator(a) : RngOrdElt -> RngIntElt
Returns the denominator of the element a, that is the least common
multiple of the denominators of the coefficients of a.
Returns the numerator of the element a, that is the element
multiplied by its denominator.
ContFrac: BoolElt Default: true
Finds an approximation of the field element
E where the denominator is bounded by the integer M.
If ContFrac is given, the approximation is computed by applying
the continued fraction algorithm to the coefficients of E viewed over Q.
Elements may also be tested for whether they lie in an ideal of an order.
See Section Predicates on Ideals.
a eq b : FldAlgElt, FldAlgElt -> BoolElt
w eq v : RngOrdElt, RngOrdElt -> BoolElt
a ne b : FldAlgElt, FldAlgElt -> BoolElt
w ne v : RngOrdElt, RngOrdElt -> BoolElt
a in F : FldAlgElt, FldAlg -> BoolElt
w in O : RngOrdElt, RngOrd -> BoolElt
In addition to the generic predicates IsMinusOne, IsZero
and IsOne, the predicates IsIntegral and IsPrimitive
are defined on elements of algebraic fields and orders.
IsZero(a) : FldAlgElt -> BoolElt
IsZero(w) : RngOrdElt -> BoolElt
IsOne(a) : FldAlgElt -> BoolElt
IsOne(w) : RngOrdElt -> BoolElt
IsMinusOne(a) : FldAlgElt -> BoolElt
IsMinusOne(w) : RngOrdElt -> BoolElt
IsUnit(a) : FldAlgElt -> BoolElt
IsUnit(w) : RngOrdElt -> BoolElt
IsNilpotent(a) : FldAlgElt -> BoolElt
IsNilpotent(a) : RngOrdElt -> BoolElt
IsIdempotent(a) : FldAlgElt -> BoolElt
IsIdempotent(a) : RngOrdElt -> BoolElt
IsZeroDivisor(a) : FldAlgElt -> BoolElt
IsZeroDivisor(a) : RngOrdElt -> BoolElt
IsRegular(a) : FldAlgElt -> BoolElt
IsRegular(a) : RngOrdElt -> BoolElt
IsIrreducible(a) : FldAlgElt -> BoolElt
IsIrreducible(a) : RngOrdElt -> BoolElt
IsPrime(a) : FldAlgElt -> BoolElt
IsPrime(a) : RngOrdElt -> BoolElt
IsIntegral(a) : RngOrdElt -> BoolElt
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.
IsPrimitive(a) : RngOrdElt -> BoolElt
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∈O such that
w=vn; if true, such an element v is returned as well.
IsTotallyPositive(a) : FldAlgElt -> BoolElt
Returnes true iff all real embeddings of the element a are positive. For elements
in absolute fields this is equivalent to all real conjugates being positive.
Generators of fields can be retrieved.
Return the image α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.
PrimitiveElement(F) : FldOrd -> FldOrdElt
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.
For non-simple fields, a random element is returned.
The list of generators of K over its coefficient field, that is a sequence
containing a root of each defining polynomial is returned.
Generators(K, Q) : FldAlg, FldRat -> [FldAlgElt]
A list of generators of 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.
Returns a primitive element for the field of fractions of the order O,
that is
an element whose minimal polynomial has the same degree as the field.
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.
AbsoluteValues(a) : RngOrdElt -> [FldPrElt]
Return a sequence of length r1 + r2 of the real
absolute values of the conjugates
of the 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) : RngOrdElt -> FldPrElt
Let P be the minimal polynomial of the 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(a0 ∏j=1n max(1, |αj|)).
Conjugates(a) : RngOrdElt -> [ 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) : RngOrdElt, RngIntElt -> FldPrElt
Equivalent to Conjugates(a)[k].
Let l := [l1, ..., ln] be a sequence of positive integers and assume
that the 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, ...
Length(a) : FldAlgElt -> FldPrElt
Length(a) : RngOrdElt -> FldPrElt
Return the T2-norm of the element a, which is a real
number. This equals the sum of the (complex)
norms of the conjugates of a.
Logs(a) : RngOrdElt -> [FldPrElt]
Return the sequence of length r1 + r2 of logarithms of the absolute
values of the conjugates of a number field or order element a != 0.
CoefficientHeight(E) : FldAlgElt -> RngIntElt
Computes the coefficient height of the 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) : FldAlgElt -> RngIntElt
Computes the coefficient length of the 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.
Using the functions Conjugates and Basis, it is easy to
write an alternative discriminant function.
> 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);
42025
Thus, 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 T2 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.
Norm(a) : FldAlgElt -> FldRatElt
Norm(a, R) : FldAlgElt, Rng -> RngElt
Norm(a) : RngOrdElt -> RngOrdElt
Norm(a) : RngOrdElt -> RngIntElt
Norm(a, R) : RngOrdElt, Rng -> RngElt
Norm(a, R) : RngIntElt, Rng -> RngElt
Norm(a, R) : FldRatElt, Rng -> RngElt
The relative norm NL/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.
In this case, R must occur as a coefficient ring somewhere in the tower
under L.
NormAbs(a) : FldAlgElt -> FldRatElt
AbsoluteNorm(a) : RngOrdElt -> FldRatElt
NormAbs(a) : RngOrdElt -> FldRatElt
The absolute norm NL/Q(a) over Q of the element a of L
(or one of its orders).
Trace(a) : FldAlgElt -> FldRatElt
Trace(a, R) : FldAlgElt, Rng -> RngElt
Trace(a) : RngOrdElt -> RngOrdElt
Trace(a) : RngOrdElt -> RngIntElt
Trace(a, R) : RngOrdElt, Rng -> RngElt
The relative trace TrL/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.
In this case, R must occur as a coefficient ring somewhere in the tower
under L.
TraceAbs(a) : FldAlgElt -> FldRatElt
AbsoluteTrace(a) : RngOrdElt -> FldRatElt
TraceAbs(a) : RngOrdElt -> FldRatElt
The absolute trace TrL/Q(a) over Q of the element a of L
(or one of its orders).
CharacteristicPolynomial(a, R) : FldAlgElt, Rng -> RngUPolElt
CharacteristicPolynomial(a) : RngOrdElt -> RngUPolElt
CharacteristicPolynomial(a, R) : RngOrdElt, Rng -> RngUPolElt
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.
AbsoluteCharacteristicPolynomial(a) : RngOrdElt -> RngUPolElt
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.
MinimalPolynomial(a, R) : FldAlgElt, Rng -> RngUPolElt
MinimalPolynomial(a) : RngOrdElt -> RngUPolElt
MinimalPolynomial(a, R) : RngOrdElt, Rng -> RngUPolElt
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.
AbsoluteMinimalPolynomial(a) : RngOrdElt -> RngUPolElt
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.
RepresentationMatrix(a, R) : FldAlgElt, Rng -> AlgMatElt
RepresentationMatrix(a) : RngOrdElt -> AlgMatElt
RepresentationMatrix(a, R) : RngOrdElt, Rng -> AlgMatElt
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 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) : RngOrdElt -> AlgMatElt
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 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.
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
Elements can be represented by sequences and matrices. Valuation can also
be calculated.
Eltseq(a) : FldAlgElt -> [ FldAlgElt ]
ElementToSequence(a) : RngOrdElt -> [ FldOrdElt ]
Eltseq(a) : RngOrdElt -> [ FldOrdElt ]
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.
Eltseq(E, k) : FldAlgElt, 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.
The coefficients of the algebraic field element e wrt. to the canonical Q basis for its
field. This is performed by iterating Eltseq until
the coefficients are rational numbers. For number field elements the
coefficients obtained match the coefficients wrt. to
AbsoluteBasis.
a[i] : FldAlgElt, RngIntElt -> FldAlgElt
a[i] : RngOrdElt, RngIntElt -> FldRatElt
a[i] : RngOrdElt, RngIntElt -> FldOrdElt
The coefficient of the ith basis element in the algebraic field or order
element a.
ProductRepresentation(a) : FldAlgElt -> [ FldAlgElt ], [ 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.
PowerProduct(P, E) : [FldAlgElt], [RngIntElt] -> FldAlgElt
Return the 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.
Valuation(w, I) : FldAlgElt, RngOrdIdl -> RngIntElt
Given a prime ideal I and an element w of an order or algebraic field,
this function returns the valuation vI(w) of w with respect to I;
this valuation will be a non-negative integer. Ideals are discussed in
Section Ideals and Quotients.
Decomposition(a): FldOrdElt -> SeqEnum[<RngOrdIdl, RngIntElt>]
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.
The different of the element a of an order of a number field.
[Next][Prev] [Right] [Left] [Up] [Index] [Root]
|