Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an unexpected error when computing conjugacy classes in certain large permutation groups (and other improvements) #4875

Merged
merged 5 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,876 changes: 1,875 additions & 1 deletion grp/simplerew.grp

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions lib/clashom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ local cs, # chief series of G
# we will give classes always by their representatives in G and
# centralizers by their full preimages in G.

cs:= ChiefSeriesOfGroup( G );
cs:= ChiefSeriesThrough( G,[Socle(G)] );

# the first step is always simple
if HasAbelianFactorGroup(G,cs[2]) then
Expand Down Expand Up @@ -1719,8 +1719,6 @@ BindGlobal("LiftClassesEANonsolvGeneral",

# Construct matrices for the affine operation on $N/[h,N]$.
Info(InfoHomClass,4,"space=",Size(field),"^",r);
if Size(field)^r>3*10^8 then Error("too large");fi;
aff := ExtendedVectors( field ^ r );

gens:=Concatenation(cl[2],Npcgs,cl[3]); # all generators
gpsz:=cl[5];
Expand All @@ -1745,7 +1743,9 @@ BindGlobal("LiftClassesEANonsolvGeneral",
Add( imgs, M );
od;

#if Size(field)^r>10^7 then Error("BIG");fi;

if Size(field)^r>3*10^8 then Error("too large");fi;
aff := ExtendedVectors( field ^ r );

# now compute orbits, being careful to get stabilizers in steps
#orbreps:=[];
Expand Down
12 changes: 10 additions & 2 deletions lib/ctblfuns.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,9 @@ InstallMethod( ScalarProduct,
x2:= ValuesOfClassFunction( x2 );
scpr:= 0;
for i in [ 1 .. Length( x1 ) ] do
scpr:= scpr + x1[i] * GaloisCyc( x2[i], -1 ) * weight[i];
if x1[i]<>0 and x2[i]<>0 then
scpr:= scpr + x1[i] * GaloisCyc( x2[i], -1 ) * weight[i];
fi;
od;
return scpr / Size( tbl );
end );
Expand Down Expand Up @@ -3269,18 +3271,24 @@ InstallMethod( ReducedClassFunctions,

for i in [ 1 .. Length( reducibles ) ] do
single:= reducibles[i];
for j in [ 1 .. upper[i] ] do

j:=1;
while j<=upper[i] do
scpr:= ScalarProduct( ordtbl, single, constituents[j] );
if IsInt( scpr ) then
scpr:= Int( scpr / normsquare[j] );
if scpr <> 0 then
single:= single - scpr * constituents[j];
if ForAll(single,x->x=0) then
j:=upper[i];
fi;
fi;
else
Info( InfoCharacterTable, 1,
"ReducedClassFunctions: scalar product of X[", j,
"] with Y[", i, "] not integral (ignore)" );
fi;
j:=j+1;
od;
if ForAny( single, x -> x <> 0 ) then
if single[1] < 0 then
Expand Down
2 changes: 2 additions & 0 deletions lib/ctblgrp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ DeclareGlobalFunction("OrbitSplit");
##
DeclareGlobalFunction("DxSplitDegree");

DeclareGlobalFunction("DxOnedimCleanout");


#############################################################################
##
Expand Down
67 changes: 38 additions & 29 deletions lib/ctblgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ InstallGlobalFunction(SplitStep,function(D,bestMat)

Add(D.yetmats,bestMat);
for col in bestMatCol do
Info(InfoCharacterTable,2,"Computing column ",col,":");
D.ClassMatrixColumn(D,M,bestMat,col);
od;

Expand Down Expand Up @@ -1732,7 +1731,7 @@ DoubleCentralizerOrbit := function(D,c1,c2)
often:=List(trans,i->Length(i));
return [List(trans,i->i[1]),often];
else
Info(InfoCharacterTable,3,"using DoubleCosets;");
#Info(InfoCharacterTable,3,"using DoubleCosets;");
cent:=Centralizer(D.classes[inv]);
l:=DoubleCosetRepsAndSizes(D.group,cent,Centralizer(D.classes[c2]));
s1:=Size(cent);
Expand Down Expand Up @@ -1769,14 +1768,16 @@ StandardClassMatrixColumn := function(D,M,r,t)
for i in D.classrange do
M[i^p,t]:=M[i,c];
od;
Info(InfoCharacterTable,2,"by GaloisImage");
Info(InfoCharacterTable,2,"Computing column ",t,
" : by GaloisImage");
return;
fi;
fi;
fi;

T:=DoubleCentralizerOrbit(D,r,t);
Info(InfoCharacterTable,2,Length(T[1])," instead of ",D.classiz[r]);
Info(InfoCharacterTable,2,"Computing column ",t," :",
Length(T[1])," instead of ",D.classiz[r]);

if IsDxLargeGroup(D.group) then
# if r and t are unique,the conjugation test can be weak (i.e. up to
Expand Down Expand Up @@ -2061,25 +2062,9 @@ local G, # group
return D;
end );


#############################################################################
##
#F DixonSplit(<D>) . . calculate matrix,split spaces and obtain characters
##
InstallGlobalFunction( DixonSplit, function(arg)
local D,r,i,j,ch,ra,bsm,
gens;

D:=arg[1];
if Length(arg)>1 then
bsm:=arg[2];
else
bsm:=BestSplittingMatrix(D);
fi;
if bsm<>fail then
SplitStep(D,bsm);
fi;

InstallGlobalFunction(DxOnedimCleanout,function(D)
local i,j,r,ch,kill,gens,ra;
kill:=false;
for i in [1..Length(D.raeume)] do
r:=D.raeume[i];
if r.dim=1 then
Expand All @@ -2101,14 +2086,38 @@ local D,r,i,j,ch,ra,bsm,
Add(D.irreducibles,j);
od;
Unbind(D.raeume[i]);
kill:=true;
fi;
od;
# Throw away lifted spaces
ra:=[];
for i in D.raeume do
Add(ra,i);
od;
D.raeume:=ra;
if kill then
# Throw away lifted spaces
ra:=[];
for i in D.raeume do
Add(ra,i);
od;
D.raeume:=ra;
fi;
end);

#############################################################################
##
#F DixonSplit(<D>) . . calculate matrix,split spaces and obtain characters
##
InstallGlobalFunction( DixonSplit, function(arg)
local D,bsm;

D:=arg[1];
if Length(arg)>1 then
bsm:=arg[2];
else
bsm:=BestSplittingMatrix(D);
fi;
if bsm<>fail then
SplitStep(D,bsm);
fi;

DxOnedimCleanout(D);

CombinatoricSplit(D);
return bsm;
end );
Expand Down
6 changes: 4 additions & 2 deletions lib/ctblpc.gi
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ PcGroupClassMatrixColumn := function(D,M,r,t)
for i in D.classrange do
M[i^p][t]:=M[i][c];
od;
Info(InfoCharacterTable,2,"by GaloisImage");
Info(InfoCharacterTable,2,"Computing column ",t,
" : by GaloisImage");
return;
fi;
fi;

T:=DoubleCentralizerOrbit(D,r,t);
Info(InfoCharacterTable,2,Length(T[1])," instead of ",D.classiz[r]);
Info(InfoCharacterTable,2,"Computing column ",t," :",
Length(T[1])," instead of ",D.classiz[r]);

for i in [1..Length(T[1])] do
T[1][i]:=T[1][i]*z;
Expand Down
16 changes: 8 additions & 8 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,21 @@ end);
##
#M MinimalGeneratingSet(<G>) . . . . . . . . . . . . . for groups
##
InstallMethod(MinimalGeneratingSet,"solvable group via pc",true,
[IsGroup],0,
InstallMethod(MinimalGeneratingSet,"test solvable and 2-generator noncyclic",
true, [IsGroup and IsFinite],0,
function(G)
local i;
if not IsSolvableGroup(G) then
if IsGroup(G) and HasGeneratorsOfGroup(G)
if not HasIsSolvableGroup(G) and IsSolvableGroup(G) and
CanEasilyComputePcgs(G) then
# discovered solvable -- redo
return MinimalGeneratingSet(G);
elif not IsSolvableGroup(G) then
if IsGroup(G) and (not IsCyclic(G)) and HasGeneratorsOfGroup(G)
and Length(GeneratorsOfGroup(G)) = 2 then
return GeneratorsOfGroup(G);
fi;
TryNextMethod();
fi;
i:=IsomorphismPcGroup(G);
G:=Image(i,G);
G:=MinimalGeneratingSet(G);
return List(G,j->PreImagesRepresentative(i,j));
end);

#############################################################################
Expand Down
11 changes: 3 additions & 8 deletions lib/grppcatr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ end;
##
InstallMethod( MinimalGeneratingSet,
"pcgs computable groups using special pcgs",
true, [ IsPcGroup and IsFinite ], 0,
true, [ IsSolvableGroup and IsFinite and CanEasilyComputePcgs], 0,

function( G )
local spec, weights, first, m, mingens, i, start, next, j,
Expand Down Expand Up @@ -662,13 +662,8 @@ end );
#M SmallGeneratingSet(<G>)
##
InstallMethod(SmallGeneratingSet,"using minimal generating set",true,
[IsPcGroup and IsFinite],0,
function (G)
if Length(Pcgs(G))>14 then
TryNextMethod();
fi;
return MinimalGeneratingSet(G);
end);
[IsSolvableGroup and IsFinite and CanEasilyComputePcgs],0,
MinimalGeneratingSet);

#############################################################################
##
Expand Down
7 changes: 7 additions & 0 deletions tst/testbugfix/2022-04-19-conjcl.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ConjugacyClasses, #4866
gap> g:=Group((9,11)(12,14)(15,17)(18,20)(21,23)(24,26)(27,29)(30,32)(33,35)
> (36,38),(9,39)(11,40)(13,42)(15,44)(17,45)(19,46)(21,47)(23,49)(25,51)
> (27,52)(29,53)(31,54)(33,56)(35,58)(37,59), (7,8)(10,11)(15,16)(20,21)
> (25,26)(30,31)(35,36)(40,41)(43,44)(47,48)(50,51)(54,55)(57,58));;
gap> Length(ConjugacyClasses(g));
1308