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);