4.15 Representative

Representative( D )

Representative returns a representative of the domain D.

The existence of a representative, and the exact definition of what a representative is, depends on the category of D. The representative should be an element that, within a given context, identifies the domain D. For example if D is a cyclic group, its representative would be a generator of D, or if D is a coset, its representative would be an arbitrary element of the coset.

Note that Representative is pretty free in choosing a representative if there are several. It is not even guaranteed that Representative returns the same representative if it is called several times for one domain. Thus the main difference between Representative and Random (see Random) is that Representative is free to choose a value that is cheap to compute, while Random must make an effort to randomly distribute its answers.

    gap> C := Coset( Subgroup( G, [(1,4)(2,5)(3,6)] ), (1,6,5,4,3,2) );;
    gap> Representative( C );
    (1,3,5)(2,4,6) 

Representative first tests whether the component D.representative is bound. If the field is bound it returns its value. Otherwise it calls D.operations.Representative( D ), remembers the returned value in D.representative, and returns it.

The default function called this way is DomainOps.Representative, which simply signals an error, since there is no default way to find a representative.

Previous Up Top Next
Index

GAP 3.4.4
April 1997