Derek Holt writes in his e-mail message of 13-Nov-92:
A user in Oxford (Jane Bamblett) has pointed out to me that the function
RestrictedPerm( <perm>, <list> )
fails when <perm> is the identity. This seems undesirable to me.
Indeed it does. A quick fix is to add the following three lines to the
file '<gap-dir>/lib/permutat.g'.
RestrictedPerm := function( g, D ) local res, d;# check the arguments if not IsPerm( g ) then Error("<g> must be a permutation"); elif not IsList( D ) then Error("<D> must be a list"); fi;
+ # handle the identity + if g = () then return (); fi; + # compute the restricted permutation <res> res := [ 1 .. Maximum( LargestMovedPointPerm(g), Maximum(D) ) ]; for d in D do if not d^g in D then Error("<D> must be invariant under the action of <g>"); fi; res[d] := d^g; od;
# return the restricted permutation <res>
return PermList( res );
end;
Martin.
-- .- .-. - .. -. .-.. --- ...- . ... .- -. -. .. -.- .- Martin Sch"onert, Martin.Schoenert@Math.RWTH-Aachen.DE, +49 241 804551 Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, D 51 Aachen, Germany