Skip to content

Commit

Permalink
Support AbelianInvariants for infinite cyclic groups
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Mar 17, 2023
1 parent 577dcec commit e97be8e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,9 @@ InstallMethod( AbelianInvariants,
local H, p, l, r, i, j, gns, inv, ranks, g, cmm;

if not IsFinite(G) then
if HasIsCyclic(G) and IsCyclic(G) then
return [ 0 ];
fi;
TryNextMethod();
elif IsTrivial( G ) then
return [];
Expand Down
10 changes: 10 additions & 0 deletions tst/testinstall/opers/AbelianInvariants.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
gap> START_TEST("AbelianInvariants.tst");

#
gap> G := Group( [ [ [ 2, 1 ], [ 17, 8 ] ] ] );
Group([ [ [ 2, 1 ], [ 17, 8 ] ] ])
gap> AbelianInvariants(G);
[ 0 ]

#
gap> STOP_TEST( "AbelianInvariants.tst", 1);

0 comments on commit e97be8e

Please sign in to comment.