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 a rare error message in isomorphism test #5298

Merged
merged 5 commits into from
Jan 10, 2023
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
17 changes: 8 additions & 9 deletions lib/autsr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs,
for j in b do
N:=ClosureSubgroup(N,b);
od;
# insert
# insert in series
for j in [Length(ser),Length(ser)-1..i+1] do
ser[j+1]:=ser[j];
od;
Expand All @@ -1034,13 +1034,13 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs,
Info(InfoMorph,2,"insert2");
fi;
N:=ser[i+1]; # the added normal
if rada<>fail
and ForAny(GeneratorsOfGroup(rada),x->N<>Image(x,N)) then
Info(InfoMorph,3,"radical automorphism stabilizer");
SetIsGroupOfAutomorphismsFiniteGroup(rada,true);
NiceMonomorphism(rada:autactbase:=fail,someCharacteristics:=fail);
rada:=Stabilizer(rada,N,asAutom);
fi;
fi;
if rada<>fail
and ForAny(GeneratorsOfGroup(rada),x->N<>Image(x,N)) then
Info(InfoMorph,3,"radical automorphism stabilizer");
SetIsGroupOfAutomorphismsFiniteGroup(rada,true);
NiceMonomorphism(rada:autactbase:=fail,someCharacteristics:=fail);
rada:=Stabilizer(rada,N,asAutom);
fi;
fi;
until split or fratsim;
Expand Down Expand Up @@ -1332,7 +1332,6 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs,
# move back to bad degree
rada:=Group(List(GeneratorsOfGroup(rada),
x-> InducedAutomorphism(InverseGeneralMapping(ind),x)));

fi;
fi;

