Skip to content

Commit a97a261

Browse files
authored
Fix LowerCentralSeriesOfGroup for trivial groups (gap-system#6110)
Fix `LowerCentralSeriesOfGroup` and `NilpotencyClassOfGroup` for trivial groups to return a list of length 1 resp. the value 0 (and not a list of length 2 resp. the value 1).
1 parent 779bd56 commit a97a261

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

lib/grpperm.gi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,10 @@ InstallMethod( LowerCentralSeriesOfGroup,"for permgrp", true, [ IsPermGroup ], 0
14471447
function( G )
14481448
local pcgs, series;
14491449

1450+
if IsTrivial(G) then
1451+
return [G];
1452+
fi;
1453+
14501454
if not DefaultStabChainOptions.tryPcgs
14511455
or HasIsNilpotentGroup( G ) and not IsNilpotentGroup( G )
14521456
and not (HasIsNilpotentGroup(G) and IsNilpotentGroup(G)) then
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Fix a bug in LowerCentralSeriesOfGroup for trivial groups
2+
# See https://github.com/gap-system/gap/issues/6108
3+
gap> D:=Group(());;
4+
gap> LowerCentralSeriesOfGroup( D );
5+
[ Group(()) ]
6+
gap> NilpotencyClassOfGroup(D);
7+
0

0 commit comments

Comments
 (0)