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

Fix Agemo(G,p) for trivial group G #5494

Merged
merged 1 commit into from
Aug 25, 2023
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
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 @@
G := arg[1];
p := arg[2];

if IsTrivial(G) then
return G;

Check warning on line 2366 in lib/grp.gi

View check run for this annotation

Codecov / codecov/patch

lib/grp.gi#L2366

Added line #L2366 was not covered by tests
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>