GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<Appendix Label="Examples">1<Heading>Examples</Heading>23There are a large number of examples provided with the &ANUPQ; package.4These may be executed or displayed via the function <C>PqExample</C>5(see <Ref Func="PqExample" Style="Text"/>). Each example resides in a file of the same name in the6directory <C>examples</C>. Most of the examples are translations to &GAP; of7examples provided for the <C>pq</C> standalone by Eamonn O'Brien; the8standalone examples are found in directories <C>standalone/examples</C>9(<M>p</M>-quotient and <M>p</M>-group generation examples) and <C>standalone/isom</C>10(standard presentation examples). The first line of each example11indicates its origin. All the examples seen in earlier chapters of this12manual are also available as examples, in a slightly modified form (the13example which one can run in order to see something very close to the14text example <Q>live</Q> is always indicated near -- usually immediately15after -- the text example). The format of the (<C>PqExample</C>) examples is16such that they can be read by the standard <C>Read</C> function of &GAP;, but17certain features and comments are interpreted by the function <C>PqExample</C>18to do somewhat more than <C>Read</C> does. In particular, any function without19a <C>-i</C>, <C>-ni</C> or <C>.g</C> suffix has both a non-interactive and interactive20form; in these cases, the default form is the non-interactive form, and21giving <C>PqStart</C> as second argument generates the interactive form.2223<P/>2425Running <C>PqExample</C> without an argument or with a non-existent example26<C>Info</C>s the available examples and some hints on usage:2728<Example><![CDATA[29gap> PqExample();30#I PqExample Index (Table of Contents)31#I -----------------------------------32#I This table of possible examples is displayed when calling `PqExample'33#I with no arguments, or with the argument: "index" (meant in the sense34#I of ``list''), or with a non-existent example name.35#I36#I Examples that have a name ending in `-ni' are non-interactive only.37#I Examples that have a name ending in `-i' are interactive only.38#I Examples with names ending in `.g' also have only one form. Other39#I examples have both a non-interactive and an interactive form; call40#I `PqExample' with 2nd argument `PqStart' to get the interactive form41#I of the example. The substring `PG' in an example name indicates a42#I p-Group Generation example, `SP' indicates a Standard Presentation43#I example, `Rel' indicates it uses the `Relators' option, and `Id'44#I indicates it uses the `Identities' option.45#I46#I The following ANUPQ examples are available:47#I48#I p-Quotient examples:49#I general:50#I "Pq" "Pq-ni" "PqEpimorphism"51#I "PqPCover" "PqSupplementInnerAutomorphisms"52#I 2-groups:53#I "2gp-Rel" "2gp-Rel-i" "2gp-a-Rel-i"54#I "B2-4" "B2-4-Id" "B2-8-i"55#I "B4-4-i" "B4-4-a-i" "B5-4.g"56#I 3-groups:57#I "3gp-Rel-i" "3gp-a-Rel" "3gp-a-Rel-i"58#I "3gp-a-x-Rel-i" "3gp-maxoccur-Rel-i"59#I 5-groups:60#I "5gp-Rel-i" "5gp-a-Rel-i" "5gp-b-Rel-i"61#I "5gp-c-Rel-i" "5gp-metabelian-Rel-i" "5gp-maxoccur-Rel-i"62#I "F2-5-i" "B2-5-i" "R2-5-i"63#I "R2-5-x-i" "B5-5-Engel3-Id"64#I 7-groups:65#I "7gp-Rel-i"66#I 11-groups:67#I "11gp-i" "11gp-Rel-i" "11gp-a-Rel-i"68#I "11gp-3-Engel-Id" "11gp-3-Engel-Id-i"69#I70#I p-Group Generation examples:71#I general:72#I "PqDescendants-1" "PqDescendants-2" "PqDescendants-3"73#I "PqDescendants-1-i"74#I 2-groups:75#I "2gp-PG-i" "2gp-PG-2-i" "2gp-PG-3-i"76#I "2gp-PG-4-i" "2gp-PG-e4-i"77#I "PqDescendantsTreeCoclassOne-16-i"78#I 3-groups:79#I "3gp-PG-i" "3gp-PG-4-i" "3gp-PG-x-i"80#I "3gp-PG-x-1-i" "PqDescendants-treetraverse-i"81#I "PqDescendantsTreeCoclassOne-9-i"82#I 5-groups:83#I "5gp-PG-i" "Nott-PG-Rel-i" "Nott-APG-Rel-i"84#I "PqDescendantsTreeCoclassOne-25-i"85#I 7,11-groups:86#I "7gp-PG-i" "11gp-PG-i"87#I88#I Standard Presentation examples:89#I general:90#I "StandardPresentation" "StandardPresentation-i"91#I "EpimorphismStandardPresentation"92#I "EpimorphismStandardPresentation-i" "IsIsomorphicPGroup-ni"93#I 2-groups:94#I "2gp-SP-Rel-i" "2gp-SP-1-Rel-i" "2gp-SP-2-Rel-i"95#I "2gp-SP-3-Rel-i" "2gp-SP-4-Rel-i" "2gp-SP-d-Rel-i"96#I "gp-256-SP-Rel-i" "B2-4-SP-i" "G2-SP-Rel-i"97#I 3-groups:98#I "3gp-SP-Rel-i" "3gp-SP-1-Rel-i" "3gp-SP-2-Rel-i"99#I "3gp-SP-3-Rel-i" "3gp-SP-4-Rel-i" "G3-SP-Rel-i"100#I 5-groups:101#I "5gp-SP-Rel-i" "5gp-SP-a-Rel-i" "5gp-SP-b-Rel-i"102#I "5gp-SP-big-Rel-i" "5gp-SP-d-Rel-i" "G5-SP-Rel-i"103#I "G5-SP-a-Rel-i" "Nott-SP-Rel-i"104#I 7-groups:105#I "7gp-SP-Rel-i" "7gp-SP-a-Rel-i" "7gp-SP-b-Rel-i"106#I 11-groups:107#I "11gp-SP-a-i" "11gp-SP-a-Rel-i" "11gp-SP-a-Rel-1-i"108#I "11gp-SP-b-i" "11gp-SP-b-Rel-i" "11gp-SP-c-Rel-i"109#I110#I Notes111#I -----112#I 1. The example (first) argument of `PqExample' is a string; each113#I example above is in double quotes to remind you to include them.114#I 2. Some examples accept options. To find out whether a particular115#I example accepts options, display it first (by including `Display'116#I as last argument) which will also indicate how `PqExample'117#I interprets the options, e.g. `PqExample("11gp-SP-a-i", Display);'.118#I 3. Try `SetInfoLevel(InfoANUPQ, <n>);' for some <n> in [2 .. 4]119#I before calling PqExample, to see what's going on behind the scenes.120#I121]]></Example>122123If on your terminal you are unable to scroll back, an alternative to124typing <C>PqExample();</C> to see the displayed examples is to use on-line125help, i.e. you may type:126127<Log><![CDATA[128gap> ?anupq:examples129]]></Log>130131which will display this appendix in a &GAP; session. If you are not132fussed about the order in which the examples are organised,133<C>AllPqExamples();</C> lists the available examples relatively compactly134(see <Ref Func="AllPqExamples" Style="Text"/>).135<P/>136137In the remainder of this appendix we will discuss particular aspects138related to the <C>Relators</C> (see <Ref Label="option Relators" Style="Text"/>) and <C>Identities</C>139(see <Ref Label="option Identities" Style="Text"/>) options, and the construction of the Burnside140group <M>B(5, 4)</M>.141142143<Section Label="The Relators Option">144<Heading>The Relators Option</Heading>145146The <C>Relators</C> option was included because computations involving words147containing commutators that are pre-expanded by &GAP; before being148passed to the <C>pq</C> program may run considerably more slowly, than the149same computations being run with &GAP; pre-expansions avoided. The150following examples demonstrate a case where the performance hit due to151pre-expansion of commutators by &GAP; is a factor of order 100 (in order152to see timing information from the <C>pq</C> program, we set the <C>InfoANUPQ</C>153level to 2).154155<P/>156157Firstly, we run the example that allows pre-expansion of commutators (the158function <C>PqLeftNormComm</C> is provided by the &ANUPQ; package;159see <Ref Func="PqLeftNormComm" Style="Text"/>). Note that since the two commutators of this160example are <E>very</E> long (taking more than an page to print), we have161edited the output at this point.162163<Log><![CDATA[164gap> SetInfoLevel(InfoANUPQ, 2); #to see timing information165gap> PqExample("11gp-i");166#I #Example: "11gp-i" . . . based on: examples/11gp167#I F, a, b, c, R, procId are local to `PqExample'168gap> F := FreeGroup("a", "b", "c"); a := F.1; b := F.2; c := F.3;169<free group on the generators [ a, b, c ]>170a171b172c173gap> R := [PqLeftNormComm([b, a, a, b, c])^11,174> PqLeftNormComm([a, b, b, a, b, c])^11, (a * b)^11];;175gap> procId := PqStart(F/R : Prime := 11);1761177gap> PqPcPresentation(procId : ClassBound := 7,178> OutputLevel := 1);179#I Lower exponent-11 central series for [grp]180#I Group: [grp] to lower exponent-11 central class 1 has order 11^3181#I Group: [grp] to lower exponent-11 central class 2 has order 11^8182#I Group: [grp] to lower exponent-11 central class 3 has order 11^19183#I Group: [grp] to lower exponent-11 central class 4 has order 11^42184#I Group: [grp] to lower exponent-11 central class 5 has order 11^98185#I Group: [grp] to lower exponent-11 central class 6 has order 11^228186#I Group: [grp] to lower exponent-11 central class 7 has order 11^563187#I Computation of presentation took 27.04 seconds188gap> PqSavePcPresentation(procId, ANUPQData.outfile);189#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.190]]></Log>191192Now we do the same calculation using the <C>Relators</C> option. In this way,193the commutators are passed directly as strings to the <C>pq</C> program, so194that &GAP; does not <Q>see</Q> them and pre-expand them.195196<Log><![CDATA[197gap> PqExample("11gp-Rel-i");198#I #Example: "11gp-Rel-i" . . . based on: examples/11gp199#I #(equivalent to "11gp-i" example but uses `Relators' option)200#I F, rels, procId are local to `PqExample'201gap> F := FreeGroup("a", "b", "c");202<free group on the generators [ a, b, c ]>203gap> rels := ["[b, a, a, b, c]^11", "[a, b, b, a, b, c]^11", "(a * b)^11"];204[ "[b, a, a, b, c]^11", "[a, b, b, a, b, c]^11", "(a * b)^11" ]205gap> procId := PqStart(F : Prime := 11, Relators := rels);2062207gap> PqPcPresentation(procId : ClassBound := 7,208> OutputLevel := 1);209#I Relators parsed ok.210#I Lower exponent-11 central series for [grp]211#I Group: [grp] to lower exponent-11 central class 1 has order 11^3212#I Group: [grp] to lower exponent-11 central class 2 has order 11^8213#I Group: [grp] to lower exponent-11 central class 3 has order 11^19214#I Group: [grp] to lower exponent-11 central class 4 has order 11^42215#I Group: [grp] to lower exponent-11 central class 5 has order 11^98216#I Group: [grp] to lower exponent-11 central class 6 has order 11^228217#I Group: [grp] to lower exponent-11 central class 7 has order 11^563218#I Computation of presentation took 0.27 seconds219gap> PqSavePcPresentation(procId, ANUPQData.outfile);220#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.221]]></Log>222</Section>223224225<Section Label="The Identities Option and PqEvaluateIdentities Function">226<Heading>The Identities Option and PqEvaluateIdentities Function</Heading>227228Please pay heed to the warnings given for the <C>Identities</C> option229(see <Ref Label="option Identities" Style="Text"/>); it is written mainly at the &GAP; level and230is not particularly optimised. The <C>Identities</C> option allows one to231compute <M>p</M>-quotients that satisfy an identity. A trivial example better232done using the <C>Exponent</C> option, but which nevertheless demonstrates the233usage of the <C>Identities</C> option, is as follows:234235<Log><![CDATA[236gap> SetInfoLevel(InfoANUPQ, 1);237gap> PqExample("B2-4-Id");238#I #Example: "B2-4-Id" . . . alternative way to generate B(2, 4)239#I #Generates B(2, 4) by using the `Identities' option240#I #... this is not as efficient as using `Exponent' but241#I #demonstrates the usage of the `Identities' option.242#I F, f, procId are local to `PqExample'243gap> F := FreeGroup("a", "b");244<free group on the generators [ a, b ]>245gap> # All words w in the pc generators of B(2, 4) satisfy f(w) = 1246gap> f := w -> w^4;247function( w ) ... end248gap> Pq( F : Prime := 2, Identities := [ f ] );249#I Class 1 with 2 generators.250#I Class 2 with 5 generators.251#I Class 3 with 7 generators.252#I Class 4 with 10 generators.253#I Class 5 with 12 generators.254#I Class 5 with 12 generators.255<pc group of size 4096 with 12 generators>256#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.257gap> time;2581400259]]></Log>260261Note that the <C>time</C> statement gives the time in milliseconds spent by262&GAP; in executing the <C>PqExample("B2-4-Id");</C> command (i.e. everything263up to the <C>Info</C>-ing of the variables used), but over 90% of that time264is spent in the final <C>Pq</C> statement. The time spent by the <C>pq</C> program,265which is negligible anyway (you can check this by running the example266while the <C>InfoANUPQ</C> level is set to 2), is not counted by <C>time</C>.267268<P/>269270Since the identity used in the above construction of <M>B(2, 4)</M> is just an271exponent law, the <Q>right</Q> way to compute it is via the <C>Exponent</C>272option (see <Ref Label="option Exponent" Style="Text"/>), which is implemented at the C level and273<E>is</E> highly optimised. Consequently, the <C>Exponent</C> option is274significantly faster, generally by several orders of magnitude:275276<Log><![CDATA[277gap> SetInfoLevel(InfoANUPQ, 2); # to see time spent by the `pq' program278gap> PqExample("B2-4");279#I #Example: "B2-4" . . . the ``right'' way to generate B(2, 4)280#I #Generates B(2, 4) by using the `Exponent' option281#I F, procId are local to `PqExample'282gap> F := FreeGroup("a", "b");283<free group on the generators [ a, b ]>284gap> Pq( F : Prime := 2, Exponent := 4 );285#I Computation of presentation took 0.00 seconds286<pc group of size 4096 with 12 generators>287#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.288gap> time; # time spent by GAP in executing `PqExample("B2-4");'28950290]]></Log>291292The following example uses the <C>Identities</C> option to compute a 3-Engel293group for the prime 11. As is the case for the example <C>"B2-4-Id"</C>, the294example has both a non-interactive and an interactive form; below, we295demonstrate the interactive form.296297<Log><![CDATA[298gap> SetInfoLevel(InfoANUPQ, 1); # reset InfoANUPQ to default level299gap> PqExample("11gp-3-Engel-Id", PqStart);300#I #Example: "11gp-3-Engel-Id" . . . 3-Engel group for prime 11301#I #Non-trivial example of using the `Identities' option302#I F, a, b, G, f, procId, Q are local to `PqExample'303gap> F := FreeGroup("a", "b"); a := F.1; b := F.2;304<free group on the generators [ a, b ]>305a306b307gap> G := F/[ a^11, b^11 ];308<fp group on the generators [ a, b ]>309gap> # All word pairs u, v in the pc generators of the 11-quotient Q of G310gap> # must satisfy the Engel identity: [u, v, v, v] = 1.311gap> f := function(u, v) return PqLeftNormComm( [u, v, v, v] ); end;312function( u, v ) ... end313gap> procId := PqStart( G );3143315gap> Q := Pq( procId : Prime := 11, Identities := [ f ] );316#I Class 1 with 2 generators.317#I Class 2 with 3 generators.318#I Class 3 with 5 generators.319#I Class 3 with 5 generators.320<pc group of size 161051 with 5 generators>321gap> # We do a ``sample'' check that pairs of elements of Q do satisfy322gap> # the given identity:323gap> f( Random(Q), Random(Q) );324<identity> of ...325gap> f( Q.1, Q.2 );326<identity> of ...327#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.328]]></Log>329330The (interactive) call to <C>Pq</C> above is essentially equivalent to a call331to <C>PqPcPresentation</C> with the same arguments and options followed by a332call to <C>PqCurrentGroup</C>. Moreover, the call to <C>PqPcPresentation</C> (as333described in <Ref Func="PqPcPresentation" Style="Text"/>) is equivalent to a <Q>class 1</Q> call to334<C>PqPcPresentation</C> followed by the requisite number of calls to335<C>PqNextClass</C>, and with the <C>Identities</C> option set, both336<C>PqPcPresentation</C> and <C>PqNextClass</C> <Q>quietly</Q> perform the equivalent337of a <C>PqEvaluateIdentities</C> call. In the following example we break down338the <C>Pq</C> call into its low-level equivalents, and set and unset the339<C>Identities</C> option to show where <C>PqEvaluateIdentities</C> fits into this340scheme.341342<Log><![CDATA[343gap> PqExample("11gp-3-Engel-Id-i");344#I #Example: "11gp-3-Engel-Id-i" . . . 3-Engel grp for prime 11345#I #Variation of "11gp-3-Engel-Id" broken down into its lower-level component346#I #command parts.347#I F, a, b, G, f, procId, Q are local to `PqExample'348gap> F := FreeGroup("a", "b"); a := F.1; b := F.2;349<free group on the generators [ a, b ]>350a351b352gap> G := F/[ a^11, b^11 ];353<fp group on the generators [ a, b ]>354gap> # All word pairs u, v in the pc generators of the 11-quotient Q of G355gap> # must satisfy the Engel identity: [u, v, v, v] = 1.356gap> f := function(u, v) return PqLeftNormComm( [u, v, v, v] ); end;357function( u, v ) ... end358gap> procId := PqStart( G : Prime := 11 );3594360gap> PqPcPresentation( procId : ClassBound := 1);361gap> PqEvaluateIdentities( procId : Identities := [f] );362#I Class 1 with 2 generators.363gap> for c in [2 .. 4] do364> PqNextClass( procId : Identities := [] ); #reset `Identities' option365> PqEvaluateIdentities( procId : Identities := [f] );366> od;367#I Class 2 with 3 generators.368#I Class 3 with 5 generators.369#I Class 3 with 5 generators.370gap> Q := PqCurrentGroup( procId );371<pc group of size 161051 with 5 generators>372gap> # We do a ``sample'' check that pairs of elements of Q do satisfy373gap> # the given identity:374gap> f( Random(Q), Random(Q) );375<identity> of ...376gap> f( Q.1, Q.2 );377<identity> of ...378#I Variables used in `PqExample' are saved in `ANUPQData.example.vars'.379]]></Log>380381</Section>382383384<Section Label="A Large Example">385<Heading>A Large Example</Heading>386387<Index Key="B(5,4)"><M>B(5,4)</M></Index>388An example demonstrating how a large computation can be organised with the389&ANUPQ; package is the computation of the Burnside group <M>B(5, 4)</M>, the390largest group of exponent 4 generated by 5 elements. It has order391<M>2^{2728}</M> and lower exponent-<M>p</M> central class 13. The example392<C>"B5-4.g"</C> computes <M>B(5, 4)</M>; it is based on a <C>pq</C> standalone input393file written by M. F. Newman.394<P/>395396To be able to do examples like this was part of the motivation to provide397access to the low-level functions of the standalone program from within398&GAP;.399<P/>400401Please note that the construction uses the knowledge gained by Newman and402O'Brien in their initial construction of <M>B(5, 4)</M>, in particular,403insight into the commutator structure of the group and the knowledge of404the <M>p</M>-central class and the order of <M>B(5, 4)</M>. Therefore, the405construction cannot be used to prove that <M>B(5, 4)</M> has the order and406class mentioned above. It is merely a reconstruction of the group. More407information is contained in the header of the file <C>examples/B5-4.g</C>.408409<Log><![CDATA[410procId := PqStart( FreeGroup(5) : Exponent := 4, Prime := 2 );411Pq( procId : ClassBound := 2 );412PqSupplyAutomorphisms( procId,413[414[ [ 1, 1, 0, 0, 0], # first automorphism415[ 0, 1, 0, 0, 0],416[ 0, 0, 1, 0, 0],417[ 0, 0, 0, 1, 0],418[ 0, 0, 0, 0, 1] ],419420[ [ 0, 0, 0, 0, 1], # second automorphism421[ 1, 0, 0, 0, 0],422[ 0, 1, 0, 0, 0],423[ 0, 0, 1, 0, 0],424[ 0, 0, 0, 1, 0] ]425] );;426427Relations :=428[ [], ## class 1429[], ## class 2430[], ## class 3431[], ## class 4432[], ## class 5433[], ## class 6434## class 7435[ [ "x2","x1","x1","x3","x4","x4","x4" ] ],436## class 8437[ [ "x2","x1","x1","x3","x4","x5","x5","x5" ] ],438## class 9439[ [ "x2","x1","x1","x3","x4","x4","x5","x5","x5" ],440[ "x2","x1","x1","x2","x3","x4","x5","x5","x5" ],441[ "x2","x1","x1","x3","x3","x4","x5","x5","x5" ] ],442## class 10443[ [ "x2","x1","x1","x2","x3","x3","x4","x5","x5","x5" ],444[ "x2","x1","x1","x3","x3","x4","x4","x5","x5","x5" ] ],445## class 11446[ [ "x2","x1","x1","x2","x3","x3","x4","x4","x5","x5","x5" ],447[ "x2","x1","x1","x2","x3","x1","x3","x4","x2","x4","x3" ] ],448## class 12449[ [ "x2","x1","x1","x2","x3","x1","x3","x4","x2","x5","x5","x5" ],450[ "x2","x1","x1","x3","x2","x4","x3","x5","x4","x5","x5","x5" ] ],451## class 13452[ [ "x2","x1","x1","x2","x3","x1","x3","x4","x2","x4","x5","x5","x5"453] ]454];455456for class in [ 3 .. 13 ] do457Print( "Computing class ", class, "\n" );458PqSetupTablesForNextClass( procId );459460for w in [ class, class-1 .. 7 ] do461462PqAddTails( procId, w );463PqDisplayPcPresentation( procId );464465if Relations[ w ] <> [] then466# recalculate automorphisms467PqExtendAutomorphisms( procId );468469for r in Relations[ w ] do470Print( "Collecting ", r, "\n" );471PqCommutator( procId, r, 1 );472PqEchelonise( procId );473PqApplyAutomorphisms( procId, 15 ); #queue factor = 15474od;475476PqEliminateRedundantGenerators( procId );477fi;478PqComputeTails( procId, w );479od;480PqDisplayPcPresentation( procId );481482smallclass := Minimum( class, 6 );483for w in [ smallclass, smallclass-1 .. 2 ] do484PqTails( procId, w );485od;486# recalculate automorphisms487PqExtendAutomorphisms( procId );488PqCollect( procId, "x5^4" );489PqEchelonise( procId );490PqApplyAutomorphisms( procId, 15 ); #queue factor = 15491PqEliminateRedundantGenerators( procId );492PqDisplayPcPresentation( procId );493od;494]]></Log>495496</Section>497498499<Section Label="Developing descendants trees">500<Heading>Developing descendants trees</Heading>501502In the following example we will explore the 3-groups of rank 2 and5033-coclass 1 up to 3-class 5. This will be done using the <M>p</M>-group504generation machinery of the package. We start with the elementary abelian5053-group of rank 2. From within &GAP;, run the example506<C>"PqDescendants-treetraverse-i"</C> via <C>PqExample</C> (see <Ref Func="PqExample" Style="Text"/>).507508<Example><![CDATA[509gap> G := ElementaryAbelianGroup( 9 );510<pc group of size 9 with 2 generators>511gap> procId := PqStart( G );5125513gap> #514gap> # Below, we use the option StepSize in order to construct descendants515gap> # of coclass 1. This is equivalent to setting the StepSize to 1 in516gap> # each descendant calculation.517gap> #518gap> # The elementary abelian group of order 9 has 3 descendants of519gap> # 3-class 2 and 3-coclass 1, as the result of the next command520gap> # shows.521gap> #522gap> PqDescendants( procId : StepSize := 1 );523[ <pc group of size 27 with 3 generators>,524<pc group of size 27 with 3 generators>,525<pc group of size 27 with 3 generators> ]526gap> #527gap> # Now we will compute the descendants of coclass 1 for each of the528gap> # groups above. Then we will compute the descendants of coclass 1529gap> # of each descendant and so on. Note that the pq program keeps530gap> # one file for each class at a time. For example, the descendants531gap> # calculation for the second group of class 2 overwrites the532gap> # descendant file obtained from the first group of class 2.533gap> # Hence, we have to traverse the descendants tree in depth first534gap> # order.535gap> #536gap> PqPGSetDescendantToPcp( procId, 2, 1 );537gap> PqPGExtendAutomorphisms( procId );538gap> PqPGConstructDescendants( procId : StepSize := 1 );5392540gap> PqPGSetDescendantToPcp( procId, 3, 1 );541gap> PqPGExtendAutomorphisms( procId );542gap> PqPGConstructDescendants( procId : StepSize := 1 );5432544gap> PqPGSetDescendantToPcp( procId, 4, 1 );545gap> PqPGExtendAutomorphisms( procId );546gap> PqPGConstructDescendants( procId : StepSize := 1 );5472548gap> #549gap> # At this point we stop traversing the ``left most'' branch of the550gap> # descendants tree and move upwards.551gap> #552gap> PqPGSetDescendantToPcp( procId, 4, 2 );553gap> PqPGExtendAutomorphisms( procId );554gap> PqPGConstructDescendants( procId : StepSize := 1 );555#I group restored from file is incapable5560557gap> PqPGSetDescendantToPcp( procId, 3, 2 );558gap> PqPGExtendAutomorphisms( procId );559gap> PqPGConstructDescendants( procId : StepSize := 1 );560#I group restored from file is incapable5610562gap> #563gap> # The computations above indicate that the descendants subtree under564gap> # the first descendant of the elementary abelian group of order 9565gap> # will have only one path of infinite length.566gap> #567gap> PqPGSetDescendantToPcp( procId, 2, 2 );568gap> PqPGExtendAutomorphisms( procId );569gap> PqPGConstructDescendants( procId : StepSize := 1 );5704571gap> #572gap> # We get four descendants here, three of which will turn out to be573gap> # incapable, i.e., they have no descendants and are terminal nodes574gap> # in the descendants tree.575gap> #576gap> PqPGSetDescendantToPcp( procId, 2, 3 );577gap> PqPGExtendAutomorphisms( procId );578gap> PqPGConstructDescendants( procId : StepSize := 1 );579#I group restored from file is incapable5800581gap> #582gap> # The third descendant of class three is incapable. Let us return583gap> # to the second descendant of class 2.584gap> #585gap> PqPGSetDescendantToPcp( procId, 2, 2 );586gap> PqPGExtendAutomorphisms( procId );587gap> PqPGConstructDescendants( procId : StepSize := 1 );5884589gap> PqPGSetDescendantToPcp( procId, 3, 1 );590gap> PqPGExtendAutomorphisms( procId );591gap> PqPGConstructDescendants( procId : StepSize := 1 );592#I group restored from file is incapable5930594gap> PqPGSetDescendantToPcp( procId, 3, 2 );595gap> PqPGExtendAutomorphisms( procId );596gap> PqPGConstructDescendants( procId : StepSize := 1 );597#I group restored from file is incapable5980599gap> #600gap> # We skip the third descendant for the moment ...601gap> #602gap> PqPGSetDescendantToPcp( procId, 3, 4 );603gap> PqPGExtendAutomorphisms( procId );604gap> PqPGConstructDescendants( procId : StepSize := 1 );605#I group restored from file is incapable6060607gap> #608gap> # ... and look at it now.609gap> #610gap> PqPGSetDescendantToPcp( procId, 3, 3 );611gap> PqPGExtendAutomorphisms( procId );612gap> PqPGConstructDescendants( procId : StepSize := 1 );6136614gap> #615gap> # In this branch of the descendant tree we get 6 descendants of class616gap> # three. Of those 5 will turn out to be incapable and one will have617gap> # 7 descendants.618gap> #619gap> PqPGSetDescendantToPcp( procId, 4, 1 );620gap> PqPGExtendAutomorphisms( procId );621gap> PqPGConstructDescendants( procId : StepSize := 1 );622#I group restored from file is incapable6230624gap> PqPGSetDescendantToPcp( procId, 4, 2 );625gap> PqPGExtendAutomorphisms( procId );626gap> PqPGConstructDescendants( procId : StepSize := 1 );6277628gap> PqPGSetDescendantToPcp( procId, 4, 3 );629gap> PqPGExtendAutomorphisms( procId );630gap> PqPGConstructDescendants( procId : StepSize := 1 );631#I group restored from file is incapable6320633]]></Example>634635To automate the above procedure to some extent we provide:636637<ManSection>638<Func Name="PqDescendantsTreeCoclassOne" Arg="i"/>639<Func Name="PqDescendantsTreeCoclassOne" Arg="" Label="for default process"/>640641<Description>642for the <A>i</A>th or default interactive &ANUPQ; process, generate a643descendant tree for the group of the process (which must be a pc644<M>p</M>-group) consisting of descendants of <M>p</M>-coclass 1 and extending to645the class determined by the option <C>TreeDepth</C> (or 6 if the option is646omitted). In an &XGAP; session, a graphical representation of the647descendants tree appears in a separate window. Subsequent calls to648<C>PqDescendantsTreeCoclassOne</C> for the same process may be used to extend649the descendant tree from the last descendant computed that itself has650more than one descendant. <C>PqDescendantsTreeCoclassOne</C> also accepts the651options <C>CapableDescendants</C> (or <C>AllDescendants</C>) and any options652accepted by the interactive <C>PqDescendants</C> function653(see <Ref Func="PqDescendants" Label="interactive" Style="Text"/>).654<P/>655656<E>Notes</E>657<Enum>658<Item>659<C>PqDescendantsTreeCoclassOne</C> first calls <C>PqDescendants</C>. If660<C>PqDescendants</C> has already been called for the process, the previous661value computed is used and a warning is <C>Info</C>-ed at <C>InfoANUPQ</C> level 1.662</Item>663664<Item>665As each descendant is processed its unique label defined by the <C>pq</C>666program and number of descendants is <C>Info</C>-ed at <C>InfoANUPQ</C> level 1.667</Item>668669<Item>670<C>PqDescendantsTreeCoclassOne</C> is an <Q>experimental</Q> function that is671included to demonstrate the sort of things that are possible with the672<M>p</M>-group generation machinery.673</Item>674</Enum>675676Ignoring the extra functionality provided in an &XGAP; session,677<C>PqDescendantsTreeCoclassOne</C>, with one argument that is the index of an678interactive &ANUPQ; process, is approximately equivalent to:679680<Listing><![CDATA[681PqDescendantsTreeCoclassOne := function( procId )682local des, i;683684des := PqDescendants( procId : StepSize := 1 );685RecurseDescendants( procId, 2, Length(des) );686end;687]]></Listing>688689where <C>RecurseDescendants</C> is (approximately) defined as follows:690691<Listing><![CDATA[692RecurseDescendants := function( procId, class, n )693local i, nr;694695if class > ValueOption("TreeDepth") then return; fi;696697for i in [1..n] do698PqPGSetDescendantToPcp( procId, class, i );699PqPGExtendAutomorphisms( procId );700nr := PqPGConstructDescendants( procId : StepSize := 1 );701Print( "Number of descendants of group ", i,702" at class ", class, ": ", nr, "\n" );703RecurseDescendants( procId, class+1, nr );704od;705return;706end;707]]></Listing>708709The following examples (executed via <C>PqExample</C>; see <Ref Func="PqExample" Style="Text"/>),710demonstrate the use of <C>PqDescendantsTreeCoclassOne</C>:711712<List>713<Mark><C>"PqDescendantsTreeCoclassOne-9-i"</C></Mark>714<Item>715approximately does example <C>"PqDescendants-treetraverse-i"</C> again using716<C>PqDescendantsTreeCoclassOne</C>;717</Item>718<Mark><C>"PqDescendantsTreeCoclassOne-16-i"</C></Mark>719<Item>720uses the option <C>CapableDescendants</C>; and721</Item>722<Mark><C>"PqDescendantsTreeCoclassOne-25-i"</C></Mark>723<Item>724calculates all descendants by omitting the <C>CapableDescendants</C> option.725</Item>726</List>727728The numbers <C>9</C>, <C>16</C> and <C>25</C> respectively, indicate the order of the729elementary abelian group to which <C>PqDescendantsTreeCoclassOne</C> is730applied for these examples.731</Description>732</ManSection>733734</Section>735</Appendix>736737738