Skip to content

Commit

Permalink
grpfp: detect relators that are powers
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Mar 16, 2024
1 parent 21dbc3d commit 9404db1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/grpfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3790,15 +3790,26 @@ end );
## enumerations with cumulatively bigger coset tables up to table size
## <maxtable>. It returns `fail' if no table could be found.
BindGlobal("FinIndexCyclicSubgroupGenerator",function(G,maxtable)
local fgens,grels,max,gens,t,Attempt,perms,short;
local fgens, grels, powers, max, gens, t, Attempt, perms, short;

fgens:=FreeGeneratorsOfFpGroup(G);
grels:=RelatorsOfFpGroup(G);

max:=ValueOption("max");
if max=fail then
max:=CosetTableDefaultMaxLimit;
fi;
max:=Minimum(max,maxtable);

powers := List(grels, ExtRepOfObj);
powers := Filtered(powers, x -> Length(x) = 2);
if not IsEmpty(powers) then
SortBy(powers, x -> x[2]);
if Last(powers)[2] > 10 then
max := Last(powers)[2];
fi;
fi;

# take the generators, most frequent first
gens:=GeneratorsOfGroup(G);
t:=MostFrequentGeneratorFpGroup(G);
Expand Down

0 comments on commit 9404db1

Please sign in to comment.