GAP3 allows computations in abelian extension fields of the rational field Q, i.e., fields with abelian Galois group over Q. These fields are described in chapter Subfields of Cyclotomic Fields. They are subfields of cyclotomic fields Q_{n} = Q(e_{n}) where e_{n} = e^{(2π i)/(n)} is a primitive nth root of unity. Their elements are called cyclotomics.
The internal representation of a cyclotomic does not refer to the smallest number field but the smallest cyclotomic field containing it (the socalled conductor). This is because it is easy to embed two cyclotomic fields in a larger one that contains both, i.e., there is a natural way to get the sum or the product of two arbitrary cyclotomics as element of a cyclotomic field. The disadvantage is that the arithmetical operations are too expensive to do arithmetics in number fields, e.g., calculations in a matrix ring over a number field. But it suffices to deal with irrationalities in character tables (see Character Tables). (And in fact, the comfortability of working with the natural embeddings is used there in many situations which did not actually afford it ...)
All functions that take a field extension as possibly optional
argument, e.g., Trace
or Coefficients
(see chapter Fields), are
described in chapter Subfields of Cyclotomic Fields.
The external functions are in the file LIBNAME/"cyclotom.g"
.
Elements of number fields (see chapter Subfields of Cyclotomic Fields), cyclotomics for short, are arithmetical objects like rationals and finite field elements; they are not implemented as records like groups or e.g. with respect to a character table (although character tables may be the main interest for cyclotomic arithmetics).
E( n )
returns the primitive nth root of unity e_{n} = e^{(2π i)/(n)}. Cyclotomics are usually entered as (and irrational cyclotomics are always displayed as) sums of roots of unity with rational coefficients. (For special cyclotomics, see ATLAS irrationalities.)
gap> E(9); E(9)^3; E(6); E(12) / 3; E(9)^4E(9)^7 # the root needs not to be an element of the base E(3) E(3)^2 1/3*E(12)^7
For the representation of cyclotomics one has to recall that the cyclotomic field Q_{n} = Q(e_{n}) is a vector space of dimension φ(n) over the rationals where φ denotes Euler's phifunction (see Phi).
Note that the set of all nth roots of unity is linearly dependent for n > 1, so multiplication is not the multiplication of the group ring Q⟨ e_{n} ⟩; given a Qbasis of Q_{n} the result of the multiplication (computed as multiplication of polynomials in e_{n}, using (e_{n})^{n} = 1) will be converted to the base.
gap> E(5) * E(5)^2; ( E(5) + E(5)^4 ) * E(5)^2; E(5)^3 E(5)+E(5)^3 gap> ( E(5) + E(5)^4 ) * E(5); E(5)E(5)^3E(5)^4
Cyclotomics are always represented in the smallest cyclotomic field they are contained in. Together with the choice of a fixed base this means that two cyclotomics are equal if and only if they are equally represented.
Addition and multiplication of two cyclotomics represented in Q_{n} and Q_{m}, respectively, is computed in the smallest cyclotomic field containing both: Q_{Lcm(n,m)}. Conversely, if the result is contained in a smaller cyclotomic field the representation is reduced to the minimal such field.
The base, the base conversion and the reduction to the minimal cyclotomic field are described in Zum89, more about the base can be found in ZumbroichBase.
Since n must be a short integer
, the maximal cyclotomic field
implemented in GAP3 is not really the field Q^{ab}. The biggest
allowed (though not very useful) n is 65535.
There is a global variable Cyclotomics
in GAP3, a record that
stands for the domain of all cyclotomics (see chapter Subfields of
Cyclotomic Fields).
A cyclotomic is called integral or cyclotomic integer if all coefficients of its minimal polynomial are integers. Since the base used is an integral base (see ZumbroichBase), the subring of cyclotomic integers in a cyclotomic field is formed by those cyclotomics which have not only rational but integral coefficients in their representation as sums of roots of unity. For example, square roots of integers are cyclotomic integers (see ATLAS irrationalities), any root of unity is a cyclotomic integer, character values are always cyclotomic integers, but all rationals which are not integers are not cyclotomic integers. (See IsCycInt)
gap> ER( 5 ); # The square root of 5 is a cyclotomic E(5)E(5)^2E(5)^3+E(5)^4 # integer, it has integral coefficients. gap> 1/2 * ER( 5 ); # This is not a cyclotomic integer, ... 1/2*E(5)1/2*E(5)^21/2*E(5)^3+1/2*E(5)^4 gap> 1/2 * ER( 5 )  1/2; # ... but this is one. E(5)+E(5)^4
IntCyc( z )
returns the cyclotomic integer (see Cyclotomic Integers) with
Zumbroich base coefficients (see ZumbroichBase) List( zumb, x >
Int( x ) )
where zumb is the vector of Zumbroich base coefficients
of the cyclotomic z; see also RoundCyc.
gap> IntCyc( E(5)+1/2*E(5)^2 ); IntCyc( 2/3*E(7)+3/2*E(4) ); E(5) E(4)
RoundCyc( z )
returns the cyclotomic integer (see Cyclotomic Integers) with
Zumbroich base coefficients (see ZumbroichBase) List( zumb, x >
Int( x+1/2 ) )
where zumb is the vector of Zumbroich base
coefficients of the cyclotomic z; see also IntCyc.
gap> RoundCyc( E(5)+1/2*E(5)^2 ); RoundCyc( 2/3*E(7)+3/2*E(4) ); E(5)+E(5)^2 2*E(28)^3+E(28)^42*E(28)^112*E(28)^152*E(28)^192*E(28)^23 2*E(28)^27
IsCyc( obj )
returns true
if obj is a cyclotomic, and false
otherwise. Will
signal an error if obj is an unbound variable.
gap> IsCyc( 0 ); IsCyc( E(3) ); IsCyc( 1/2 * E(3) ); IsCyc( IsCyc ); true true true false
IsCyc
is an internal function.
IsCycInt( obj )
returns true
if obj is a cyclotomic integer (see Cyclotomic
Integers), false
otherwise. Will signal an error if obj is an
unbound variable.
gap> IsCycInt( 0 ); IsCycInt( E(3) ); IsCycInt( 1/2 * E(3) ); true true false
IsCycInt
is an internal function.
NofCyc( z )
NofCyc( list )
returns the smallest positive integer n for which the cyclotomic z
is resp. for which all cyclotomics in the list list are contained
in Q_{n} = Q( e^{(2 π i)/(n)} ) = Q( E(n)
).
gap> NofCyc( 0 ); NofCyc( E(10) ); NofCyc( E(12) ); 1 5 12
NofCyc
is an internal function.
CoeffsCyc( z, n )
If z is a cyclotomic which is contained in Q_{n}, CoeffsCyc( z,
n )
returns a list cfs of length n where the entry at position
i is the coefficient of E(n)
^{i1} in the internal
representation of z as element of the cyclotomic field Q_{n} (see
More about Cyclotomics, ZumbroichBase):
<z> = cfs[1] + cfs[2] E(n)
^{1} + ... + cfs[n]
E(n)
^{n1}.
Note that all positions which do not belong to base elements of Q_{n} contain zeroes.
gap> CoeffsCyc( E(5), 5 ); CoeffsCyc( E(5), 15 ); [ 0, 1, 0, 0, 0 ] [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0 ] gap> CoeffsCyc( 1+E(3), 9 ); CoeffsCyc( E(5), 7 ); [ 0, 0, 0, 0, 0, 0, 1, 0, 0 ] Error, no representation of <z> in 7th roots of unity
CoeffsCyc
calls the internal function COEFFSCYC
:
COEFFSCYC( z )
is equivalent to CoeffsCyc( z, NofCyc( z ) )
, see NofCyc.
To compare cyclotomics, the operators <
, <=
, =
, >=
, >
and
<>
can be used, the result will be true
if the first operand is
smaller, smaller or equal, equal, larger or equal, larger, or inequal,
respectively, and false
otherwise.
Cyclotomics are ordered as follows:
The relation between rationals is as usual, and rationals are smaller
than irrational cyclotomics. For two irrational cyclotomics z1, z2
which lie in different minimal cyclotomic fields, we have <z1> <
z2 if and only if NofCyc(z1)
< NofCyc(z2)
); if
NofCyc(z1)
= NofCyc(z2)
), that one is smaller that has the
smaller coefficient vector, i.e., <z1> ≤ z2 if and only if
COEFFSCYC(z1)
≤ COEFFSCYC(z2)
.
You can compare cyclotomics with objects of other types; all objects which are not cyclotomics are larger than cyclotomics.
gap> E(5) < E(6); # the latter value lies in Q_{3} false gap> E(3) < E(3)^2; # both lie in Q_{3}, so compare coefficients false gap> 3 < E(3); E(5) < E(7); true true gap> E(728) < (1,2); true
The operators +
, 
, *
, /
are used for addition, subtraction,
multiplication and division of two cyclotomics; note that division by
0 causes an error.
+
and 
can also be used as unary operators;
^
is used for exponentiation of a cyclotomic with an integer;
this is in general not equal to Galois conjugation.
gap> E(5) + E(3); (E(5) + E(5)^4) ^ 2; E(5) / E(3); E(5) * E(3); E(15)^22*E(15)^8E(15)^11E(15)^13E(15)^14 2*E(5)E(5)^2E(5)^32*E(5)^4 E(15)^13 E(15)^8
GaloisCyc( z, k )
returns the cyclotomic obtained on raising the roots of unity in the
representation of the cyclotomic z to the kth power. If z is
represented in the field Q_{n} and k is a fixed integer relative
prime to n, GaloisCyc( ., k )
acts as a Galois automorphism of
Q_{n} (see GaloisGroup for Number Fields); to get Galois
automorphisms as functions, use GaloisGroup GaloisGroup
.
gap> GaloisCyc( E(5) + E(5)^4, 2 ); E(5)^2+E(5)^3 gap> GaloisCyc( E(5), 1 ); # the complex conjugate E(5)^4 gap> GaloisCyc( E(5) + E(5)^4, 1 ); # this value is real E(5)+E(5)^4 gap> GaloisCyc( E(15) + E(15)^4, 3 ); E(5)+E(5)^4
GaloisCyc
is an internal function.
EB( N )
, EC( N )
, ..., EH( N )
,
EI( N )
, ER( N )
,
EJ( N )
, EK( N )
, EL( N )
, EM( N )
,
EJ( N, d )
, EK( N, d )
, EL( N, d )
, EM( N, d )
,
ES( N )
, ET( N )
, ..., EY( N )
,
ES( N, d )
, ET( N, d )
, ..., EY( N, d )
,
NK( N, k, d )
For N a positive integer, let z = E(N)
= e^{2 π i / N}. The
following socalled atomic irrationalities (see CCN85, Chapter 7,
Section 10) can be entered by functions (Note that the values
are not necessary irrational.):

