Skip to content

Commit

Permalink
Ensure subgroup is tested at least once,
Browse files Browse the repository at this point in the history
in finding induced permutation representation of FpGroup,
even if max parameter was increased in between. This resolves #5697
  • Loading branch information
hulpke authored and fingolfin committed May 6, 2024
1 parent 59190ce commit 4e747c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/grpfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<amax do
Expand Down
12 changes: 12 additions & 0 deletions tst/testbugfix/2024-05-06-IsomorphismPermGroupOrFailFpGroup.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Verify regression in IsomorphismPermGroupOrFailFpGroup is
# resolved, see <https://github.com/gap-system/gap/issues/5697>
gap> F:= FreeGroup(2);
<free group on the generators [ f1, f2 ]>
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;
<fp group on the generators [ f1, f2 ]>
gap> IsomorphismPermGroupOrFailFpGroup(G, 100000) <> fail;
true

0 comments on commit 4e747c9

Please sign in to comment.