`Action( `

`M`, `D` )

`Action( `

`M`, `D`, `action` )

`Action`

returns a transformation monoid with the same number of
generators as `M`, such that each generator of the transformation monoid
acts on the set `[1..Length(`

in the same way as the corresponding
generator of the monoid `D`)]`M` acts on the domain `D`, which may be a list
of arbitrary type.

It is not allowed that `D` is a proper subset of a domain, i.e., `D` must
be invariant under `M`.

`Action`

accepts a function `action` of two arguments `d` and `m` as
optional third argument, which specifies how the elements of `M` act on
`D` (see Other Actions).

`Action`

calls

`M`.operations.Action( `M`, `D`, `action` )

and returns the value. Note that the third argument is not optional for
functions called this way.

The default function called this way is `MonoidOps.Action`

, which simply
applies each generator of `M` to all the points of `D`, finds the
position of the image in `D`, and finally constructs the transformation
(see Transformation) defined by the list of those positions.

gap> M:= Monoid( [ Transformation( [ 5, 4, 4, 2, 2 ] ), Transformation( [ 2, 5, 5, 4, 1 ] ) ] );; gap> Action(M, LClasses(M), OnLClasses); Monoid( [ Transformation( [2, 6, 9, 2, 2, 6, 13, 9, 6, 9, 7, 13, 12, 13, 14] ), Transformation( [5, 3, 4, 2, 5, 7, 8, 6, 10, 11, 9, 12, 14, 15, 13] ) ] )Version 2.4 (May 1998)