18.1 Operations for Cyclotomics

  • E( n ) F

    E returns the primitive n-th root of unity en = e2pi/n. Cyclotomics are usually entered as sums of roots of unity, with rational coefficients, and irrational cyclotomics are displayed in the same way. (For special cyclotomics, see ATLAS irrationalities.)

    gap> E(9); E(9)^3; E(6); E(12) / 3;
    -E(9)^4-E(9)^7
    E(3)
    -E(3)^2
    -1/3*E(12)^7
    
    A particular basis is used to express cyclotomics, see Integral Bases for Abelian Number Fields; note that E(9) is not a basis element, as the above example shows.

  • Cyclotomics V

    is the field of all cyclotomics (in GAP).

    gap> E(9) in Cyclotomics; 37 in Cyclotomics; true in Cyclotomics;
    true
    true
    false
    

    As the cyclotomics are field elements the usual arithmetic operators +,-,* and / (and ^ to take powers by integers) are applicable. Note that ^ does not denote the conjugation of group elements, so it is not possible to explicitly construct groups of cyclotomics. (However, it is possible to compute the inverse and the multiplicative order of a nonzero cyclotomic.) Also, taking the k-th power of a cyclotomic is a Galois automorphism if and only if k is coprime to the conductor of the cyclotomic.

    gap> E(5) + E(3); (E(5) + E(5)^4) ^ 2; E(5) / E(3); E(5) * E(3);
    -E(15)^2-2*E(15)^8-E(15)^11-E(15)^13-E(15)^14
    -2*E(5)-E(5)^2-E(5)^3-2*E(5)^4
    E(15)^13
    E(15)^8
    gap> Order( E(5) ); Order( 1+E(5) );
    5
    infinity
    

  • IsCyclotomic( obj ) C
  • IsCyc( obj ) C

    Every object in the family CyclotomicsFamily lies in the category IsCyclotomic. This covers integers, rationals, proper cyclotomics, the object infinity (see Infinity), and unknowns (see Chapter Unknowns). All these objects except infinity and unknowns lie also in the category IsCyc, infinity lies in (and can be detected from) the category IsInfinity, and unknowns lie in IsUnknown.

    gap> IsCyclotomic(0); IsCyclotomic(1/2*E(3)); IsCyclotomic( infinity );
    true
    true
    true
    gap> IsCyc(0); IsCyc(1/2*E(3)); IsCyc( infinity );
    true
    true
    false
    

  • IsIntegralCyclotomic( obj ) P

    A cyclotomic is called integral or a cyclotomic integer if all coefficients of its minimal polynomial over the rationals are integers. Since the underlying basis of the external representation of cyclotomics is an integral basis (see Integral Bases for Abelian Number Fields), the subring of cyclotomic integers in a cyclotomic field is formed by those cyclotomics for which the external representation is a list of integers. 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.

    gap> r:= ER( 5 );            # The square root of 5 is a cyclotomic
    E(5)-E(5)^2-E(5)^3+E(5)^4    # integer, it has integral coefficients.
    gap> IsIntegralCyclotomic( r );
    true
    gap> r2:= 1/2 * r;           # This is not a cyclotomic integer, ...
    1/2*E(5)-1/2*E(5)^2-1/2*E(5)^3+1/2*E(5)^4
    gap> IsIntegralCyclotomic( r2 );
    false
    gap> r3:= 1/2 * r - 1/2;     # ... but this is one.
    E(5)+E(5)^4
    gap> IsIntegralCyclotomic( r3 );
    true
    

    The operation IntindexInt!for cyclotomics can be used to find a cyclotomic integer near to an arbitrary cyclotomic. For rationals, Int returns the largest integer smaller or equal to the argument.

    gap> Int( E(5)+1/2*E(5)^2 ); Int( 2/3*E(7)+3/2*E(4) );
    E(5)
    E(4)
    

    The operation StringindexString!for cyclotomics returns for a cyclotomic a string corresponding to the way the cyclotomic is printed by ViewObj and PrintObj.

    gap> String( E(5)+1/2*E(5)^2 ); String( 17/3 );
    "E(5)+1/2*E(5)^2"
    "17/3"
    

  • Conductor( cyc ) A
  • Conductor( C ) A

    For an element cyc of a cyclotomic field, Conductor returns the smallest integer n such that cyc is contained in the n-th cyclotomic field. For a collection C of cyclotomics (for example a dense list of cyclotomics or a field of cyclotomics), Conductor returns the smallest integer n such that all elements of C are contained in the n-th cyclotomic field.

    gap> Conductor( 0 ); Conductor( E(10) ); Conductor( E(12) );
    1
    5
    12
    

  • RoundCyc( cyc ) O

    is a cyclotomic integer z (see IsIntegralCyclotomic) near to the cyclotomic cyc in the sense that the i-th coefficient in the external representation (see CoeffsCyc) of z is Int( c+1/2 ) where c is the i-th coefficient in the external representation of cyc. Expressed in terms of the Zumbroich basis (see Integral Bases for Abelian Number Fields), the coefficients of cyc w.r.t. this basis are rounded.

    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)^4-2*E(28)^11-2*E(28)^15-2*E(28)^19-2*E(28)^23
     -2*E(28)^27
    

  • CoeffsCyc( cyc, N ) F

    Let cyc be a cyclotomic with conductor n. If N is not a multiple of n then CoeffsCyc returns fail because cyc cannot be expressed in terms of N-th roots of unity. Otherwise CoeffsCyc returns a list of length N with entry at position j equal to the coefficient of e2 pi (j-1)/N if this root belongs to the N-th Zumbroich basis (see Integral Bases for Abelian Number Fields), and equal to zero otherwise. So we have cyc = CoeffsCyc(cyc,N) * List( [1..N], j -> E(N)^(j-1) ).

    gap> cyc:= E(5)+E(5)^2;  
    E(5)+E(5)^2
    gap> CoeffsCyc( cyc, 5 );  CoeffsCyc( cyc, 15 );  CoeffsCyc( cyc, 7 ); 
    [ 0, 1, 1, 0, 0 ]
    [ 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, -1, 0 ]
    fail
    

  • ExtRepOfObj(cyc)
    gap> ExtRepOfObj( E(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 ]
    fail
    

  • DescriptionOfRootOfUnity( root ) F

    Given a cyclotomic root that is known to be a root of unity (this is not checked), DescriptionOfRootOfUnity returns a list [ n, e ] of coprime positive integers such that root = E(n)e holds.

    gap> E(9);  DescriptionOfRootOfUnity( E(9) );
    -E(9)^4-E(9)^7
    [ 9, 1 ]
    gap> DescriptionOfRootOfUnity( -E(3) );
    [ 6, 5 ]
    

  • IsGaussInt( x ) F

    IsGaussInt returns true if the object x is a Gaussian integer and false otherwise. Gaussian integers are of the form a + b*E(4), where a and b are integers.

  • IsGaussRat( x ) F

    IsGaussRat returns true if the object x is a Gaussian rational and false otherwise. Gaussian rationals are of the form a + b*E(4), where a and b are rationals.

    DefaultField (see DefaultField) for cyclotomics is defined to return the smallest cyclotomic field containing the given elements.

    gap> Field( E(5)+E(5)^4 );  DefaultField( E(5)+E(5)^4 );
    NF(5,[ 1, 4 ])
    CF(5)
    

    [Top] [Up] [Next] [Index]

    GAP 4 manual
    February 2000