From beac8a05dd8f4973ce0d9343b4403324e177a8aa Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 25 Aug 2023 11:46:11 +0200 Subject: [PATCH] Fix Agemo(G,p) for trivial G (#5494) --- lib/grp.gi | 4 ++++ tst/testbugfix/2023-08-25-Agemo.tst | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 tst/testbugfix/2023-08-25-Agemo.tst diff --git a/lib/grp.gi b/lib/grp.gi index f2e6b620fb..5713761c35 100644 --- a/lib/grp.gi +++ b/lib/grp.gi @@ -2362,6 +2362,10 @@ InstallGlobalFunction( Agemo, function( arg ) G := arg[1]; p := arg[2]; + if IsTrivial(G) then + return G; + fi; + # must be a

-group if not IsPGroup(G) or PrimePGroup(G)<>p then Error( "Agemo: must be a p-group" ); diff --git a/tst/testbugfix/2023-08-25-Agemo.tst b/tst/testbugfix/2023-08-25-Agemo.tst new file mode 100644 index 0000000000..1f525b5f70 --- /dev/null +++ b/tst/testbugfix/2023-08-25-Agemo.tst @@ -0,0 +1,5 @@ +# fix Agemo(G,p) for trivial G +gap> Agemo(TrivialGroup(IsPcGroup), 2); + +gap> Agemo(TrivialGroup(IsPcGroup), 2, 1); +