![[MONOiD]](monoid.png)
Most of the operations for groups can be applied as monoid actions (see "Other Operations"). In addition to these there are a couple of actions which are particular to monoids.
The functions described in this chapter generally deal with the action of
monoid elements defined by the canonical action that is denoted with the
caret (^) in GAP. However, they also allow you to specify other
actions. Such actions are specified by functions, which are accepted as
optional argument by all the functions described here.
An action function must accept two arguments. The first argument will be the point and the second will be the monoid element. The function must return the image of the point under the monoid element in the action that it specifies.
As an example, the function OnPairs that specifies the action on pairs
could be defined as follows
OnPairs := function ( pair, m )
return [ pair[1] ^ m, pair[2] ^ m ];
end;
The following monoid actions are predefined.
OnPoints:
OnPairs:
OnTuples:OnPairs is the
special case of OnTuples for tuples with two elements.
OnSets:
OnRight:
OnLeftAntiAction:
OnLClasses:
OnRClassesAntiAction:
Note that it is your responsibility to make sure that the elements of the
domain D on which you are acting are already in normal form. The
reason is that all functions will compare points using the = operation.
For example, if you are acting on sets with OnSets, you will get an
error message it not all elements of the domain are sets.
gap> OnSets(Transformation( [ 1, 2 ] ), [ 2, 1 ] );
Error, OnSets: <tuple> must be a set
Version 2.4 (May 1998)