Skip to content

Commit

Permalink
SubgroupsSolvableGroup: honor retnorm for trivial groups
Browse files Browse the repository at this point in the history
The function `SubgroupsSolvableGroup` with a trivial group as argument
did not return the list of normalizers when called with the option `retnorm`.

Co-authored-by: Max Horn <[email protected]>
  • Loading branch information
RamonEstebanRomero and fingolfin committed May 10, 2022
1 parent 572594d commit 2471da9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/grppclat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -570,25 +570,31 @@ local g, # group
xo; # xternal orbits

g:=arg[1];
if Size(g)=1 then
return [g];
fi;
if Length(arg)>1 and IsRecord(arg[Length(arg)]) then
opt:=arg[Length(arg)];
else
opt:=rec();
fi;

# parse options
retnorm:=IsBound(opt.retnorm) and opt.retnorm;

# handle trivial case
if IsTrivial(g) then
if retnorm then
return [[g],[g]];
else
return [g];
fi;
fi;

normal:=IsBound(opt.normal) and opt.normal=true;
if IsBound(opt.consider) then
consider:=opt.consider;
else
consider:=false;
fi;

retnorm:=IsBound(opt.retnorm) and opt.retnorm;

isom:=fail;

# get automorphisms and compute their normalizer, if applicable
Expand Down
9 changes: 9 additions & 0 deletions tst/testbugfix/2022-05-10-SubgroupsSolvableGroup.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Verify SubgroupsSolvableGroup honor retnorm=true if the
# input is a trivial group.
# See https://github.com/gap-system/gap/pull/4855
gap> G:=TrivialGroup(IsPermGroup);
Group(())
gap> SubgroupsSolvableGroup(G);
[ Group(()) ]
gap> SubgroupsSolvableGroup(G, rec(retnorm:=true));
[ [ Group(()) ], [ Group(()) ] ]

0 comments on commit 2471da9

Please sign in to comment.