Debian Codegraph @

examples/Pq

raw
1 #Example: "Pq" . . . based on manual example illustrating `Pq' usage
2 #vars: F, a, b, procId1, procId2, procId3, procId4, G, R, H, rels;
3 #options:
4 F := FreeGroup("a", "b"); a := F.1; b := F.2;
5 #alt: do
6 #procId1 := PqStart( F );
7 #alt: sub <procId1> for <F>
8 Pq( F : Prime := 2, ClassBound := 3 );
9
10 ## Now let us get a p-quotient of an fp group
11 G := F / [a^4, b^4];
12 #alt: do
13 #procId2 := PqStart( G );
14 #alt: sub <procId2> for <G>
15 Pq( G : Prime := 2, ClassBound := 3 );
16
17 ## Now let's get a different p-quotient of the same group
18 #alt: sub <procId2> for <G>
19 Pq( G : Prime := 2, ClassBound := 3,
20 #alt: do
21 # RedoPcp,
22 Exponent := 4 );
23
24 ## Now we'll get a p-quotient of another fp group
25 ## which we will redo using the `Relators' option
26 R := [ a^25, Comm(Comm(b, a), a), b^5 ];
27 H := F / R;
28 #alt: do
29 #procId3 := PqStart( H );
30 #alt: sub <procId3> for <H>
31 Pq( H : Prime := 5, ClassBound := 5, Metabelian );
32
33 ## Now we redo the previous example using the `Relators' option
34 F := FreeGroup("a", "b");
35 ## `F' was defined for `Relators'. We use the same strings that GAP uses
36 ## for printing the free group generators. It is *not* necessary to
37 ## predefine: a := F.1; etc. (as it was above).
38 rels := [ "a^25", "[b, a, a]", "b^5" ];
39 R := PqGAPRelators(F, rels);
40 H := F / R;
41 #alt: sub <procId3> for <H>
42 Pq( H : Prime := 5, ClassBound := 5, Metabelian,
43 #alt: do
44 # RedoPcp,
45 Relators := rels );
46
47 ## Above we could have just passed `F' (rather than `H'):
48 F := FreeGroup("a", "b");
49 rels := [ "a^25", "[b, a, a]", "b^5" ];
50 #alt: do
51 #procId4 := PqStart( F );
52 #alt: sub <procId4> for <F>
53 Pq( F : Prime := 5, ClassBound := 5, Metabelian,
54 Relators := rels );