Skip to content

Commit

Permalink
NormalClosure: accept list of normal generators as input
Browse files Browse the repository at this point in the history
... for the second argument
  • Loading branch information
fingolfin committed Apr 30, 2020
1 parent 9112e3e commit a48cdf4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2914,6 +2914,12 @@ function(G,U)
return U;
end);

InstallOtherMethod( NormalClosure, "generic method for a list of normal generators",
IsIdenticalObj, [ IsGroup, IsList ], SUM_FLAGS,
function(G, list)
return NormalClosure(G, Subgroup(G, list));
end);

#############################################################################
##
#M NormalIntersection( <G>, <U> ) . . . . . intersection with normal subgrp
Expand Down
40 changes: 40 additions & 0 deletions tst/testinstall/opers/NormalClosure.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
gap> START_TEST("NormalClosure.tst");

#
# setup perm groups
#
gap> G := SymmetricGroup(4);;
gap> H := AlternatingGroup(4);;

# normal closure of a subgroup
gap> G = NormalClosure(G, Group((1,2)));
true
gap> H = NormalClosure(G, Group((1,2,3)));
true

# normal closure of a bunch of generators
gap> G = NormalClosure(G, [ (1,2) ]);
true
gap> H = NormalClosure(G, [ (1,2,3) ]);
true

#
# setup fp groups
#
gap> G := FreeGroup(2);;

# normal closure of a subgroup
gap> H := Subgroup(G, [G.1^2, G.2^2, Comm(G.1, G.2)]);;
gap> Index(G, H);
infinity
gap> N := NormalClosure(G, H);;
gap> Index(G, N);
4

#
gap> N := NormalClosure(G, [G.1^2, G.2^2, Comm(G.1, G.2)]);;
gap> Index(G, N);
4

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

0 comments on commit a48cdf4

Please sign in to comment.