<p>There are a large number of examples provided with the <strong class="pkg">ANUPQ</strong> package. These may be executed or displayed via the function <code class="code">PqExample</code> (see <code class="func">PqExample</code> (<a href="chap3_mj.html#X7BB0EB607F337265"><span class="RefLink">3.4-4</span></a>)). Each example resides in a file of the same name in the directory <code class="code">examples</code>. Most of the examples are translations to <strong class="pkg">GAP</strong> of examples provided for the <code class="code">pq</code> standalone by Eamonn O'Brien; the standalone examples are found in directories <code class="code">standalone/examples</code> (<span class="SimpleMath">\(p\)</span>-quotient and <span class="SimpleMath">\(p\)</span>-group generation examples) and <code class="code">standalone/isom</code> (standard presentation examples). The first line of each example indicates its origin. All the examples seen in earlier chapters of this manual are also available as examples, in a slightly modified form (the example which one can run in order to see something very close to the text example <q>live</q> is always indicated near -- usually immediately after -- the text example). The format of the (<code class="code">PqExample</code>) examples is such that they can be read by the standard <code class="code">Read</code> function of <strong class="pkg">GAP</strong>, but certain features and comments are interpreted by the function <code class="code">PqExample</code> to do somewhat more than <code class="code">Read</code> does. In particular, any function without a <code class="code">-i</code>, <code class="code">-ni</code> or <code class="code">.g</code> suffix has both a non-interactive and interactive form; in these cases, the default form is the non-interactive form, and giving <code class="code">PqStart</code> as second argument generates the interactive form.</p>
<p>Running <code class="code">PqExample</code> without an argument or with a non-existent example <code class="code">Info</code>s the available examples and some hints on usage:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqExample();</span>
#I PqExample Index (Table of Contents)
#I -----------------------------------
#I This table of possible examples is displayed when calling `PqExample'
#I with no arguments, or with the argument: "index" (meant in the sense
#I of ``list''), or with a non-existent example name.
#I
#I Examples that have a name ending in `-ni' are non-interactive only.
#I Examples that have a name ending in `-i' are interactive only.
#I Examples with names ending in `.g' also have only one form. Other
#I examples have both a non-interactive and an interactive form; call
#I `PqExample' with 2nd argument `PqStart' to get the interactive form
#I of the example. The substring `PG' in an example name indicates a
#I p-Group Generation example, `SP' indicates a Standard Presentation
#I example, `Rel' indicates it uses the `Relators'option, and `Id'
#I indicates it uses the `Identities' option.
#I
#I The following ANUPQ examples are available:
#I
#I p-Quotient examples:
#I general:
#I "Pq""Pq-ni""PqEpimorphism"
#I "PqPCover""PqSupplementInnerAutomorphisms"
#I 2-groups:
#I "2gp-Rel""2gp-Rel-i""2gp-a-Rel-i"
#I "B2-4""B2-4-Id""B2-8-i"
#I "B4-4-i""B4-4-a-i""B5-4.g"
#I 3-groups:
#I "3gp-Rel-i""3gp-a-Rel""3gp-a-Rel-i"
#I "3gp-a-x-Rel-i""3gp-maxoccur-Rel-i"
#I 5-groups:
#I "5gp-Rel-i""5gp-a-Rel-i""5gp-b-Rel-i"
#I "5gp-c-Rel-i""5gp-metabelian-Rel-i""5gp-maxoccur-Rel-i"
#I "F2-5-i""B2-5-i""R2-5-i"
#I "R2-5-x-i""B5-5-Engel3-Id"
#I 7-groups:
#I "7gp-Rel-i"
#I 11-groups:
#I "11gp-i""11gp-Rel-i""11gp-a-Rel-i"
#I "11gp-3-Engel-Id""11gp-3-Engel-Id-i"
#I
#I p-Group Generation examples:
#I general:
#I "PqDescendants-1""PqDescendants-2""PqDescendants-3"
#I "PqDescendants-1-i"
#I 2-groups:
#I "2gp-PG-i""2gp-PG-2-i""2gp-PG-3-i"
#I "2gp-PG-4-i""2gp-PG-e4-i"
#I "PqDescendantsTreeCoclassOne-16-i"
#I 3-groups:
#I "3gp-PG-i""3gp-PG-4-i""3gp-PG-x-i"
#I "3gp-PG-x-1-i""PqDescendants-treetraverse-i"
#I "PqDescendantsTreeCoclassOne-9-i"
#I 5-groups:
#I "5gp-PG-i""Nott-PG-Rel-i""Nott-APG-Rel-i"
#I "PqDescendantsTreeCoclassOne-25-i"
#I 7,11-groups:
#I "7gp-PG-i""11gp-PG-i"
#I
#I Standard Presentation examples:
#I general:
#I "StandardPresentation""StandardPresentation-i"
#I "EpimorphismStandardPresentation"
#I "EpimorphismStandardPresentation-i""IsIsomorphicPGroup-ni"
#I 2-groups:
#I "2gp-SP-Rel-i""2gp-SP-1-Rel-i""2gp-SP-2-Rel-i"
#I "2gp-SP-3-Rel-i""2gp-SP-4-Rel-i""2gp-SP-d-Rel-i"
#I "gp-256-SP-Rel-i""B2-4-SP-i""G2-SP-Rel-i"
#I 3-groups:
#I "3gp-SP-Rel-i""3gp-SP-1-Rel-i""3gp-SP-2-Rel-i"
#I "3gp-SP-3-Rel-i""3gp-SP-4-Rel-i""G3-SP-Rel-i"
#I 5-groups:
#I "5gp-SP-Rel-i""5gp-SP-a-Rel-i""5gp-SP-b-Rel-i"
#I "5gp-SP-big-Rel-i""5gp-SP-d-Rel-i""G5-SP-Rel-i"
#I "G5-SP-a-Rel-i""Nott-SP-Rel-i"
#I 7-groups:
#I "7gp-SP-Rel-i""7gp-SP-a-Rel-i""7gp-SP-b-Rel-i"
#I 11-groups:
#I "11gp-SP-a-i""11gp-SP-a-Rel-i""11gp-SP-a-Rel-1-i"
#I "11gp-SP-b-i""11gp-SP-b-Rel-i""11gp-SP-c-Rel-i"
#I
#I Notes
#I -----
#I 1. The example (first) argument of `PqExample' is a string; each
#I example above is in double quotes to remind you to include them.
#I 2. Some examples accept options. To find out whether a particular
#I example accepts options, display it first (by including `Display'
#I as last argument) which will also indicate how `PqExample'
#I interprets the options, e.g. `PqExample("11gp-SP-a-i", Display);'.
#I 3. Try `SetInfoLevel(InfoANUPQ, <n>);' for some <n> in [2 .. 4]
#I before calling PqExample, to see what's going on behind the scenes.
#I
</pre></div>
<p>If on your terminal you are unable to scroll back, an alternative to typing <code class="code">PqExample();</code> to see the displayed examples is to use on-line help, i.e. you may type:</p>
<p>which will display this appendix in a <strong class="pkg">GAP</strong> session. If you are not fussed about the order in which the examples are organised, <code class="code">AllPqExamples();</code> lists the available examples relatively compactly (see <code class="func">AllPqExamples</code> (<a href="chap3_mj.html#X823C93FC7B87F5BC"><span class="RefLink">3.4-5</span></a>)).</p>
<p>In the remainder of this appendix we will discuss particular aspects related to the <code class="code">Relators</code> (see <a href="chap6_mj.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>) and <code class="code">Identities</code> (see <a href="chap6_mj.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>) options, and the construction of the Burnside group <span class="SimpleMath">\(B(5, 4)\)</span>.</p>
<p>The <code class="code">Relators</code> option was included because computations involving words containing commutators that are pre-expanded by <strong class="pkg">GAP</strong> before being passed to the <code class="code">pq</code> program may run considerably more slowly, than the same computations being run with <strong class="pkg">GAP</strong> pre-expansions avoided. The following examples demonstrate a case where the performance hit due to pre-expansion of commutators by <strong class="pkg">GAP</strong> is a factor of order 100 (in order to see timing information from the <code class="code">pq</code> program, we set the <code class="code">InfoANUPQ</code> level to 2).</p>
<p>Firstly, we run the example that allows pre-expansion of commutators (the function <code class="code">PqLeftNormComm</code> is provided by the <strong class="pkg">ANUPQ</strong> package; see <code class="func">PqLeftNormComm</code> (<a href="chap3_mj.html#X8771393B7F53F534"><span class="RefLink">3.4-1</span></a>)). Note that since the two commutators of this example are <em>very</em> long (taking more than an page to print), we have edited the output at this point.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 2); #to see timing information</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqExample("11gp-i");</span>
#I #Example: "11gp-i" . . . based on: examples/11gp
#I F, a, b, c, R, procId are local to `PqExample'
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup("a", "b", "c"); a := F.1; b := F.2; c := F.3;</span>
<free group on the generators [ a, b, c ]>
a
b
c
<span class="GAPprompt">gap></span> <span class="GAPinput">R := [PqLeftNormComm([b, a, a, b, c])^11, </span>
<span class="GAPprompt">></span> <span class="GAPinput"> PqLeftNormComm([a, b, b, a, b, c])^11, (a * b)^11];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">procId := PqStart(F/R : Prime := 11);</span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPcPresentation(procId : ClassBound := 7, </span>
<span class="GAPprompt">></span> <span class="GAPinput"> OutputLevel := 1);</span>
#I Lower exponent-11 central series for [grp]
#I Group: [grp] to lower exponent-11 central class 1 has order 11^3
#I Group: [grp] to lower exponent-11 central class 2 has order 11^8
#I Group: [grp] to lower exponent-11 central class 3 has order 11^19
#I Group: [grp] to lower exponent-11 central class 4 has order 11^42
#I Group: [grp] to lower exponent-11 central class 5 has order 11^98
#I Group: [grp] to lower exponent-11 central class 6 has order 11^228
#I Group: [grp] to lower exponent-11 central class 7 has order 11^563
#I Computation of presentation took 27.04 seconds
<span class="GAPprompt">gap></span> <span class="GAPinput">PqSavePcPresentation(procId, ANUPQData.outfile);</span>
#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.
</pre></div>
<p>Now we do the same calculation using the <code class="code">Relators</code> option. In this way, the commutators are passed directly as strings to the <code class="code">pq</code> program, so that <strong class="pkg">GAP</strong> does not <q>see</q> them and pre-expand them.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqExample("11gp-Rel-i");</span>
#I #Example: "11gp-Rel-i" . . . based on: examples/11gp
#I #(equivalent to "11gp-i" example but uses `Relators' option)
#I F, rels, procId are local to `PqExample'
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup("a", "b", "c");</span>
<free group on the generators [ a, b, c ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">rels := ["[b, a, a, b, c]^11", "[a, b, b, a, b, c]^11", "(a * b)^11"];</span>
[ "[b, a, a, b, c]^11", "[a, b, b, a, b, c]^11", "(a * b)^11" ]
<span class="GAPprompt">gap></span> <span class="GAPinput">procId := PqStart(F : Prime := 11, Relators := rels);</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPcPresentation(procId : ClassBound := 7, </span>
<span class="GAPprompt">></span> <span class="GAPinput"> OutputLevel := 1);</span>
#I Relators parsed ok.
#I Lower exponent-11 central series for [grp]
#I Group: [grp] to lower exponent-11 central class 1 has order 11^3
#I Group: [grp] to lower exponent-11 central class 2 has order 11^8
#I Group: [grp] to lower exponent-11 central class 3 has order 11^19
#I Group: [grp] to lower exponent-11 central class 4 has order 11^42
#I Group: [grp] to lower exponent-11 central class 5 has order 11^98
#I Group: [grp] to lower exponent-11 central class 6 has order 11^228
#I Group: [grp] to lower exponent-11 central class 7 has order 11^563
#I Computation of presentation took 0.27 seconds
<span class="GAPprompt">gap></span> <span class="GAPinput">PqSavePcPresentation(procId, ANUPQData.outfile);</span>
#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.
</pre></div>
<h4>A.2 <span class="Heading">The Identities Option and PqEvaluateIdentities Function</span></h4>
<p>Please pay heed to the warnings given for the <code class="code">Identities</code> option (see <a href="chap6_mj.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>); it is written mainly at the <strong class="pkg">GAP</strong> level and is not particularly optimised. The <code class="code">Identities</code> option allows one to compute <span class="SimpleMath">\(p\)</span>-quotients that satisfy an identity. A trivial example better done using the <code class="code">Exponent</code> option, but which nevertheless demonstrates the usage of the <code class="code">Identities</code> option, is as follows:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqExample("B2-4-Id");</span>
#I #Example: "B2-4-Id" . . . alternative way to generate B(2, 4)
#I #Generates B(2, 4) by using the `Identities' option
#I #... this is not as efficient as using `Exponent' but
#I #demonstrates the usage of the `Identities' option.
#I F, f, procId are local to `PqExample'
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup("a", "b");</span>
<free group on the generators [ a, b ]>
<span class="GAPprompt">gap></span> <span class="GAPinput"># All words w in the pc generators of B(2, 4) satisfy f(w) = 1 </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := w -> w^4;</span>
function( w ) ... end
<span class="GAPprompt">gap></span> <span class="GAPinput">Pq( F : Prime := 2, Identities := [ f ] );</span>
#I Class 1 with 2 generators.
#I Class 2 with 5 generators.
#I Class 3 with 7 generators.
#I Class 4 with 10 generators.
#I Class 5 with 12 generators.
#I Class 5 with 12 generators.
<pc group of size 4096 with 12 generators>
#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.
<span class="GAPprompt">gap></span> <span class="GAPinput">time; </span>
1400
</pre></div>
<p>Note that the <code class="code">time</code> statement gives the time in milliseconds spent by <strong class="pkg">GAP</strong> in executing the <code class="code">PqExample("B2-4-Id");</code> command (i.e. everything up to the <code class="code">Info</code>-ing of the variables used), but over 90% of that time is spent in the final <code class="code">Pq</code> statement. The time spent by the <code class="code">pq</code> program, which is negligible anyway (you can check this by running the example while the <code class="code">InfoANUPQ</code> level is set to 2), is not counted by <code class="code">time</code>.</p>
<p>Since the identity used in the above construction of <span class="SimpleMath">\(B(2, 4)\)</span> is just an exponent law, the <q>right</q> way to compute it is via the <code class="code">Exponent</code> option (see <a href="chap6_mj.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>), which is implemented at the C level and <em>is</em> highly optimised. Consequently, the <code class="code">Exponent</code> option is significantly faster, generally by several orders of magnitude:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 2); # to see time spent by the `pq' program</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqExample("B2-4");</span>
#I #Example: "B2-4" . . . the ``right'' way to generate B(2, 4)
#I #Generates B(2, 4) by using the `Exponent' option
#I F, procId are local to `PqExample'
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup("a", "b");</span>
<free group on the generators [ a, b ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">Pq( F : Prime := 2, Exponent := 4 );</span>
#I Computation of presentation took 0.00 seconds
<pc group of size 4096 with 12 generators>
#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.
<span class="GAPprompt">gap></span> <span class="GAPinput">time; # time spent by GAP in executing `PqExample("B2-4");' </span>
50
</pre></div>
<p>The following example uses the <code class="code">Identities</code> option to compute a 3-Engel group for the prime 11. As is the case for the example <code class="code">"B2-4-Id"</code>, the example has both a non-interactive and an interactive form; below, we demonstrate the interactive form.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 1); # reset InfoANUPQ to default level</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqExample("11gp-3-Engel-Id", PqStart);</span>
#I #Example: "11gp-3-Engel-Id" . . . 3-Engel group for prime 11
#I #Non-trivial example of using the `Identities' option
#I F, a, b, G, f, procId, Q are local to `PqExample'
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup("a", "b"); a := F.1; b := F.2;</span>
<free group on the generators [ a, b ]>
a
b
<span class="GAPprompt">gap></span> <span class="GAPinput">G := F/[ a^11, b^11 ];</span>
<fp group on the generators [ a, b ]>
<span class="GAPprompt">gap></span> <span class="GAPinput"># All word pairs u, v in the pc generators of the 11-quotient Q of G </span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># must satisfy the Engel identity: [u, v, v, v] = 1.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := function(u, v) return PqLeftNormComm( [u, v, v, v] ); end;</span>
function( u, v ) ... end
<span class="GAPprompt">gap></span> <span class="GAPinput">procId := PqStart( G );</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">Q := Pq( procId : Prime := 11, Identities := [ f ] );</span>
#I Class 1 with 2 generators.
#I Class 2 with 3 generators.
#I Class 3 with 5 generators.
#I Class 3 with 5 generators.
<pc group of size 161051 with 5 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput"># We do a ``sample'' check that pairs of elements of Q do satisfy</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># the given identity:</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f( Random(Q), Random(Q) );</span>
<identity> of ...
<span class="GAPprompt">gap></span> <span class="GAPinput">f( Q.1, Q.2 );</span>
<identity> of ...
#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.
</pre></div>
<p>The (interactive) call to <code class="code">Pq</code> above is essentially equivalent to a call to <code class="code">PqPcPresentation</code> with the same arguments and options followed by a call to <code class="code">PqCurrentGroup</code>. Moreover, the call to <code class="code">PqPcPresentation</code> (as described in <code class="func">PqPcPresentation</code> (<a href="chap5_mj.html#X7BF135DD84A781EB"><span class="RefLink">5.6-1</span></a>)) is equivalent to a <q>class 1</q> call to <code class="code">PqPcPresentation</code> followed by the requisite number of calls to <code class="code">PqNextClass</code>, and with the <code class="code">Identities</code> optionset, both <code class="code">PqPcPresentation</code> and <code class="code">PqNextClass</code> <q>quietly</q> perform the equivalent of a <code class="code">PqEvaluateIdentities</code> call. In the following example we break down the <code class="code">Pq</code> call into its low-level equivalents, and set and unset the <code class="code">Identities</code> option to show where <code class="code">PqEvaluateIdentities</code> fits into this scheme.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqExample("11gp-3-Engel-Id-i");</span>
#I #Example: "11gp-3-Engel-Id-i" . . . 3-Engel grp for prime 11
#I #Variation of "11gp-3-Engel-Id" broken down into its lower-level component
#I #command parts.
#I F, a, b, G, f, procId, Q are local to `PqExample'
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup("a", "b"); a := F.1; b := F.2;</span>
<free group on the generators [ a, b ]>
a
b
<span class="GAPprompt">gap></span> <span class="GAPinput">G := F/[ a^11, b^11 ];</span>
<fp group on the generators [ a, b ]>
<span class="GAPprompt">gap></span> <span class="GAPinput"># All word pairs u, v in the pc generators of the 11-quotient Q of G </span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># must satisfy the Engel identity: [u, v, v, v] = 1.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := function(u, v) return PqLeftNormComm( [u, v, v, v] ); end;</span>
function( u, v ) ... end
<span class="GAPprompt">gap></span> <span class="GAPinput">procId := PqStart( G : Prime := 11 );</span>
4
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPcPresentation( procId : ClassBound := 1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqEvaluateIdentities( procId : Identities := [f] );</span>
#I Class 1 with 2 generators.
<span class="GAPprompt">gap></span> <span class="GAPinput">for c in [2 .. 4] do</span>
<span class="GAPprompt">></span> <span class="GAPinput"> PqNextClass( procId : Identities := [] ); #reset `Identities' option</span>
<span class="GAPprompt">></span> <span class="GAPinput"> PqEvaluateIdentities( procId : Identities := [f] );</span>
<span class="GAPprompt">></span> <span class="GAPinput"> od;</span>
#I Class 2 with 3 generators.
#I Class 3 with 5 generators.
#I Class 3 with 5 generators.
<span class="GAPprompt">gap></span> <span class="GAPinput">Q := PqCurrentGroup( procId );</span>
<pc group of size 161051 with 5 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput"># We do a ``sample'' check that pairs of elements of Q do satisfy</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># the given identity:</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f( Random(Q), Random(Q) );</span>
<identity> of ...
<span class="GAPprompt">gap></span> <span class="GAPinput">f( Q.1, Q.2 );</span>
<identity> of ...
#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.
</pre></div>
<h4>A.3 <span class="Heading">A Large Example</span></h4>
<p>An example demonstrating how a large computation can be organised with the <strong class="pkg">ANUPQ</strong> package is the computation of the Burnside group <span class="SimpleMath">\(B(5, 4)\)</span>, the largest group of exponent 4 generated by 5 elements. It has order <span class="SimpleMath">\(2^{2728}\)</span> and lower exponent-<span class="SimpleMath">\(p\)</span> central class 13. The example <code class="code">"B5-4.g"</code> computes <span class="SimpleMath">\(B(5, 4)\)</span>; it is based on a <code class="code">pq</code> standalone input file written by M. F. Newman.</p>
<p>To be able to do examples like this was part of the motivation to provide access to the low-level functions of the standalone program from within <strong class="pkg">GAP</strong>.</p>
<p>Please note that the construction uses the knowledge gained by Newman and O'Brien in their initial construction of <span class="SimpleMath">\(B(5, 4)\)</span>, in particular, insight into the commutator structure of the group and the knowledge of the <span class="SimpleMath">\(p\)</span>-central class and the order of <span class="SimpleMath">\(B(5, 4)\)</span>. Therefore, the construction cannot be used to prove that <span class="SimpleMath">\(B(5, 4)\)</span> has the order and class mentioned above. It is merely a reconstruction of the group. More information is contained in the header of the file <code class="code">examples/B5-4.g</code>.</p>
<p>In the following example we will explore the 3-groups of rank 2 and 3-coclass 1 up to 3-class 5. This will be done using the <span class="SimpleMath">\(p\)</span>-group generation machinery of the package. We start with the elementary abelian 3-group of rank 2. From within <strong class="pkg">GAP</strong>, run the example <code class="code">"PqDescendants-treetraverse-i"</code> via <code class="code">PqExample</code> (see <code class="func">PqExample</code> (<a href="chap3_mj.html#X7BB0EB607F337265"><span class="RefLink">3.4-4</span></a>)).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := ElementaryAbelianGroup( 9 );</span>
<pc group of size 9 with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">procId := PqStart( G );</span>
5
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># Below, we use the option StepSize in order to construct descendants</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># of coclass 1. This is equivalent to setting the StepSize to 1 in</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># each descendant calculation.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># The elementary abelian group of order 9 has 3 descendants of</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># 3-class 2 and 3-coclass 1, as the result of the next command</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># shows. </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqDescendants( procId : StepSize := 1 );</span>
[ <pc group of size 27 with 3 generators>,
<pc group of size 27 with 3 generators>,
<pc group of size 27 with 3 generators> ]
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># Now we will compute the descendants of coclass 1 for each of the</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># groups above. Then we will compute the descendants of coclass 1</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># of each descendant and so on. Note that the pq program keeps</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># one file for each class at a time. For example, the descendants</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># calculation for the second group of class 2 overwrites the</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># descendant file obtained from the first group of class 2.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># Hence, we have to traverse the descendants tree in depth first</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># order.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 2, 1 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 3, 1 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 4, 1 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># At this point we stop traversing the ``left most'' branch of the</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># descendants tree and move upwards.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 4, 2 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 3, 2 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
<span class="GAPprompt">gap></span> <span class="GAPinput"># </span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># The computations above indicate that the descendants subtree under</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># the first descendant of the elementary abelian group of order 9</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># will have only one path of infinite length.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 2, 2 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
4
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># We get four descendants here, three of which will turn out to be</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># incapable, i.e., they have no descendants and are terminal nodes</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># in the descendants tree.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 2, 3 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># The third descendant of class three is incapable. Let us return</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># to the second descendant of class 2.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 2, 2 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
4
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 3, 1 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 3, 2 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># We skip the third descendant for the moment ... </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 3, 4 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># ... and look at it now.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 3, 3 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
6
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># In this branch of the descendant tree we get 6 descendants of class</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># three. Of those 5 will turn out to be incapable and one will have</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"># 7 descendants.</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 4, 1 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 4, 2 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
7
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGSetDescendantToPcp( procId, 4, 3 );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGExtendAutomorphisms( procId );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqPGConstructDescendants( procId : StepSize := 1 );</span>
#I group restored from file is incapable
0
</pre></div>
<p>To automate the above procedure to some extent we provide:</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqDescendantsTreeCoclassOne</code>( <var class="Arg">i</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqDescendantsTreeCoclassOne</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p>for the <var class="Arg">i</var>th or default interactive <strong class="pkg">ANUPQ</strong> process, generate a descendant tree for the group of the process (which must be a pc <span class="SimpleMath">\(p\)</span>-group) consisting of descendants of <span class="SimpleMath">\(p\)</span>-coclass 1 and extending to the class determined by the option <code class="code">TreeDepth</code> (or 6 if the option is omitted). In an <strong class="pkg">XGAP</strong> session, a graphical representation of the descendants tree appears in a separate window. Subsequent calls to <code class="code">PqDescendantsTreeCoclassOne</code> for the same process may be used to extend the descendant tree from the last descendant computed that itself has more than one descendant. <code class="code">PqDescendantsTreeCoclassOne</code> also accepts the options <code class="code">CapableDescendants</code> (or <code class="code">AllDescendants</code>) and any options accepted by the interactive <code class="code">PqDescendants</code> function (see <code class="func">PqDescendants</code> (<a href="chap5_mj.html#X795817217C53AB89"><span class="RefLink">5.3-6</span></a>)).</p>
<p><em>Notes</em></p>
<ol>
<li><p><code class="code">PqDescendantsTreeCoclassOne</code> first calls <code class="code">PqDescendants</code>. If <code class="code">PqDescendants</code> has already been called for the process, the previous value computed is used and a warning is <code class="code">Info</code>-ed at <code class="code">InfoANUPQ</code> level 1.</p>
</li>
<li><p>As each descendant is processed its unique label defined by the <code class="code">pq</code> program and number of descendants is <code class="code">Info</code>-ed at <code class="code">InfoANUPQ</code> level 1.</p>
</li>
<li><p><code class="code">PqDescendantsTreeCoclassOne</code> is an <q>experimental</q> function that is included to demonstrate the sort of things that are possible with the <span class="SimpleMath">\(p\)</span>-group generation machinery.</p>
</li>
</ol>
<p>Ignoring the extra functionality provided in an <strong class="pkg">XGAP</strong> session, <code class="code">PqDescendantsTreeCoclassOne</code>, with one argument that is the index of an interactive <strong class="pkg">ANUPQ</strong> process, is approximately equivalent to:</p>
<div class="example"><pre>
PqDescendantsTreeCoclassOne := function( procId )
local des, i;
<p>where <code class="code">RecurseDescendants</code> is (approximately) defined as follows:</p>
<div class="example"><pre>
RecurseDescendants := function( procId, class, n )
local i, nr;
if class > ValueOption("TreeDepth") then return; fi;
for i in [1..n] do
PqPGSetDescendantToPcp( procId, class, i );
PqPGExtendAutomorphisms( procId );
nr := PqPGConstructDescendants( procId : StepSize := 1 );
Print( "Number of descendants of group ", i, " at class ", class, ": ", nr, "\n" );
RecurseDescendants( procId, class+1, nr );
od;
return;
end;
</pre></div>
<p>The following examples (executed via <code class="code">PqExample</code>; see <code class="func">PqExample</code> (<a href="chap3_mj.html#X7BB0EB607F337265"><span class="RefLink">3.4-4</span></a>)), demonstrate the use of <code class="code">PqDescendantsTreeCoclassOne</code>:</p>
<dl>
<dt><strong class="Mark"><code class="code">"PqDescendantsTreeCoclassOne-9-i"</code></strong></dt>
<dd><p>approximately does example <code class="code">"PqDescendants-treetraverse-i"</code> again using <code class="code">PqDescendantsTreeCoclassOne</code>;</p>
</dd>
<dt><strong class="Mark"><code class="code">"PqDescendantsTreeCoclassOne-16-i"</code></strong></dt>
<dd><p>uses the option <code class="code">CapableDescendants</code>; and</p>
</dd>
<dt><strong class="Mark"><code class="code">"PqDescendantsTreeCoclassOne-25-i"</code></strong></dt>
<dd><p>calculates all descendants by omitting the <code class="code">CapableDescendants</code> option.</p>
</dd>
</dl>
<p>The numbers <code class="code">9</code>, <code class="code">16</code> and <code class="code">25</code> respectively, indicate the order of the elementary abelian group to which <code class="code">PqDescendantsTreeCoclassOne</code> is applied for these examples.</p>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.