The only number fields that GAP3 can handle at the moment are subfields of cyclotomic fields, e.g., Q(√5) is a number field that is not cyclotomic but contained in the cyclotomic field Q5 = Q(e(2π i)/(5)). Although this means that GAP3 does not know arbitrary algebraic number fields but only those with abelian Galois group, here we call these fields number fields for short. The elements of number fields are called cyclotomics (see chapter Cyclotomics). Thus number fields are the domains (see chapter Domains) related to cyclotomics; they are special field records (see Field Records) which are needed to specify the field extension with respect to which e.g. the trace of a cyclotomic shall be computed.
In many situations cyclotomic fields need not be treated in a special
way, except that there may be more efficient algorithms for them than
for arbitrary number fields. For that, there are the global variables
NumberFieldOps
and CyclotomicFieldOps
, both records which contain
the field operations stored in FieldOps
(see chapter Fields) and
in which some functions are overlaid (see Domain Functions for Number
Fields). If all necessary information about a function is already
given in chapter Fields, this function is not described here; this
is the case e.g. for Conjugates
and related functions, like Trace
and CharPol
. Some functions, however, need further explanation,
e.g., Coefficients for Number Fields tells more about Coefficients
for number fields.
There are some functions which are different for cyclotomic fields and
other number fields, e.g., the field constructors CF
resp. NF
. In
such a situation, the special case is described in a section immediately
following the section about the general case.
Besides the single number fields, there is another domain in GAP3
related to number fields, the domain Cyclotomics
of all cyclotomics.
Although this is an abstract field, namely the field Qab,
Cyclotomics
is not a field record. It is used by DefaultField
,
DefaultRing
, Domain
, Field
and Ring
(see DefaultField,
DefaultRing, Domain, Field, Ring) which are mainly interested in
the corresponding entries of Cyclotomics.operations
since these
functions know how to create fields resp. integral rings generated by
some cyclotomics.
The external functions are in the file LIBNAME/"numfield.g"
IsNumberField( obj )
returns true
if obj is a field record (see IsField, Field
Records) of a field of characteristic zero where F.generators
is a
list of cyclotomics (see chapter Cyclotomics), and false
else.
gap> IsNumberField( CF(9) ); IsNumberField( NF( [ ER(3) ] ) ); true true gap> IsNumberField( GF( 2 ) ); false
IsCyclotomicField( obj )
returns true
if obj is a number field record (see IsNumberField)
where obj.isCyclotomicField = true
, and false
else.
gap> IsCyclotomicField( CF(9) ); true gap> IsCyclotomicField( NF( [ ER(-3) ] ) ); true gap> IsCyclotomicField( NF( [ ER(3) ] ) ); false
NumberField( gens )
NumberField( n, stab )
NumberField( subfield, poly )
NumberField( subfield, base )
NumberField
may be abbreviated NF
; it returns number fields, namely
NumberField( gens )
:
the number field generated by the cyclotomics in the list gens,
NumberField( n, stab )
:
the fixed field of the prime residues in the list stab inside the
cyclotomic field Qn (see Cyclotomic Field Records),
NumberField( subfield, poly )
:
the splitting field of the polynomial poly (which must have degree
at most 2) over the number field subfield; subfield = 0
is equivalent to subfield = Rationals
,
NumberField( subfield, base )
:
the extension field of the number field subfield which is
as vector space generated by the elements of the list base of
cyclotomics; that means, base must be or at least contain a vector
space base of this extension, if base is a base it will be
assigned to the base
field of the cyclotomic field
(see Coefficients for Number Fields).
subfield = 0
is equivalent to subfield = Rationals
.
gap> NF( [ EB(7), ER(3) ] ); NF(84,[ 1, 11, 23, 25, 37, 71 ]) gap> NF( 7, [ 1 ] ); CF(7) gap> NF( NF( [ EB(7) ] ), [ 1, 1, 1 ] ); NF(NF(7,[ 1, 2, 4 ]),[ 1, E(3) ]) gap> F:= NF( 0, [ 1, E(4) ] ); G:= NF( 0, NormalBaseNumberField( F ) ); GaussianRationals CF( Rationals,[ 1/2-1/2*E(4), 1/2+1/2*E(4) ]) gap> G.base; G.basechangemat; Coefficients( G, 1 ); [ 1/2-1/2*E(4), 1/2+1/2*E(4) ] [ [ 1, 1 ], [ -1, 1 ] ] [ 1, 1 ]
Number field records are field records (see Field Records) representing a number field. Besides the obligatory record components, a number field record F contains the component
stabilizer
:NofCyc( F.generators )
which
fix all elements of F
and possibly
isIntegralBase
:true
if F.base
is an integral vector space base of the field
extension F / F.field
, false
else (used by Ring Ring
);
for the case that F.field
is a cyclotomic field,
Integral Bases for Number Fields describes integral bases of the
field extension;
isNormalBase
:true
if F.base
is a normal vector space base of the field
extension F/F.field
, false
else;
coeffslist
:Coefficients
; (see also
Coefficients for Number Fields);
coeffsmat
:Coefficients
;
bound only if F.field
is not a cyclotomic field
(see also Coefficients for Number Fields);
basechangemat
:F.dimension
, representing the
basechange from the default base of F / F.field
(see Coefficients for Number Fields) to the base stored
in F.base
if these two are different; used by Coefficients
.
Note: These fields and also the field base
should not be changed by
hand!
CyclotomicField( n )
CyclotomicField( gens )
CyclotomicField( subfield, n )
CyclotomicField( subfield, base )
CyclotomicField
may be abbreviated CF
; it returns cyclotomic fields,
namely
CyclotomicField( n )
:
CyclotomicField( gens )
:
CyclotomicField( subfield, n )
:
CyclotomicField( subfield, base )
:base
field of the cyclotomic field
(see Coefficients for Number Fields).
subfield = 0
is equivalent to subfield = Rationals
.
gap> CF( 5 ); CF( [ EB(7), ER(3) ] ); CF( NF( [ ER(3) ] ), 24 ); CF(5) CF(84) CF(24)/NF(12,[ 1, 11 ]) gap> CF( CF(3), [ 1, E(4) ] ); CF(12)/CF(3)
A cyclotomic field record is a field record (see Field Records), in particular a number field record (see Number Field Records) that represents a cyclotomic field. Besides the obligatory record fields, a cyclotomic field record F contains the fields
isCyclotomicField
:true
; used by IsCyclotomicField IsCyclotomicField
,
zumbroichbase
:ZumbroichBase( n, m )
(see ZumbroichBase)
if F represents the
field extension Qn/Qm, and containing Zumbroichbase( n, 1 )
if F is an extension of a number field that is not cyclotomic;
used by Coefficients Coefficients
, see Coefficients for Number
Fields
and possibly optional fields of number fields (see Number Field Records).
15.5 DefaultField and Field for Cyclotomics
For a set S of cyclotomics,
DefaultField( S ) = CF( S )
is the smallest cylotomic field
containing S (see DefaultField), the so--called conductor of S;
Field( S ) = NF( S )
is the smallest field containing S (see
Field).
gap> DefaultField( [ E(5) ] ); DefaultField( [ E(3), ER(6) ] ); CF(5) CF(24) gap> Field( [ E(5) ] ); Field( [ E(3), ER(6) ] ); CF(5) NF(24,[ 1, 19 ])
DefaultField
and Field
are used by functions that specify the field
for which some cyclotomics are regarded as elements (see DefaultField,
Field), e.g., Trace
with only one argument will compute the trace of
this argument (which must be a cyclotomic) with respect to its default
field.
15.6 DefaultRing and Ring for Cyclotomic Integers
For a set S of cyclotomic integers,
DefaultRing( S )
is the ring of integers in CF( S )
(see DefaultRing),
Ring( S )
is the ring of integers in NF( S )
(see Ring).
gap> Ring( [ E(5) ] ); Ring( E(5) ) gap> Ring( [ EB(7) ] ); Ring( E(7)+E(7)^2+E(7)^4 ) gap> DefaultRing( [ EB(7) ] ); Ring( E(7) )
GeneratorsPrimeResidues( n )
returns a record with fields
primes
:
exponents
:
generators
:
gap> GeneratorsPrimeResidues( 9 ); # 2 is a primitive root rec( primes := [ 3 ], exponents := [ 2 ], generators := [ 2 ] ) gap> GeneratorsPrimeResidues( 24 ); # 8 divides 24 rec( primes := [ 2, 3 ], exponents := [ 3, 1 ], generators := [ [ 7, 13 ], 17 ] ) gap> GeneratorsPrimeResidues( 1155 ); rec( primes := [ 3, 5, 7, 11 ], exponents := [ 1, 1, 1, 1 ], generators := [ 386, 232, 661, 211 ] )
15.8 GaloisGroup for Number Fields
The Galois automorphisms of the cyclotomic field Qn are given by
linear extension of the maps * k: en → enk with
1 ≤ k < n and Gcd( n, k ) = 1
(see GaloisCyc).
Note that this action is not equal to exponentiation of cyclotomics,
i.e., in general z* k is different from zk:
gap> ( E(5) + E(5)^4 )^2; GaloisCyc( E(5) + E(5)^4, 2 ); -2*E(5)-E(5)^2-E(5)^3-2*E(5)^4 E(5)^2+E(5)^3
For Gcd( n, k ) ≠ 1
, the map en → enk is not a
field automorphism but only a linear map:
gap> GaloisCyc( E(5)+E(5)^4, 5 ); GaloisCyc( ( E(5)+E(5)^4 )^2, 5 ); 2 -6
The Galois group Gal( Qn, Q ) of the field extension Qn/Q is isomorphic to the group (Z/nZ)* of prime residues modulo n, via the isomorphism
| , |
thus the Galois group of the field extension Qn / L with
L ⊆ Qn which is simply the factor group of Gal( Qn, Q )
modulo the stabilizer of L, and the Galois group of L/L′
which is the subgroup in this group that stabilizes L′, are
easily described in terms of (Z/nZ)* (Generators of
(Z/nZ)* can be computed using GeneratorsPrimeResidues
GeneratorsPrimeResidues
.).
The Galois group of a field extension can be computed using GaloisGroup
GaloisGroup
:
gap> f:= NF( [ EY(48) ] ); NF(48,[ 1, 47 ]) gap> g:= GaloisGroup( f ); Group( NFAutomorphism( NF(48,[ 1, 47 ]) , 17 ), NFAutomorphism( NF(48, [ 1, 47 ]) , 11 ), NFAutomorphism( NF(48,[ 1, 47 ]) , 17 ) ) gap> Size( g ); IsCyclic( g ); IsAbelian( g ); 8 false true gap> f.base[1]; g.1; f.base[1] ^ g.1; E(24)-E(24)^11 NFAutomorphism( NF(48,[ 1, 47 ]) , 17 ) E(24)^17-E(24)^19 gap> Operation( g, NormalBaseNumberField( f ), OnPoints ); Group( (1,6)(2,4)(3,8)(5,7), (1,4,8,5)(2,3,7,6), (1,6)(2,4)(3,8) (5,7) )
The number field automorphism NFAutomorphism( F, k )
maps each
element x of F to GaloisCyc( x, k )
, see GaloisCyc.
ZumbroichBase( n, m )
returns the set of exponents i where eni belongs to the base {B}n,m of the field extension Qn/Qm; for that, n and m must be positive integers where m divides n.
{B}n,m is defined as follows:
Let P denote the set of prime divisors of n, n = ∏p∈ P pνp, m = ∏p∈ P pμp with μp ≤ νp, and { en1j}j∈ J ⊗ { en2k}k∈ K = { en1j . en2k}j∈ J, k∈ K.
Then
{B}n,m = ⊗p∈ P ⊗k=μpνp-1 { epk+1j}j∈ Jk,p \rm where Jk,p = { |
| . . |
{B}n,1 is equal to the base {B}(Qn) of Qn over the rationals given in Zum89 (Note that the notation here is slightly different from that there.).
{B}n,m consists of roots of unity, it is an integral base (that is, the integral elements in Qn have integral coefficients, see Cyclotomic Integers), it is a normal base for squarefree n and closed under complex conjugation for odd n.
gap> ZumbroichBase( 15, 1 ); ZumbroichBase( 12, 3 ); [ 1, 2, 4, 7, 8, 11, 13, 14 ] [ 0, 3 ] gap> ZumbroichBase( 10, 2 ); ZumbroichBase( 32, 4 ); [ 2, 4, 6, 8 ] [ 0, 1, 2, 3, 4, 5, 6, 7 ]
15.10 Integral Bases for Number Fields
LenstraBase( n, stabilizer, super )
returns a list [
b1, b2, ..., bm ]
of lists, each bi
consisting of integers such that the elements ∑j∈ bi E(n)
j
form an integral base of the number field NF( n, stabilizer )
,
see Number Field Records.
super is a list representing a supergroup of the group described by the list stabilizer; the base is chosen such that the group of super acts on it, as far as this is possible.
Note:
The bi are in general not sets, since for stabilizer = super
,
bi[1] is always an element of ZumbroichBase( N, 1 )
; this is used
by NF
(see Number Field Records) and Coefficients
(see
Coefficients for Number Fields).
stabilizer must not contain the stabilizer of a proper cyclotomic subfield of Qn.
gap> LenstraBase( 24, [ 1, 19 ], [ 1, 19 ] ); # a base of [ [ 1, 19 ], [ 8 ], [ 11, 17 ], [ 16 ] ] # Q3(√6), gap> LenstraBase( 24, [ 1, 19 ], [ 1, 5, 19, 23 ] ); # another one [ [ 1, 19 ], [ 5, 23 ], [ 8 ], [ 16 ] ] gap> LenstraBase( 15, [ 1, 4 ], PrimeResidues( 15 ) ); # normal base of [ [ 1, 4 ], [ 2, 8 ], [ 7, 13 ], [ 11, 14 ] ] # Q3(√5)
NormalBaseNumberField( F )
NormalBaseNumberField( F, x )
returns a list of cyclotomics which form a normal base of the number
field F (see Number Field Records), i.e. a vector space base of the
field F over its subfield F.field
which is closed under the action
of the Galois group F.galoisGroup
of the field extension.
The normal base is computed as described in Art68: Let Φ denote the polynomial of a field extension L/L′, Φ′ its derivative and α one of its roots; then for all except finitely many elements z∈ L′, the conjugates of (Φ(z))/((z-α).Φ′(α)) form a normal base of L/L′.
When NormalBaseNumberField( F )
is called, z is chosen as integer,
starting with 1, NormalBaseNumberField( F, x )
starts with z=x,
increasing by one, until a normal base is found.
gap> NormalBaseNumberField( CF( 5 ) ); [ -E(5), -E(5)^2, -E(5)^3, -E(5)^4 ] gap> NormalBaseNumberField( CF( 8 ) ); [ 1/4-2*E(8)-E(8)^2-1/2*E(8)^3, 1/4-1/2*E(8)+E(8)^2-2*E(8)^3, 1/4+2*E(8)-E(8)^2+1/2*E(8)^3, 1/4+1/2*E(8)+E(8)^2+2*E(8)^3 ]
15.12 Coefficients for Number Fields
Coefficients( z )
Coefficients( F, z )
return the coefficient vector cfs of z with respect to a particular
base B, i.e., we have z = cfs * B
. If z is the only
argument, B is the default base of the default field of z
(see DefaultField and Field for Cyclotomics), otherwise F must be a
number field containing z, and we have B = F.base
.
The default base of a number field is defined as follows:
For the field extension Qn/Qm (i.e. both F and F.field
are
cyclotomic fields), B is the base {B}n,m described in
ZumbroichBase. This is an integral base which is closely related to
the internal representation of cyclotomics, thus the coefficients are
easy to compute, using only the zumbroichbase
fields of F and
F.field
.
For the field extension L/Q where L is not a cyclotomic field, B is
the integral base described in Integral Bases for Number Fields that
consists of orbitsums on roots of unity. The computation of coefficients
requires the field F.coeffslist
.
in future: replace Q by Qm
In all other cases, B = NormalBaseNumberField( F )
. Here, the
coefficients of z with respect to B are computed using
F.coeffslist
and F.coeffsmat
.
If F.base
is not the default base of F, the coefficients with
respect to the default base are multiplied with F.basechangemat
.
The only possibility where it is allowed to prescribe a base is when the
field is constructed (see Number Field Records, Cyclotomic Field
Records).
gap> F:= NF( [ ER(3), EB(7) ] ) / NF( [ ER(3) ] ); NF(84,[ 1, 11, 23, 25, 37, 71 ])/NF(12,[ 1, 11 ]) gap> Coefficients( F, ER(3) ); Coefficients( F, EB(7) ); [ -E(12)^7+E(12)^11, -E(12)^7+E(12)^11 ] [ 11*E(12)^4+7*E(12)^7+11*E(12)^8-7*E(12)^11, -10*E(12)^4-7*E(12)^7-10*E(12)^8+7*E(12)^11 ] gap> G:= CF( 8 ); H:= CF( 0, NormalBaseNumberField( G ) ); CF(8) CF( 0,[ 1/4-2*E(8)-E(8)^2-1/2*E(8)^3, 1/4-1/2*E(8)+E(8)^2-2*E(8)^3, 1/4+2*E(8)-E(8)^2+1/2*E(8)^3, 1/4+1/2*E(8)+E(8)^2+2*E(8)^3 ]) gap> Coefficients( G, ER(2) ); Coefficients( H, ER(2) ); [ 0, 1, 0, -1 ] [ -1/3, 1/3, 1/3, -1/3 ]
15.13 Domain Functions for Number Fields
The following functions of FieldOps
(see chapter Fields) are
overlaid in NumberFieldOps
:
/
, Coefficients
, Conjugates
, GaloisGroup
, in
,
Intersection
, Norm
, Order
, Print
, Random
, Trace
.
The following functions of NumberFieldOps
are overlaid in
CyclotomicFieldOps
:
Coefficients
, Conjugates
, in
, Norm
, Print
, Trace
.
gap3-jm