From fcd5de4c62de48cf74b67a58cf8310e135f099ae Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 6 May 2024 18:37:52 +0200 Subject: [PATCH] Ensure subgroup is tested at least once, (#5709) in finding induced permutation representation of FpGroup, even if max parameter was increased in between. This resolves #5697 Co-authored-by: Alexander Hulpke --- 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