diff --git a/lib/clashom.gi b/lib/clashom.gi index 7015e26e3d..1fddef656f 100644 --- a/lib/clashom.gi +++ b/lib/clashom.gi @@ -1131,31 +1131,26 @@ local cs, # chief series of G cs:= ChiefSeriesThrough( G,[Socle(G)] ); - # the first step is always simple - if HasAbelianFactorGroup(G,cs[2]) then - # try to get the largest abelian factor - i:=2; - while i[i,G]); + # First do socle factor + if Size(Socle(G))=Size(G) then + cl:=[One(G),G]; + lastM:=G; else + lastM:=Socle(G); # compute the classes of the simple nonabelian factor by random search - hom:=NaturalHomomorphismByNormalSubgroupNC(G,cs[2]); + hom:=NaturalHomomorphismByNormalSubgroupNC(G,lastM); cl:=ConjugacyClasses(Image(hom)); cl:=List(cl,i->[PreImagesRepresentative(hom,Representative(i)), PreImage(hom,StabilizerOfExternalSet(i))]); + cs:=Concatenation([G],Filtered(cs,x->IsSubset(lastM,x))); fi; - lastM:=cs[2]; - for i in [3..Length(cs)] do + for i in [2..Length(cs)] do # we assume that cl contains classreps/centralizers for G/cs[i-1] # we want to lift to G/cs[i] M:=cs[i-1]; N:=cs[i]; + Info(InfoHomClass,1,i,":",Index(M,N),"; ",Size(N)); if HasAbelianFactorGroup(M,N) then Info(InfoHomClass,2,"abelian factor ignored"); diff --git a/tst/testbugfix/2023-11-09-ConjugacyClasses.tst b/tst/testbugfix/2023-11-09-ConjugacyClasses.tst new file mode 100644 index 0000000000..77789f20cb --- /dev/null +++ b/tst/testbugfix/2023-11-09-ConjugacyClasses.tst @@ -0,0 +1,7 @@ +# Reported by Sumi Toshio Nov/9/2023 +gap> G:=Group([ (1,2,3,4,5), (3,4,5), (6,7,8,9,10), (8,9,10), (11,12,13,14,15), +> (13,14,15), (16,17,18,19,20), (18,19,20), (21,22,23,24,25), (23,24,25), +> (26,27,28), (1,6)(2,7)(3,8)(4,9)(5,10)(16,21)(17,22)(18,23)(19,24)(20,25), +> (11,16,21)(12,17,22)(13,18,23)(14,19,24)(15,20,25) ]);; +gap> Length(ConjugacyClasses(G)); +2625