Skip to content

Commit

Permalink
Fix unexpected error in MinimalGeneratingSet for solvable non-pc gr…
Browse files Browse the repository at this point in the history
…oups

It could end up returning nothing and not invoking TryNextMethod().
This caused a failure in the hap test suite.

This is a recent regression in 4.12.0.
  • Loading branch information
fingolfin committed Sep 9, 2022
1 parent 0c9da51 commit 94ea907
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ InstallMethod(MinimalGeneratingSet,"test solvable and 2-generator noncyclic",
function(G)
local i;
if not HasIsSolvableGroup(G) and IsSolvableGroup(G) and
CanEasilyComputePcgs(G) then
CanEasilyComputePcgs(G) then
# discovered solvable -- redo
return MinimalGeneratingSet(G);
elif not IsSolvableGroup(G) then
if IsGroup(G) and (not IsCyclic(G)) and HasGeneratorsOfGroup(G)
and Length(GeneratorsOfGroup(G)) = 2 then
return GeneratorsOfGroup(G);
fi;
TryNextMethod();
fi;
TryNextMethod();
end);

#############################################################################
Expand Down
5 changes: 5 additions & 0 deletions tst/testbugfix/2022-09-09-MinimalGeneratingSet.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gap> G:=Group((1,2),(2,3),(3,4));;
gap> H:=Image(IsomorphismFpGroup(G));;
gap> MinimalGeneratingSet(H);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 4th choice method found for `MinimalGeneratingSet' on 1 arguments

0 comments on commit 94ea907

Please sign in to comment.