In the lists below F usually refers to an algebraic field, K to a number field and O to an order.
Number fields form the Magma category FldNum, orders form RngOrd and their fields of fractions form FldOrd. The notional power structures exist as parents of algebraic fields and their orders, no operations are allowed.
Procedure to change the names of the generating elements in the number field K to the contents of the sequence of strings s.The i-th sequence element will be the name used for the generator of the (i - 1)-st subfield down from K as determined by the creation of K, the first element being used as the name for the generator of K. In the case where K is defined by more than one polynomial as an absolute extension, the ith sequence element will be the name used for the root of the ith polynomial used in the creation of K.
This procedure only changes the names used in printing the elements of K. It does not assign to any identifiers the value of a generator in K; to do this, use an assignment statement, or use angle brackets when creating the field.
Note that since this is a procedure that modifies K, it is necessary to have a reference ~K to K in the call to this function.
Given a number field K, return the element which has the i-th name attached to it, that is, the generator of the (i - 1)-st subfield down from K as determined by the creation of K. Here i must be in the range 1 <= i <= m, where m is the number of polynomials used in creating K. If K was created using multiple polynomials as an absolute extension, K.i will be a root of the ith polynomial used in creating K.
Assign the strings in the sequence s to the names of the basis elements of F.
Return the ith basis element of F
Return the ith basis element of O.
Each order and field has other orders and fields which are related to it in various ways.
Given an algebraic field F, return the algebraic field over which F was defined. For an absolute number field F, the function returns the rational field Q.
Given an order O, this returns the order over which O was defined. For an absolute order O this will be the integers Z.
Given an algebraic field F, this returns an isomorphic number field L defined as an absolute extension (i.e. over Q).
Given an order O, this returns an isomorphic order O' defined as an order in an absolute extension (over Q).
Given an algebraic field F or an order O, this returns an isomorphic field L defined as an absolute simple extension or the Z-isomorphic order in it.
Given algebraic fields L and F such that Magma knows that F is a subfield of L, return an isomorphic algebraic field M defined as an extension over F.
> R<x> := PolynomialRing(Integers()); > Composite := function( K, L ) > T<y> := PolynomialRing( K ); > f := T!DefiningPolynomial( L ); > ff := Factorization(f); > LKM := NumberField(ff[1][1]); > return AbsoluteField(LKM); > end function;To create, for example, the field Q(Sqrt(2), Sqrt(3), Sqrt(5)), the above function should be applied twice:
> K := NumberField(x^2-3); > L := NumberField(x^2-2); > M := NumberField(x^2-5); > KL := Composite(K, L); > S<s> := PolynomialRing(BaseField(KL)); > KLM<w> := Composite(KL, M); > KLM; Number Field with defining polynomial s^8 - 40*s^6 + 352*s^4 - 960*s^2 + 576 over the Rational FieldNote, that the same field may be constructed with just one call to NumberField followed by AbsoluteField:
> KLM2 := AbsoluteField(NumberField([x^2-3, x^2-2, x^2-5])); > KLM2; Number Field with defining polynomial s^8 - 40*s^6 + 352*s^4 - 960*s^2 + 576 over the Rational Fieldor by
> AbsoluteField(ext<Rationals() | [x^2-3, x^2-2, x^2-5]>); Number Field with defining polynomial s^8 - 40*s^6 + 352*s^4 - 960*s^2 + 576 over the Rational FieldIn general, however, the resulting polynomials of KLM and KLM2 will differ. To see the difference between SimpleExtension and AbsoluteField, we will create KLM2 again:
> KLM3 := NumberField([x^2-3, x^2-2, x^2-5]: Abs);
> AbsoluteField(KLM3);
Number Field with defining polynomials [ x^2 - 3, x^2 - 2,
x^2 - 5] over the Rational Field
> SimpleExtension(KLM3);
Number Field with defining polynomial s^8 - 40*s^6 + 352*s^4 - 960*s^2 + 576
over the Rational Field
Given an order O, obtained by a chain of transformations from an equation order E, returns an order that is given directly by a single transformation over E.
Given an order O, return an order O' obtained from O by a transformation matrix T, which is returned as a second value. O' will have a LLL-reduced basis.
> M := MaximalOrder(x^4-14*x^3+14*x^2-14*x+14);
> L, T := LLL(M);
> L;
Maximal Order, Transformation of M
Transformation Matrix:
[ 1 0 0 0]
[ -3 1 0 0]
[ 3 -13 1 0]
[ -7 1 -13 1]
> T;
[ 1 0 0 0]
[ -3 1 0 0]
[ 3 -13 1 0]
[ -7 1 -13 1]
> Basis(M);
[
M.1,
M.2,
M.3,
M.4
]
> Basis(L, M);
[
[1, 0, 0, 0],
[-3, 1, 0, 0],
[3, -13, 1, 0],
[-7, 1, -13, 1]
]
> L eq M;
true
Even though L and M are considered to be equal because they contain
the same elements L has a basis which is LLL reduced but M does not.
Following on from the orders and ideals example (H48E6) we have
> R<x> := PolynomialRing(Integers());
> K := NumberField(x^4-420*x^2+40000);
> E := EquationOrder(K);
> O := Round2(E, K);
[ <2, 18>, <5, 8>, <41, 2> ]
index is 2
index is 4
index is 8
index is 4
index is 2
index is 1
index is 5
index is 25
index is 1
index is 1
index of equation order in maximal order is: 64000
> L := LLL(O);
> O;
Transformation of E
Transformation Matrix:
[800 0 0 400]
[ 0 400 200 180]
[ 0 0 20 0]
[ 0 0 0 1]
Denominator: 800
> O:Maximal;
F[1]
|
F[2]
/
/
Q
F [ 1] Given by transformation matrix
F [ 2] x^4 - 420*x^2 + 40000
Index: 64000/1
Signature: [4, 0]
> L;
Transformation of O
Transformation Matrix:
[-1 0 11 6]
[ 0 -1 1 2]
[ 0 0 -2 -1]
[ 0 1 0 -1]
> L:Maximal;
F[1]
|
F[2]
|
F[3]
/
/
Q
F [ 1] Given by transformation matrix
F [ 2] Given by transformation matrix
F [ 3] x^4 - 420*x^2 + 40000
Index: 1/1
Signature: [4, 0]
> Simplify(L):Maximal;
F[1]
|
F[2]
/
/
Q
F [ 1] Given by transformation matrix
F [ 2] x^4 - 420*x^2 + 40000
Index: 64000/1
Signature: [4, 0]
> Simplify(L);
Transformation of E
Transformation Matrix:
[-800 400 8800 4400]
[ 0 -220 0 420]
[ 0 0 -40 -20]
[ 0 1 0 -1]
Denominator: 800
Install the embedding of F in L where the image of the primitive element of F is a. This will be used in coercing from F into L.
Returns the embedding map of F in L if an embedding is known.
> k := NumberField(x^2-2); > l := NumberField(x^2-2);Embed is useful in specifying the embedding of a field in a larger field.
> l!k.1; >> l!k.1; ^ Runtime error in '!': Arguments are not compatible LHS: FldNum RHS: FldNumElt > l eq k; false > Embed(k, l, l.1); > l!k.1; $.1 > Embed(l, k, k.1); > k!l.1; $.1
> l<a> := NumberField(x^3-2); > L<b> := NumberField(x^6+108); > Root(L!2, 3); 1/18*b^4 > Embed(l, L, $1); > L!l.1; 1/18*b^4Another embedding would be
> Roots(PolynomialRing(L)!DefiningPolynomial(l));
[
<1/36*(-b^4 - 18*b), 1>,
<1/36*(-b^4 + 18*b), 1>,
<1/18*b^4, 1>
]
> Embed(l, L, $1[1][1]);
> L!l.1;
1/36*(-b^4 - 18*b)
Given an absolute order O, returns the lattice determined by the real and complex embeddings of O.
The Minkowski vector space V of the absolute field F as a real vector space, with inner product given by the T_2-norm (Length) on F, and by the embedding F -> V.
Precision: RngIntElt Default: 50
For an absolute extension of Q or Z, compute the completion at a prime ideal P which must be either a prime ideal of the maximal order or unramified. The result will be a local field or ring with precision Precision or e*Precision if the ideal is ramified with ramification degree e.The returned map is the canonical injection into the completion. It allows pointwise inverse operations.
The completion of Order(P) at the prime ideal P up to precision prec.
Some information describing an order can be retrieved.
Given an algebraic field F, return the degree [F:G] of F over its ground field G. For an order O it returns the relative degree of O over its ground order.
Given an order O or an algebraic field F, return the absolute degree of O over Z or F over Q.
Given an extension F of Q, return the discriminant of F. This discriminant is defined to be the discriminant of the order of the field of fractions or the equation order of a number field.
The discriminant of any order defined over Z is by definition the discriminant of its basis, where the discriminant of any sequence of elements omega_i from K is defined to be the determinant of the trace matrix of the sequence.
The discriminant of absolute fields and orders is an integer.
The discriminant in a relative extension is the ideal generated by the discriminants of all sequences of elements omega_i from O, where the discriminant of a sequence is defined to be the determinant of its trace matrix. This can only be computed in when the coefficient ring of O is maximal or when O has a power basis.
The discriminant of relative orders is an ideal of the base ring.
Given an order O, return the absolute value of the discriminant of O regarded as an order over Z.
Given an algebraic field K, return the absolute value of the discriminant of K regarded as an extension of Q.
The reduced discriminant of an order O is defined as the maximal elementary divisor (elementary ideal) of the torsion module O^#/O where O^# is the dual module to O with respect to the trace form.For absolute extensions this is the largest entry of the Smith normal form of the TraceMatrix. For relative extensions, in addition to the TraceMatrix one has to consider the coefficient ideals.
For orders with a power basis, this is (a generator of) the inverse of the ideal generated by the cofactors X and Y of Xf + Yf'=1 where f is the defining polynomial of the order and f' its first derivative.
Current: BoolElt Default: false
Given a number field K or an order O, return the regulator of K or O, as a real number. Note that this will trigger the computation of the maximal order and its unit group if they are not known yet. This only works in an absolute extension.If Current is true and a maximal system of independent units is known, then the regulator of that system is returned. In this case no effort is spent to produce a system of fundamental units.
Given an order O or number field K, return a lower bound on the regulator of O or K. This only works in an absolute extension.
Given an absolute algebraic field F, or an order O of F, returns two integers, being the number of real embeddings and the number of pairs of complex embeddings of F.
The unit rank (one less than the number of real embeddings plus number of pairs of complex embeddings)
The index of order S in order O, for orders S subset O. O and S must have the same equation order and S must be a suborder of O.
Given a algebraic field F, the polynomial defining F as an extension of its ground field G is returned. For an order O, a integral polynomial is returned that defines O over its coefficient ring.For non simple extensions, this will return a list of polynomials.
Given an absolute algebraic field F or an order in F, and an integer n, return the zeroes of the defining polynomial of F with a precision of exactly n decimal digits. The function returns a sequence of length the degree of F; all of the real zeroes appear before the complex zeroes.
If n is omitted, the zeros are returned with the default precision.
> L := NumberField(x^6+108); > DefiningPolynomial(L); x^6 + 108 > Zeros(L, 30); [ 1.8898815748423097472937989826999999999 + 1.0911236359717214032408541534999999999*i, 1.8898815748423097472937989826999999999 - 1.0911236359717214032408541534999999999*i, -1.8898815748423097475106394171999999999 + 1.0911236359717214035661148052999999999*i, -1.8898815748423097475106394171999999999 - 1.0911236359717214035661148052999999999*i, 0.E-38 + 2.1822472719434428071322296104999999999*i, 0.E-38 - 2.1822472719434428071322296104999999999*i ] > l := NumberField(x^3 - 2); > DefiningPolynomial(l); x^3 - 2 > Zeros(l, 30); [ 1.2599210498948731646456922205999999999, -0.62996052494743658221442589306703999999 + 1.0911236359717214018313913292999999999*i, -0.62996052494743658221442589306703999999 - 1.0911236359717214018313913292999999999*i ]
The different of a maximal order O is defined as { x in O | Tr(xO) subset O}.
The conductor of an order O is the largest ideal of its maximal order that is still contained in O: { x in M | xM subseteq O}.
The basis of an order or algebraic field can be expressed using elements from any compatible ring. Basis related matrices can be formed.
Return the current basis for the order O or algebraic field F over its ground ring as a sequence of elements of its field of fractions or as a sequence of elements of R.
An integral basis for the algebraic field F is returned as a sequence of elements of F or R if given. This is the same as the basis for the maximal order. Note that the maximal order will be determined (and stored) if necessary.
> f := x^5 + 5*x^4 - 75*x^3 + 250*x^2 + 65625;
> M := MaximalOrder(f);
> M;
Maximal Order of Equation Order with defining polynomial x^5 + 5*x^4 - 75*x^3 +
250*x^2 + 65625 over its ground order
> Basis(M);
[
M.1,
M.2,
M.3,
M.4,
M.5
]
> Basis(NumberField(M));
[
1,
$.1,
$.1^2,
$.1^3,
$.1^4
]
> Basis(M, NumberField(M));
[
1,
1/5*$.1,
1/25*$.1^2,
1/125*$.1^3,
1/625*$.1^4
]
Returns an absolute basis for K, i.e. a basis for K as a Q vector space. The basis will consist of the products of the basis elements of the intermediate fields. The expansion is done depth-first.
Given an order O in a number field K of degree n, this returns an n x n matrix whose i-th row contains the (rational) coefficients for the i-th basis element of O with respect to the power basis of K. Thus, if b_i is the i-th basis element of O, b_i=sum_(j=1)^(n)M_(ij)alpha^(j - 1) where M is the matrix and alpha is the generator of K.The matrix is the same as TransformationMatrix(O, E), where E is the equation order for K, except that the entries of the basis matrix are from the subfield of K, instead of the coefficient ring of the order.
Returns the transformation matrix for the transformation between the orders O and P with common equation order of degree n. The function returns an n x n matrix T with integral entries as well as a common integer denominator. The rows of the matrix express the n basis elements of O as a linear combination of the basis elements of P. Hence the effect of multiplying T on the left by a row vector v containing the basis coefficients of an element of O is the row vector v.T expressing the same element of the common number field on the basis for P.
The functions Basis and IntegralBasis both return a sequence of elements, that can be accessed using the operators for enumerated sequences. Note that if, as in our example, O is the maximal order of K, both functions produce the same output:
> R<x> := PolynomialRing(Integers());
> f := x^4 - 420*x^2 + 40000;
> K<y> := NumberField(f);
> O := MaximalOrder(K);
> I := IntegralBasis(K);
> B := Basis(O);
> I, B;
[
1,
1/2*y,
1/40*(y^2 + 10*y),
1/800*(y^3 + 180*y + 400)
]
[
O.1,
O.2,
O.3,
O.4
]
> Basis(O, K);
[
1,
1/2*y,
1/40*(y^2 + 10*y),
1/800*(y^3 + 180*y + 400)
]
The BasisMatrix function makes it possible to move between orders, in
the following manner. We may regard orders as free Z-modules of rank
the degree of the number field. The basis matrix then provides the
transformation between the order and the equation order. The function
ElementToSequence can be used to create module elements.
> BM := BasisMatrix(O); > Mod := RSpace(RationalField(), Degree(K)); > z := O ! y; > e := z^2-3*z; > em := Mod ! ElementToSequence(e); > em; ( 0 -26 40 0) > f := em*BM; > f; ( 0 -3 1 0)So, since f is represented with respect to the basis of the equation order, which is the power basis, we indeed get the original element back. Of course it is much more useful to go in the other direction, using the inverse transformation. We check the result in the last line:
> E := EquationOrder(K); > f := y^3+7; > fm := Mod ! ElementToSequence(f); > e := fm*BM^-1; > e; (-393 -360 0 800) > &+[e[i]*B[i] : i in [1 .. Degree(K)] ]; -393/1*O.1 - 360/1*O.2 + 800/1*O.4 > K!$1; y^3 + 7
Given an order O of some number field K of degree n, return the multiplication table with respect to the basis of O as a sequence of n matrices of size n x n. The i-th matrix will have as its j-th row the basis representation of b_ib_j, where b_i is the i-th basis element for O.
Return the trace matrix of an order O, which has the trace Tr(omega_i x omega_j) as its i, j-th entry where the omega_i are the basis for O.
The multiplication table of the order O consists of 4 matrices, such that the i-th 4 x 4 matrix (1 <= i <= 4) determines the multiplication by the i-th basis element of O as a linear transformation with respect to that basis. Thus the third row of T[2] gives the basis coefficients for the product of B[2] and B[3], and we can use the sequence reduction operator to calculate B[2] * B[3] in an alternative way:
> R<x> := PolynomialRing(Integers()); > f := x^4 - 420*x^2 + 40000; > K<y> := NumberField(f); > O := MaximalOrder(K); > B := Basis(O); > B[2]; O.2 > T := MultiplicationTable(O); > T[2]; [ 0 1 0 0] [ 0 -5 10 0] [ -5 -7 5 10] [-25 -7 15 0] > &+[ T[2][3][i]*B[i] : i in [1..4] ]; -5/1*O.1 - 7/1*O.2 + 5/1*O.3 + 10/1*O.4 > B[2]*B[3]; -5/1*O.1 - 7/1*O.2 + 5/1*O.3 + 10/1*O.4The trace matrix may be found either by using the built-in function or by the one-line definition given below (for a field of degree 4):
> TraceMatrix(O); [ 4 0 21 2] [ 0 210 105 215] [ 21 105 173 118] [ 2 215 118 226] > MatrixRing(RationalField(), 4) ! [Trace(B[i]*B[j]): i, j in [1..4] ]; [ 4 0 21 2] [ 0 210 105 215] [ 21 105 173 118] [ 2 215 118 226]
Orders and algebraic fields can be tested for having several properties that may hold for general rings.
Two orders are equal if the transformation matrix taking one to the other is integral and has determinant 1 or -1. For the transformation matrix to exist the orders must have the same number field.
Returns true if and only if the fields F and L, are the same.No two algebraic fields which have been created independently of each other will be considered equal since it is possible that they can be embedded into a larger field in more than one way.
This is not a check for euclidean number fields. This function will always return an error.
Checks if the field is defined as a simple extension over the base ring.
Always true for fields.
Always false for orders. Even if the class number is 1, orders are not considered as PIDs.
Since orders are rings with additional properties, special predicates are applicable.
This returns true if the basis of the order O is an integral power basis, false otherwise.
This returns true if the order O in the field F is the maximal order of F, false otherwise. The user is warned that this may trigger the computation of the maximal order.
Returns true iff the order O is a constructed as an absolute extension of Z.
Returns true iff the order O is wildly ramified, i.e. if there is a prime ideal P of O such that the characteristic of its residue class field divides its ramification index.
Returns true iff the order O is not wildly ramified, i.e. if for all prime ideals P of O the characteristic of its residue class field does not divide the ramification index.
Returns true iff the order O is unramified at the finite places.
Here all the predicates that are specific to algebraic fields are listed.
Given two algebraic fields F and L, this returns true as well as an isomorphism F -> L, if F and L are isomorphic, and it returns false otherwise.
Given two algebraic fields F and L, this returns true as well as an embedding F hookrightarrow L, if F is a subfield of L, and it returns false otherwise.
Returns true if and only if the field F is a normal extension of Q. At present this may only be applied if F is an absolute extension or simple relative extension. In the relative case the result is obtained via Galois Group computation and therefore restricted up to degree 23.
Returns true if and only if the field F is a normal extension of Q with abelian Galois group. At present this may only be applied if F is an absolute extension or simple relative extension. In the relative case the result is obtained via Galois Group computation and therefore restricted up to degree 23.
Returns true iff the field K is a constructed as an absolute extension of Q.
Returns true iff K is wildly ramified, i.e. if there is a prime ideal P of K (its maximal order) such that the characteristic of its residue class field divides the ramification index.
Returns true iff K is not wildly ramified, i.e. if for all prime ideals P of the maximal order of K, the characteristic of its residue class field does not divide the ramification index.
Returns true iff K is unramified at the finite places.
Several properties of orders can be set to be known and/or to have a given value.
Set the order O to be maximal if b is true or known to be non maximal if b is false.
Set the torsion unit of O to be e with rank r.
Mark that the units of O are fundamental.[Next][Prev] [Right] [Left] [Up] [Index] [Root]