Skip to content

Commit

Permalink
Fix Agemo(G,p) for trivial G (#5494)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Aug 25, 2023
1 parent 7762032 commit beac8a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2362,6 +2362,10 @@ InstallGlobalFunction( Agemo, function( arg )
G := arg[1];
p := arg[2];

if IsTrivial(G) then
return G;
fi;

# <G> must be a <p>-group
if not IsPGroup(G) or PrimePGroup(G)<>p then
Error( "Agemo: <G> must be a p-group" );
Expand Down
5 changes: 5 additions & 0 deletions tst/testbugfix/2023-08-25-Agemo.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# fix Agemo(G,p) for trivial G
gap> Agemo(TrivialGroup(IsPcGroup), 2);
<pc group of size 1 with 0 generators>
gap> Agemo(TrivialGroup(IsPcGroup), 2, 1);
<pc group of size 1 with 0 generators>

0 comments on commit beac8a0

Please sign in to comment.