8.1 Other Operations

The functions in the operation package generally compute with the operation of group elements defined by the canonical operation that is denoted with the caret (^) in GAP. However they also allow you to specify other operations. Such operations are specified by functions, which are accepted as optional argument by all the operations package functions.

This function must accept two arguments. The first argument will be the point and the second will be the group element. The function must return the image of the point under the group element.

As an example, the function OnPairs that specifies the operation on pairs could be defined as follows

    OnPairs := function ( pair, g )
        return [ pair[1] ^ g, pair[2] ^ g ];
    end; 

The following operations are predefined.

OnPoints:

specifies the canonical default operation. Passing this function is equivalent to specifying no operation. This function exists because there are places where the operation in not an option.

OnPairs:

specifies the componentwise operation of group elements on pairs of points, which are represented by lists of length 2.

OnTuples:

specifies the componentwise operation of group elements on tuples of points, which are represented by lists. OnPairs is the special case of OnTuples for tuples with two elements.

OnSets:

specifies the operation of group elements on sets of points, which are represented by sorted lists of points without duplicates (see Sets).

OnRight:

specifies that group elements operate by multiplication from the right.

OnLeftInverse:

specifies that group elements operate by multiplication by their inverses from the left. This is an operation, unlike OnLeftAntiOperation (see below).

OnRightCosets:

specifies that group elements operate by multiplication from the right on sets of points, which are represented by sorted lists of points without duplicates (see Sets).

OnLeftCosets:

specifies that group elements operate by multiplication from the left on sets of points, which are represented by sorted lists of points without duplicates (see Sets).

OnLines:

specifies that group elements, which must be matrices, operate on lines, which are represented by vectors with first nonzero coefficient one. That is, OnLines multiplies the vector by the group element and then divides the vector by the first nonzero coefficient.

Note that it is your responsibility to make sure that the elements of the domain D on which you are operating are already in normal form. The reason is that all functions will compare points using the = operation. For example, if you are operating on sets with OnSets, you will get an error message it not all elements of the domain are sets.

    gap> Cycle( (1,2), [2,1], OnSets );
    Error, OnSets: <tuple> must be a set 

The former function OnLeft which operated by mulitplication from the left has been renamed OnLeftAntiOperation, to emphasise the point that it does not satisify the axioms of an operation, and may cause errors if supplied where an operation is expected.

Up Top Next
Index

GAP 3.4.4
April 1997