Skip to content

Commit

Permalink
randiso: fix CodePcGroup for trivial gp (#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson committed Sep 6, 2017
1 parent a4b3595 commit 43907fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/randiso.gi
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ InstallGlobalFunction( CodePcgs, function( pcgs )

# basic structures
l := Length( pcgs );
if l = 0 then
return 0;
fi;
indices := RelativeOrders( pcgs );
mi := Maximum( indices ) - 1;
code := 0;
Expand Down
7 changes: 7 additions & 0 deletions tst/testbugfix/2017-09-06-CodePcGroup.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Issue #1664 on github.com/gap-system/gap
gap> G := TrivialGroup(IsPcGroup);
<pc group of size 1 with 0 generators>
gap> CodePcGroup(G);
0
gap> IsTrivial(PcGroupCode(0, 1));
true

0 comments on commit 43907fc

Please sign in to comment.