Domain( list )
Domain returns a domain that contains all the elements in list and
that knows how to make the ring, field, group, or vector space that
contains those elements.
Note that the domain returned by
Domain need in general not be a ring,
field, group, or vector space itself. For example if passed a list of
elements of finite fields
Domain will return the domain
FiniteFieldElements. This domain contains all finite field elements,
no matter of which characteristic. This domain has a function
FiniteFieldElementsOps.Field that knows how to make a finite field that
contains the elements in list. This function knows that all elements
must have the same characteristic for them to lie in a common field.
gap> D := Domain( [ Z(4), Z(8) ] ); FiniteFieldElements gap> IsField( D ); false gap> D.operations.Field( [ Z(4), Z(8) ] ); GF(2^6)
Domain is the only function in the whole GAP library that knows
about the various types of elements. For example, when
confronted by a field element z, it does not know what to do with it.
So it calls
F := DefaultField( [ z ] ) to get a field in which z
lies, because this field (more precisely
F.operations.Norm) will know
DefaultField also does not know what to do with z.
So it calls
D := Domain( [ z ] ) to get a domain in which z lies,
because it (more precisely
D.operations.DefaultField) will know how to
make a default field in which z lies.
Previous Up Top Next