How to define own group action in GAP?

Solution 1:

I am posting a CW answer to remove this question from the unanswered queue. This is just a quote from the GAP manual:

GAP already provides acting functions for the more common actions of a group. For built-in operations such as Stabilizer special methods are available for many of these actions.

If one needs an action for which no acting function is provided by the library it can be implemented via a GAP function that conforms to the syntax

actfun( omega, g )

where omega is an element of the action domain, g is an element of the acting group, and the return value is the image of omega under g.

For example one could define the following function that acts on pairs of polynomials via OnIndeterminates:

OnIndeterminatesPairs:= function( polypair, g )
  return [ OnIndeterminates( polypair[1], g ),
           OnIndeterminates( polypair[2], g ) ];
end;

Note that this function must implement a group action from the right. This is not verified by GAP and results are unpredictable otherwise.