Skip to content

Commit

Permalink
Add test file for p-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
hungaborhorvath committed Jan 17, 2016
1 parent 3cc245a commit e1b3267
Showing 1 changed file with 171 additions and 0 deletions.
171 changes: 171 additions & 0 deletions tst/testinstall/pgroups.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
gap> START_TEST("pgroups.tst");
gap> A := Group((1,2),(3,4),(5,6));
Group([ (1,2), (3,4), (5,6) ])
gap> G := DirectProduct(A, A);
Group([ (1,2), (3,4), (5,6), (7,8), (9,10), (11,12) ])
gap> IsPGroup(G);
true
gap> HasPrimePGroup(A) and HasPrimePGroup(G);
true
gap> PrimePGroup(A);
2
gap> PrimePGroup(G);
2
gap> B := Group((1,2,3),(4,5,6));
Group([ (1,2,3), (4,5,6) ])
gap> IsAbelian(B);
true
gap> G := DirectProduct(B, B);
Group([ (1,2,3), (4,5,6), (7,8,9), (10,11,12) ])
gap> IsPGroup(G);
true
gap> HasPrimePGroup(G);
true
gap> PrimePGroup(G);
3
gap> C := Group((1,2,3,4),(5,6,7,8));
Group([ (1,2,3,4), (5,6,7,8) ])
gap> IsAbelian(C);
true
gap> G := DirectProduct(C, C);
Group([ (1,2,3,4), (5,6,7,8), (9,10,11,12), (13,14,15,16) ])
gap> Size(G);
256
gap> IsPGroup(G);
true
gap> HasPrimePGroup(G);
true
gap> PrimePGroup(G);
2
gap> D := Group((1,3),(1,2,3,4));
Group([ (1,3), (1,2,3,4) ])
gap> G := DirectProduct(D, D);
Group([ (1,3), (1,2,3,4), (5,7), (5,6,7,8) ])
gap> IsPGroup(G);
true
gap> HasPrimePGroup(D) and HasPrimePGroup(G);
true
gap> PrimePGroup(D);
2
gap> PrimePGroup(G);
2
gap> Q := Group( (1,2,3,8)(4,5,6,7), (1,7,3,5)(2,6,8,4) );
Group([ (1,2,3,8)(4,5,6,7), (1,7,3,5)(2,6,8,4) ])
gap> SetIsPGroup(Q,true);
gap> PrimePGroup(Q);
2
gap> G := DihedralGroup(IsFpGroup, 8);
<fp group of size 8 on the generators [ r, s ]>
gap> IsPGroup(G);
true
gap> H := CyclicGroup(IsFpGroup, 2);
<fp group of size 2 on the generators [ a ]>
gap> hom := GroupHomomorphismByImages(G, H, [G.1, G.2], [H.1, One(H)]);
[ r, s ] -> [ a, <identity ...> ]
gap> K := Kernel(hom);
Group(<fp, no generators known>)
gap> SetIsPGroup(K, true);
gap> PrimePGroup(K);
2
gap> IsPGroup(TrivialGroup());
true
gap> PrimePGroup(TrivialGroup());
fail
gap> IsPGroup(AbelianGroup([2, 4, 8, 16]));
true
gap> IsPGroup(AbelianGroup([2, 4, 8, 18]));
false
gap> H1 := Group((1,2)(3,4),(1,2,3));
Group([ (1,2)(3,4), (1,2,3) ])
gap> IsPGroup(H1);
false
gap> H2 := Group((1,2),(3,4,5));
Group([ (1,2), (3,4,5) ])
gap> IsPGroup(H2);
false
gap> H3 := Group((1,2),(3,4,5));
Group([ (1,2), (3,4,5) ])
gap> IsAbelian(H3);
true
gap> IsPGroup(H3);
false
gap> H4 := Group((1,2),(3,4,5));
Group([ (1,2), (3,4,5) ])
gap> IsAbelian(H4);
true
gap> Size(H4);
6
gap> IsPGroup(H4);
false
gap> K := Group((1,3),(1,2,3,4),(5,6,7));
Group([ (1,3), (1,2,3,4), (5,6,7) ])
gap> IsNilpotentGroup(K);
true
gap> HasIsPGroup(K);
true
gap> IsPGroup(K);
false
gap> L := Group((2,4), (1,2,3,4));
Group([ (2,4), (1,2,3,4) ])
gap> IsNilpotentGroup(L);
true
gap> HasIsPGroup(L) and HasPrimePGroup(L);
true
gap> IsPGroup(L);
true
gap> PrimePGroup(L);
2
gap> F := FreeGroup("r","s");
<free group on the generators [ r, s ]>
gap> r := F.1; s := F.2;
r
s
gap> G := F/[ r^4, s^2, s*r*s*r ];
<fp group on the generators [ r, s ]>
gap> IsNilpotentGroup(G);
true
gap> G := F/[ r^3, s^2, r*s*r*s ];
<fp group on the generators [ r, s ]>
gap> IsNilpotentGroup(G);
false
gap> ForAll(List([1..11], i -> TransitiveGroup(8,i)), IsPGroup);
true
gap> IsPGroup(TransitiveGroup(8, 12));
false
gap> IsNilpotentGroup(TransitiveGroup(8, 12));
false
gap> IsPGroup(AlternatingGroup(3));
true
gap> IsPGroup(AlternatingGroup(4));
false
gap> IsPGroup(SymmetricGroup(3));
false
gap> G := SymmetricGroup(8);
Sym( [ 1 .. 8 ] )
gap> s := Size(G);
40320
gap> IsPGroup(G);
false
gap> IsNilpotentGroup(G);
false
gap> ForAll(PrimeDivisors(s), p -> HasIsPGroup(SylowSubgroup(G, p)));
true
gap> ForAll(PrimeDivisors(s), p -> HasPrimePGroup(SylowSubgroup(G, p)));
true
gap> ForAll(PrimeDivisors(s), p -> p=PrimePGroup(SylowSubgroup(G, p)));
true
gap> G := DihedralGroup(Factorial(8));
<pc group of size 40320 with 11 generators>
gap> IsPGroup(G);
false
gap> IsNilpotentGroup(G);
false
gap> s := Size(G);
40320
gap> ForAll(PrimeDivisors(s), p -> HasIsPGroup(SylowSubgroup(G, p)));
true
gap> ForAll(PrimeDivisors(s), p -> HasPrimePGroup(SylowSubgroup(G, p)));
true
gap> ForAll(PrimeDivisors(s), p -> p=PrimePGroup(SylowSubgroup(G, p)));
true
gap> STOP_TEST("pgroups.tst", 10000);

0 comments on commit e1b3267

Please sign in to comment.