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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
|
#############################################################################
##
#W clasperm.gi GAP library Heiko Theißen
##
##
#Y Copyright (C) 1997, Lehrstuhl D für 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 functions that calculate ordinary and rational
## classes for permutation groups.
##
#############################################################################
##
#M Enumerator( <xorb> ) . . . . . . . . . for conj. classes in perm. groups
##
## The only difference to the enumerator for external orbits is a better
## `Position' (and `PositionCanonical') method.
##
BindGlobal( "NumberElement_ConjugacyClassPermGroup", function( enum, elm )
local xorb, G, rep;
xorb := UnderlyingCollection( enum );
G := ActingDomain( xorb );
rep := RepOpElmTuplesPermGroup( true, G, [ elm ],
[ Representative( xorb ) ],
TrivialSubgroup( G ), StabilizerOfExternalSet( xorb ) );
if rep = fail then
return fail;
else
return PositionCanonical( enum!.rightTransversal, rep ^ -1 );
fi;
end );
InstallMethod( Enumerator,
[ IsConjugacyClassPermGroupRep ],
xorb -> EnumeratorByFunctions( xorb, rec(
NumberElement := NumberElement_ConjugacyClassPermGroup,
ElementNumber := ElementNumber_ExternalOrbitByStabilizer,
rightTransversal := RightTransversal( ActingDomain( xorb ),
StabilizerOfExternalSet( xorb ) ) ) ) );
#############################################################################
##
#M <cl1> = <cl2> . . . . . . . . . . . . . . . . . . . for conjugacy classes
##
InstallMethod( \=,"classes for perm group", IsIdenticalObj,
[ IsConjugacyClassPermGroupRep, IsConjugacyClassPermGroupRep ],
function( cl1, cl2 )
if not IsIdenticalObj( ActingDomain( cl1 ), ActingDomain( cl2 ) ) then
TryNextMethod();
fi;
return RepOpElmTuplesPermGroup( true, ActingDomain( cl1 ),
[ Representative( cl1 ) ],
[ Representative( cl2 ) ],
StabilizerOfExternalSet( cl1 ),
StabilizerOfExternalSet( cl2 ) ) <> fail;
end );
#############################################################################
##
#M <g> in <cl> . . . . . . . . . . . . . . . . . . . . for conjugacy classes
##
InstallMethod( \in,"perm class rep", IsElmsColls,
[ IsPerm, IsConjugacyClassPermGroupRep ],
function( g, cl )
local G;
if HasAsList(cl) or HasAsSSortedList(cl) then
TryNextMethod();
fi;
G := ActingDomain( cl );
return RepOpElmTuplesPermGroup( true, ActingDomain( cl ),
[ g ], [ Representative( cl ) ],
TrivialSubgroup( G ),
StabilizerOfExternalSet( cl ) ) <> fail;
end );
#############################################################################
##
#M Enumerator( <rcl> ) . . . . . . . . . of rational class in a perm. group
##
## The only difference to the enumerator for rational classes is a better
## `Position' (and `PositionCanonical') method.
##
BindGlobal( "NumberElement_RationalClassPermGroup", function( enum, elm )
local rcl, G, rep, gal, T, pow, t;
rcl := UnderlyingCollection( enum );
G := ActingDomain( rcl );
rep := Representative( rcl );
gal := RightTransversalInParent( GaloisGroup( rcl ) );
T := enum!.rightTransversal;
for pow in [ 1 .. Length( gal ) ] do
# if gal[pow]=0 then the rep is the identity , no need to worry.
t := RepOpElmTuplesPermGroup( true, G,
[ elm ], [ rep ^ Int( gal[ pow ] ) ],
TrivialSubgroup( G ),
StabilizerOfExternalSet( rcl ) );
if t <> fail then
break;
fi;
od;
if t = fail then
return fail;
else
return ( pow - 1 ) * Length( T ) + PositionCanonical( T, t ^ -1 );
fi;
end );
InstallMethod( Enumerator,
[ IsRationalClassPermGroupRep ],
rcl -> EnumeratorByFunctions( rcl, rec(
NumberElement := NumberElement_RationalClassPermGroup,
ElementNumber := ElementNumber_RationalClassGroup,
rightTransversal := RightTransversal( ActingDomain( rcl ),
StabilizerOfExternalSet( rcl ) ) ) ) );
InstallOtherMethod( CentralizerOp, [ IsRationalClassGroupRep ],
StabilizerOfExternalSet );
#############################################################################
##
#M <cl1> = <cl2> . . . . . . . . . . . . . . . . . . . for rational classes
##
InstallMethod( \=, IsIdenticalObj, [ IsRationalClassPermGroupRep,
IsRationalClassPermGroupRep ],
function( cl1, cl2 )
if ActingDomain( cl1 ) <> ActingDomain( cl2 ) then
TryNextMethod();
fi;
# the Galois group of the identity is <0>, therefore we have to do this
# extra test.
return Order(Representative(cl1))=Order(Representative(cl2)) and
ForAny( RightTransversalInParent( GaloisGroup( cl1 ) ), e ->
RepOpElmTuplesPermGroup( true, ActingDomain( cl1 ),
[ Representative( cl1 ) ],
[ Representative( cl2 ) ^ Int( e ) ],
StabilizerOfExternalSet( cl1 ),
StabilizerOfExternalSet( cl2 ) ) <> fail );
end );
#############################################################################
##
#M <g> in <cl> . . . . . . . . . . . . . . . . . . . . for rational classes
##
InstallMethod( \in, true, [ IsPerm, IsRationalClassPermGroupRep ], 0,
function( g, cl )
local G;
G := ActingDomain( cl );
# the Galois group of the identity is <0>, therefore we have to do this
# extra test.
return Order(Representative(cl))=Order(g) and
ForAny( RightTransversalInParent( GaloisGroup( cl ) ), e ->
RepOpElmTuplesPermGroup( true, G,
[ g ^ Int( e ) ],
[ Representative( cl ) ],
TrivialSubgroup( G ),
StabilizerOfExternalSet( cl ) ) <> fail );
end );
#############################################################################
##
#E
|