Skip to content

Commit

Permalink
Fix one IsPNilpotent method, and add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jan 23, 2018
1 parent 3afc42f commit 3a6fc87
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2622,7 +2622,7 @@ InstallMethod( IsPNilpotentOp,
local primes, S;

primes:= PrimeDivisors( Size( G ) );
RemoveSet( primes, p );
primes:= Filtered(primes, q -> q <> p );
S:= HallSubgroup( G, primes );

return S <> fail and IsNormal( G, S );
Expand Down
15 changes: 15 additions & 0 deletions tst/testinstall/opers/IsPNilpotent.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
gap> START_TEST("IsPNilpotent.tst");

#
gap> G:=SymmetricGroup(3);;
gap> List([2,3,5], p -> IsPNilpotent(G,p));
[ true, false, true ]

#
gap> G:=SymmetricGroup(3);;
gap> SpecialPcgs(G);;
gap> List([2,3,5], p -> IsPNilpotent(G,p));
[ true, false, true ]

#
gap> STOP_TEST("IsPNilpotent.tst", 10000);
28 changes: 28 additions & 0 deletions tst/testinstall/opers/SimpleGroup.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
gap> START_TEST("SimpleGroup.tst");

#
gap> SimpleGroup("Sz(8)");
Sz(8)
gap> SimpleGroup("Suzuki(32)");
Sz(32)
gap> SimpleGroup("Suz(8)");
Sz(8)
gap> SimpleGroup("Sz(9)");
Error, Illegal Parameter for Suzuki groups
gap> SimpleGroup("Suz(16)");
Error, Illegal Parameter for Suzuki groups

#
gap> SimpleGroup("R(27)");
Ree(27)
gap> SimpleGroup("Ree(27)");
Ree(27)
gap> SimpleGroup("2G(243)");
Ree(243)
gap> SimpleGroup("Ree(9)");
Error, Illegal Parameter for Ree groups
gap> SimpleGroup("Ree(16)");
Error, Illegal Parameter for Ree groups

#
gap> STOP_TEST("SimpleGroup.tst", 10000);
33 changes: 33 additions & 0 deletions tst/testinstall/opers/SubdirectProducts.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
gap> START_TEST("SubdirectProducts.tst");
gap> G := SymmetricGroup(3);;
gap> H := SymmetricGroup(4);;
gap> A := CyclicGroup(6);;

#
gap> Set(SubdirectProducts(G, G), IdGroup);
[ [ 6, 1 ], [ 18, 4 ], [ 36, 10 ] ]
gap> Set(SubdirectProducts(H, H), IdGroup);
[ [ 24, 12 ], [ 96, 227 ], [ 288, 1026 ], [ 576, 8653 ] ]
gap> Set(SubdirectProducts(A, A), IdGroup);
[ [ 6, 2 ], [ 12, 5 ], [ 18, 5 ], [ 36, 14 ] ]

#
gap> Set(SubdirectProducts(G, H), IdGroup);
[ [ 24, 12 ], [ 72, 43 ], [ 144, 183 ] ]
gap> Set(SubdirectProducts(H, G), IdGroup);
[ [ 24, 12 ], [ 72, 43 ], [ 144, 183 ] ]

#
gap> Set(SubdirectProducts(G, A), IdGroup);
[ [ 18, 3 ], [ 36, 12 ] ]
gap> Set(SubdirectProducts(A, G), IdGroup);
[ [ 18, 3 ], [ 36, 12 ] ]

#
gap> Set(SubdirectProducts(H, A), IdGroup);
[ [ 72, 42 ], [ 144, 188 ] ]
gap> Set(SubdirectProducts(A, H), IdGroup);
[ [ 72, 42 ], [ 144, 188 ] ]

#
gap> STOP_TEST("SubdirectProducts.tst", 10000);

0 comments on commit 3a6fc87

Please sign in to comment.