Permutation( g, D )
Permutation( g, D, operation )
Permutation returns a permutation that operates on the points
[1..Length(D)] in the same way that the group element g operates 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 the element g.
Permutation accepts a function operation of two arguments d and g
as optional third argument, which specifies how the element g operates
(see Other Operations).
gap> Permutation( (1,5,3,8)(4,6,7), [4,7,6] );
(1,3,2)
gap> D := [ [1,4], [1,6], [1,7], [3,4], [3,6], [3,7],
> [4,5], [5,6], [5,7], [4,8], [6,8], [7,8] ];;
gap> Permutation( (1,5,3,8)(4,6,7), D, OnSets );
( 1, 8, 6,10, 2, 9, 4,11, 3, 7, 5,12)
Permutation calls
Domain([g]).operations.Permutation( g, D, operation )
and returns the value. Note that the third argument is not optional for
the functions called this way.
The default function called this way is GroupElementsOps.Permutation,
which simply applies g to all the points of D, finds the position of
the image in D, and finally applies PermList (see PermList) to the
list of those positions. Actually this is not quite true. Because
finding the position of an image in a sorted list is so much faster than
finding it in D, GroupElementsOps.Permutation first sorts a copy of
D and remembers how it had to rearrange the elements of D to achieve
this. Special categories of group elements overlay this default function
with more efficient functions.
GAP 3.4.4