Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<Chapter Label="Interactive ANUPQ functions">1<Heading>Interactive ANUPQ functions</Heading>23Here we describe the interactive functions defined by the &ANUPQ;4package, i.e. the functions that manipulate and initiate interactive5&ANUPQ; processes. These are functions that extract information via a6dialogue with a running <C>pq</C> process (process used in the UNIX sense).7Occasionally, a user needs the <Q>next step</Q>; the functions provided in8this chapter make use of data from previous steps retained by the <C>pq</C>9program, thus allowing the user to interact with the <C>pq</C> program like10one can when one uses the <C>pq</C> program as a stand-alone (see <C>guide.dvi</C>11in the <C>standalone-doc</C> directory).12<P/>1314An interactive &ANUPQ; process is initiated by <C>PqStart</C> and terminated15via <C>PqQuit</C>; these functions are described in16ection <Ref Sect="Starting and Stopping Interactive ANUPQ Processes" Style="Text"/>.17<P/>1819Each interactive &ANUPQ; function that manipulates an already started20interactive &ANUPQ; process, has a form where the first argument is the21integer <A>i</A> returned by the initiating <C>PqStart</C> command, and a second22form with one argument fewer (where the integer <A>i</A> is discovered by a23default mechanism, namely by determining the least integer <A>i</A> for which24there is a currently active interactive &ANUPQ; process). We will thus25commonly say that <Q>for the <A>i</A>th (or default) interactive &ANUPQ;26process</Q> a certain function performs a given action. In each case, it is27an error if <A>i</A> is not the index of an active interactive process, or28there are no current active interactive processes.29<P/>3031<E>Notes</E>:32The global method of passing options (via <C>PushOptions</C>), should not be33used with any of the interactive functions. In fact, the <C>OptionsStack</C>34should be empty at the time any of the interactive functions is called.35<P/>3637On <K>quit</K>ting &GAP;, <C>PqQuitAll();</C> is executed, which terminates all38active interactive &ANUPQ; processes. If &GAP; is killed without39<K>quit</K>ting, before all interactive &ANUPQ; processes are terminated,40<E>zombie</E> processes (still living <E>child</E> processes whose <E>parents</E> have41died), may result. Since zombie processes do consume resources, in such42an event, the responsible computer user should seek out and terminate43those zombie processes (e.g. on Linux: <C>ps xw | grep pq</C> gives you44information on the <C>pq</C> processes corresponding to any interactive45&ANUPQ; processes started in a &GAP; session; you can then do <C>kill46<A>N</A></C> for each number <A>N</A> appearing in the first column of this output).4748<Section Label="Starting and Stopping Interactive ANUPQ Processes">49<Heading>Starting and Stopping Interactive ANUPQ Processes</Heading>5051<ManSection>52<Func Name="PqStart" Arg="G, workspace : options" Label="with group and workspace size"/>53<Func Name="PqStart" Arg="G : options" Label="with group"/>54<Func Name="PqStart" Arg="workspace : options" Label="with workspace size"/>55<Func Name="PqStart" Arg=": options"/>56<Description>57activate an iostream for an interactive &ANUPQ; process (i.e. <C>PqStart</C>58starts up a <C>pq</C> process and opens a &GAP; iostream to <Q>talk</Q> to that59process) and returns an integer <A>i</A> that can be used to identify that60process. The argument <A>G</A> should be an <E>fp group</E> or <E>pc group</E> that the61user intends to manipulate using interactive &ANUPQ; functions. If the62function is called without specifying <A>G</A>, a group can be read in by63using the function <C>PqRestorePcPresentation</C> (see <Ref Func="PqRestorePcPresentation" Style="Text"/>).64If <C>PqStart</C> is given an integer argument <A>workspace</A>, then the <C>pq</C>65program is started up with a workspace (an integer array) of size66<A>workspace</A> (i.e. <M>4 \times <A>workspace</A></M> bytes in a 32-bit environment);67otherwise, the <C>pq</C> program sets a default workspace of <M>10000000</M>.68<P/>6970The only <A>options</A> currently recognised by <C>PqStart</C> are <C>Prime</C>,71<C>Exponent</C> and <C>Relators</C> (see Chapter <Ref Chap="ANUPQ Options" Style="Text"/> for detailed72descriptions of these options) and if provided they are essentially73global for the interactive &ANUPQ; process, except that any interactive74function interacting with the process and passing new values for these75options will over-ride the global values.76</Description>77</ManSection>7879<ManSection>80<Func Name="PqQuit" Arg="i"/>81<Func Name="PqQuit" Arg="" Label="for default process"/>82<Description>83closes the stream of the <A>i</A>th or default interactive &ANUPQ; process84and unbinds its <C>ANUPQData.io</C> record.85<P/>8687<E>Note:</E>88It can happen that the <C>pq</C> process, and hence the &GAP; iostream89assigned to communicate with it, can die, e.g. by the user typing a90<C>Ctrl-C</C> while the <C>pq</C> process is engaged in a long calculation.91<C>IsPqProcessAlive</C> (see <Ref Func="IsPqProcessAlive" Style="Text"/>) is provided to check the92status of the &GAP; iostream (and hence the status of the <C>pq</C> process93it was communicating with).94</Description>95</ManSection>9697<ManSection>98<Func Name="PqQuitAll" Arg=""/>99<Description>100is provided as a convenience, to terminate all active interactive101&ANUPQ; processes with a single command. It is equivalent to executing102<C>PqQuit(<A>i</A>)</C> for all active interactive &ANUPQ; processes <A>i</A>103(see <Ref Func="PqQuit" Style="Text"/>).104</Description>105</ManSection>106107</Section>108109110<Section Label="Interactive ANUPQ Process Utility Functions">111<Heading>Interactive ANUPQ Process Utility Functions</Heading>112113<ManSection>114<Func Name="PqProcessIndex" Arg="i"/>115<Func Name="PqProcessIndex" Arg="" Label="for default process"/>116<Description>117With argument <A>i</A>, which must be a positive integer, <C>PqProcessIndex</C>118returns <A>i</A> if it corresponds to an active interactive process, or raises119an error. With no arguments it returns the default active interactive120process or returns <K>fail</K> and emits a warning message to <C>Info</C> at121<C>InfoANUPQ</C> or <C>InfoWarning</C> level 1.122<P/>123124<E>Note:</E>125Essentially, an interactive &ANUPQ; process <A>i</A> is <Q>active</Q> if126<C>ANUPQData.io[<A>i</A>]</C> is bound (i.e. we still have some data telling us127about it). Also see <Ref Func="PqStart" Style="Text"/>.128</Description>129</ManSection>130131<ManSection>132<Func Name="PqProcessIndices" Arg=""/>133<Description>134returns the list of integer indices of all active interactive &ANUPQ;135processes (see <Ref Func="PqProcessIndex" Style="Text"/> for the meaning of <Q>active</Q>).136</Description>137</ManSection>138139<ManSection>140<Func Name="IsPqProcessAlive" Arg="i"/>141<Func Name="IsPqProcessAlive" Arg="" Label="for default process"/>142<Description>143return <K>true</K> if the &GAP; iostream of the <A>i</A>th (or default)144interactive &ANUPQ; process started by <C>PqStart</C> is alive (i.e. can145still be written to), or <K>false</K>, otherwise. (See the notes for <Ref Func="PqStart" Style="Text"/>146and <Ref Func="PqQuit" Style="Text"/>.)147<P/>148149<Index>interruption</Index><!-- @interruption of an interactive ANUPQ process -->150If the user does not yet have a <C>gap></C> prompt then usually the <C>pq</C>151program is still away doing something and an &ANUPQ; interface function152is still waiting for a reply. Typing a <C>Ctrl-C</C> (i.e. holding down the153<C>Ctrl</C> key and typing <C>c</C>) will stop the waiting and send &GAP; into a154<C>break</C>-loop, from which one has no option but to <C>quit;</C>. The typing of155<C>Ctrl-C</C>, in such a circumstance, usually causes the stream of the156interactive &ANUPQ; process to die; to check this we provide157<C>IsPqProcessAlive</C> (see <Ref Func="IsPqProcessAlive" Style="Text"/>).158<P/>159160The &GAP; iostream of an interactive &ANUPQ; process will also die if161the <C>pq</C> program has a segmentation fault. We do hope that this never162happens to you, but if it does and the failure is reproducible, then it's163a bug and we'd like to know about it. Please read the <C>README</C> that comes164with the &ANUPQ; package to find out what to include in a bug report and165who to email it to.166</Description>167</ManSection>168169</Section>170171172<Section Label="Interactive Versions of Non-interactive ANUPQ Functions">173<Heading>Interactive Versions of Non-interactive ANUPQ Functions</Heading>174175<ManSection>176<Func Name="Pq" Arg="i : options" Label="interactive"/>177<Func Name="Pq" Arg=": options" Label="interactive, for default process"/>178<Description>179return, for the fp or pc group (let us call it <A>F</A>), of the <A>i</A>th or180default interactive &ANUPQ; process, the <M>p</M>-quotient of <A>F</A>181specified by <A>options</A>, as a pc group; <A>F</A> must previously have been182given (as first argument) to <C>PqStart</C> to start the interactive183&ANUPQ; process (see <Ref Func="PqStart" Style="Text"/>) or restored from file using the184function <C>PqRestorePcPresentation</C> (see <Ref Func="PqRestorePcPresentation" Style="Text"/>).185Following the colon <A>options</A> is a selection of the options listed for186the non-interactive <C>Pq</C> function (see <Ref Func="Pq" Style="Text"/>), separated by commas like187record components (see Section <Ref BookName="ref" Label="Function Call With Options" Style="Text"/> in the188&GAP; Reference Manual), except that the options <C>SetupFile</C> or189<C>PqWorkspace</C> are ignored by the interactive <C>Pq</C>, and <C>RedoPcp</C> is an190option only recognised by the interactive <C>Pq</C> i.e. the following191options are recognised by the interactive <C>Pq</C> function:192193<List>194<Item>195<C>Prime := <A>p</A></C><Index>option Prime</Index>196</Item>197<Item>198<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>199</Item>200<Item>201<C>Exponent := <A>n</A></C><Index>option Exponent</Index>202</Item>203<Item>204<C>Relators := <A>rels</A></C><Index>option Relators</Index>205</Item>206<Item>207<C>Metabelian</C><Index>option Metabelian</Index>208</Item>209<Item>210<C>Identities := <A>funcs</A></C><Index>option Identities</Index>211</Item>212<Item>213<C>GroupName := <A>name</A></C><Index>option GroupName</Index>214</Item>215<Item>216<C>OutputLevel := <A>n</A></C><Index>option OutputLevel</Index>217</Item>218<Item>219<C>RedoPcp</C><Index>option RedoPcp</Index>220</Item>221</List>222223Detailed descriptions of the above options may be found in Chapter <Ref Chap="ANUPQ Options" Style="Text"/>.224<P/>225226As a minimum the <C>Pq</C> function <E>must</E> have a value for the <C>Prime</C>227option, though <C>Prime</C> need not be passed again in the case it has228previously been provided, e.g. to <C>PqStart</C> (see <Ref Func="PqStart" Style="Text"/>) when starting229the interactive process.230<P/>231232The behaviour of the interactive <C>Pq</C> function depends on the current233state of the pc presentation stored by the <C>pq</C> program:234235<Enum>236<Item>237If no pc presentation has yet been computed (the case immediately after238the <C>PqStart</C> call initiating the process) then the quotient group of the239input group of the process of largest lower exponent-<A>p</A> class bounded by240the value of the <C>ClassBound</C> option (see <Ref Label="option ClassBound" Style="Text"/>) is241returned.242</Item>243244<Item>245If the current pc presentation of the process was determined by a246previous call to <C>Pq</C> or <C>PqEpimorphism</C>, and the current call has a247larger value <C>ClassBound</C> then the class is extended as much as is248possible and the quotient group of the input group of the process of the249new lower exponent-<A>p</A> class is returned.250</Item>251252<Item>253If the current pc presentation of the process was determined by a254previous call to <C>PqPCover</C> then a consistent pc presentation of a255quotient for the current class is determined before proceeding as in 2.256</Item>257258<Item>259If the <C>RedoPcp</C> option is supplied the current pc presentation is260scrapped, all options must be re-supplied (in particular, <C>Prime</C> <E>must</E>261be supplied) and then the <C>Pq</C> function proceeds as in 1.262</Item>263</Enum>264265See Section <Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/> for the266attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and267<C>IsCapable</C> which may be applied to the group returned by <C>Pq</C>.268<P/>269270The following is one of the examples for the non-interactive <C>Pq</C> redone271with the interactive version. Also, we set the option <C>OutputLevel</C> to 1272(see <Ref Label="option OutputLevel" Style="Text"/>), in order to see the orders of the quotients273of all the classes determined, and we set the <C>InfoANUPQ</C> level to 2274(see <Ref Func="InfoANUPQ" Style="Text"/>), so that we catch the timing information.275276<Example><![CDATA[277gap> F := FreeGroup("a", "b");; a := F.1;; b := F.2;;278gap> G := F / [a^4, b^4];279<fp group on the generators [ a, b ]>280gap> PqStart(G);2811282gap> SetInfoLevel(InfoANUPQ, 2); #To see timing information283gap> Pq(: Prime := 2, ClassBound := 3, OutputLevel := 1 );284#I Lower exponent-2 central series for [grp]285#I Group: [grp] to lower exponent-2 central class 1 has order 2^2286#I Group: [grp] to lower exponent-2 central class 2 has order 2^5287#I Group: [grp] to lower exponent-2 central class 3 has order 2^8288#I Computation of presentation took 0.00 seconds289<pc group of size 256 with 8 generators>290]]></Example>291</Description>292</ManSection>293294<ManSection>295<Func Name="PqEpimorphism" Arg="i : options" Label="interactive"/>296<Func Name="PqEpimorphism" Arg=": options" Label="interactive, for default process"/>297<Description>298return, for the fp or pc group (let us call it <A>F</A>), of the <A>i</A>th or299default interactive &ANUPQ; process, an epimorphism from <A>F</A> onto the300<M>p</M>-quotient of <A>F</A> specified by <A>options</A>; <A>F</A> must previously have been301given (as first argument) to <C>PqStart</C> to start the interactive &ANUPQ;302process (see <Ref Func="PqStart" Style="Text"/>). Since the underlying interactions with the <C>pq</C>303program effected by the interactive <C>PqEpimorphism</C> are identical to304those effected by the interactive <C>Pq</C>, everything said regarding the305requirements and behaviour of the interactive <C>Pq</C> function306(see <Ref Func="Pq" Label="interactive" Style="Text"/>) is also the case for the interactive307<C>PqEpimorphism</C>.308<P/>309310<E>Note:</E>311See Section <Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/> for the312attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and313<C>IsCapable</C> which may be applied to the image group of the epimorphism314returned by <C>PqEpimorphism</C>.315</Description>316</ManSection>317318<ManSection>319<Func Name="PqPCover" Arg="i : options" Label="interactive"/>320<Func Name="PqPCover" Arg=": options" Label="interactive, for default process"/>321<Description>322return, for the fp or pc group of the <A>i</A>th or default interactive323&ANUPQ; process, the <M>p</M>-covering group of the <M>p</M>-quotient <C>Pq(<A>i</A> :324<A>options</A>)</C> or <C>Pq(: <A>options</A>)</C>, modulo the following:325326<Enum>327<Item>328If no pc presentation has yet been computed (the case immediately after329the <C>PqStart</C> call initiating the process) and the group <A>F</A> of the330process is already a <M>p</M>-group, in the sense that <C>HasIsPGroup(<A>F</A>) and331IsPGroup(<A>F</A>)</C> is <K>true</K>, then332<List>333<Mark><C>Prime</C></Mark>334<Item>335defaults to <C>PrimePGroup(<A>F</A>)</C>, if not supplied and <C>HasPrimePGroup(<A>F</A>)336= true</C>; and337</Item>338<Mark><C>ClassBound</C></Mark>339<Item>340defaults to <C>PClassPGroup(<A>F</A>)</C> if <C>HasPClassPGroup(<A>F</A>) = true</C> if not341supplied, or to the usual default of 63, otherwise.342</Item>343</List>344</Item>345346<Item>347If a pc presentation has been computed and none of <A>options</A> is <C>RedoPcp</C>348or if no pc presentation has yet been computed but 1. does not apply then349<C>PqPCover(<A>i</A> : <A>options</A>);</C> is equivalent to:350351<Listing><![CDATA[352Pq(i : options);353PqPCover(i);354]]></Listing>355</Item>356357<Item>358If the <C>RedoPcp</C> option is supplied the current pc presentation is359scrapped, and <C>PqPCover</C> proceeds as in 1. or 2. but without the360<C>RedoPcp</C> option.361</Item>362</Enum>363</Description>364</ManSection>365366<Index>automorphisms<Subkey>of <M>p</M>-groups</Subkey></Index>367<ManSection>368<Func Name="PqStandardPresentation" Arg="[ i ]: options" Label="interactive"/>369<Func Name="StandardPresentation" Arg="[ i ]: options" Label="interactive"/>370<Description>371return, for the <A>i</A>th or default interactive &ANUPQ; process, the372<A>p</A>-quotient of the group <A>F</A> of the process, specified by <A>options</A>, as373an <E>fp group</E> which has a standard presentation. Here <A>options</A> is a374selection of the options from the following list (see Chapter <Ref Chap="ANUPQ Options" Style="Text"/> for detailed descriptions); this list is the same as for the375non-interactive version of <C>PqStandardPresentation</C> except for the376omission of options <C>SetupFile</C> and <C>PqWorkspace</C>377(see <Ref Func="PqStandardPresentation" Style="Text"/>).378379<List>380<Item>381<C>Prime := <A>p</A></C><Index>option Prime</Index>382</Item>383<Item>384<C>pQuotient := <A>Q</A></C><Index>option pQuotient</Index>385</Item>386<Item>387<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>388</Item>389<Item>390<C>Exponent := <A>n</A></C><Index>option Exponent</Index>391</Item>392<Item>393<C>Metabelian</C><Index>option Metabelian</Index>394</Item>395<Item>396<C>GroupName := <A>name</A></C><Index>option GroupName</Index>397</Item>398<Item>399<C>OutputLevel := <A>n</A></C><Index>option OutputLevel</Index>400</Item>401<Item>402<C>StandardPresentationFile := <A>filename</A></C><Index>option StandardPresentationFile</Index>403</Item>404</List>405406Unless <A>F</A> is a pc <A>p</A>-group, or the option <C>Prime</C> has been passed to a407previous interactive function for the process to compute a <A>p</A>-quotient408for <A>F</A>, the user <E>must</E> supply either the option <C>Prime</C> or the option409<C>pQuotient</C> (if both <C>Prime</C> and <C>pQuotient</C> are supplied, the prime <A>p</A>410is determined by applying <C>PrimePGroup</C> (see <Ref BookName="ref" Attr="PrimePGroup" Style="Text"/> in the411Reference Manual) to the value of <C>pQuotient</C>).412<P/>413414Taking one of the examples for the non-interactive version of415<C>StandardPresentation</C> (see <Ref Func="StandardPresentation" Style="Text"/>) that required two416separate calls to the <C>pq</C> program, we now show how it can be done by417setting up a dialogue with just the one <C>pq</C> process, using the418interactive version of <C>StandardPresentation</C>:419420<Example><![CDATA[421gap> F4 := FreeGroup( "a", "b", "c", "d" );;422gap> a := F4.1;; b := F4.2;; c := F4.3;; d := F4.4;;423gap> G4 := F4 / [ b^4, b^2 / Comm(Comm (b, a), a), d^16,424> a^16 / (c * d), b^8 / (d * c^4) ];425<fp group on the generators [ a, b, c, d ]>426gap> SetInfoLevel(InfoANUPQ, 1); #Only essential Info please427gap> PqStart(G4); #Start a new interactive process for a new group4282429gap> K := Pq( 2 : Prime := 2, ClassBound := 1 ); #`pq' process no. is 2430<pc group of size 4 with 2 generators>431gap> StandardPresentation( 2 : pQuotient := K, ClassBound := 14 );432<fp group with 53 generators>433]]></Example>434435<E>Notes</E>436<P/>437438In contrast to the function <C>Pq</C> (see <Ref Func="Pq" Style="Text"/>) which returns a pc group,439<C>PqStandardPresentation</C> or <C>StandardPresentation</C> returns an fp group.440This is because the output is mainly used for isomorphism testing for441which an fp group is enough. However, the presentation is a polycyclic442presentation and if you need to do any further computation with this443group (e.g. to find the order) you can use the function <C>PcGroupFpGroup</C>444(see <Ref BookName="ref" Func="PcGroupFpGroup" Style="Text"/> in the445&GAP; Reference Manual) to form a pc group.446<P/>447448If the user does not supply a <A>p</A>-quotient <A>Q</A> via the449<C>pQuotient</C> option, and the prime <A>p</A> is either supplied, stored, or450<A>F</A> is a pc <A>p</A>-group, then a <A>p</A>-quotient <A>Q</A> is451computed. (The value of the prime <A>p</A> is stored if passed initially to452<C>PqStart</C> or to a subsequent interactive process.) Note that a stored453value for <C>pQuotient</C> (from a prior call to <C>Pq</C>) does <E>not</E>454have precedence over a value for the prime <A>p</A>. If the user does supply a455<A>p</A>-quotient <A>Q</A> via the <C>pQuotient</C> option, the package456&AutPGrp; is called to compute the automorphism group of <A>Q</A>; an error457will occur that asks the user to install the package &AutPGrp; if the458automorphism group cannot be computed.459<P/>460461If any of the interactive functions <C>PqStandardPresentation</C>,462<C>StandardPresentation</C>, <C>EpimorphismPqStandardPresentation</C> or463<C>EpimorphismStandardPresentation</C> has been called previously for an464interactive process, a subsequent call to any of these functions for the same465process returns the previously computed value. Note that all these functions466compute both an epimorphism and an fp group and store the results in the467<C>SPepi</C> and <C>SP</C> fields of the data record associated with the468process. See the example for the interactive469<C>EpimorphismStandardPresentation</C>470(<Ref Func="EpimorphismStandardPresentation" Label="interactive" Style="Text"/>).471<P/>472473The attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and474<C>IsCapable</C> are set for the group returned by <C>PqStandardPresentation</C> or475<C>StandardPresentation</C> (see Section <Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/>).476</Description>477</ManSection>478479<ManSection>480<Func Name="EpimorphismPqStandardPresentation" Arg="[ i ]: options" Label="interactive"/>481<Meth Name="EpimorphismStandardPresentation" Arg="[ i ]: options" Label="interactive"/>482<Description>483Each of the above functions accepts the same arguments and options as the484interactive form of <C>StandardPresentation</C>485(see <Ref Func="StandardPresentation" Label="interactive" Style="Text"/>) and returns an epimorphism from486the fp or pc group <A>F</A> of the <A>i</A>th or default interactive &ANUPQ;487process onto the finitely presented group given by a standard488presentation, i.e. if <A>S</A> is the standard presentation computed for the489<M>p</M>-quotient of <A>F</A> by <C>StandardPresentation</C> then490<C>EpimorphismStandardPresentation</C> returns the epimorphism from <A>F</A> to the491group with presentation <A>S</A>. The group <A>F</A> must have been given (as first492argument) to <C>PqStart</C> to start the interactive &ANUPQ; process493(see <Ref Func="PqStart" Style="Text"/>).494<P/>495496Taking our earlier non-interactive example497(see <Ref Func="EpimorphismPqStandardPresentation" Style="Text"/>) and modifying it a little, we498illustrate, as for the interactive <C>StandardPresentation</C>499(see <Ref Func="StandardPresentation" Label="interactive" Style="Text"/>), how something that required two500separate calls to the <C>pq</C> program can now be achieved with a dialogue501with just one <C>pq</C> process. Also, observe that calls to one of the502standard presentation functions (as mentioned in the notes503of <Ref Func="StandardPresentation" Label="interactive" Style="Text"/>) computes and stores both an fp504group with a standard presentation and an epimorphism; subsequent calls505to a standard presentation function for the same process simply return506the appropriate stored value.507508<Example><![CDATA[509gap> F := FreeGroup(6, "F");;510gap> x := F.1;; y := F.2;; z := F.3;; w := F.4;; a := F.5;; b := F.6;;511gap> R := [x^3 / w, y^3 / w * a^2 * b^2, w^3 / b,512> Comm (y, x) / z, Comm (z, x), Comm (z, y) / a, z^3 ];513[ F1^3*F4^-1, F2^3*F4^-1*F5^2*F6^2, F4^3*F6^-1, F2^-1*F1^-1*F2*F1*F3^-1,514F3^-1*F1^-1*F3*F1, F3^-1*F2^-1*F3*F2*F5^-1, F3^3 ]515gap> Q := F / R;516<fp group on the generators [ F1, F2, F3, F4, F5, F6 ]>517gap> PqStart( Q );5183519gap> G := Pq( 3 : Prime := 3, ClassBound := 3 );520<pc group of size 729 with 6 generators>521gap> lev := InfoLevel(InfoANUPQ);; # Save current InfoANUPQ level522gap> SetInfoLevel(InfoANUPQ, 2); # To see computation times523gap> # It is not necessary to pass the `Prime' option to524gap> # `EpimorphismStandardPresentation' since it was previously525gap> # passed to `Pq':526gap> phi := EpimorphismStandardPresentation( 3 : ClassBound := 3 );527#I Class 1 3-quotient and its 3-covering group computed in 0.00 seconds528#I Order of GL subgroup is 48529#I No. of soluble autos is 0530#I dim U = 1 dim N = 3 dim M = 3531#I nice stabilizer with perm rep532#I Computing standard presentation for class 2 took 0.00 seconds533#I Computing standard presentation for class 3 took 0.01 seconds534[ F1, F2, F3, F4, F5, F6 ] -> [ f1*f2^2*f3*f4^2*f5^2, f1*f2*f3*f5, f3^2,535f4*f6^2, f5, f6 ]536gap> # Image of phi should be isomorphic to G ...537gap> # let's check the order is correct:538gap> Size( Image(phi) );539729540gap> # `StandardPresentation' and `EpimorphismStandardPresentation'541gap> # behave like attributes, so no computation is done when542gap> # either is called again for the same process ...543gap> StandardPresentation( 3 : ClassBound := 3 );544<fp group of size 729 on the generators [ f1, f2, f3, f4, f5, f6 ]>545gap> # No timing data was Info-ed since no computation was done546gap> SetInfoLevel(InfoANUPQ, lev); # Restore previous InfoANUPQ level547]]></Example>548549A very similar (essential details are the same) example to the above may550be executed live, by typing:551<C>PqExample( "EpimorphismStandardPresentation-i" );</C>.552<P/>553554<E>Note:</E>555The notes for <C>PqStandardPresentation</C> or <C>StandardPresentation</C>556(see <Ref Func="PqStandardPresentation" Label="interactive" Style="Text"/>) apply also to557<C>EpimorphismPqStandardPresentation</C> or <C>EpimorphismStandardPresentation</C>558except that their return value is an <E>epimorphism onto</E> an fp group,559i.e. one should interpret the phrase <Q>returns an fp group</Q> as <Q>returns560an epimorphism onto an fp group</Q> etc.561</Description>562</ManSection>563564<ManSection>565<Func Name="PqDescendants" Arg="i : options" Label="interactive"/>566<Func Name="PqDescendants" Arg=": options" Label="interactive, for default process"/>567<Description>568return for the pc group <A>G</A> of the <A>i</A>th or default interactive &ANUPQ;569process, which must be of prime power order with a confluent pc570presentation (see <Ref BookName="ref" Func="IsConfluent" Label="for pc groups" Style="Text"/> in the &GAP; Reference571Manual), a list of descendants (pc groups) of <A>G</A>. The group <A>G</A> is572usually given as first argument to <C>PqStart</C> when starting the573interactive &ANUPQ; process (see <Ref Func="PqStart" Style="Text"/>). Alternatively, one may574initiate the process with an fp group, use <C>Pq</C> interactively575(see <Ref Func="Pq" Label="interactive" Style="Text"/>) to create a pc group and use576<C>PqSetPQuotientToGroup</C> (see <Ref Func="PqSetPQuotientToGroup" Style="Text"/>), which involves577<E>no</E> computation, to set the pc group returned by <C>Pq</C> as the group of578the process. Note that repeating a call to <C>PqDescendants</C> for the same579interactive &ANUPQ; process simply returns the list of descendants580originally calculated; a warning is emitted at <C>InfoANUPQ</C> level 1581reminding you of this should you do this.582<P/>583584After the colon, <A>options</A> a selection of the options listed for the585non-interactive <C>PqDescendants</C> function (see <Ref Func="PqDescendants" Style="Text"/>), should be586given, separated by commas like record components (see587Section <Ref BookName="ref" Label="Function Call With Options" Style="Text"/> in the &GAP; Reference Manual),588except that the options <C>SetupFile</C> or <C>PqWorkspace</C> are ignored by the589interactive <C>PqDescendants</C>, i.e. the following options are recognised by590the interactive <C>PqDescendants</C> function:591592<List>593<Item>594<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>595</Item>596<Item>597<C>Relators := <A>rels</A></C><Index>option Relators</Index>598</Item>599<Item>600<C>OrderBound := <A>n</A></C><Index>option OrderBound</Index>601</Item>602<Item>603<C>StepSize := <A>n</A></C>, <C>StepSize := <A>list</A></C>604<Index>option StepSize</Index>605</Item>606<Item>607<C>RankInitialSegmentSubgroups := <A>n</A></C><Index>option RankInitialSegmentSubgroups</Index>608</Item>609<Item>610<C>SpaceEfficient</C><Index>option SpaceEfficient</Index>611</Item>612<Item>613<C>CapableDescendants</C><Index>option CapableDescendants</Index>614</Item>615<Item>616<C>AllDescendants := false</C><Index>option AllDescendants</Index>617</Item>618<Item>619<C>Exponent := <A>n</A></C><Index>option Exponent</Index>620</Item>621<Item>622<C>Metabelian</C><Index>option Metabelian</Index>623</Item>624<Item>625<C>GroupName := <A>name</A></C><Index>option GroupName</Index>626</Item>627<Item>628<C>SubList := <A>sub</A></C><Index>option SubList</Index>629</Item>630<Item>631<C>BasicAlgorithm</C><Index>option BasicAlgorithm</Index>632</Item>633<Item>634<C>CustomiseOutput := <A>rec</A></C><Index>option CustomiseOutput</Index>635</Item>636</List>637638<E>Notes:</E> The function <C>PqDescendants</C> uses the automorphism group of <A>G</A>639which it computes via the package &AutPGrp; if the automorphism group of640<A>G</A> is not already present. If &AutPGrp; is not installed an error may641be raised. If the automorphism group of <A>G</A> is insoluble the <C>pq</C>642program will call &GAP; together with the &AutPGrp; package for certain643orbit-stabilizer calculations.644<P/>645646The attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and647<C>IsCapable</C> are set for each group of the list returned by648<C>PqDescendants</C> (see Section <Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/>).649<P/>650651Let us now repeat the examples previously given for the non-interactive652<C>PqDescendants</C>, but this time with the interactive version of653<C>PqDescendants</C>:654655<Example><![CDATA[656gap> F := FreeGroup( "a", "b" );; a := F.1;; b := F.2;;657gap> G := PcGroupFpGroup( F / [ a^2, b^2, Comm(b, a) ] );658<pc group of size 4 with 2 generators>659gap> PqStart(G); #This will now be the 4th interactive process running6604661gap> des := PqDescendants( 4 : OrderBound := 6, ClassBound := 5 );;662gap> Length(des);66383664gap> List(des, Size);665[ 8, 8, 8, 16, 16, 16, 32, 16, 16, 16, 16, 16, 32, 32, 64, 64, 32, 32, 32,66632, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32,66764, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32, 32, 64, 64, 64,66864, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,66964, 64, 64, 64, 64, 64, 64 ]670gap> List(des, d -> Length( PCentralSeries( d, 2 ) ) - 1 );671[ 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,6723, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,6734, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,6744, 4, 4, 5, 5, 5, 5, 5 ]675]]></Example>676677In the second example we compute all capable descendants of order 27 of678the elementary abelian group of order 9.679680<Example><![CDATA[681gap> F := FreeGroup( 2, "g" );;682gap> G := PcGroupFpGroup( F / [ F.1^3, F.2^3, Comm(F.1, F.2) ] );683<pc group of size 9 with 2 generators>684gap> PqStart(G); #This will now be the 5th interactive process running6855686gap> des := PqDescendants( 5 : OrderBound := 3, ClassBound := 2,687> CapableDescendants );688[ <pc group of size 27 with 3 generators>,689<pc group of size 27 with 3 generators> ]690gap> List(des, d -> Length( PCentralSeries( d, 3 ) ) - 1 );691[ 2, 2 ]692gap> # For comparison let us now compute all descendants693gap> # (using the non-interactive Pq function)694gap> PqDescendants( G : OrderBound := 3, ClassBound := 2);695[ <pc group of size 27 with 3 generators>,696<pc group of size 27 with 3 generators>,697<pc group of size 27 with 3 generators> ]698]]></Example>699700In the third example, we compute all capable descendants of the701elementary abelian group of order <M>5^2</M> which have exponent-<M>5</M> class at702most <M>3</M>, exponent <M>5</M>, and are metabelian.703704<Example><![CDATA[705gap> F := FreeGroup( 2, "g" );;706gap> G := PcGroupFpGroup( F / [ F.1^5, F.2^5, Comm(F.2, F.1) ] );707<pc group of size 25 with 2 generators>708gap> PqStart(G); #This will now be the 6th interactive process running7096710gap> des := PqDescendants( 6 : Metabelian, ClassBound := 3,711> Exponent := 5, CapableDescendants );712[ <pc group of size 125 with 3 generators>,713<pc group of size 625 with 4 generators>,714<pc group of size 3125 with 5 generators> ]715gap> List(des, d -> Length( PCentralSeries( d, 5 ) ) - 1 );716[ 2, 3, 3 ]717gap> List(des, d -> Length( DerivedSeries( d ) ) );718[ 3, 3, 3 ]719gap> List(des, d -> Maximum( List( Elements(d), Order ) ) );720[ 5, 5, 5 ]721]]></Example>722</Description>723</ManSection>724725<ManSection>726<Func Name="PqSetPQuotientToGroup" Arg="i"/>727<Func Name="PqSetPQuotientToGroup" Arg="" Label="for default process"/>728<Description>729for the <A>i</A>th or default interactive &ANUPQ; process, set the730<M>p</M>-quotient previously computed by the interactive <C>Pq</C> function731(see <Ref Func="Pq" Label="interactive" Style="Text"/>) to be the group of the process. This function is732supplied to enable the computation of descendants of a <M>p</M>-quotient that733is already known to the <C>pq</C> program, via the interactive <C>PqDescendants</C>734function (see <Ref Func="PqDescendants" Label="interactive" Style="Text"/>), thus avoiding the need to735re-submit it and have the <C>pq</C> program recompute it.736<P/>737738<E>Note:</E> See the function <C>PqPGSetDescendantToPcp</C>739(<Ref Func="PqPGSetDescendantToPcp" Style="Text"/>) for a mechanism to make (the <M>p</M>-cover of) a740particular descendants the current group of the process.741<P/>742743The following example of the usage of <C>PqSetPQuotientToGroup</C>, which is744essentially equivalent to what is obtained by running745<C>PqExample("PqDescendants-1-i");</C>, redoes the first example of746<Ref Func="PqDescendants" Label="interactive" Style="Text"/> (which computes the descendants of the Klein747four group).748749<Example><![CDATA[750gap> F := FreeGroup( "a", "b" );751<free group on the generators [ a, b ]>752gap> procId := PqStart( F : Prime := 2 );7537754gap> Pq( procId : ClassBound := 1 );755<pc group of size 4 with 2 generators>756gap> PqSetPQuotientToGroup( procId );757gap> des := PqDescendants( procId : OrderBound := 6, ClassBound := 5 );;758gap> Length(des);75983760gap> List(des, Size);761[ 8, 8, 8, 16, 16, 16, 32, 16, 16, 16, 16, 16, 32, 32, 64, 64, 32, 32, 32,76232, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32,76364, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32, 32, 64, 64, 64,76464, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,76564, 64, 64, 64, 64, 64, 64 ]766gap> List(des, d -> Length( PCentralSeries( d, 2 ) ) - 1 );767[ 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,7683, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,7694, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,7704, 4, 4, 5, 5, 5, 5, 5 ]771]]></Example>772</Description>773</ManSection>774775</Section>776777778<Section Label="Low-level Interactive ANUPQ functions based on menu items of the pq program">779<Heading>Low-level Interactive ANUPQ functions based on menu items of the780pq program</Heading>781782The <C>pq</C> program has 5 menus, the details of which the reader will not783normally need to know, but if she wishes to know the details they may be784found in the standalone manual: <C>guide.dvi</C>. Both <C>guide.dvi</C> and the785<C>pq</C> program refer to the items of these 5 menus as <Q>options</Q>, which do786<E>not</E> correspond in any way to the options used by any of the &GAP;787functions that interface with the <C>pq</C> program.788<P/>789790<E>Warning:</E>791The commands provided in this section are intended to provide something792like the interactive functionality one has when running the standalone,793from within &GAP;. The <C>pq</C> standalone (in particular, its <Q>advanced</Q>794menus) assumes some expertise of the user; doing the <Q>wrong</Q> thing can795cause the program to crash. While a number of safeguards have been796provided in the &GAP; interface to the <C>pq</C> program, these are <E>not</E>797foolproof, and the user should exercise care and ensure pre-requisites of798the various commands are met.799</Section>800801<Section><Heading>General commands</Heading>802803The following commands either use a menu item from whatever menu is804<Q>current</Q> for the <C>pq</C> program, or have general application and are not805associated with just one menu item of the <C>pq</C> program.806807<ManSection>808<Func Name="PqNrPcGenerators" Arg="i"/>809<Func Name="PqNrPcGenerators" Arg="" Label="for default process"/>810<Description>811for the <A>i</A>th or default interactive &ANUPQ; process, return the number812of pc generators of the lower exponent <M>p</M>-class quotient of the group813currently determined by the process. This also applies if the pc814presentation is not consistent.815</Description>816</ManSection>817818<ManSection>819<Func Name="PqFactoredOrder" Arg="i"/>820<Func Name="PqFactoredOrder" Arg="" Label="for default process"/>821<Description>822for the <A>i</A>th or default interactive &ANUPQ; process, return an integer823pair <C>[<A>p</A>, <A>n</A>]</C> where <A>p</A> is a prime and <A>n</A> is the number of pc824generators (see <Ref Func="PqNrPcGenerators" Style="Text"/>) in the pc presentation of the825quotient group currently determined by the process. If this presentation826is consistent, then <M>p^n</M> is the order of the quotient group. Otherwise827(if tails have been added but the necessary consistency checks, relation828collections, exponent law checks and redundant generator eliminations829have not yet been done), <M>p^n</M> is an upper bound for the order of the830group.831</Description>832</ManSection>833834<ManSection>835<Func Name="PqOrder" Arg="i"/>836<Func Name="PqOrder" Arg="" Label="for default process"/>837<Description>838for the <A>i</A>th or default interactive &ANUPQ; process, return <M>p^n</M>839where <C>[<A>p</A>, <A>n</A>]</C> is the pair as returned by <C>PqFactoredOrder</C>840(see <Ref Func="PqFactoredOrder" Style="Text"/>).841</Description>842</ManSection>843844<ManSection>845<Func Name="PqPClass" Arg="i"/>846<Func Name="PqPClass" Arg="" Label="for default process"/>847<Description>848for the <A>i</A>th or default interactive &ANUPQ; process, return the lower849exponent <M>p</M>-class of the quotient group currently determined by the850process.851</Description>852</ManSection>853854<ManSection>855<Func Name="PqWeight" Arg="i, j"/>856<Func Name="PqWeight" Arg="j" Label="for default process"/>857<Description>858for the <A>i</A>th or default interactive &ANUPQ; process, return the weight859of the <A>j</A>th pc generator of the lower exponent <M>p</M>-class quotient of the860group currently determined by the process, or <K>fail</K> if there is no such861numbered pc generator.862</Description>863</ManSection>864865<ManSection>866<Func Name="PqCurrentGroup" Arg="i"/>867<Func Name="PqCurrentGroup" Arg="" Label="for default process"/>868<Description>869for the <A>i</A>th or default interactive &ANUPQ; process, return the group870whose pc presentation is determined by the process as a &GAP; pc group871(either a lower exponent <M>p</M>-class quotient of the start group or the872<M>p</M>-cover of such a quotient).873<P/>874875<E>Notes:</E>876See Section <Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/> for the877attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and878<C>IsCapable</C> which may be applied to the group returned by879<C>PqCurrentGroup</C>.880</Description>881</ManSection>882883<ManSection>884<Func Name="PqDisplayPcPresentation" Arg="i : [OutputLevel := lev ]"/>885<Func Name="PqDisplayPcPresentation" Arg=": [OutputLevel := lev ]" Label="for default process"/>886<Description>887for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>888program to display the pc presentation of the lower exponent <M>p</M>-class889quotient of the group currently determined by the process.890<P/>891892Except if the last command communicating with the <C>pq</C> program was a893<M>p</M>-group generation command (for which there is only a verbose output894level), to set the amount of information this command displays you may895wish to call <C>PqSetOutputLevel</C> first (see <Ref Func="PqSetOutputLevel" Style="Text"/>), or896equivalently pass the option <C>OutputLevel</C> (see <Ref Label="option OutputLevel" Style="Text"/>).897<P/>898899<E>Note:</E>900For those familiar with the <C>pq</C> program, <C>PqDisplayPcPresentation</C>901performs menu item 4 of the current menu of the <C>pq</C> program.902</Description>903</ManSection>904905<ManSection>906<Func Name="PqSetOutputLevel" Arg="i, lev"/>907<Func Name="PqSetOutputLevel" Arg="lev" Label="for default process"/>908<Description>909for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>910program to set the output level of the <C>pq</C> program to <A>lev</A>.911<P/>912913<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSetOutputLevel</C>914performs menu item 5 of the main (or advanced) <M>p</M>-Quotient menu, or the915Standard Presentation menu.916</Description>917</ManSection>918919<ManSection>920<Func Name="PqEvaluateIdentities" Arg="i : [ Identities := funcs ]"/>921<Func Name="PqEvaluateIdentities" Arg=": [ Identities := funcs ]" Label="for default process"/>922<Description>923for the <A>i</A>th or default interactive &ANUPQ; process, invoke the924evaluation of identities defined by the <C>Identities</C> option, and925eliminate any redundant pc generators formed. Since a previous value of926<C>Identities</C> is saved in the data record of the process, it is927unnecessary to pass the <C>Identities</C> if set previously.928<P/>929930<E>Note:</E> This function is mainly implemented at the &GAP; level. It does931not correspond to a menu item of the <C>pq</C> program.932</Description>933</ManSection>934935</Section>936937<Section><Heading>Commands from the Main <M>p</M>-Quotient menu</Heading>938939<ManSection>940<Func Name="PqPcPresentation" Arg="i : options"/>941<Func Name="PqPcPresentation" Arg=": options" Label="for default process"/>942<Description>943for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>944program to compute the pc presentation of the quotient (determined by945<A>options</A>) of the group of the process, which for process <A>i</A> is stored946as <C>ANUPQData.io[<A>i</A>].group</C>.947<P/>948949The possible <A>options</A> are the same as for the interactive <C>Pq</C>950(see <Ref Func="Pq" Label="interactive" Style="Text"/>) function, except for <C>RedoPcp</C> (which, in any951case, would be superfluous), namely: <C>Prime</C>, <C>ClassBound</C>, <C>Exponent</C>,952<C>Relators</C>, <C>GroupName</C>, <C>Metabelian</C>, <C>Identities</C> and <C>OutputLevel</C>953(see Chapter <Ref Chap="ANUPQ Options" Style="Text"/> for a detailed description for these954options). The option <C>Prime</C> is required unless already provided to955<C>PqStart</C>.956<P/>957958<E>Notes</E>959<P/>960961The pc presentation is held by the <C>pq</C> program. In contrast to <C>Pq</C>962(see <Ref Func="Pq" Label="interactive" Style="Text"/>), no &GAP; pc group is returned;963see <C>PqCurrentGroup</C> (<Ref Func="PqCurrentGroup" Style="Text"/>) if you need the corresponding964&GAP; pc group.965<P/>966967<C>PqPcPresentation(<A>i</A>: <A>options</A>);</C> is roughly equivalent to the968following sequence of low-level commands:969<P/>970971<Listing><![CDATA[972PqPcPresentation(i: opts); #class 1 call973for c in [2 .. class] do974PqNextClass(i);975od;976]]></Listing>977978where <A>opts</A> is <A>options</A> except with the <C>ClassBound</C> option set to 1,979and <A>class</A> is either the maximum class of a <A>p</A>-quotient of the group of980the process or the user-supplied value of the option <C>ClassBound</C>981(whichever is smaller). If the <C>Identities</C> option has been set, both the982first <C>PqPcPresentation</C> class 1 call and the <C>PqNextClass</C> calls invoke983<C>PqEvaluateIdentities(<A>i</A>);</C> as their final step.984<P/>985986For those familiar with the <C>pq</C> program, <C>PqPcPresentation</C> performs987menu item 1 of the main <M>p</M>-Quotient menu.988</Description>989</ManSection>990991<ManSection>992<Func Name="PqSavePcPresentation" Arg="i, filename"/>993<Func Name="PqSavePcPresentation" Arg="filename" Label="for default process"/>994<Description>995for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>996program to save the pc presentation previously computed for the quotient997of the group of that process to the file with name <A>filename</A>. If the998first character of the string <A>filename</A> is not <C>/</C>, <A>filename</A> is999assumed to be the path of a writable file relative to the directory in1000which &GAP; was started. A saved file may be restored by1001<C>PqRestorePcPresentation</C> (see <Ref Func="PqRestorePcPresentation" Style="Text"/>).1002<P/>10031004<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSavePcPresentation</C>1005performs menu item 2 of the main <M>p</M>-Quotient menu.1006</Description>1007</ManSection>10081009<ManSection>1010<Func Name="PqRestorePcPresentation" Arg="i, filename"/>1011<Func Name="PqRestorePcPresentation" Arg="filename" Label="for default process"/>1012<Description>1013for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1014program to restore the pc presentation previously saved to <A>filename</A>, by1015<C>PqSavePcPresentation</C> (see <Ref Func="PqSavePcPresentation" Style="Text"/>). If the first1016character of the string <A>filename</A> is not <C>/</C>, <A>filename</A> is assumed to1017be the path of a readable file relative to the directory in which &GAP;1018was started.1019<P/>10201021<E>Note:</E>1022For those familiar with the <C>pq</C> program, <C>PqRestorePcPresentation</C>1023performs menu item 3 of the main <M>p</M>-Quotient menu.1024</Description>1025</ManSection>10261027<ManSection>1028<Func Name="PqNextClass" Arg="i : [ QueueFactor ]"/>1029<Func Name="PqNextClass" Arg=": [ QueueFactor ]" Label="for default process"/>1030<Description>1031for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1032program to calculate the next class of <C>ANUPQData.io[<A>i</A>].group</C>.1033<P/>10341035<Index>option QueueFactor</Index>1036<C>PqNextClass</C> accepts the option <C>QueueFactor</C> (see also <Ref Label="option QueueFactor" Style="Text"/>) which should be a positive integer if automorphisms have1037been previously supplied. If the <C>pq</C> program requires a queue factor and1038none is supplied via the option <C>QueueFactor</C> a default of 15 is taken.1039<P/>10401041<E>Notes</E>1042<P/>10431044The single command: <C>PqNextClass(<A>i</A>);</C> is equivalent to executing10451046<Listing><![CDATA[1047PqComputePCover(i);1048PqCollectDefiningRelations(i);1049PqDoExponentChecks(i);1050PqEliminateRedundantGenerators(i);1051]]></Listing>10521053If the <C>Identities</C> option is set the <C>PqEliminateRedundantGenerators(<A>i</A>);</C>1054step is essentially replaced by <C>PqEvaluateIdentities(<A>i</A>);</C> (which invokes1055its own elimination of redundant generators).1056<P/>10571058For those familiar with the <C>pq</C> program, <C>PqNextClass</C> performs menu item10596 of the main <M>p</M>-Quotient menu.1060</Description>1061</ManSection>10621063<ManSection>1064<Func Name="PqComputePCover" Arg="i"/>1065<Func Name="PqComputePCover" Arg="" Label="for default process"/>1066<Description>1067for the <A>i</A>th or default interactive &ANUPQ; processi, directi, the <C>pq</C>1068program to compute the <M>p</M>-covering group of <C>ANUPQData.io[<A>i</A>].group</C>.1069In contrast to the function <C>PqPCover</C> (see <Ref Func="PqPCover" Style="Text"/>), this function does1070not return a &GAP; pc group.1071<P/>10721073<E>Notes</E>1074<P/>10751076The single command: <C>PqComputePCover(<A>i</A>);</C> is equivalent to executing10771078<Listing><![CDATA[1079PqSetupTablesForNextClass(i);1080PqTails(i, 0);1081PqDoConsistencyChecks(i, 0, 0);1082PqEliminateRedundantGenerators(i);1083]]></Listing>10841085For those familiar with the <C>pq</C> program, <C>PqComputePCover</C> performs menu1086item 7 of the main <M>p</M>-Quotient menu.1087</Description>1088</ManSection>10891090</Section>10911092<Section><Heading>Commands from the Advanced <M>p</M>-Quotient menu</Heading>10931094<ManSection>1095<Func Name="PqCollect" Arg="i, word"/>1096<Func Name="PqCollect" Arg="word" Label="for default process"/>1097<Description>1098for the <A>i</A>th or default interactive &ANUPQ; process, instruct the <C>pq</C>1099program to do a collection on <A>word</A>, a word in the current pc generators1100(the form of <A>word</A> required is described below). <C>PqCollect</C> returns the1101resulting word of the collection as a list of generator number, exponent1102pairs (the same form as the second allowed input form of <A>word</A>; see1103below).1104<P/>11051106The argument <A>word</A> may be input in either of the following ways:11071108<Enum>1109<Item>1110<A>word</A> may be a string, where the <A>i</A>th pc generator is represented by1111<C>x<A>i</A></C>, e.g. <C>"x3*x2^2*x1"</C>. This way is quite versatile as parentheses1112and left-normed commutators -- using square brackets, in the same way as1113<C>PqGAPRelators</C> (see <Ref Func="PqGAPRelators" Style="Text"/>) -- are permitted; <A>word</A> is checked1114for correct syntax via <C>PqParseWord</C> (see <Ref Func="PqParseWord" Style="Text"/>).1115</Item>11161117<Item>1118Otherwise, <A>word</A> must be a list of generator number, exponent pairs of1119integers, i.e. each pair represents a <Q>syllable</Q> so that <C>[ [3, 1],1120[2, 2], [1, 1] ]</C> represents the same word as that of the example given1121for the first allowed form of <A>word</A>.1122</Item>1123</Enum>11241125<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqCollect</C> performs1126menu item 1 of the Advanced <M>p</M>-Quotient menu.1127</Description>1128</ManSection>11291130<ManSection>1131<Func Name="PqSolveEquation" Arg="i, a, b"/>1132<Func Name="PqSolveEquation" Arg="a, b" Label="for default process"/>1133<Description>1134for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1135program to solve <M><A>a</A> * <A>x</A> = <A>b</A></M> for <A>x</A>, where <A>a</A> and <A>b</A> are words1136in the pc generators. For the representation of these words see the1137description of the function <C>PqCollect</C> (<Ref Func="PqCollect" Style="Text"/>).1138<P/>11391140<E>Note:</E>1141For those familiar with the <C>pq</C> program, <C>PqSolveEquation</C> performs1142menu item 2 of the Advanced <M>p</M>-Quotient menu.1143</Description>1144</ManSection>11451146<ManSection>1147<Func Name="PqCommutator" Arg="i, words, pow"/>1148<Func Name="PqCommutator" Arg="words, pow" Label="for default process"/>1149<Description>1150for the <A>i</A>th or default interactive &ANUPQ; process, instruct the <C>pq</C>1151program to compute the left normed commutator of the list <A>words</A> of1152words in the current pc generators raised to the integer power <A>pow</A>, and1153return the resulting word as a list of generator number, exponent pairs.1154The form required for each word of <A>words</A> is the same as that required1155for the <A>word</A> argument of <C>PqCollect</C> (see <Ref Func="PqCollect" Style="Text"/>). The form of the1156output word is also the same as for <C>PqCollect</C>.1157<P/>11581159<E>Note:</E>1160For those familiar with the <C>pq</C> program, <C>PqCommutator</C> performs menu1161item 3 of the Advanced <M>p</M>-Quotient menu.1162</Description>1163</ManSection>11641165<ManSection>1166<Func Name="PqSetupTablesForNextClass" Arg="i"/>1167<Func Name="PqSetupTablesForNextClass" Arg="" Label="for default process"/>1168<Description>1169for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1170program to set up tables for the next class. As as side-effect,1171after <C>PqSetupTablesForNextClass(<A>i</A>)</C> the value returned by1172<C>PqPClass(<A>i</A>)</C> will be one more than it was previously.1173<P/>11741175<E>Note:</E>1176For those familiar with the <C>pq</C> program, <C>PqSetupTablesForNextClass</C>1177performs menu item 6 of the Advanced <M>p</M>-Quotient menu.1178</Description>1179</ManSection>11801181<ManSection>1182<Func Name="PqTails" Arg="i, weight"/>1183<Func Name="PqTails" Arg="weight" Label="for default process"/>1184<Description>1185for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1186program to compute and add tails of weight <A>weight</A> if <A>weight</A> is in the1187integer range <C>[2 .. PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the1188process, even in the default case) or for all weights if <C><A>weight</A> = 0</C>.1189<P/>11901191If <A>weight</A> is non-zero, then tails that introduce new generators for1192only weight <A>weight</A> are computed and added, and in this case and if1193<C><A>weight</A> < PqPClass(<A>i</A>)</C>, it is assumed that the tails that introduce1194new generators for each weight from <C>PqPClass(<A>i</A>)</C> down to weight1195<C><A>weight</A> + 1</C> have already been added. You may wish to call1196<C>PqSetMetabelian</C> (see <Ref Func="PqSetMetabelian" Style="Text"/>) prior to calling <C>PqTails</C>.1197<P/>11981199<E>Notes</E>1200<P/>12011202For its use in the context of finding the next class see <Ref Func="PqNextClass" Style="Text"/>;1203in particular, a call to <C>PqSetupTablesForNextClass</C>1204(see <Ref Func="PqSetupTablesForNextClass" Style="Text"/>) needs to have been made prior to1205calling <C>PqTails</C>.1206<P/>12071208The single command: <C>PqTails(<A>i</A>, <A>weight</A>);</C> is equivalent to12091210<Listing><![CDATA[1211PqComputeTails(i, weight);1212PqAddTails(i, weight);1213]]></Listing>12141215For those familiar with the <C>pq</C> program, <C>PqTails</C> uses menu item 7 of1216the Advanced <M>p</M>-Quotient menu.1217</Description>1218</ManSection>12191220<ManSection>1221<Func Name="PqComputeTails" Arg="i, weight"/>1222<Func Name="PqComputeTails" Arg="weight" Label="for default process"/>1223<Description>1224for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1225program to compute tails of weight <A>weight</A> if <A>weight</A> is in the integer1226range <C>[2 .. PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the process,1227even in the default case) or for all weights if <C><A>weight</A> = 0</C>. See1228<C>PqTails</C> (<Ref Func="PqTails" Style="Text"/>) for more details.1229<P/>12301231<E>Note:</E>1232For those familiar with the <C>pq</C> program, <C>PqComputeTails</C> uses menu item12337 of the Advanced <M>p</M>-Quotient menu.1234</Description>1235</ManSection>12361237<ManSection>1238<Func Name="PqAddTails" Arg="i, weight"/>1239<Func Name="PqAddTails" Arg="weight" Label="for default process"/>1240<Description>1241for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1242program to add the tails of weight <A>weight</A>, previously computed by1243<C>PqComputeTails</C> (see <Ref Func="PqComputeTails" Style="Text"/>), if <A>weight</A> is in the integer1244range <C>[2 .. PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the process,1245even in the default case) or for all weights if <C><A>weight</A> = 0</C>. See1246<C>PqTails</C> (<Ref Func="PqTails" Style="Text"/>) for more details.1247<P/>12481249<E>Note:</E>1250For those familiar with the <C>pq</C> program, <C>PqAddTails</C> uses menu item 7 of1251the Advanced <M>p</M>-Quotient menu.1252</Description>1253</ManSection>12541255<ManSection>1256<Func Name="PqDoConsistencyChecks" Arg="i, weight, type"/>1257<Func Name="PqDoConsistencyChecks" Arg="weight, type" Label="for default process"/>1258<Description>1259for the <A>i</A>th or default interactive &ANUPQ; process, do consistency1260checks for weight <A>weight</A> if <A>weight</A> is in the integer range <C>[3 ..1261PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the process) or for all1262weights if <C><A>weight</A> = 0</C>, and for type <A>type</A> if <A>type</A> is in the range1263<C>[1, 2, 3]</C> (see below) or for all types if <C><A>type</A> = 0</C>. (For its use in1264the context of finding the next class see <Ref Func="PqNextClass" Style="Text"/>.)1265<P/>12661267The <E>type</E> of a consistency check is defined as follows.1268<C>PqDoConsistencyChecks(<A>i</A>, <A>weight</A>, <A>type</A>)</C> for <A>weight</A> in <C>[3 ..1269PqPClass(<A>i</A>)]</C> and the given value of <A>type</A> invokes the equivalent of1270the following <C>PqDoConsistencyCheck</C> calls (see <Ref Func="PqDoConsistencyCheck" Style="Text"/>):12711272<List>1273<Mark><C><A>type</A> = 1</C>:</Mark>1274<Item>1275<C>PqDoConsistencyCheck(<A>i</A>, <A>a</A>, <A>a</A>, <A>a</A>)</C> checks <C>2 * PqWeight(<A>i</A>, <A>a</A>)1276+ 1 = <A>weight</A></C>, for pc generators of index <A>a</A>.1277</Item>1278<Mark><C><A>type</A> = 2</C>:</Mark>1279<Item>1280<C>PqDoConsistencyCheck(<A>i</A>, <A>b</A>, <A>b</A>, <A>a</A>)</C> checks for pc generators of1281indices <A>b</A>, <A>a</A> satisfyingx both <C><A>b</A> > <A>a</A></C> and <C>PqWeight(<A>i</A>, <A>b</A>) +1282PqWeight(<A>i</A>, <A>a</A>) + 1 = <A>weight</A></C>.1283</Item>1284<Mark><C><A>type</A> = 3</C>:</Mark>1285<Item>1286<C>PqDoConsistencyCheck(<A>i</A>, <A>c</A>, <A>b</A>, <A>a</A>)</C> checks for pc generators of1287indices <A>c</A>, <A>b</A>, <A>a</A> satisfying <C><A>c</A> > <A>b</A> > <A>a</A></C> and the sum of the1288weights of these generators equals <A>weight</A>.1289</Item>1290</List>129112921293<E>Notes</E>1294<P/>12951296<C>PqWeight(<A>i</A>, <A>j</A>)</C> returns the weight of the <A>j</A>th pc generator, for1297process <A>i</A> (see <Ref Func="PqWeight" Style="Text"/>).1298<P/>12991300It is assumed that tails for the given weight (or weights) have already1301been added (see <Ref Func="PqTails" Style="Text"/>).1302<P/>13031304For those familiar with the <C>pq</C> program, <C>PqDoConsistencyChecks</C> performs1305menu item 8 of the Advanced <M>p</M>-Quotient menu.1306</Description>1307</ManSection>13081309<ManSection>1310<Func Name="PqCollectDefiningRelations" Arg="i"/>1311<Func Name="PqCollectDefiningRelations" Arg="" Label="for default process"/>1312<Description>1313for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1314program to collect the images of the defining relations of the original fp1315group of the process, with respect to the current pc presentation, in the1316context of finding the next class (see <Ref Func="PqNextClass" Style="Text"/>). If the tails1317operation is not complete then the relations may be evaluated1318incorrectly.1319<P/>13201321<E>Note:</E>1322For those familiar with the <C>pq</C> program, <C>PqCollectDefiningRelations</C>1323performs menu item 9 of the Advanced <M>p</M>-Quotient menu.1324</Description>1325</ManSection>13261327<ManSection>1328<Func Name="PqCollectWordInDefiningGenerators" Arg="i, word"/>1329<Func Name="PqCollectWordInDefiningGenerators" Arg="word" Label="for default process"/>1330<Description>1331for the <A>i</A>th or default interactive &ANUPQ; process, take a1332user-defined word <A>word</A> in the defining generators of the original1333presentation of the fp or pc group of the process. Each generator is1334mapped into the current pc presentation, and the resulting word is1335collected with respect to the current pc presentation. The result of the1336collection is returned as a list of generator number, exponent pairs.1337<P/>13381339The <A>word</A> argument may be input in either of the two ways described for1340<C>PqCollect</C> (see <Ref Func="PqCollect" Style="Text"/>).1341<P/>13421343<E>Note:</E>1344For those familiar with the <C>pq</C> program, <C>PqCollectDefiningGenerators</C>1345performs menu item 23 of the Advanced <M>p</M>-Quotient menu.1346</Description>1347</ManSection>13481349<ManSection>1350<Func Name="PqCommutatorDefiningGenerators" Arg="i, words, pow"/>1351<Func Name="PqCommutatorDefiningGenerators" Arg="words, pow" Label="for default process"/>1352<Description>1353for the <A>i</A>th or default interactive &ANUPQ; process, take a list1354<A>words</A> of user-defined words in the defining generators of the original1355presentation of the fp or pc group of the process, and an integer power1356<A>pow</A>. Each generator is mapped into the current pc presentation. The1357list <A>words</A> is interpreted as a left-normed commutator which is then1358raised to <A>pow</A> and collected with respect to the current pc1359presentation. The result of the collection is returned as a list of1360generator number, exponent pairs.1361<P/>13621363<E>Note</E>1364For those familiar with the <C>pq</C> program, <C>PqCommutatorDefiningGenerators</C>1365performs menu item 24 of the Advanced <M>p</M>-Quotient menu.1366</Description>1367</ManSection>13681369<ManSection>1370<Func Name="PqDoExponentChecks" Arg="i : [ Bounds := list ]"/>1371<Func Name="PqDoExponentChecks" Arg=": [ Bounds := list ]" Label="for default process"/>1372<Description>1373for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1374program to do exponent checks for weights (inclusively) between the bounds1375of <C>Bounds</C> or for all weights if <C>Bounds</C> is not given. The value <A>list</A>1376of <C>Bounds</C> (assuming the interactive process is numbered <A>i</A>) should be a1377list of two integers <A>low</A>, <A>high</A> satisfying1378<!-- FIXME: hack to move C outside of M -->1379<M>1 \le <A>low</A> \le <A>high</A> \le </M>1380<C>PqPClass(<A>i</A>)</C> (see <Ref Func="PqPClass" Style="Text"/>). If no exponent law has been specified,1381no exponent checks are performed.1382<P/>13831384<E>Note:</E>1385For those familiar with the <C>pq</C> program, <C>PqDoExponentChecks</C> performs1386menu item 10 of the Advanced <M>p</M>-Quotient menu.1387</Description>1388</ManSection>13891390<ManSection>1391<Func Name="PqEliminateRedundantGenerators" Arg="i"/>1392<Func Name="PqEliminateRedundantGenerators" Arg="" Label="for default process"/>1393<Description>1394for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1395program to eliminate redundant generators of the current <M>p</M>-quotient.1396<P/>13971398<E>Note:</E>1399For those familiar with the <C>pq</C> program, <C>PqEliminateRedundantGenerators</C>1400performs menu item 11 of the Advanced <M>p</M>-Quotient menu.1401</Description>1402</ManSection>14031404<ManSection>1405<Func Name="PqRevertToPreviousClass" Arg="i"/>1406<Func Name="PqRevertToPreviousClass" Arg="" Label="for default process"/>1407<Description>1408for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1409program to abandon the current class and revert to the previous class.1410<P/>14111412<E>Note:</E>1413For those familiar with the <C>pq</C> program, <C>PqRevertToPreviousClass</C>1414performs menu item 12 of the Advanced <M>p</M>-Quotient menu.1415</Description>1416</ManSection>14171418<ManSection>1419<Func Name="PqSetMaximalOccurrences" Arg="i, noccur"/>1420<Func Name="PqSetMaximalOccurrences" Arg="noccur" Label="for default process"/>1421<Description>1422for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1423program to set maximal occurrences of the weight 1 generators in the1424definitions of pcp generators of the group of the process. This can be1425used to avoid the definition of generators of which one knows for1426theoretical reasons that they would be eliminated later on.1427<P/>14281429The argument <A>noccur</A> must be a list of non-negative integers of length1430the number of weight 1 generators (i.e. the rank of the class 11431<M>p</M>-quotient of the group of the process). An entry of <C>0</C> for a1432particular generator indicates that there is no limit on the number of1433occurrences for the generator.1434<P/>14351436<E>Note:</E>1437For those familiar with the <C>pq</C> program, <C>PqSetMaximalOccurrences</C>1438performs menu item 13 of the Advanced <M>p</M>-Quotient menu.1439</Description>1440</ManSection>14411442<ManSection>1443<Func Name="PqSetMetabelian" Arg="i"/>1444<Func Name="PqSetMetabelian" Arg="" Label="for default process"/>1445<Description>1446for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1447program to enforce metabelian-ness.1448<P/>14491450<E>Note:</E>1451For those familiar with the <C>pq</C> program, <C>PqSetMetabelian</C> performs1452menu item 14 of the Advanced <M>p</M>-Quotient menu.1453</Description>1454</ManSection>14551456<ManSection>1457<Func Name="PqDoConsistencyCheck" Arg="i, c, b, a"/>1458<Func Name="PqDoConsistencyCheck" Arg="c, b, a" Label="for default process"/>1459<Func Name="PqJacobi" Arg="i, c, b, a"/>1460<Func Name="PqJacobi" Arg="c, b, a" Label="for default process"/>1461<Description>1462for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1463program to do the consistency check for the pc generators with indices1464<A>c</A>, <A>b</A>, <A>a</A> which should be non-increasing positive integers, i.e. <M><A>c</A>1465\ge <A>b</A> \ge <A>a</A></M>.1466<P/>14671468There are 3 types of consistency checks:1469<Display>1470\begin{array}{rclrl}1471(a^n)a &=& a(a^n) && {\rm (Type\ 1)} \\1472(b^n)a &=& b^{(n-1)}(ba), b(a^n) = (ba)a^{(n-1)} && {\rm (Type\ 2)} \\1473c(ba) &=& (cb)a && {\rm (Type\ 3)} \\1474\end{array}1475</Display>1476The reason some people talk about Jacobi relations instead of consistency1477checks becomes clear when one looks at the consistency check of type 3:1478<Display>1479\begin{array}{rcl}1480c(ba) &=& a c[c,a] b[b,a] = acb [c,a][c,a,b][b,a] = \dots \\1481(cb)a &=& b c[c,b] a = a b[b,a] c[c,a] [c,b][c,b,a] \\1482&=& abc [b,a] [b,a,c] [c,a] [c,b] [c,b,a] = \dots \\1483\end{array}1484</Display>1485Each collection would normally carry on further. But one can see1486already that no other commutators of weight 3 will occur. After all terms1487of weight one and weight two have been moved to the left we end up with:1488<Display>1489\begin{array}{rcl}1490& &abc [b,a] [c,a] [c,b] [c,a,b] \dots \\1491&=&abc [b,a] [c,a] [c,b] [c,b,a] [b,a,c] \dots \\1492\end{array}1493</Display>1494Modulo terms of weight 4 this is equivalent to1495<Display>1496[c,a,b] [b,c,a] [a,b,c] = 11497</Display>1498which is the Jacobi identity.1499<P/>15001501See also <C>PqDoConsistencyChecks</C> (<Ref Func="PqDoConsistencyChecks" Style="Text"/>).1502<P/>15031504<E>Note:</E>1505For those familiar with the <C>pq</C> program, <C>PqDoConsistencyCheck</C> and1506<C>PqJacobi</C> perform menu item 15 of the Advanced <M>p</M>-Quotient menu.1507</Description>1508</ManSection>15091510<ManSection>1511<Func Name="PqCompact" Arg="i"/>1512<Func Name="PqCompact" Arg="" Label="for default process"/>1513<Description>1514for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1515program to do a compaction of its work space. This function is safe to1516perform only at certain points in time.1517<P/>15181519<E>Note:</E>1520For those familiar with the <C>pq</C> program, <C>PqCompact</C> performs menu item152116 of the Advanced <M>p</M>-Quotient menu.1522</Description>1523</ManSection>15241525<ManSection>1526<Func Name="PqEchelonise" Arg="i"/>1527<Func Name="PqEchelonise" Arg="" Label="for default process"/>1528<Description>1529for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1530program to echelonise the word most recently collected by <C>PqCollect</C> or1531<C>PqCommutator</C> against the relations of the current pc presentation, and1532return the number of the generator made redundant or <K>fail</K> if no1533generator was made redundant. A call to <C>PqCollect</C> (see <Ref Func="PqCollect" Style="Text"/>) or1534<C>PqCommutator</C> (see <Ref Func="PqCommutator" Style="Text"/>) needs to be performed prior to using1535this command.1536<P/>15371538<E>Note:</E>1539For those familiar with the <C>pq</C> program, <C>PqEchelonise</C> performs menu1540item 17 of the Advanced <M>p</M>-Quotient menu.1541</Description>1542</ManSection>15431544<ManSection>1545<Func Name="PqSupplyAutomorphisms" Arg="i, mlist"/>1546<Func Name="PqSupplyAutomorphisms" Arg="mlist" Label="for default process"/>1547<Description>1548for the <A>i</A>th or default interactive &ANUPQ; process, supply the1549automorphism data provided by the list <A>mlist</A> of matrices with1550non-negative integer coefficients. Each matrix in <A>mlist</A> describes one1551automorphism in the following way.15521553<List>1554<Item>1555The rows of each matrix correspond to the pc generators of1556weight one.1557</Item>1558<Item>1559Each row is the exponent vector of the image of the1560corresponding weight one generator under the respective automorphism.1561</Item>1562</List>15631564<E>Note:</E>1565For those familiar with the <C>pq</C> program, <C>PqSupplyAutomorphisms</C> uses1566menu item 18 of the Advanced <M>p</M>-Quotient menu.1567</Description>1568</ManSection>15691570<ManSection>1571<Func Name="PqExtendAutomorphisms" Arg="i"/>1572<Func Name="PqExtendAutomorphisms" Arg="" Label="for default process"/>1573<Description>1574for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1575program to extend automorphisms of the <M>p</M>-quotient of the previous class1576to the <M>p</M>-quotient of the present class.1577<P/>15781579<E>Note:</E>1580For those familiar with the <C>pq</C> program, <C>PqExtendAutomorphisms</C> uses1581menu item 18 of the Advanced <M>p</M>-Quotient menu.1582</Description>1583</ManSection>15841585<ManSection>1586<Func Name="PqApplyAutomorphisms" Arg="i, qfac"/>1587<Func Name="PqApplyAutomorphisms" Arg="qfac" Label="for default process"/>1588<Description>1589for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1590program to apply automorphisms; <A>qfac</A> is the queue factor e.g. <C>15</C>.1591<P/>15921593<E>Note:</E>1594For those familiar with the <C>pq</C> program, <C>PqCloseRelations</C> performs1595menu item 19 of the Advanced <M>p</M>-Quotient menu.1596</Description>1597</ManSection>15981599<ManSection>1600<Func Name="PqDisplayStructure" Arg="i : [ Bounds := list ]"/>1601<Func Name="PqDisplayStructure" Arg=": [ Bounds := list ]" Label="for default process"/>1602<Description>1603for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1604program to display the structure for the pcp generators numbered1605(inclusively) between the bounds of <C>Bounds</C> or for all generators if1606<C>Bounds</C> is not given. The value <A>list</A> of <C>Bounds</C> (assuming the1607interactive process is numbered <A>i</A>) should be a list of two integers1608<!-- FIXME: hack to move C outside of M -->1609<A>low</A>, <A>high</A> satisfying <M>1 \le <A>low</A> \le <A>high</A> \le </M>1610<C>PqNrPcGenerators(<A>i</A>)</C> (see <Ref Func="PqNrPcGenerators" Style="Text"/>). <C>PqDisplayStructure</C>1611also accepts the option <C>OutputLevel</C> (see <Ref Label="option OutputLevel" Style="Text"/>).1612<P/>16131614<E>Explanation of output</E>1615<P/>16161617New generators are defined as commutators of previous generators and1618generators of class 1 or as <M>p</M>-th powers of generators that have1619themselves been defined as <M>p</M>-th powers. A generator is never defined as1620<M>p</M>-th power of a commutator.1621<P/>16221623Therefore, there are two cases: all the numbers on the righthand side are1624either the same or they differ. Below, <C>g<A>i</A></C> refers to the <A>i</A>th1625defining generator.16261627<List>1628<Item>1629If the righthand side numbers are all the same, then the generator is a1630<M>p</M>-th power (of a <M>p</M>-th power of a <M>p</M>-th power, etc.). The number of1631repeated digits say how often a <M>p</M>-th power has to be taken.1632<P/>16331634In the following example, the generator number 31 is the eleventh power1635of generator 17 which in turn is an eleventh power and so on:1636<P/>16371638\begintt1639#I 31 is defined on 17^11 = 1 1 1 1 11640\endtt16411642So generator 31 is obtained by taking the eleventh power of generator 11643five times.1644</Item>1645<Item>16461647If the numbers are not all the same, the generator is defined by a1648commutator. If the first two generator numbers differ, the generator is1649defined as a left-normed commutator of the weight one generators, e.g.1650<P/>16511652\begintt1653#I 19 is defined on [11, 1] = 2 1 1 1 11654\endtt16551656Here, generator 19 is defined as the commutator of generator 11 and1657generator 1 which is the same as the left-normed commutator1658<C>[x2, x1, x1, x1, x1]</C>. One can check this by tracing back the definition1659of generator 11 until one gets to a generator of class 1.1660</Item>1661<Item>16621663If the first two generator numbers are identical, then the left most1664component of the left-normed commutator is a <M>p</M>-th power, e.g.1665<P/>16661667\begintt1668#I 25 is defined on [14, 1] = 1 1 2 1 11669\endtt1670<P/>16711672In this example, generator 25 is defined as commutator of generator 141673and generator 1. The left-normed commutator is1674<Display>1675[(x1^{11})^{11}, x2, x1, x1]1676</Display>1677Again, this can be verified by tracing back the definitions.1678</Item>1679</List>16801681<E>Note:</E>1682For those familiar with the <C>pq</C> program, <C>PqDisplayStructure</C> performs1683menu item 20 of the Advanced <M>p</M>-Quotient menu.1684</Description>1685</ManSection>16861687<ManSection>1688<Func Name="PqDisplayAutomorphisms" Arg="i : [ Bounds := list ]"/>1689<Func Name="PqDisplayAutomorphisms" Arg=": [ Bounds := list ]" Label="for default process"/>1690<Description>1691for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1692program to display the automorphism actions on the pcp generators numbered1693(inclusively) between the bounds of <C>Bounds</C> or for all generators if1694<C>Bounds</C> is not given. The value <A>list</A> of <C>Bounds</C> (assuming the1695interactive process is numbered <A>i</A>) should be a list of two integers1696<!-- FIXME: hack to move C outside of M -->1697<A>low</A>, <A>high</A> satisfying <M>1 \le <A>low</A> \le <A>high</A> \le </M>1698<C>PqNrPcGenerators(<A>i</A>)</C> (see <Ref Func="PqNrPcGenerators" Style="Text"/>). <C>PqDisplayStructure</C>1699also accepts the option <C>OutputLevel</C> (see <Ref Label="option OutputLevel" Style="Text"/>).1700<P/>17011702<E>Note:</E>1703For those familiar with the <C>pq</C> program, <C>PqDisplayAutomorphisms</C>1704performs menu item 21 of the Advanced <M>p</M>-Quotient menu.1705</Description>1706</ManSection>17071708<ManSection>1709<Func Name="PqWritePcPresentation" Arg="i, filename"/>1710<Func Name="PqWritePcPresentation" Arg="filename" Label="for default process"/>1711<Description>1712for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1713program to write a pc presentation of a previously-computed quotient of1714the group of that process, to the file with name <A>filename</A>. Here the1715group of a process is the one given as first argument when <C>PqStart</C> was1716called to initiate that process (for process <A>i</A> the group is stored as1717<C>ANUPQData.io[<A>i</A>].group</C>). If the first character of the string1718<A>filename</A> is not <C>/</C>, <A>filename</A> is assumed to be the path of a writable1719file relative to the directory in which &GAP; was started. If a pc1720presentation has not been previously computed by the <C>pq</C> program, then1721<C>pq</C> is called to compute it first, effectively invoking1722<C>PqPcPresentation</C> (see <Ref Func="PqPcPresentation" Style="Text"/>).1723<P/>17241725<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqPcWritePresentation</C>1726performs menu item 25 of the Advanced <M>p</M>-Quotient menu.1727<P/>17281729<!-- %We may include this in the future. -->1730<!-- %\>PqWriteCompactDescription( <A>i</A> ) F -->1731<!-- %\>PqWriteCompactDescription() F -->1732<!-- % -->1733<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->1734<!-- %program to write a compact description -->1735<!-- % -->1736<!-- %<E>OF ....</E> -->1737<!-- % -->1738<!-- %to a file. -->1739<!-- % -->1740<!-- %<E>Note:</E> -->1741<!-- %For those familiar with the <C>pq</C> program, <C>PqWriteCompactDescription</C> -->1742<!-- %performs menu item 26 of the Advanced <M>p</M>-Quotient menu. -->1743</Description>1744</ManSection>17451746</Section>17471748<Section><Heading>Commands from the Standard Presentation menu</Heading>17491750<ManSection>1751<Func Name="PqSPComputePcpAndPCover" Arg="i : options"/>1752<Func Name="PqSPComputePcpAndPCover" Arg=": options" Label="for default process"/>1753<Description>1754for the <A>i</A>th or default interactive &ANUPQ; process, directs the <C>pq</C>1755program to compute for the group of that process a pc presentation up to1756the <M>p</M>-quotient of maximum class or the value of the option <C>ClassBound</C>1757and the <M>p</M>-cover of that quotient, and sets up tabular information1758required for computation of a standard presentation. Here the group of a1759process is the one given as first argument when <C>PqStart</C> was called to1760initiate that process (for process <A>i</A> the group is stored as1761<C>ANUPQData.io[<A>i</A>].group</C>).1762<P/>17631764The possible <A>options</A> are <C>Prime</C>, <C>ClassBound</C>, <C>Relators</C>, <C>Exponent</C>,1765<C>Metabelian</C> and <C>OutputLevel</C> (see Chapter <Ref Chap="ANUPQ Options" Style="Text"/> for detailed1766descriptions of these options). The option <C>Prime</C> is normally determined1767via <C>PrimePGroup</C>, and so is not required unless the group doesn't know1768it's a <M>p</M>-group and <C>HasPrimePGroup</C> returns <K>false</K>.1769<P/>17701771<E>Note:</E>1772For those familiar with the <C>pq</C> program, <C>PqSPComputePcpAndPCover</C>1773performs option 1 of the Standard Presentation menu.1774</Description>1775</ManSection>17761777<ManSection>1778<Func Name="PqSPStandardPresentation" Arg="i[, mlist] : [ options]"/>1779<Func Name="PqSPStandardPresentation" Arg="[mlist] : [ options]" Label="for default process"/>1780<Description>1781for the <A>i</A>th or default interactive &ANUPQ; process, inputs data given1782by <A>options</A> to compute a standard presentation for the group of that1783process. If argument <A>mlist</A> is given it is assumed to be the1784automorphism group data required. Otherwise it is assumed that a call to1785either <C>Pq</C> (see <Ref Func="Pq" Label="interactive" Style="Text"/>) or <C>PqEpimorphism</C>1786(see <Ref Func="PqEpimorphism" Label="interactive" Style="Text"/>) has generated a <M>p</M>-quotient and that1787&GAP; can compute its automorphism group from which the necessary1788automorphism group data can be derived. The group of the process is the1789one given as first argument when <C>PqStart</C> was called to initiate the1790process (for process <A>i</A> the group is stored as <C>ANUPQData.io[<A>i</A>].group</C>1791and the <M>p</M>-quotient if existent is stored as1792<C>ANUPQData.io[<A>i</A>].pQuotient</C>). If <A>mlist</A> is not given and a1793<M>p</M>-quotient of the group has not been previously computed a class 11794<M>p</M>-quotient is computed.1795<P/>17961797<C>PqSPStandardPresentation</C> accepts three options, all optional:17981799<List>1800<Item>1801<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>1802</Item>1803<Item>1804<C>PcgsAutomorphisms</C><Index>option PcgsAutomorphisms</Index>1805</Item>1806<Item>1807<C>StandardPresentationFile := <A>filename</A></C><Index>option StandardPresentationFile</Index>1808</Item>1809</List>18101811If <C>ClassBound</C> is omitted it defaults to 63.1812<P/>18131814Detailed descriptions of the above options may be found in Chapter <Ref Chap="ANUPQ Options" Style="Text"/>.1815<P/>18161817<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSPPcPresentation</C>1818performs menu item 2 of the Standard Presentation menu.1819</Description>1820</ManSection>18211822<ManSection>1823<Func Name="PqSPSavePresentation" Arg="i, filename"/>1824<Func Name="PqSPSavePresentation" Arg="filename" Label="for default process"/>1825<Description>1826for the <A>i</A>th or default interactive &ANUPQ; process, directs the <C>pq</C>1827program to save the standard presentation previously computed for the1828group of that process to the file with name <A>filename</A>, where the group1829of a process is the one given as first argument when <C>PqStart</C> was called1830to initiate that process. If the first character of the string <A>filename</A>1831is not <C>/</C>, <A>filename</A> is assumed to be the path of a writable file1832relative to the directory in which &GAP; was started.1833<P/>18341835<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSPSavePresentation</C>1836performs menu item 3 of the Standard Presentation menu.1837</Description>1838</ManSection>18391840<ManSection>1841<Func Name="PqSPCompareTwoFilePresentations" Arg="i, f1, f2"/>1842<Func Name="PqSPCompareTwoFilePresentations" Arg="f1, f2" Label="for default process"/>1843<Description>1844for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1845program to compare the presentations in the files with names <A>f1</A> and <A>f2</A>1846and returns <K>true</K> if they are identical and <K>false</K> otherwise. For each1847of the strings <A>f1</A> and <A>f2</A>, if the first character is not a <C>/</C> then it1848is assumed to be the path of a readable file relative to the directory in1849which &GAP; was started.1850<P/>18511852<E>Notes</E>1853<P/>18541855The presentations in files <A>f1</A> and <A>f2</A> must have been generated by the1856<C>pq</C> program but they do <E>not</E> need to be <E>standard</E> presentations. If If1857the presentations in files <A>f1</A> and <A>f2</A> <E>have</E> been generated by1858<C>PqSPStandardPresentation</C> (see <Ref Func="PqSPStandardPresentation" Style="Text"/>) then a1859<K>false</K> response from <C>PqSPCompareTwoFilePresentations</C> says the groups1860defined by those presentations are <E>not</E> isomorphic.1861<P/>18621863For those familiar with the <C>pq</C> program,1864<C>PqSPCompareTwoFilePresentations</C> performs menu item 6 of the Standard1865Presentation menu.1866</Description>1867</ManSection>18681869<ManSection>1870<Func Name="PqSPIsomorphism" Arg="i"/>1871<Func Name="PqSPIsomorphism" Arg="" Label="for default process"/>1872<Description>1873for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1874program to compute the isomorphism mapping from the <M>p</M>-group of the1875process to its standard presentation. This function provides a1876description only; for a &GAP; object, use1877<C>EpimorphismStandardPresentation</C>1878(see <Ref Func="EpimorphismStandardPresentation" Label="interactive" Style="Text"/>).1879<P/>18801881<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSPIsomorphism</C>1882performs menu item 8 of the Standard Presentation menu.1883</Description>1884</ManSection>18851886</Section>18871888<Section><Heading>Commands from the Main <M>p</M>-Group Generation menu</Heading>18891890Note that the <M>p</M>-group generation commands can only be applied once the1891<C>pq</C> program has produced a pc presentation of some quotient group of the1892<Q>group of the process</Q>.18931894<ManSection>1895<Func Name="PqPGSupplyAutomorphisms" Arg="i[, mlist] : options"/>1896<Func Name="PqPGSupplyAutomorphisms" Arg="[mlist] : options" Label="for default process"/>1897<Description>1898for the <A>i</A>th or default interactive &ANUPQ; process, supply the <C>pq</C>1899program with the automorphism group data needed for the current quotient1900of the group of that process (for process <A>i</A> the group is stored as1901<C>ANUPQData.io[<A>i</A>].group</C>). For a description of the format of <A>mlist</A>1902see <Ref Func="PqSupplyAutomorphisms" Style="Text"/>. The options possible are1903<C>NumberOfSolubleAutomorphisms</C> and <C>RelativeOrders</C>. (Detailed1904descriptions of these options may be found in Chapter <Ref Chap="ANUPQ Options" Style="Text"/>.)1905<P/>19061907If <A>mlist</A> is omitted, the automorphism data is determined from the group1908of the process which must have been a <M>p</M>-group in pc presentation.1909<P/>19101911<E>Note:</E>1912For those familiar with the <C>pq</C> program, <C>PqPGSupplyAutomorphisms</C>1913performs menu item 1 of the main <M>p</M>-Group Generation menu.1914</Description>1915</ManSection>19161917<ManSection>1918<Func Name="PqPGExtendAutomorphisms" Arg="i"/>1919<Func Name="PqPGExtendAutomorphisms" Arg="" Label="for default process"/>1920<Description>1921for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1922program to compute the extensions of the automorphisms of the1923<M>p</M>-quotient of the previous class to the <M>p</M>-quotient of the current1924class. You may wish to set the <C>InfoLevel</C> of <C>InfoANUPQ</C> to 2 (or more)1925in order to see the output from the <C>pq</C> program (see <Ref Func="InfoANUPQ" Style="Text"/>).1926<P/>19271928<E>Note:</E>1929For those familiar with the <C>pq</C> program, <C>PqPGExtendAutomorphisms</C>1930performs menu item 2 of the main or advanced <M>p</M>-Group Generation menu.1931</Description>1932</ManSection>19331934<ManSection>1935<Func Name="PqPGConstructDescendants" Arg="i : options"/>1936<Func Name="PqPGConstructDescendants" Arg=": options" Label="for default process"/>1937<Description>1938for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1939program to construct descendants prescribed by <A>options</A>, and return the1940number of descendants constructed (compare function <Ref Func="PqDescendants" Style="Text"/> which1941returns the list of descendants). The options possible are <C>ClassBound</C>,1942<C>OrderBound</C>, <C>StepSize</C>, <C>PcgsAutomorphisms</C>,1943<C>RankInitialSegmentSubgroups</C>, <C>SpaceEfficient</C>, <C>CapableDescendants</C>,1944<C>AllDescendants</C>, <C>Exponent</C>, <C>Metabelian</C>, <C>BasicAlgorithm</C>,1945<C>CustomiseOutput</C>. (Detailed descriptions of these options may be found1946in Chapter <Ref Chap="ANUPQ Options" Style="Text"/>.)1947<P/>19481949<C>PqPGConstructDescendants</C> requires that the <C>pq</C> program has previously1950computed a pc presentation and a <M>p</M>-cover for a <M>p</M>-quotient of some1951class of the group of the process.1952<P/>19531954<E>Note:</E>1955For those familiar with the <C>pq</C> program, <C>PqPGConstructDescendants</C>1956performs menu item 5 of the main <M>p</M>-Group Generation menu.1957</Description>1958</ManSection>19591960<ManSection>1961<Func Name="PqPGSetDescendantToPcp" Arg="i, cls, n" Label="with class"/>1962<Func Name="PqPGSetDescendantToPcp" Arg="cls, n" Label="with class, for default process"/>1963<Func Name="PqPGSetDescendantToPcp" Arg="i : [ Filename := name ]"/>1964<Func Name="PqPGSetDescendantToPcp" Arg=": [ Filename := name ]" Label="for default process"/>1965<Func Name="PqPGRestoreDescendantFromFile" Arg="i, cls, n" Label="with class"/>1966<Func Name="PqPGRestoreDescendantFromFile" Arg="cls, n" Label="with class, for default process"/>1967<Func Name="PqPGRestoreDescendantFromFile" Arg="i : [ Filename := name ]"/>1968<Func Name="PqPGRestoreDescendantFromFile" Arg=": [ Filename := name ]" Label="for default process"/>1969<Description>1970for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>1971program to restore group <A>n</A> of class <A>cls</A> from a temporary file, where1972<A>cls</A> and <A>n</A> are positive integers, or the group stored in <A>name</A>.1973<C>PqPGSetDescendantToPcp</C> and <C>PqPGRestoreDescendantFromFile</C> are1974synonyms; they make sense only after a prior call to construct1975descendants by say <C>PqPGConstructDescendants</C>1976(see <Ref Func="PqPGConstructDescendants" Style="Text"/>) or the interactive <C>PqDescendants</C>1977(see <Ref Func="PqDescendants" Label="interactive" Style="Text"/>). In the <C>Filename</C> option forms, the1978option defaults to the last filename in which a presentation was stored1979by the <C>pq</C> program.1980<P/>19811982<E>Notes</E>1983<P/>19841985Since the <C>PqPGSetDescendantToPcp</C> and <C>PqPGRestoreDescendantFromFile</C>1986are intended to be used in calculation of further descendants the <C>pq</C>1987program computes the <M>p</M>-cover of the restored descendant. Hence,1988<C>PqCurrentGroup</C> used immediately after one of these commands returns the1989<M>p</M>-cover of the restored descendant rather than the descendant itself.1990<P/>19911992For those familiar with the <C>pq</C> program, <C>PqPGSetDescendantToPcp</C> and1993<C>PqPGRestoreDescendantFromFile</C> perform menu item 3 of the main or1994advanced <M>p</M>-Group Generation menu.1995</Description>1996</ManSection>19971998</Section>19992000<Section><Heading>Commands from the Advanced <M>p</M>-Group Generation menu</Heading>20012002The functions below perform the component algorithms of2003<C>PqPGConstructDescendants</C> (see <Ref Func="PqPGConstructDescendants" Style="Text"/>). You can get2004some idea of their usage by trying <C>PqExample("Nott-APG-Rel-i");</C>. You2005can get some idea of the breakdown of <C>PqPGConstructDescendants</C> into2006these functions by comparing the previous output with2007<C>PqExample("Nott-PG-Rel-i");</C>.2008<P/>20092010These functions are intended for use only by <Q>experts</Q>; please contact2011the authors of the package if you genuinely have a need for them and need2012any amplified descriptions.20132014<ManSection>2015<Func Name="PqAPGDegree" Arg="i, step, rank : [ Exponent := n ]"/>2016<Func Name="PqAPGDegree" Arg="step, rank : [ Exponent := n ]" Label="for default process"/>2017<Description>2018<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->2019<!-- %program to compute definition sets and return the degree of the -->2020<!-- %permutation group. Here the step-size <A>step</A> and the rank <A>rank</A> of the -->2021<!-- %initial segment subgroup are positive integers. See <Ref Label="option Exponent" Style="Text"/> for -->2022<!-- %the one recognised option <C>Exponent</C>. -->2023for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>2024program to invoke menu item 6 of the Advanced <M>p</M>-Group Generation menu.2025Here the step-size <A>step</A> and the rank <A>rank</A> are positive integers and2026are the arguments required by the <C>pq</C> program. See <Ref Label="option Exponent" Style="Text"/>2027for the one recognised option <C>Exponent</C>.2028<!-- %<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqAPGDegree</C> performs -->2029<!-- %menu item 6 of the Advanced <M>p</M>-Group Generation menu. -->2030</Description>2031</ManSection>20322033<ManSection>2034<Func Name="PqAPGPermutations" Arg="i : options"/>2035<Func Name="PqAPGPermutations" Arg=": options" Label="for default process"/>2036<Description>2037<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->2038<!-- %program to compute permutations of subgroups. -->2039for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>2040program to perform menu item 7 of the Advanced <M>p</M>-Group Generation menu.2041Here the options <A>options</A> recognised are <C>PcgsAutomorphisms</C>,2042<C>SpaceEfficient</C>, <C>PrintAutomorphisms</C> and <C>PrintPermutations</C> (see2043Chapter <Ref Chap="ANUPQ Options" Style="Text"/> for details).2044<!-- %<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqAPGPermutations</C> -->2045<!-- %performs menu item 7 of the Advanced <M>p</M>-Group Generation menu. -->2046</Description>2047</ManSection>20482049<ManSection>2050<Func Name="PqAPGOrbits" Arg="i : options"/>2051<Func Name="PqAPGOrbits" Arg=": options" Label="for default process"/>2052<Description>2053<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->2054<!-- %program to compute the orbits of the automorphism group, and return the -->2055<!-- %number of orbits, if either a summary or a complete listing (or both) of -->2056<!-- %orbit information was requested. -->2057for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>2058to perform menu item 8 of the Advanced <M>p</M>-Group Generation menu.2059<P/>20602061Here the options <A>options</A> recognised are <C>PcgsAutomorphisms</C>,2062<C>SpaceEfficient</C> and <C>CustomiseOutput</C> (see Chapter <Ref Chap="ANUPQ Options" Style="Text"/> for2063details). For the <C>CustomiseOutput</C> option only the setting of the2064<C>orbit</C> is recognised (all other fields if set are ignored).2065<!-- %<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqAPGOrbits</C> performs -->2066<!-- %menu item 8 of the Advanced <M>p</M>-Group Generation menu. -->2067</Description>2068</ManSection>20692070<ManSection>2071<Func Name="PqAPGOrbitRepresentatives" Arg="i : options"/>2072<Func Name="PqAPGOrbitRepresentatives" Arg=": options" Label="for default process"/>2073<Description>2074<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->2075<!-- %program to process the orbit representatives and output the reduced -->2076<!-- %<M>p</M>-cover to a file. -->2077for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>2078to perform item 9 of the Advanced <M>p</M>-Group Generation menu.2079<P/>20802081The options <A>options</A> may be any selection of the following:2082<C>PcgsAutomorphisms</C>, <C>SpaceEfficient</C>, <C>Exponent</C>, <C>Metabelian</C>,2083<C>CapableDescendants</C> (or <C>AllDescendants</C>), <C>CustomiseOutput</C> (where only2084the <C>group</C> and <C>autgroup</C> fields are recognised) and <C>Filename</C> (see2085Chapter <Ref Chap="ANUPQ Options" Style="Text"/> for details). If <C>Filename</C> is omitted the2086reduced <M>p</M>-cover is written to the file <C>"redPCover"</C> in the temporary2087directory whose name is stored in <C>ANUPQData.tmpdir</C>.2088<!-- %<E>Note:</E> -->2089<!-- %For those familiar with the <C>pq</C> program, <C>PqAPGOrbitRepresentatives</C> -->2090<!-- %performs option 9 of the Advanced <M>p</M>-Group Generation menu. -->2091</Description>2092</ManSection>20932094<ManSection>2095<Func Name="PqAPGSingleStage" Arg="i : options"/>2096<Func Name="PqAPGSingleStage" Arg=": options" Label="for default process"/>2097<Description>2098<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->2099<!-- %program to do a single stage of the descendants construction algorithm as -->2100<!-- %prescribed by <A>options</A>. -->2101for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>2102to perform option 5 of the Advanced <M>p</M>-Group Generation menu.2103<P/>21042105The possible options are <C>StepSize</C>, <C>PcgsAutomorphisms</C>,2106<C>RankInitialSegmentSubgroups</C>, <C>SpaceEfficient</C>, <C>CapableDescendants</C>,2107<C>AllDescendants</C>, <C>Exponent</C>, <C>Metabelian</C>, <C>BasicAlgorithm</C> and2108<C>CustomiseOutput</C>. (Detailed descriptions of these options may be found2109in Chapter <Ref Chap="ANUPQ Options" Style="Text"/>.)2110<!-- %<E>Note:</E> -->2111<!-- %For those familiar with the <C>pq</C> program, <C>PqAPGSingleStage</C> performs -->2112<!-- %option 5 of the Advanced <M>p</M>-Group Generation menu. -->2113</Description>2114</ManSection>21152116</Section>211721182119<Section Label="Primitive Interactive ANUPQ Process Read/Write Functions">2120<Heading>Primitive Interactive ANUPQ Process Read/Write Functions</Heading>21212122For those familiar with using the <C>pq</C> program as a standalone we provide2123primitive read/write tools to communicate directly with an interactive2124&ANUPQ; process, started via <C>PqStart</C>. For the most part, it is up to2125the user to translate the output strings from <C>pq</C> program into a form2126useful in &GAP;.21272128<ManSection>2129<Func Name="PqRead" Arg="i"/>2130<Func Name="PqRead" Arg="" Label="for default process"/>2131<Description>2132read a complete line of &ANUPQ; output, from the <A>i</A>th or default2133interactive &ANUPQ; process, if there is output to be read and returns2134<K>fail</K> otherwise. When successful, the line is returned as a string2135complete with trailing newline, colon, or question-mark character. Please2136note that it is possible to be <Q>too quick</Q> (i.e. the return can be2137<K>fail</K> purely because the output from &ANUPQ; is not there yet), but if2138<C>PqRead</C> finds any output at all, it waits for a complete line. <C>PqRead</C>2139also writes the line read via <C>Info</C> at <C>InfoANUPQ</C> level 2. It doesn't2140try to distinguish banner and menu output from other output of the <C>pq</C>2141program.2142</Description>2143</ManSection>21442145<ManSection>2146<Func Name="PqReadAll" Arg="i"/>2147<Func Name="PqReadAll" Arg="" Label="for default process"/>2148<Description>2149read and return as many <E>complete</E> lines of &ANUPQ; output, from the2150<A>i</A>th or default interactive &ANUPQ; process, as there are to be read,2151<E>at the time of the call</E>, as a list of strings with any trailing2152newlines removed and returns the empty list otherwise. <C>PqReadAll</C> also2153writes each line read via <C>Info</C> at <C>InfoANUPQ</C> level 2. It doesn't try2154to distinguish banner and menu output from other output of the <C>pq</C>2155program. Whenever <C>PqReadAll</C> finds only a partial line, it waits for the2156complete line, thus increasing the probability that it has captured all2157the output to be had from &ANUPQ;.2158</Description>2159</ManSection>21602161<ManSection>2162<Func Name="PqReadUntil" Arg="i, IsMyLine"/>2163<Func Name="PqReadUntil" Arg="IsMyLine" Label="for default process"/>2164<Func Name="PqReadUntil" Arg="i, IsMyLine, Modify" Label="with modify map"/>2165<Func Name="PqReadUntil" Arg="IsMyLine, Modify" Label="with modify map, for default process"/>2166<Description>2167read complete lines of &ANUPQ; output, from the <A>i</A>th or default2168interactive &ANUPQ; process, <Q>chomps</Q> them (i.e. removes any trailing2169newline character), emits them to <C>Info</C> at <C>InfoANUPQ</C> level 2 (without2170trying to distinguish banner and menu output from other output of the2171<C>pq</C> program), and applies the function <A>Modify</A> (where <A>Modify</A> is just2172the identity map/function for the first two forms) until a <Q>chomped</Q>2173line <A>line</A> for which <C><A>IsMyLine</A>( <A>Modify</A>(<A>line</A>) )</C> is true.2174<C>PqReadUntil</C> returns the list of <A>Modify</A>-ed <Q>chomped</Q> lines read.2175<P/>21762177<E>Notes:</E>2178When provided by the user, <A>Modify</A> should be a function that accepts a2179single string argument.2180<P/>21812182<A>IsMyLine</A> should be a function that is able to accept the output of2183<A>Modify</A> (or take a single string argument when <A>Modify</A> is not provided)2184and should return a boolean.2185<P/>21862187If <C><A>IsMyLine</A>( <A>Modify</A>(<A>line</A>) )</C> is never true, <C>PqReadUntil</C> will2188wait indefinitely.2189</Description>2190</ManSection>21912192<ManSection>2193<Func Name="PqWrite" Arg="i, string"/>2194<Func Name="PqWrite" Arg="string" Label="for default process"/>2195<Description>2196write <A>string</A> to the <A>i</A>th or default interactive &ANUPQ; process;2197<A>string</A> must be in exactly the form the &ANUPQ; standalone expects. The2198command is echoed via <C>Info</C> at <C>InfoANUPQ</C> level 3 (with a <Q><C>ToPQ> </C></Q>2199prompt); i.e. do <C>SetInfoLevel(InfoANUPQ, 3);</C> to see what is transmitted2200to the <C>pq</C> program. <C>PqWrite</C> returns <K>true</K> if successful in writing to2201the stream of the interactive &ANUPQ; process, and <K>fail</K> otherwise.2202<P/>22032204<E>Note:</E>2205If <C>PqWrite</C> returns <K>fail</K> it means that the &ANUPQ; process has died.2206</Description>2207</ManSection>22082209</Section>2210</Chapter>221122122213