Expand Down
2 changes: 1 addition & 1 deletion lib/ctblfuns.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ DeclareAttribute( "TrivialCharacter", IsGroup );
## gap> NaturalCharacter( Group( [ [ 0, -1 ], [ 1, -1 ] ] ) );
## Character( CharacterTable( Group([ [ [ 0, -1 ], [ 1, -1 ] ] ]) ),
## [ 2, -1, -1 ] )
## gap> d8:= DihedralGroup( 8 );; hom:= IsomorphismPermGroup( d8 );;
## gap> d8:= DihedralGroup( 8 );; hom:= RegularActionHomomorphism( d8 );;
## gap> NaturalCharacter( hom );
## Character( CharacterTable( <pc group of size 8 with 3 generators> ),
## [ 8, 0, 0, 0, 0 ] )
Expand Down
19 changes: 18 additions & 1 deletion lib/ctblgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ local D,C,cl,pl;
D.classes:= ConjugacyClasses( C );
cl:=ShallowCopy(D.classes);
D.classreps:=List(cl,Representative);
D.centfachom:=[];
D.klanz:=Length(cl);
D.classrange:=[1..D.klanz];
Info(InfoCharacterTable,1,D.klanz," classes");
Expand Down Expand Up @@ -1727,7 +1728,23 @@ DoubleCentralizerOrbit := function(D,c1,c2)
else
#Info(InfoCharacterTable,3,"using DoubleCosets;");
cent:=Centralizer(D.classes[inv]);
l:=DoubleCosetRepsAndSizes(D.group,cent,Centralizer(D.classes[c2]));
if IndexNC(D.group,cent)<=10^5 then
if not IsBound(D.centfachom[inv]) then
e:=ActionHomomorphism(D.group,RightTransversal(D.group,cent),OnRight,
"surjective");
Image(e);
# do not use action later on
e:=AsGroupGeneralMappingByImages(e);
D.centfachom[inv]:=e;
else
e:=D.centfachom[inv];
fi;
s:=Orbits(Image(e,Centralizer(D.classes[c2])),[1..IndexNC(D.group,cent)]);
l:=List(s,x->[PreImagesRepresentative(e,
RepresentativeAction(Image(e),1,x[1])),Size(cent)*Length(x)]);
else
l:=DoubleCosetRepsAndSizes(D.group,cent,Centralizer(D.classes[c2]));
fi;
s1:=Size(cent);
e:=[];
s:=[];
Expand Down
3 changes: 2 additions & 1 deletion lib/factgrp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,12 @@ DeclareSynonym( "ImproveOperationDegreeByBlocks",
## called internally might try a degree reduction.)
## <P/>
## <Example><![CDATA[
## gap> iso:=RegularActionHomomorphism(SymmetricGroup(4));;
## gap> image:= Image( iso );; NrMovedPoints( image );
## 24
## gap> small:= SmallerDegreePermutationRepresentation( image );;
## gap> Image( small );
## Group([ (2,3), (1,2,3), (1,3)(2,4), (1,2)(3,4) ])
## Group([ (2,5,4,3), (1,4)(2,6)(3,5) ])
## gap> g:=Image(IsomorphismPermGroup(GL(4,5)));;
## gap> sm:=SmallerDegreePermutationRepresentation(g:cheap);;
## gap> NrMovedPoints(Range(sm));
Expand Down
4 changes: 4 additions & 0 deletions lib/factgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ local pool,p,h,ise,emb,i,j;
fi;
od;
ise:=List(ise,i->GetNaturalHomomorphismsPool(G,pool.ker[i]));
if not (ForAll(ise,IsPcGroup) or ForAll(ise,IsPermGroup)) then
ise:=List(ise,x->x*IsomorphismPermGroup(Image(x)));
fi;

h:=CallFuncList(DirectProduct,List(ise,Image));
emb:=List([1..Length(ise)],i->Embedding(h,i));
emb:=List(GeneratorsOfGroup(G),
Expand Down
1 change: 1 addition & 0 deletions lib/fitfree.gd
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ InstallTrueMethod(CanComputeFittingFree,HasFittingFreeLiftSetup);
## </ManSection>
## <#/GAPDoc>
DeclareGlobalFunction("FittingFreeSubgroupSetup");
DeclareOperation("DoFFSS",[IsGroup,IsGroup]);

# This attribute is used for groups treated by constructive recognition and
# a composition tree. It is declared in the library such that the function
Expand Down
114 changes: 84 additions & 30 deletions lib/fitfree.gi
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,11 @@ local R;
fi;
end);

InstallGlobalFunction(FittingFreeSubgroupSetup,function(G,U)
local cache,ffs,pcisom,rest,it,kpc,k,x,ker,r,pool,i,xx,inv,pregens;
ffs:=FittingFreeLiftSetup(G);
InstallMethod(DoFFSS,"generic",IsIdenticalObj,[IsGroup and IsFinite,IsGroup],0,
function(G,U)
local ffs,pcisom,rest,it,kpc,k,x,ker,r,pool,i,xx,inv,pregens,iso;

# result cached?
if not IsBound(U!.cachedFFS) then
cache:=[];
U!.cachedFFS:=cache;
else
cache:=U!.cachedFFS;
fi;
r:=First(cache,x->IsIdenticalObj(x[1],ffs));
if r<>fail then
return r[2];
fi;
ffs:=FittingFreeLiftSetup(G);

pcisom:=ffs.pcisom;

Expand Down Expand Up @@ -90,25 +80,51 @@ local cache,ffs,pcisom,rest,it,kpc,k,x,ker,r,pool,i,xx,inv,pregens;
k:=ffs.pcgs;
else

inv:=RestrictedInverseGeneralMapping(rest);
pregens:=List(SmallGeneratingSet(Image(rest)),
x->ImagesRepresentative(inv,x));
it:=CoKernelGensIterator(inv);
kpc:=TrivialSubgroup(Image(pcisom));
while not IsDoneIterator(it) do
x:=NextIterator(it);
pool:=[x];
for x in pool do
xx:=ImagesRepresentative(pcisom,x);
if not xx in kpc then
kpc:=ClosureGroup(kpc,xx);
for i in pregens do
Add(pool,x^i);
od;
iso:=IsomorphismFpGroup(Image(rest,U));
pregens:=List(GeneratorsOfGroup(Range(iso)),x->
PreImagesRepresentative(rest,PreImagesRepresentative(iso,x)));
# evaluate relators
pool:=List(RelatorsOfFpGroup(Range(iso)),
x->MappedWord(x,FreeGeneratorsOfFpGroup(Range(iso)),pregens));
# divide off original generators
Append(pool,List(GeneratorsOfGroup(U),x->x/
MappedWord(UnderlyingElement(ImagesRepresentative(iso,ImagesRepresentative(ffs.factorhom,x))),FreeGeneratorsOfFpGroup(Range(iso)),pregens)));


pool:=List(pool,x->ImagesRepresentative(pcisom,x));
kpc:=SubgroupNC(Image(pcisom),pool);
pool:=List(SmallGeneratingSet(kpc),x->PreImage(pcisom,x));
# normal closure
for x in pool do
for i in GeneratorsOfGroup(U) do
xx:=x^i;
k:=ImagesRepresentative(pcisom,xx);
if not k in kpc then
kpc:=ClosureSubgroupNC(kpc,k);
Add(pool,xx);
fi;
od;
#Print("|pool|=",Length(pool),"\n");
od;

# inv:=RestrictedInverseGeneralMapping(rest);
# pregens:=List(SmallGeneratingSet(Image(rest)),
# x->ImagesRepresentative(inv,x));
# it:=CoKernelGensIterator(inv);
# kpc:=TrivialSubgroup(Image(pcisom));
# while not IsDoneIterator(it) do
# x:=NextIterator(it);
# pool:=[x];
# for x in pool do
# xx:=ImagesRepresentative(pcisom,x);
# if not xx in kpc then
# kpc:=ClosureGroup(kpc,xx);
# for i in pregens do
# Add(pool,x^i);
# od;
# fi;
# od;
# #Print("|pool|=",Length(pool),"\n");
# od;
SetSize(U,Size(Image(rest))*Size(kpc));
k:=InducedPcgs(FamilyPcgs(Image(pcisom)),kpc);
k:=List(k,x->PreImagesRepresentative(pcisom,x));
Expand All @@ -131,6 +147,44 @@ local cache,ffs,pcisom,rest,it,kpc,k,x,ker,r,pool,i,xx,inv,pregens;
pcgs:=k,
serdepths:=List(ffs.depths,y->First([1..Length(r)],x->r[x]>=y))
);

return r;

end);

InstallGlobalFunction(FittingFreeSubgroupSetup,function(G,U)
local ffs,cache,rest,ker,k,r;
ffs:=FittingFreeLiftSetup(G);

# result cached?
if not IsBound(U!.cachedFFS) then
cache:=[];
U!.cachedFFS:=cache;
else
cache:=U!.cachedFFS;
fi;
r:=First(cache,x->IsIdenticalObj(x[1],ffs));
if r<>fail then
return r[2];
fi;

if IsIdenticalObj(G,U) or GeneratorsOfGroup(G)=GeneratorsOfGroup(U) then
rest:=ffs.factorhom;
ker:=ffs.radical;
k:=ffs.pcgs;
r:=[1..Length(k)];
r:=rec(parentffs:=ffs,
rest:=rest,
ker:=ker,
pcgs:=k,
serdepths:=List(ffs.depths,y->First([1..Length(r)],x->r[x]>=y))
);
else
r:=DoFFSS(G,U);
fi;

k:=r.pcgs;
rest:=r.rest;
Add(cache,[ffs,r]); # keep
if Length(k)=0 then
SetSize(U,Size(Image(rest)));
Expand Down
2 changes: 2 additions & 0 deletions lib/ghom.gd
Original file line number Diff line number Diff line change
Expand Up @@ -673,3 +673,5 @@ DeclareAttribute( "ImagesSmallestGenerators",
## <#/GAPDoc>
##
DeclareAttribute( "RegularActionHomomorphism", IsGroup );

DeclareGlobalName("IsomorphismAbelianGroupViaIndependentGenerators");
4 changes: 4 additions & 0 deletions lib/ghom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,10 @@ function ( G )
if not HasIsAbelian( G ) and IsAbelian( G ) then
# Redispatch to give the special methods for abelian groups a chance.
return IsomorphismPermGroup( G );
elif (not HasIsSolvableGroup(G)) and IsSolvableGroup(G) then
# Redispatch to give the special methods for solvable groups a chance.
return IsomorphismPermGroup( G );

# MH: Disabled the following code for now, as computing IsNilpotentGroup
# can be very expensive, depending on the group type. We could
# re-enable it for e.g. pc groups, but I am not sure whether it is
Expand Down
5 changes: 2 additions & 3 deletions lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4279,10 +4279,9 @@ DeclareAttribute( "IsomorphismSpecialPcGroup", IsGroup );
## gap> g:=SmallGroup(24,12);
## <pc group of size 24 with 4 generators>
## gap> iso:=IsomorphismPermGroup(g);
## <action isomorphism>
## [ f1, f2, f3, f4 ] -> [ (2,3), (2,3,4), (1,2)(3,4), (1,3)(2,4) ]
## gap> Image(iso,g.3*g.4);
## (1,12)(2,16)(3,19)(4,5)(6,22)(7,8)(9,23)(10,11)(13,24)(14,15)(17,
## 18)(20,21)
## (1,4)(2,3)
## ]]></Example>
## <P/>
## In many cases the permutation representation constructed by
Expand Down
Loading