6.3 DefaultField

DefaultField( z,.. ) DefaultField( list )

In the first form DefaultField returns the default field that contains all the elements z,.. etc. In the second form DefaultField returns the default field that contains all the elements in the list list. If any element is not an element of a field or the elements lie in no common field an error is raised.

The field returned by DefaultField need not be the smallest field in which the elements lie. For example for elements from cyclotomic fields DefaultField may return the smallest cyclotomic field in which the elements lie, which need not be the smallest field overall, because the elements may in fact lie in a smaller number field which is not a cyclotomic field.

For the exact definition of the default field of a certain type of elements read the chapter describing this type (see Finite Fields and Subfields of Cyclotomic Fields).

DefaultField is used by Conjugates, Norm, Trace, CharPol, and MinPol (see Conjugates, Norm, Trace, CharPol, and MinPol) if no explicit field is given.

    gap> DefaultField( Z(4) );
    GF(2^2)
    gap> DefaultField( E(9) );
    CF(9)
    gap> DefaultField( [ Z(4), Z(9) ] );
    Error, CharFFE: <z> must be a finite field element, vector, or matrix
    gap> DefaultField( [ E(4), E(9) ] );
    CF(36) 

Field (see Field) differs from DefaultField in that it returns the smallest field in which the elements lie, while DefaultField may return a larger field if that makes sense.

Previous Up Top Next
Index

GAP 3.4.4
April 1997