From 4e747c914b1cbbd6099b6cf244a2e24fbaa4060d Mon Sep 17 00:00:00 2001 From: Alexander Hulpke Date: Fri, 5 Apr 2024 09:59:21 -0600 Subject: [PATCH] Ensure subgroup is tested at least once, in finding induced permutation representation of FpGroup, even if max parameter was increased in between. This resolves #5697 --- lib/grpfp.gi | 3 +++ .../2024-05-06-IsomorphismPermGroupOrFailFpGroup.tst | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tst/testbugfix/2024-05-06-IsomorphismPermGroupOrFailFpGroup.tst diff --git a/lib/grpfp.gi b/lib/grpfp.gi index 3466204b8b..b84ded14ab 100644 --- a/lib/grpfp.gi +++ b/lib/grpfp.gi @@ -4051,6 +4051,7 @@ local mappow, G, max, p, gens, rels, comb, i, l, m, H, t, gen, sz, RelatorsOfFpGroup(G),[gen],true,false: cyclic:=true,limit:=1+max,quiet:=true ); fi; + if t=fail then # we cannot get the size within the permitted limits -- give up return fail; @@ -4098,6 +4099,8 @@ local mappow, G, max, p, gens, rels, comb, i, l, m, H, t, gen, sz, max:=10^3*sz; fi; + amax:=Maximum(amax,max+1); + useind:=false; t1:=timerFunc(); while max +gap> F:= FreeGroup(2); + +gap> gens:= GeneratorsOfGroup( F ); +[ f1, f2 ] +gap> x:= gens[1];; y:= gens[2];; +gap> rels:= [ y*x^-1*y^-1*x*y^-1*x^-1, x^-1*y*x*y*x^-1*y^-2 ];; +gap> G:= F / rels; + +gap> IsomorphismPermGroupOrFailFpGroup(G, 100000) <> fail; +true