In the lists below K always denotes a number field.
Number fields form the Magma category FldNum. The notional power structures exist as parents of algebraic fields with 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.
Each number field has other structures related to it in various ways.
Given a number field F, return the number field over which F was defined. For an absolute number field F, the function returns the rational field Q.
Given a number field F, this returns an isomorphic number field L defined as an absolute extension (i.e. over Q). (For algorithm, see [Tra76])
Given a number field F or an order O, this returns an isomorphic field L defined as an absolute simple extension. (For algorithm, see [Tra76])
Given number fields L and F such that Magma knows that F is a subfield of L, return an isomorphic number field M defined as an extension over F.
Given a number field F return the sequence of number fields each defined by a defining polynomial of 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
Overwrite: BoolElt Default: false
Install the embedding of a simple number field F in L where the image of the primitive element of F is the element a of L. This embedding will be used in coercing from F into L.If the addition of this embedding causes an inconsistency with currently known embeddings then the embedding will not be added unless Overwrite is set to true.
Overwrite: BoolElt Default: false
Install the embedding of the non-simple number field F in L where the image of the generating elements of F are in the sequence a of elements of L. This embedding will be used in coercing from F into L.If the addition of this embedding causes an inconsistency with currently known embeddings then the embedding will not be added unless Overwrite is set to true.
Returns the embedding map of the number field F in L if an embedding is known.
> k := NumberField(x^2-2); > l := NumberField(x^2-2); > 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; l.1 > Embed(l, k, k.1); > k!l.1; k.1Embed is useful in specifying the embedding of a field in a larger field.
> 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] : Overwrite := true); > L!l.1; 1/36*(-b^4 - 18*b)
The Minkowski vector space V of the absolute number field F as a real vector space, with inner product given by the T2-norm (Length) on F, and by the embedding F -> V.
Precision: RngIntElt Default: 20
For an absolute extension K of Q, 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 default precision Precision.The returned map is the canonical injection into the completion. It allows pointwise inverse operations.
Precision: RngIntElt Default: 20
For an absolute extension K over Q and a (finite) place P, compute the completion at P. The precision and the map are as described for Completion.
It is possible to express a number field as a vector space of any subfield using the intrinsics below. Such a construction also allows one to find properties of elements over these subfields.
Returns the associative structure constant algebra which is isomorphic to the number field K as an algebra over J. Also returns the isomorphism from K to the algebra mapping wi to the i + 1st unit vector of the algebra where w is a primitive element of K.If a sequence S is given it is taken to be a basis of K over J and the isomorphism will map the ith element of S to the ith unit vector of the algebra.
The vector space isomorphic to the number field K as a vector space over J and the isomorphism from K to the vector space. The isomorphism maps wi to the i + 1st unit vector of the vector space where w is a primitive element of K.If S is given, the isomorphism will map the ith element of S to the ith unit vector of the vector space.
> K := NumberField([x^2 - 2, x^2 - 3, x^2 - 7]); > J := AbsoluteField(NumberField([x^2 - 2, x^2 - 7])); > A, m := Algebra(K, J); > A; Associative Algebra of dimension 2 with base ring J > m; Mapping from: RngOrd: K to AlgAss: A > m(K.1); (1/10*(J.1^3 - 13*J.1) 0) > m(K.1^2); (2 0) > m(K.2); (1/470*(83*J.1^3 + 125*J.1^2 - 1419*J.1 - 1735) 1/940*(-24*J.1^3 - 5*J.1^2 + 382*J.1 + 295)) > m(K.2^2); (3 0) > m(K.3); (1/10*(-J.1^3 + 23*J.1) 0) > m(K.3^2); (7 0) > A.1 @@ m; 1 > A.2 @@ m; (($.1 - 1)*$.1 - $.1 - 1)*K.1 + ($.1 + 1)*$.1 + $.1 + 1 > > r := 5*K.1 - 8*K.2 + K.3; > m(r); (1/235*(-238*J.1^3 - 500*J.1^2 + 4689*J.1 + 6940) 1/235*(48*J.1^3 + 10*J.1^2 - 764*J.1 - 590)) > MinimalPolynomial($1); $.1^2 + 1/5*(-4*J.1^3 + 42*J.1)*$.1 + 5*J.1^2 - 180 > Evaluate($1, r); 0 > K:Maximal; K | | $1 | | $2 | | Q K : $.1^2 - 2 $1 : $.1^2 - 3 $2 : x^2 - 7 > Parent($3); Univariate Polynomial Ring over J > J; Number Field with defining polynomial $.1^4 - 18*$.1^2 + 25 over the Rational Field
Some information describing a number field can be retrieved.
Given a number field F, return the degree [F:G] of F over its ground field G.
Given a number field F, return the absolute degree of F over Q.
Given an extension F of Q, return the discriminant of F. This discriminant is defined to be the discriminant of the defining polynomial, not as the discriminant of the maximal order.The discriminant in a relative extension F is the ideal in the base ring generated by the discriminant of the defining polynomial.
Given a number field K, return the absolute value of the discriminant of K regarded as an extension of Q.
Given a number field K, return the regulator of K 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.
Given a number field K, return a lower bound on the regulator of O or K. This only works in an absolute extension.
Given an absolute number field F, returns two integers, one being the number of real embeddings, the other the number of pairs of complex embeddings of F.
The unit rank of the number field K (one less than the number of real embeddings plus number of pairs of complex embeddings).
Given a number field F, the polynomial defining F as an extension of its ground field G is returned.For non simple extensions, this will return a list of polynomials.
Given an absolute number field 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.
> L := NumberField(x^6+108); > DefiningPolynomial(L); x^6 + 108 > Zeros(L, 30); [ 1.889881574842309747150815910899999999994 + 1.0911236359717214035600726141999999999977*i, 1.889881574842309747150815910899999999994 - 1.0911236359717214035600726141999999999977*i, 0.E-29 + 2.1822472719434428071201452283999999999955*i, 0.E-29 - 2.1822472719434428071201452283999999999955*i, -1.889881574842309747150815910899999999994 + 1.0911236359717214035600726141999999999977*i, -1.889881574842309747150815910899999999994 - 1.0911236359717214035600726141999999999977*i ] > l := NumberField(x^3 - 2); > DefiningPolynomial(l); x^3 - 2 > Zeros(l, 30); [ 1.259921049894873164767210607299999999994, -0.629960524947436582383605303639109999999 + 1.0911236359717214035600726141999999999977*i, -0.629960524947436582383605303639109999999 - 1.0911236359717214035600726141999999999977*i ]
The basis of a number field can be expressed using elements from any compatible ring.
Return the current basis for the number field F over its ground ring as a sequence of elements of F or as a sequence of elements of R.
An integral basis for the algebraic number 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; > N := NumberField(f); > N; Number Field with defining polynomial x^5 + 5*x^4 - 75*x^3 + 250*x^2 + 65625 over the Rational Field > Basis(N); [ 1, N.1, N.1^2, N.1^3, N.1^4 ] > IntegralBasis(N); [ 1, 1/5*N.1, 1/25*N.1^2, 1/125*N.1^3, 1/625*N.1^4 ] > IntegralBasis(N, MaximalOrder(N)); [ [1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1] ]
Returns an absolute basis for the number field 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.
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) ]
Number fields can be tested for having several properties that may hold for general rings.
Returns true if and only if the number fields F and L are indentical.No two number 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 true, as all number fields are euclidean domains.
Checks if the number field F is defined as a simple extension over the base ring.
Always true for number fields.
This function returns true if there is an automorphism in the number field K that acts like complex conjugation.
For an element x of a number field K where HasComplexConjugate returns true (in particular this includes totally real fields, cyclotomic and quadratic fields and CM-extensions), the conjugate of x is returned.
Here all the predicates that are specific to number fields are listed.
Given two number 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 number fields F and L, this returns true as well as an embedding F -> L, if F is a subfield of L, and it returns false otherwise.
Returns true if and only if the number field F is a normal extension. 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.
Returns true if and only if the number field F is a normal extension 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.
Returns true if and only if the number field F is a normal extension with cyclic 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 and automorphism group.
Returns true iff the number field K is a constructed as an absolute extension of Q.