1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
#############################################################################
##
#W csetperm.gi GAP library Alexander Hulpke
##
#H @(#)$Id: csetperm.gi,v 4.12 2002/09/20 22:27:45 gap Exp $
##
#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany
#Y (C) 1998 School Math and Comp. Sci., University of St. Andrews, Scotland
#Y Copyright (C) 2002 The GAP Group
##
## This file contains the operations for cosets of permutation groups
##
Revision.csetperm_gi:=
"@(#)$Id: csetperm.gi,v 4.12 2002/09/20 22:27:45 gap Exp $";
InstallMethod( AscendingChainOp, "PermGroup", IsIdenticalObj,
[IsPermGroup,IsPermGroup],0,
function(G,U)
local s,c,mp,o,i,step;
s:=G;
c:=[G];
repeat
mp:=MovedPoints(s);
o:=ShallowCopy(OrbitsDomain(s,mp));
Sort(o,function(a,b) return Length(a)<Length(b);end);
i:=1;
step:=false;
while i<=Length(o) and step=false do
if not IsTransitive(U,o[i]) then
Info(InfoCoset,2,"AC: orbit");
o:=ShallowCopy(OrbitsDomain(U,o[i]));
Sort(o,function(a,b) return Length(a)<Length(b);end);
s:=Stabilizer(s,Set(o[1]),OnSets);
step:=true;
elif Index(G,U)>NrMovedPoints(U)
and IsPrimitive(s,o[i]) and not IsPrimitive(U,o[i]) then
Info(InfoCoset,2,"AC: blocks");
s:=Stabilizer(s,Set(List(MaximalBlocks(U,o[i]),Set)),
OnSetsDisjointSets);
step:=true;
else
i:=i+1;
fi;
od;
if step then
Add(c,s);
fi;
until step=false or Index(s,U)=1; # we could not refine better
if Index(s,U)>1 then
Add(c,U);
fi;
if InfoLevel(InfoCoset)>1 then
Print("Indices",List([1..Length(c)-1],i->Index(c[i],c[i+1])),"\n");
fi;
return RefinedChain(G,Reversed(c));
end);
InstallMethod(CanonicalRightCosetElement,"Perm",IsCollsElms,
[IsPermGroup,IsPerm],0,
function(U,e)
return MinimalElementCosetStabChain(MinimalStabChain(U),e);
end);
InstallMethod(\<,"RightCosets of perm group",IsIdenticalObj,
[IsRightCoset and IsPermCollection,IsRightCoset and IsPermCollection],0,
function(a,b)
# for permutation groups the canonical rep is the smallest element of the
# coset
if ActingDomain(a)<>ActingDomain(b) then
return ActingDomain(a)<ActingDomain(b);
fi;
return CanonicalRepresentativeOfExternalSet(a)
<CanonicalRepresentativeOfExternalSet(b);
end);
#############################################################################
##
#E csetperm.gi . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
##
|