  
  [1X60 [33X[0;0YAbelian Number Fields[133X[101X
  
  [33X[0;0YAn  [13Xabelian  number field[113X is a field in characteristic zero that is a finite
  dimensional  normal  extension of its prime field such that the Galois group
  is  abelian. In [5XGAP[105X, one implementation of abelian number fields is given by
  fields  of  cyclotomic  numbers  (see  Chapter [14X18[114X). Note that abelian number
  fields  can  also  be  constructed  with the more general [2XAlgebraicExtension[102X
  ([14X67.1-1[114X), a discussion of advantages and disadvantages can be found in [14X18.6[114X.
  The functions described in this chapter have been developed for fields whose
  elements  are  in the filter [2XIsCyclotomic[102X ([14X18.1-3[114X), they may or may not work
  well for abelian number fields consisting of other kinds of elements.[133X
  
  [33X[0;0YThroughout  this  chapter, [22Xℚ_n[122X will denote the cyclotomic field generated by
  the field [22Xℚ[122X of rationals together with [22Xn[122X-th roots of unity.[133X
  
  [33X[0;0YIn [14X60.1[114X,   constructors  for  abelian  number  fields  are  described,  [14X60.2[114X
  introduces  operations for abelian number fields, [14X60.3[114X deals with the vector
  space   structure  of  abelian  number  fields,  and  [14X60.4[114X  describes  field
  automorphisms of abelian number fields,[133X
  
  
  [1X60.1 [33X[0;0YConstruction of Abelian Number Fields[133X[101X
  
  [33X[0;0YBesides   the  usual  construction  using  [2XField[102X  ([14X58.1-3[114X)  or  [2XDefaultField[102X
  ([14X18.1-16[114X)  (see [2XDefaultField[102X ([14X18.1-16[114X)), abelian number fields consisting of
  cyclotomics    can    be   created   with   [2XCyclotomicField[102X   ([14X60.1-1[114X)   and
  [2XAbelianNumberField[102X ([14X60.1-2[114X).[133X
  
  [1X60.1-1 CyclotomicField[101X
  
  [33X[1;0Y[29X[2XCyclotomicField[102X( [[3Xsubfield[103X, ][3Xn[103X ) [32X function[133X
  [33X[1;0Y[29X[2XCyclotomicField[102X( [[3Xsubfield[103X, ][3Xgens[103X ) [32X function[133X
  [33X[1;0Y[29X[2XCF[102X( [[3Xsubfield[103X, ][3Xn[103X ) [32X function[133X
  [33X[1;0Y[29X[2XCF[102X( [[3Xsubfield[103X, ][3Xgens[103X ) [32X function[133X
  
  [33X[0;0YThe  first version creates the [3Xn[103X-th cyclotomic field [22Xℚ_n[122X. The second version
  creates  the  smallest  cyclotomic field containing the elements in the list
  [3Xgens[103X.  In  both  cases  the  field  can  be  generated  as an extension of a
  designated subfield [3Xsubfield[103X (cf. [14X60.3[114X).[133X
  
  [33X[0;0Y[2XCyclotomicField[102X  can  be  abbreviated to [2XCF[102X, this form is used also when [5XGAP[105X
  prints cyclotomic fields.[133X
  
  [33X[0;0YFields  constructed  with  the  one argument version of [2XCF[102X are stored in the
  global  list  [10XCYCLOTOMIC_FIELDS[110X,  so  repeated  calls of [2XCF[102X just fetch these
  field objects after they have been created once.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XCyclotomicField( 5 );  CyclotomicField( [ Sqrt(3) ] );[127X[104X
    [4X[28XCF(5)[128X[104X
    [4X[28XCF(12)[128X[104X
    [4X[25Xgap>[125X [27XCF( CF(3), 12 );  CF( CF(4), [ Sqrt(7) ] );[127X[104X
    [4X[28XAsField( CF(3), CF(12) )[128X[104X
    [4X[28XAsField( GaussianRationals, CF(28) )[128X[104X
  [4X[32X[104X
  
  [1X60.1-2 AbelianNumberField[101X
  
  [33X[1;0Y[29X[2XAbelianNumberField[102X( [3Xn[103X, [3Xstab[103X ) [32X function[133X
  [33X[1;0Y[29X[2XNF[102X( [3Xn[103X, [3Xstab[103X ) [32X function[133X
  
  [33X[0;0YFor  a  positive  integer  [3Xn[103X  and  a  list  [3Xstab[103X of prime residues modulo [3Xn[103X,
  [2XAbelianNumberField[102X  returns  the  fixed field of the group described by [3Xstab[103X
  (cf. [2XGaloisStabilizer[102X    ([14X60.2-5[114X)),    in   the   [3Xn[103X-th   cyclotomic   field.
  [2XAbelianNumberField[102X  is  mainly  thought  for  internal  use and for printing
  fields  in  a  standard way; [2XField[102X ([14X58.1-3[114X) (cf. also [14X60.2[114X) is probably more
  suitable if one knows generators of the field in question.[133X
  
  [33X[0;0Y[2XAbelianNumberField[102X can be abbreviated to [2XNF[102X, this form is used also when [5XGAP[105X
  prints abelian number fields.[133X
  
  [33X[0;0YFields    constructed    with   [2XNF[102X   are   stored   in   the   global   list
  [10XABELIAN_NUMBER_FIELDS[110X,  so  repeated  calls  of  [2XNF[102X  just  fetch these field
  objects after they have been created once.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XNF( 7, [ 1 ] );[127X[104X
    [4X[28XCF(7)[128X[104X
    [4X[25Xgap>[125X [27Xf:= NF( 7, [ 1, 2 ] );  Sqrt(-7); Sqrt(-7) in f;[127X[104X
    [4X[28XNF(7,[ 1, 2, 4 ])[128X[104X
    [4X[28XE(7)+E(7)^2-E(7)^3+E(7)^4-E(7)^5-E(7)^6[128X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X60.1-3 GaussianRationals[101X
  
  [33X[1;0Y[29X[2XGaussianRationals[102X [32X global variable[133X
  [33X[1;0Y[29X[2XIsGaussianRationals[102X( [3Xobj[103X ) [32X Category[133X
  
  [33X[0;0Y[2XGaussianRationals[102X is the field [22Xℚ_4 = ℚ(sqrt{-1})[122X of Gaussian rationals, as a
  set  of  cyclotomic numbers, see Chapter [14X18[114X for basic operations. This field
  can also be obtained as [10XCF(4)[110X (see [2XCyclotomicField[102X ([14X60.1-1[114X)).[133X
  
  [33X[0;0YThe   filter   [2XIsGaussianRationals[102X   returns   [9Xtrue[109X   for   the  [5XGAP[105X  object
  [2XGaussianRationals[102X, and [9Xfalse[109X for all other [5XGAP[105X objects.[133X
  
  [33X[0;0Y(For details about the field of rationals, see Chapter [2XRationals[102X ([14X17.1-1[114X).)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XCF(4) = GaussianRationals;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XSqrt(-1) in GaussianRationals;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X60.2 [33X[0;0YOperations for Abelian Number Fields[133X[101X
  
  [33X[0;0YFor  operations  for  elements  of  abelian  number  fields, e.g., [2XConductor[102X
  ([14X18.1-7[114X) or [2XComplexConjugate[102X ([14X18.5-2[114X), see Chapter [14X18[114X.[133X
  
  [1X60.2-1 Factors[101X
  
  [33X[1;0Y[29X[2XFactors[102X( [3XF[103X ) [32X method[133X
  
  [33X[0;0YFactoring   of   polynomials   over  abelian  number  fields  consisting  of
  cyclotomics  works  in  principle but is not very efficient if the degree of
  the field extension is large.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx:= Indeterminate( CF(5) );[127X[104X
    [4X[28Xx_1[128X[104X
    [4X[25Xgap>[125X [27XFactors( PolynomialRing( Rationals ), x^5-1 );[127X[104X
    [4X[28X[ x_1-1, x_1^4+x_1^3+x_1^2+x_1+1 ][128X[104X
    [4X[25Xgap>[125X [27XFactors( PolynomialRing( CF(5) ), x^5-1 );[127X[104X
    [4X[28X[ x_1-1, x_1+(-E(5)), x_1+(-E(5)^2), x_1+(-E(5)^3), x_1+(-E(5)^4) ][128X[104X
  [4X[32X[104X
  
  [1X60.2-2 IsNumberField[101X
  
  [33X[1;0Y[29X[2XIsNumberField[102X( [3XF[103X ) [32X property[133X
  
  [33X[0;0Yreturns  [9Xtrue[109X  if  the  field [3XF[103X is a finite dimensional extension of a prime
  field in characteristic zero, and [9Xfalse[109X otherwise.[133X
  
  [1X60.2-3 IsAbelianNumberField[101X
  
  [33X[1;0Y[29X[2XIsAbelianNumberField[102X( [3XF[103X ) [32X property[133X
  
  [33X[0;0Yreturns  [9Xtrue[109X  if the field [3XF[103X is a number field (see [2XIsNumberField[102X ([14X60.2-2[114X))
  that  is  a  Galois  extension of the prime field, with abelian Galois group
  (see [2XGaloisGroup[102X ([14X58.3-1[114X)).[133X
  
  [1X60.2-4 IsCyclotomicField[101X
  
  [33X[1;0Y[29X[2XIsCyclotomicField[102X( [3XF[103X ) [32X property[133X
  
  [33X[0;0Yreturns  [9Xtrue[109X  if the field [3XF[103X is a [13Xcyclotomic field[113X, i.e., an abelian number
  field  (see [2XIsAbelianNumberField[102X ([14X60.2-3[114X)) that can be generated by roots of
  unity.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsNumberField( CF(9) ); IsAbelianNumberField( Field( [ ER(3) ] ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsNumberField( GF(2) );[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsCyclotomicField( CF(9) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCyclotomicField( Field( [ Sqrt(-3) ] ) );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCyclotomicField( Field( [ Sqrt(3) ] ) );[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X60.2-5 GaloisStabilizer[101X
  
  [33X[1;0Y[29X[2XGaloisStabilizer[102X( [3XF[103X ) [32X attribute[133X
  
  [33X[0;0YLet  [3XF[103X  be  an abelian number field (see [2XIsAbelianNumberField[102X ([14X60.2-3[114X)) with
  conductor [22Xn[122X, say. (This means that the [22Xn[122X-th cyclotomic field is the smallest
  cyclotomic  field  containing  [3XF[103X,  see [2XConductor[102X ([14X18.1-7[114X).) [2XGaloisStabilizer[102X
  returns  the  set  of all those integers [22Xk[122X in the range [22X[ 1 .. n ][122X such that
  the  field  automorphism  induced by raising [22Xn[122X-th roots of unity to the [22Xk[122X-th
  power acts trivially on [3XF[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xr5:= Sqrt(5);[127X[104X
    [4X[28XE(5)-E(5)^2-E(5)^3+E(5)^4[128X[104X
    [4X[25Xgap>[125X [27XGaloisCyc( r5, 4 ) = r5;  GaloisCyc( r5, 2 ) = r5;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XGaloisStabilizer( Field( [ r5 ] ) );[127X[104X
    [4X[28X[ 1, 4 ][128X[104X
  [4X[32X[104X
  
  
  [1X60.3 [33X[0;0YIntegral Bases of Abelian Number Fields[133X[101X
  
  [33X[0;0YEach  abelian  number field is naturally a vector space over [22Xℚ[122X. Moreover, if
  the  abelian number field [22XF[122X contains the [22Xn[122X-th cyclotomic field [22Xℚ_n[122X then [22XF[122X is
  a vector space over [22Xℚ_n[122X. In [5XGAP[105X, each field object represents a vector space
  object  over  a  certain  subfield  [22XS[122X,  which  depends  on  the  way  [22XF[122X  was
  constructed.  The  subfield  [22XS[122X can be accessed as the value of the attribute
  [2XLeftActingDomain[102X ([14X57.1-11[114X).[133X
  
  [33X[0;0YThe  return  values  of  [2XNF[102X  ([14X60.1-2[114X) and of the one argument versions of [2XCF[102X
  ([14X60.1-1[114X)  represent  vector  spaces over [22Xℚ[122X, and the return values of the two
  argument  version of [2XCF[102X ([14X60.1-1[114X) represent vector spaces over the field that
  is given as the first argument. For an abelian number field [3XF[103X and a subfield
  [3XS[103X  of  [3XF[103X,  a  [5XGAP[105X  object  representing  [3XF[103X  as  a vector space over [3XS[103X can be
  constructed using [2XAsField[102X ([14X58.1-9[114X).[133X
  
  [33X[0;0YLet  [3XF[103X  be  the cyclotomic field [22Xℚ_n[122X, represented as a vector space over the
  subfield  [3XS[103X.  If  [3XS[103X is the cyclotomic field [22Xℚ_m[122X, with [22Xm[122X a divisor of [22Xn[122X, then
  [10XCanonicalBasis(  [3XF[103X[10X  )[110X  returns the Zumbroich basis of [3XF[103X relative to [3XS[103X, which
  consists  of  the  roots  of  unity [10XE([3Xn[103X[10X)[110X^[3Xi[103X where [3Xi[103X is an element of the list
  [10XZumbroichBase(  [3Xn[103X[10X,  [3Xm[103X[10X  )[110X  (see [2XZumbroichBase[102X  ([14X60.3-1[114X)).  If [3XS[103X is an abelian
  number field that is not a cyclotomic field then [10XCanonicalBasis( [3XF[103X[10X )[110X returns
  a  normal  [3XS[103X-basis  of  [3XF[103X,  i.e.,  a  basis  that  is closed under the field
  automorphisms of [3XF[103X.[133X
  
  [33X[0;0YLet  [3XF[103X  be the abelian number field [10XNF( [3Xn[103X[10X, [3Xstab[103X[10X )[110X, with conductor [3Xn[103X, that is
  itself  not  a  cyclotomic  field,  represented  as  a vector space over the
  subfield  [3XS[103X.  If  [3XS[103X is the cyclotomic field [22Xℚ_m[122X, with [22Xm[122X a divisor of [22Xn[122X, then
  [10XCanonicalBasis(  [3XF[103X[10X  )[110X  returns  the  Lenstra  basis  of [3XF[103X relative to [3XS[103X that
  consists  of  the  sums of roots of unity described by [10XLenstraBase( [3Xn[103X[10X, [3Xstab[103X[10X,
  [3Xstab[103X[10X,  [3Xm[103X[10X  )[110X (see [2XLenstraBase[102X ([14X60.3-2[114X)). If [3XS[103X is an abelian number field that
  is  not a cyclotomic field then [10XCanonicalBasis( [3XF[103X[10X )[110X returns a normal [3XS[103X-basis
  of [3XF[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xf:= CF(8);;   # a cycl. field over the rationals[127X[104X
    [4X[25Xgap>[125X [27Xb:= CanonicalBasis( f );;  BasisVectors( b );[127X[104X
    [4X[28X[ 1, E(8), E(4), E(8)^3 ][128X[104X
    [4X[25Xgap>[125X [27XCoefficients( b, Sqrt(-2) );[127X[104X
    [4X[28X[ 0, 1, 0, 1 ][128X[104X
    [4X[25Xgap>[125X [27Xf:= AsField( CF(4), CF(8) );;  # a cycl. field over a cycl. field[127X[104X
    [4X[25Xgap>[125X [27Xb:= CanonicalBasis( f );;  BasisVectors( b );[127X[104X
    [4X[28X[ 1, E(8) ][128X[104X
    [4X[25Xgap>[125X [27XCoefficients( b, Sqrt(-2) );[127X[104X
    [4X[28X[ 0, 1+E(4) ][128X[104X
    [4X[25Xgap>[125X [27Xf:= AsField( Field( [ Sqrt(-2) ] ), CF(8) );;[127X[104X
    [4X[25Xgap>[125X [27X# a cycl. field over a non-cycl. field[127X[104X
    [4X[25Xgap>[125X [27Xb:= CanonicalBasis( f );;  BasisVectors( b );[127X[104X
    [4X[28X[ 1/2+1/2*E(8)-1/2*E(8)^2-1/2*E(8)^3,[128X[104X
    [4X[28X  1/2-1/2*E(8)+1/2*E(8)^2+1/2*E(8)^3 ][128X[104X
    [4X[25Xgap>[125X [27XCoefficients( b, Sqrt(-2) );[127X[104X
    [4X[28X[ E(8)+E(8)^3, E(8)+E(8)^3 ][128X[104X
    [4X[25Xgap>[125X [27Xf:= Field( [ Sqrt(-2) ] );   # a non-cycl. field over the rationals[127X[104X
    [4X[28XNF(8,[ 1, 3 ])[128X[104X
    [4X[25Xgap>[125X [27Xb:= CanonicalBasis( f );;  BasisVectors( b );[127X[104X
    [4X[28X[ 1, E(8)+E(8)^3 ][128X[104X
    [4X[25Xgap>[125X [27XCoefficients( b, Sqrt(-2) );[127X[104X
    [4X[28X[ 0, 1 ][128X[104X
  [4X[32X[104X
  
  [1X60.3-1 ZumbroichBase[101X
  
  [33X[1;0Y[29X[2XZumbroichBase[102X( [3Xn[103X, [3Xm[103X ) [32X function[133X
  
  [33X[0;0YLet  [3Xn[103X  and  [3Xm[103X  be  positive  integers, such that [3Xm[103X divides [3Xn[103X. [2XZumbroichBase[102X
  returns the set of exponents [22Xi[122X for which [10XE([3Xn[103X[10X)^[110X[22Xi[122X belongs to the (generalized)
  Zumbroich  basis  of the cyclotomic field [22Xℚ_n[122X, viewed as a vector space over
  [22Xℚ_m[122X.[133X
  
  [33X[0;0YThis  basis is defined as follows. Let [22XP[122X denote the set of prime divisors of
  [3Xn[103X,  [22X[3Xn[103X = ∏_{p ∈ P} p^{ν_p}[122X, and [22X[3Xm[103X = ∏_{p ∈ P} p^{μ_p}[122X with [22Xμ_p ≤ ν_p[122X. Let [22Xe_l
  =[122X  [10XE[110X[22X(l)[122X  for any positive integer [22Xl[122X, and [22X{ e_{n_1}^j }_{j ∈ J} ⊗ { e_{n_2}^k
  }_{k ∈ K} = { e_{n_1}^j ⋅ e_{n_2}^k }_{j ∈ J, k ∈ K}[122X.[133X
  
  [33X[0;0YThen the basis is[133X
  
  
  [24X[33X[0;6YB_{n,m} = ⨂_{p ∈ P} ⨂_{k = μ_p}^{ν_p-1} { e_{p^{k+1}}^j }_{j ∈ J_{k,p}}[133X[124X
  
  [33X[0;0Ywhere [22XJ_{k,p} =[122X[133X
  
        [22X{ 0 }[122X                        ;   [22Xk = 0, p = 2[122X   
        [22X{ 0, 1 }[122X                     ;   [22Xk > 0, p = 2[122X   
        [22X{ 1, ..., p-1 }[122X              ;   [22Xk = 0, p ≠ 2[122X   
        [22X{ -(p-1)/2, ..., (p-1)/2 }[122X   ;   [22Xk > 0, p ≠ 2[122X   
  
  [33X[0;0Y[22XB_{n,1}[122X  is equal to the basis of [22Xℚ_n[122X over the rationals which is introduced
  in [Zum89]. Also the conversion of arbitrary sums of roots of unity into its
  basis  representation, and the reduction to the minimal cyclotomic field are
  described in this thesis. (Note that the notation here is slightly different
  from that there.)[133X
  
  [33X[0;0Y[22XB_{n,m}[122X  consists  of  roots  of  unity,  it  is an integral basis (that is,
  exactly   the   integral   elements   in   [22Xℚ_n[122X  have  integral  coefficients
  w.r.t. [22XB_{n,m}[122X, cf. [2XIsIntegralCyclotomic[102X ([14X18.1-4[114X)), it is a normal basis for
  squarefree [22Xn[122X and closed under complex conjugation for odd [22Xn[122X.[133X
  
  [33X[0;0Y[13XNote:[113X  For [22X[3Xn[103X ≡ 2 mod 4[122X, we have [10XZumbroichBase([3Xn[103X[10X, 1) = 2 * ZumbroichBase([3Xn[103X[10X/2,
  1)[110X  and  [10XList( ZumbroichBase([3Xn[103X[10X, 1), x -> E([3Xn[103X[10X)^x ) = List( ZumbroichBase([3Xn[103X[10X/2,
  1), x -> E([3Xn[103X[10X/2)^x )[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XZumbroichBase( 15, 1 ); ZumbroichBase( 12, 3 );[127X[104X
    [4X[28X[ 1, 2, 4, 7, 8, 11, 13, 14 ][128X[104X
    [4X[28X[ 0, 3 ][128X[104X
    [4X[25Xgap>[125X [27XZumbroichBase( 10, 2 ); ZumbroichBase( 32, 4 );[127X[104X
    [4X[28X[ 2, 4, 6, 8 ][128X[104X
    [4X[28X[ 0, 1, 2, 3, 4, 5, 6, 7 ][128X[104X
  [4X[32X[104X
  
  [1X60.3-2 LenstraBase[101X
  
  [33X[1;0Y[29X[2XLenstraBase[102X( [3Xn[103X, [3Xstabilizer[103X, [3Xsuper[103X, [3Xm[103X ) [32X function[133X
  
  [33X[0;0YLet [3Xn[103X and [3Xm[103X be positive integers such that [3Xm[103X divides [3Xn[103X, [3Xstabilizer[103X be a list
  of  prime  residues  modulo  [3Xn[103X,  which  describes  a  subfield  of  the [3Xn[103X-th
  cyclotomic  field  (see [2XGaloisStabilizer[102X  ([14X60.2-5[114X)),  and  [3Xsuper[103X  be  a list
  representing a supergroup of the group given by [3Xstabilizer[103X.[133X
  
  [33X[0;0Y[2XLenstraBase[102X  returns  a  list  [22X[  b_1,  b_2,  ...,  b_k ][122X of lists, each [22Xb_i[122X
  consisting of integers such that the elements [22X∑_{j ∈ b_i}[122X[10XE(n)[110X[22X^j[122X form a basis
  of  the abelian number field [10XNF( [3Xn[103X[10X, [3Xstabilizer[103X[10X )[110X, as a vector space over the
  [3Xm[103X-th cyclotomic field (see [2XAbelianNumberField[102X ([14X60.1-2[114X)).[133X
  
  [33X[0;0YThis  basis  is an integral basis, that is, exactly the integral elements in
  [10XNF(  [3Xn[103X[10X,  [3Xstabilizer[103X[10X  )[110X  have  integral coefficients. (For details about this
  basis, see [Bre97].)[133X
  
  [33X[0;0YIf possible then the result is chosen such that the group described by [3Xsuper[103X
  acts  on it, consistently with the action of [3Xstabilizer[103X, i.e., each orbit of
  [3Xsuper[103X  is  a  union  of  orbits  of  [3Xstabilizer[103X.  (A  usual  case is [3Xsuper[103X[10X =
  [110X[3Xstabilizer[103X, so there is no additional condition.[133X
  
  [33X[0;0Y[13XNote:[113X  The  [22Xb_i[122X  are  in general not sets, since for [10X[3Xstabilizer[103X[10X = [3Xsuper[103X[10X[110X, the
  first  entry is always an element of [10XZumbroichBase( [3Xn[103X[10X, [3Xm[103X[10X )[110X; this property is
  used by [2XNF[102X ([14X60.1-2[114X) and [2XCoefficients[102X ([14X61.6-3[114X) (see [14X60.3[114X).[133X
  
  [33X[0;0Y[3Xstabilizer[103X  must  not contain the stabilizer of a proper cyclotomic subfield
  of  the  [3Xn[103X-th cyclotomic field, i.e., the result must describe a basis for a
  field with conductor [3Xn[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLenstraBase( 24, [ 1, 19 ], [ 1, 19 ], 1 );[127X[104X
    [4X[28X[ [ 1, 19 ], [ 8 ], [ 11, 17 ], [ 16 ] ][128X[104X
    [4X[25Xgap>[125X [27XLenstraBase( 24, [ 1, 19 ], [ 1, 5, 19, 23 ], 1 );[127X[104X
    [4X[28X[ [ 1, 19 ], [ 5, 23 ], [ 8 ], [ 16 ] ][128X[104X
    [4X[25Xgap>[125X [27XLenstraBase( 15, [ 1, 4 ], PrimeResidues( 15 ), 1 );[127X[104X
    [4X[28X[ [ 1, 4 ], [ 2, 8 ], [ 7, 13 ], [ 11, 14 ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  first  two  results  describe  two bases of the field [22Xℚ_3(sqrt{6})[122X, the
  third result describes a normal basis of [22Xℚ_3(sqrt{5})[122X.[133X
  
  
  [1X60.4 [33X[0;0YGalois Groups of Abelian Number Fields[133X[101X
  
  [33X[0;0YThe  field  automorphisms  of  the cyclotomic field [22Xℚ_n[122X (see Chapter [14X18[114X) are
  given  by  the  linear maps [22X*k[122X on [22Xℚ_n[122X that are defined by [10XE[110X[22X(n)^{*k} =[122X[10XE[110X[22X(n)^k[122X,
  where [22X1 ≤ k < n[122X and [10XGcd[110X[22X( n, k ) = 1[122X hold (see [2XGaloisCyc[102X ([14X18.5-1[114X)). Note that
  this action is [13Xnot[113X equal to exponentiation of cyclotomics, i.e., for general
  cyclotomics [22Xz[122X, [22Xz^{*k}[122X is different from [22Xz^k[122X.[133X
  
  [33X[0;0Y(In  [5XGAP[105X, the image of a cyclotomic [22Xz[122X under [22X*k[122X can be computed as [10XGaloisCyc(
  [110X[22Xz, k[122X[10X )[110X.)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27X( E(5) + E(5)^4 )^2; GaloisCyc( E(5) + E(5)^4, 2 );[127X[104X
    [4X[28X-2*E(5)-E(5)^2-E(5)^3-2*E(5)^4[128X[104X
    [4X[28XE(5)^2+E(5)^3[128X[104X
  [4X[32X[104X
  
  [33X[0;0YFor  [10XGcd[110X[22X(  n,  k  )  ≠  1[122X,  the  map  [10XE[110X[22X(n)  ↦[122X [10XE[110X[22X(n)^k[122X does [13Xnot[113X define a field
  automorphism of [22Xℚ_n[122X but only a [22Xℚ[122X-linear map.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XGaloisCyc( E(5)+E(5)^4, 5 ); GaloisCyc( ( E(5)+E(5)^4 )^2, 5 );[127X[104X
    [4X[28X2[128X[104X
    [4X[28X-6[128X[104X
  [4X[32X[104X
  
  [1X60.4-1 GaloisGroup[101X
  
  [33X[1;0Y[29X[2XGaloisGroup[102X( [3XF[103X ) [32X method[133X
  
  [33X[0;0YThe  Galois group [22XGal( ℚ_n, ℚ )[122X of the field extension [22Xℚ_n / ℚ[122X is isomorphic
  to  the group [22X(ℤ / n ℤ)^*[122X of prime residues modulo [22Xn[122X, via the isomorphism [22X(ℤ
  / n ℤ)^* → Gal( ℚ_n, ℚ )[122X that is defined by [22Xk + n ℤ ↦ ( z ↦ z^*k )[122X.[133X
  
  [33X[0;0YThe  Galois  group  of  the  field extension [22Xℚ_n / L[122X with any abelian number
  field  [22XL  ⊆  ℚ_n[122X  is  simply  the  factor  group of [22XGal( ℚ_n, ℚ )[122X modulo the
  stabilizer  of  [22XL[122X, and the Galois group of [22XL / L'[122X, with [22XL'[122X an abelian number
  field  contained  in  [22XL[122X,  is  the subgroup in this group that stabilizes [22XL'[122X.
  These  groups are easily described in terms of [22X(ℤ / n ℤ)^*[122X. Generators of [22X(ℤ
  / n ℤ)^*[122X can be computed using [2XGeneratorsPrimeResidues[102X ([14X15.2-4[114X).[133X
  
  [33X[0;0YIn  [5XGAP[105X,  a  field  extension  [22XL  /  L'[122X  is given by the field object [22XL[122X with
  [2XLeftActingDomain[102X ([14X57.1-11[114X) value [22XL'[122X (see [14X60.3[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xf:= CF(15);[127X[104X
    [4X[28XCF(15)[128X[104X
    [4X[25Xgap>[125X [27Xg:= GaloisGroup( f );[127X[104X
    [4X[28X<group with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize( g ); IsCyclic( g ); IsAbelian( g );[127X[104X
    [4X[28X8[128X[104X
    [4X[28Xfalse[128X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XAction( g, NormalBase( f ), OnPoints );[127X[104X
    [4X[28XGroup([ (1,6)(2,4)(3,8)(5,7), (1,4,3,7)(2,8,5,6) ])[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  following  example  shows  Galois groups of a cyclotomic field and of a
  proper subfield that is not a cyclotomic field.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens1:= GeneratorsOfGroup( GaloisGroup( CF(5) ) );[127X[104X
    [4X[28X[ ANFAutomorphism( CF(5), 2 ) ][128X[104X
    [4X[25Xgap>[125X [27Xgens2:= GeneratorsOfGroup( GaloisGroup( Field( Sqrt(5) ) ) );[127X[104X
    [4X[28X[ ANFAutomorphism( NF(5,[ 1, 4 ]), 2 ) ][128X[104X
    [4X[25Xgap>[125X [27XOrder( gens1[1] );  Order( gens2[1] );[127X[104X
    [4X[28X4[128X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XSqrt(5)^gens1[1] = Sqrt(5)^gens2[1];[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  following  example  shows the Galois group of a cyclotomic field over a
  non-cyclotomic field.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xg:= GaloisGroup( AsField( Field( [ Sqrt(5) ] ), CF(5) ) );[127X[104X
    [4X[28X<group of size 2 with 1 generator>[128X[104X
    [4X[25Xgap>[125X [27Xgens:= GeneratorsOfGroup( g );[127X[104X
    [4X[28X[ ANFAutomorphism( AsField( NF(5,[ 1, 4 ]), CF(5) ), 4 ) ][128X[104X
    [4X[25Xgap>[125X [27Xx:= last[1];;  x^2;[127X[104X
    [4X[28XIdentityMapping( AsField( NF(5,[ 1, 4 ]), CF(5) ) )[128X[104X
  [4X[32X[104X
  
  [1X60.4-2 ANFAutomorphism[101X
  
  [33X[1;0Y[29X[2XANFAutomorphism[102X( [3XF[103X, [3Xk[103X ) [32X function[133X
  
  [33X[0;0YLet  [3XF[103X be an abelian number field and [3Xk[103X be an integer that is coprime to the
  conductor  (see  [2XConductor[102X  ([14X18.1-7[114X)) of [3XF[103X. Then [2XANFAutomorphism[102X returns the
  automorphism  of  [3XF[103X  that is defined as the linear extension of the map that
  raises each root of unity in [3XF[103X to its [3Xk[103X-th power.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xf:= CF(25);[127X[104X
    [4X[28XCF(25)[128X[104X
    [4X[25Xgap>[125X [27Xalpha:= ANFAutomorphism( f, 2 );[127X[104X
    [4X[28XANFAutomorphism( CF(25), 2 )[128X[104X
    [4X[25Xgap>[125X [27Xalpha^2;[127X[104X
    [4X[28XANFAutomorphism( CF(25), 4 )[128X[104X
    [4X[25Xgap>[125X [27XOrder( alpha );[127X[104X
    [4X[28X20[128X[104X
    [4X[25Xgap>[125X [27XE(5)^alpha;[127X[104X
    [4X[28XE(5)^2[128X[104X
  [4X[32X[104X
  
  
  [1X60.5 [33X[0;0YGaussians[133X[101X
  
  [1X60.5-1 GaussianIntegers[101X
  
  [33X[1;0Y[29X[2XGaussianIntegers[102X [32X global variable[133X
  
  [33X[0;0Y[2XGaussianIntegers[102X  is  the  ring  [22Xℤ[sqrt{-1}][122X of Gaussian integers. This is a
  subring of the cyclotomic field [2XGaussianRationals[102X ([14X60.1-3[114X).[133X
  
  [1X60.5-2 IsGaussianIntegers[101X
  
  [33X[1;0Y[29X[2XIsGaussianIntegers[102X( [3Xobj[103X ) [32X Category[133X
  
  [33X[0;0Yis the defining category for the domain [2XGaussianIntegers[102X ([14X60.5-1[114X).[133X
  
