# 5.1 Other Actions

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`:

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

`OnPairs`:

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

`OnTuples`:

specifies the componentwise action of monoid 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 action of monoid elements on sets of points, which are represented by sorted lists of points without duplicates (see chapter "Sets").

`OnRight`:

specifies that monoid elements act by multiplication from the right.

`OnLeftAntiAction`:

specifies that monoid elements act by multiplication from the left.

`OnLClasses`:

specifies that monoid elements act by multiplication from the right on L classes (see LClasses).

`OnRClassesAntiAction`:

specifies that monoid elements act by multiplication from the left on R classes (see RClasses).

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)