Skip to content

Commit

Permalink
Add NormalSubgroups methods for symmetric and alternating groups
Browse files Browse the repository at this point in the history
  • Loading branch information
mtorpey committed Aug 6, 2018
1 parent c8401be commit dd2f34f
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lib/gpprmsya.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2447,6 +2447,42 @@ InstallMethod( RadicalGroup, "symmetric", true,
InstallMethod( RadicalGroup, "alternating", true,
[ IsNaturalAlternatingGroup and IsFinite], 0,RadicalSymmAlt);

InstallMethod(NormalSubgroups,
"for a perm group isomorphic to the symmetric group",
[IsPermGroup and IsSymmetricGroup],
function(G)
local pts, list;
pts := MovedPoints(G);
list := [Group(())]; # Trivial group
if Length(pts) = 4 then # Klein 4-group
Add(list, Group((pts[1],pts[2])(pts[3],pts[4]),
(pts[1],pts[3])(pts[2],pts[4])));
fi;
if Length(pts) > 2 then # Alternating group
Add(list, AlternatingGroup(pts));
fi;
if Length(pts) > 1 then
Add(list, G); # Symmetric group
fi;
return list;
end);

InstallMethod(NormalSubgroups,
"for a perm group isomorphic to the alternating group",
[IsPermGroup and IsAlternatingGroup],
function(G)
local pts, list;
pts := MovedPoints(G);
list := [Group(())];
if Length(pts) = 4 then
Add(list, Group((pts[1],pts[2])(pts[3],pts[4]),
(pts[1],pts[3])(pts[2],pts[4])));
fi;
if Length(pts) > 1 then
Add(list, G);
fi;
return list;
end);

#############################################################################
##
Expand Down
61 changes: 61 additions & 0 deletions tst/testinstall/opers/NormalSubgroups.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
gap> START_TEST("NormalSubgroups.tst");

# Normal subgroups of a symmetric group
gap> NormalSubgroups(SymmetricGroup(0));
[ Group(()) ]
gap> NormalSubgroups(SymmetricGroup(1));
[ Group(()) ]
gap> NormalSubgroups(SymmetricGroup(2));
[ Group(()), Sym( [ 1 .. 2 ] ) ]
gap> NormalSubgroups(SymmetricGroup(3));
[ Group(()), Alt( [ 1 .. 3 ] ), Sym( [ 1 .. 3 ] ) ]
gap> NormalSubgroups(SymmetricGroup(4));
[ Group(()), Group([ (1,2)(3,4), (1,3)(2,4) ]), Alt( [ 1 .. 4 ] ),
Sym( [ 1 .. 4 ] ) ]
gap> NormalSubgroups(SymmetricGroup(5));
[ Group(()), Alt( [ 1 .. 5 ] ), Sym( [ 1 .. 5 ] ) ]
gap> NormalSubgroups(SymmetricGroup(6));
[ Group(()), Alt( [ 1 .. 6 ] ), Sym( [ 1 .. 6 ] ) ]
gap> NormalSubgroups(SymmetricGroup(100));
[ Group(()), Alt( [ 1 .. 100 ] ), Sym( [ 1 .. 100 ] ) ]
gap> NormalSubgroups(SymmetricGroup([3,7,4,11,70]));
[ Group(()), Alt( [ 3, 4, 7, 11, 70 ] ), Sym( [ 3, 4, 7, 11, 70 ] ) ]
gap> NormalSubgroups(SymmetricGroup([7,4,13,21]));
[ Group(()), Group([ (4,7)(13,21), (4,13)(7,21) ]), Alt( [ 4, 7, 13, 21 ] ),
Sym( [ 4, 7, 13, 21 ] ) ]
gap> NormalSubgroups(SymmetricGroup([42]));
[ Group(()) ]
gap> NormalSubgroups(SymmetricGroup([]));
[ Group(()) ]
gap> G := Group((7,3,5,11), (11,3), (5,3));;
gap> IsSymmetricGroup(G);
true
gap> NormalSubgroups(G);
[ Group(()), Group([ (3,5)(7,11), (3,7)(5,11) ]), Alt( [ 3, 5, 7, 11 ] ),
Sym( [ 3, 5, 7, 11 ] ) ]

# Normal subgroups of an alternating group
gap> NormalSubgroups(AlternatingGroup(0));
[ Group(()) ]
gap> NormalSubgroups(AlternatingGroup(1));
[ Group(()) ]
gap> NormalSubgroups(AlternatingGroup(2));
[ Group(()) ]
gap> NormalSubgroups(AlternatingGroup(3));
[ Group(()), Alt( [ 1 .. 3 ] ) ]
gap> NormalSubgroups(AlternatingGroup(4));
[ Group(()), Group([ (1,2)(3,4), (1,3)(2,4) ]), Alt( [ 1 .. 4 ] ) ]
gap> NormalSubgroups(AlternatingGroup(5));
[ Group(()), Alt( [ 1 .. 5 ] ) ]
gap> NormalSubgroups(AlternatingGroup(101));
[ Group(()), Alt( [ 1 .. 101 ] ) ]
gap> NormalSubgroups(AlternatingGroup([1,21,7,4]));
[ Group(()), Group([ (1,4)(7,21), (1,7)(4,21) ]), Alt( [ 1, 4, 7, 21 ] ) ]
gap> G := Group((16,12,4,11,3), (12,4,11));;
gap> IsAlternatingGroup(G);
true
gap> NormalSubgroups(G);
[ Group(()), Alt( [ 3, 4, 11, 12, 16 ] ) ]

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

0 comments on commit dd2f34f

Please sign in to comment.