From df91fdb89344e71f43d88b68555193b14c059876 Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Sat, 26 Nov 2022 12:15:54 -0700 Subject: [PATCH] ENHANCE: Improvement to perm rep of fp. Try to use induced permutation representation, if we cannot find easily coreless subgroup that finishes coset enumeration. This resolves #5222 --- lib/ghomfp.gd | 7 ++++ lib/ghomfp.gi | 2 +- lib/grpfp.gi | 100 ++++++++++++++++++++++++++++++++++---------------- 3 files changed, 77 insertions(+), 32 deletions(-) diff --git a/lib/ghomfp.gd b/lib/ghomfp.gd index 61c33352fc..42f412b24e 100644 --- a/lib/ghomfp.gd +++ b/lib/ghomfp.gd @@ -357,3 +357,10 @@ DeclareGlobalFunction("LargerQuotientBySubgroupAbelianization"); ## <#/GAPDoc> ## DeclareGlobalFunction("ProcessEpimorphismToNewFpGroup"); + +############################################################################# +## +#M InducedRepFpGroup(, ) +## +## induce def. on up to the full group +DeclareGlobalFunction("InducedRepFpGroup"); diff --git a/lib/ghomfp.gi b/lib/ghomfp.gi index d0f9558ce8..d1c08cd35a 100644 --- a/lib/ghomfp.gi +++ b/lib/ghomfp.gi @@ -504,7 +504,7 @@ end); #M InducedRepFpGroup(, ) ## ## induce def. on up to the full group -BindGlobal("InducedRepFpGroup",function(thom,s) +InstallGlobalFunction(InducedRepFpGroup,function(thom,s) local t,w,c,q,chom,tg,hi,u; w:=FamilyObj(s)!.wholeGroup; diff --git a/lib/grpfp.gi b/lib/grpfp.gi index eff13fec0f..e250e5a53a 100644 --- a/lib/grpfp.gi +++ b/lib/grpfp.gi @@ -3989,7 +3989,7 @@ InstallGlobalFunction(IsomorphismPermGroupOrFailFpGroup, function(arg) local mappow, G, max, p, gens, rels, comb, i, l, m, H, t, gen, silent, sz, t1, bad, trial, b, bs, r, nl, o, u, rp, eo, rpo, e, e2, sc, j, z, - timerFunc; + timerFunc,amax,iso,useind; timerFunc := GET_TIMER_FROM_ReproducibleBehaviour(); @@ -4101,36 +4101,70 @@ local mappow, G, max, p, gens, rels, comb, i, l, m, H, t, gen, silent, sz, max:=sz*10; fi; + # Do not die on large coset table + amax:=max; + if max>10^4*sz then + max:=10^3*sz; + fi; + + useind:=false; t1:=timerFunc(); - bad:=[]; - i:=1; - while Size(H)IsSubset(i,trial)) then - Info(InfoFpGroup,1,"Try subgroup ",trial); - t:=CosetTableFromGensAndRels(gens,rels,trial:silent:=true,max:=max ); - if t<>fail then - Info(InfoFpGroup,1,"has index ",IndexCosetTab(t)); - p:=t{[1,3..Length(t)-1]}; - Unbind(t); - for j in [1..Length(p)] do - p[j]:=PermList(p[j]); - od; - H:= GroupByGenerators( p ); - # compute stabilizer chain with size info. - if Length(trial)=0 then - # regular is faithful - SetSize(H,sz); - else - StabChain(H,rec(limit:=sz)); - fi; - else - # note that this subset fails a coset enumeration - Add(bad,Set(trial)); + while maxIsSubset(i,trial)) then + Info(InfoFpGroup,1,"Try subgroup ",trial," with ",max); + t:=CosetTableFromGensAndRels(gens,rels,trial:silent:=true,max:=max ); + if t<>fail then + Info(InfoFpGroup,1,"has index ",IndexCosetTab(t)); + p:=t{[1,3..Length(t)-1]}; + Unbind(t); + for j in [1..Length(p)] do + p[j]:=PermList(p[j]); + od; + H:= GroupByGenerators( p ); + # compute stabilizer chain with size info. + if Length(trial)=0 then + # regular is faithful + SetSize(H,sz); + else + StabChain(H,rec(limit:=sz)); + fi; + + + # try to use induced rep + if Size(H)1 then + iso:=IsomorphismFpGroup(SubgroupNC(G, + List(trial,x->ElementOfFpGroup(FamilyObj(One(G)),x)) + ):silent:=true,max:=2*max); + H:=Range(iso); + t:=IsomorphismPermGroupOrFailFpGroup(H,max); + if t<>fail then + t:=iso*t; + iso:=InducedRepFpGroup(t,Source(iso)); + H:=Group(List(GeneratorsOfGroup(G), + x->ImagesRepresentative(iso,x))); + StabChain(H,rec(limit:=sz)); + if IsAbelian(H) then + t:=MinimalFaithfulPermutationRepresentation(H); + H:=Group(List(GeneratorsOfGroup(H), + x->ImagesRepresentative(t,x))); + StabChain(H,rec(limit:=sz)); + fi; + useind:=true; + fi; + fi; + else + # note that this subset fails a coset enumeration + Add(bad,Set(trial)); + fi; fi; - fi; - i:=i+1; + i:=i+1; + od; + max:=Minimum(amax,max*10); od; if Size(H)=Size(H) then + p:=SmallerDegreePermutationRepresentation(H); + else + p:=SmallerDegreePermutationRepresentation(H:cheap); + fi; # tell the family that we can now compare elements SetCanEasilyCompareElements(FamilyObj(One(G)),true); SetCanEasilySortElements(FamilyObj(One(G)),true);