Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly extend MinimalGeneratingSet for groups #1755

Merged
merged 2 commits into from
Oct 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ InstallMethod(MinimalGeneratingSet,"solvable group via pc",true,
function(G)
local i;
if not IsSolvableGroup(G) then
if IsGroup(G) and HasGeneratorsOfGroup(G)
and Length(GeneratorsOfGroup(G)) = 2 then
return GeneratorsOfGroup(G);
fi;
TryNextMethod();
fi;
i:=IsomorphismPcGroup(G);
Expand All @@ -122,9 +126,10 @@ function(G)
TryNextMethod();
else
Error(
"`MinimalGeneratingSet' currently assumes that the group must be solvable.\n",
"`MinimalGeneratingSet' currently assumes that the group is solvable, or\n",
"already possesses a generating set of size 2.\n",
"In general, try `SmallGeneratingSet' instead, which returns a generating\n",
"set that is small but not of guarateed smallest cardinality");
"set that is small but not of guaranteed smallest cardinality");
fi;
end);

Expand Down
5 changes: 5 additions & 0 deletions tst/testinstall/grpperm.tst
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,9 @@ gap> Length(MaximalSubgroupClassReps(g));
gap> g:=PSL(8,2);;
gap> Length(MaximalSubgroupClassReps(g));
10
gap> G := SymmetricGroup(6);;
gap> IsSolvable(G);
false
gap> Length(MinimalGeneratingSet(G));
2
gap> STOP_TEST( "grpperm.tst", 1);