Cycles( g, D )
Cycles( g, D, operation )
Cycles
returns the set of cycles of the group element g on the domain
D, which must be a list of points of arbitrary type, as a set of lists
of points. See Cycle for the definition of cycles.
It is allowed that D is a proper subset of a domain, i.e., that D is not invariant under the operation of g. In this case D is silently replaced by the smallest superset of D which is invariant.
The first point in each cycle is the smallest point of D in this cycle.
The ordering of the other points is such that each point is the image of
the previous point. If D is invariant under g, then because Cycles
returns a set of cycles, i.e., a sorted list, and because cycles are
compared lexicographically, and because the first point in each cycle is
the smallest point in that cycle, the list returned by Cycles
is in
fact sorted with respect to the smallest point in the cycles.
Cycles
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> Cycles( (1,5,3,8)(4,6,7), [3,5,7] ); [ [ 3, 8, 1, 5 ], [ 7, 4, 6 ] ] gap> Cycles( (1,5,3,8)(4,6,7), [[1,3],[4,6]], OnPairs ); [ [ [ 1, 3 ], [ 5, 8 ], [ 3, 1 ], [ 8, 5 ] ], [ [ 4, 6 ], [ 6, 7 ], [ 7, 4 ] ] ]
Cycles
calls
Domain([g]).operations.Cycles( 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.Cycles
, which
takes elements from D, computes their orbit, removes all points in the
orbit from D, and repeats this until D has been emptied. Special
categories of group elements overlay this default function with more
efficient functions.
GAP 3.4.4