(Note that in c_{N}, ..., h_{N}, N must be a prime.)

From a theorem of Gauss we know that
b_{N} = { 
 . , 
so √N can be (and in fact is) computed from b_{N}. If N is a
negative integer then ER(N) = EI(N)
.
For given N, let n_{k} = n_{k}(N) be the first integer with multiplicative order exactly k modulo N, chosen in the order of preference
1, 1, 2, 2, 3, 3, 4, 4, ... . 
We have


Let n_{k}^{(d)} = n_{k}^{(d)}(N) be the d+1th integer with
multiplicative order exactly k modulo N, chosen in the order of
preference defined above; we write
n_{k}=n_{k}^{(0)},n_{k}^{′}=n_{k}^{(1)}, n_{k}'' = n_{k}^{(2)}
and so on. These values can be computed as NK(N,k,d)
=
n_{k}^{(d)}(N); if there is no integer with the required multiplicative
order, NK
will return false
.
The algebraic numbers
y_{N}^{′}=y_{N}^{(1)},y_{N}''=y_{N}^{(2)},..., x_{N}^{′},x_{N}'',..., j_{N}^{′},j_{N}'',... 

gap> EW(16,3); EW(17,2); ER(3); EI(3); EY(5); EB(9); 0 E(17)+E(17)^4+E(17)^13+E(17)^16 E(12)^7+E(12)^11 E(3)E(3)^2 E(5)+E(5)^4 1
StarCyc( z )
If z is an irrational element of a quadratic number field (i.e. if
z is a quadratic irrationality), StarCyc( z )
returns the unique
Galois conjugate of z that is different from z; this is often
called <z>* (see DisplayCharTable). Otherwise false
is
returned.
gap> StarCyc( EB(5) ); StarCyc( E(5) ); E(5)^2+E(5)^3 false
Quadratic( z )
If z is a cyclotomic integer that is contained in a quadratic number
field over the rationals, it can be written as <z> = ( a + b
\sqrtn )/(d) with integers a, b, n and d, where d is
either 1 or 2. In this case Quadratic( z )
returns a record with
fields a
, b
, root
, d
and ATLAS
where the first four mean the
integers mentioned above, and the last one is a string that is a (not
necessarily shortest) representation of z by b_{m}, i_{m} or r_{m}
for m = \root\
(see ATLAS irrationalities).
If z is not a quadratic irrationality or not a cyclotomic integer,
false
is returned.
gap> Quadratic( EB(5) ); Quadratic( EB(27) ); rec( a := 1, b := 1, root := 5, d := 2, ATLAS := "b5" ) rec( a := 1, b := 3, root := 3, d := 2, ATLAS := "1+3b3" ) gap> Quadratic(0); Quadratic( E(5) ); rec( a := 0, b := 0, root := 1, d := 1, ATLAS := "0" ) false
GaloisMat( mat )
mat must be a matrix of cyclotomics (or possibly unknowns, see Unknown). The conjugate of a row in mat under a particular Galois automorphism is defined pointwise. If mat consists of full orbits under this action then the Galois group of its entries acts on mat as a permutation group, otherwise the orbits must be completed before.
GaloisMat( mat )
returns a record with fields mat
, galoisfams
and generators
:
mat
:mat
have identical
entries.
galoisfams
:mat
; its entries are either
1, 0, 1 or lists:galoisfams[i]
= 1 means that mat[i]
consists of rationals, i.e. [ mat[i]
] forms an orbit.galoisfams[i]
=1 means that mat[i]
contains unknowns; in
this case [ mat[i]
] is regarded as an orbit, too, even if
mat[i]
contains irrational entries.galoisfams[i]
= [
l_{1}, l_{2} ] is a list then mat[i]
is the first element of its
orbit in mat
; l_{1} is the list of positions of rows which
form the orbit, and l_{2} is the list of corresponding Galois
automorphisms (as exponents, not as functions); so we have
mat
[ l_{1}[j] ][k] = GaloisCyc
( mat
[i][k], l_{2}[j] ).galoisfams[i]
= 0 means that mat[i]
is an element of a
nontrivial orbit but not the first element of it.
generators
:mat
.
Note that mat should be a set, i.e. no two rows should be equal. Otherwise only the first row of some equal rows is considered for the permutations, and a warning is printed.
gap> GaloisMat( [ [ E(3), E(4) ] ] ); rec( mat := [ [ E(3), E(4) ], [ E(3), E(4) ], [ E(3)^2, E(4) ], [ E(3)^2, E(4) ] ], galoisfams := [ [ [ 1, 2, 3, 4 ], [ 1, 7, 5, 11 ] ], 0, 0, 0 ], generators := [ (1,2)(3,4), (1,3)(2,4) ] ) gap> GaloisMat( [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ] ] ); rec( mat := [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ], [ 1, E(3)^2, E(3) ] ], galoisfams := [ 1, [ [ 2, 3 ], [ 1, 2 ] ], 0 ], generators := [ (2,3) ] )
RationalizedMat( mat )
returns the set of rationalized rows of mat, i.e. the set of sums over orbits under the action of the Galois group of the elements of mat (see GaloisMat).
This may be viewed as a kind of trace operation for the rows.
Note that mat should be a set, i.e. no two rows should be equal.
gap> mat:= CharTable( "A5" ).irreducibles; [ [ 1, 1, 1, 1, 1 ], [ 3, 1, 0, E(5)E(5)^4, E(5)^2E(5)^3 ], [ 3, 1, 0, E(5)^2E(5)^3, E(5)E(5)^4 ], [ 4, 0, 1, 1, 1 ], [ 5, 1, 1, 0, 0 ] ] gap> RationalizedMat( mat ); [ [ 1, 1, 1, 1, 1 ], [ 6, 2, 0, 1, 1 ], [ 4, 0, 1, 1, 1 ], [ 5, 1, 1, 0, 0 ] ]
gap3jm