CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

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

Views: 418346
1
<Chapter Label="Interactive ANUPQ functions">
2
<Heading>Interactive ANUPQ functions</Heading>
3
4
Here we describe the interactive functions defined by the &ANUPQ;
5
package, i.e.&nbsp;the functions that manipulate and initiate interactive
6
&ANUPQ; processes. These are functions that extract information via a
7
dialogue with a running <C>pq</C> process (process used in the UNIX sense).
8
Occasionally, a user needs the <Q>next step</Q>; the functions provided in
9
this chapter make use of data from previous steps retained by the <C>pq</C>
10
program, thus allowing the user to interact with the <C>pq</C> program like
11
one can when one uses the <C>pq</C> program as a stand-alone (see&nbsp;<C>guide.dvi</C>
12
in the <C>standalone-doc</C> directory).
13
<P/>
14
15
An interactive &ANUPQ; process is initiated by <C>PqStart</C> and terminated
16
via <C>PqQuit</C>; these functions are described in
17
ection&nbsp;<Ref Sect="Starting and Stopping Interactive ANUPQ Processes" Style="Text"/>.
18
<P/>
19
20
Each interactive &ANUPQ; function that manipulates an already started
21
interactive &ANUPQ; process, has a form where the first argument is the
22
integer <A>i</A> returned by the initiating <C>PqStart</C> command, and a second
23
form with one argument fewer (where the integer <A>i</A> is discovered by a
24
default mechanism, namely by determining the least integer <A>i</A> for which
25
there is a currently active interactive &ANUPQ; process). We will thus
26
commonly say that <Q>for the <A>i</A>th (or default) interactive &ANUPQ;
27
process</Q> a certain function performs a given action. In each case, it is
28
an error if <A>i</A> is not the index of an active interactive process, or
29
there are no current active interactive processes.
30
<P/>
31
32
<E>Notes</E>:
33
The global method of passing options (via <C>PushOptions</C>), should not be
34
used with any of the interactive functions. In fact, the <C>OptionsStack</C>
35
should be empty at the time any of the interactive functions is called.
36
<P/>
37
38
On <K>quit</K>ting &GAP;, <C>PqQuitAll();</C> is executed, which terminates all
39
active interactive &ANUPQ; processes. If &GAP; is killed without
40
<K>quit</K>ting, before all interactive &ANUPQ; processes are terminated,
41
<E>zombie</E> processes (still living <E>child</E> processes whose <E>parents</E> have
42
died), may result. Since zombie processes do consume resources, in such
43
an event, the responsible computer user should seek out and terminate
44
those zombie processes (e.g.&nbsp;on Linux: <C>ps xw | grep pq</C> gives you
45
information on the <C>pq</C> processes corresponding to any interactive
46
&ANUPQ; processes started in a &GAP; session; you can then do <C>kill
47
<A>N</A></C> for each number <A>N</A> appearing in the first column of this output).
48
49
<Section Label="Starting and Stopping Interactive ANUPQ Processes">
50
<Heading>Starting and Stopping Interactive ANUPQ Processes</Heading>
51
52
<ManSection>
53
<Func Name="PqStart" Arg="G, workspace : options" Label="with group and workspace size"/>
54
<Func Name="PqStart" Arg="G : options" Label="with group"/>
55
<Func Name="PqStart" Arg="workspace : options" Label="with workspace size"/>
56
<Func Name="PqStart" Arg=": options"/>
57
<Description>
58
activate an iostream for an interactive &ANUPQ; process (i.e. <C>PqStart</C>
59
starts up a <C>pq</C> process and opens a &GAP; iostream to <Q>talk</Q> to that
60
process) and returns an integer <A>i</A> that can be used to identify that
61
process. The argument <A>G</A> should be an <E>fp group</E> or <E>pc group</E> that the
62
user intends to manipulate using interactive &ANUPQ; functions. If the
63
function is called without specifying <A>G</A>, a group can be read in by
64
using the function <C>PqRestorePcPresentation</C> (see&nbsp;<Ref Func="PqRestorePcPresentation" Style="Text"/>).
65
If <C>PqStart</C> is given an integer argument <A>workspace</A>, then the <C>pq</C>
66
program is started up with a workspace (an integer array) of size
67
<A>workspace</A> (i.e. <M>4 \times <A>workspace</A></M> bytes in a 32-bit environment);
68
otherwise, the <C>pq</C> program sets a default workspace of <M>10000000</M>.
69
<P/>
70
71
The only <A>options</A> currently recognised by <C>PqStart</C> are <C>Prime</C>,
72
<C>Exponent</C> and <C>Relators</C> (see Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/> for detailed
73
descriptions of these options) and if provided they are essentially
74
global for the interactive &ANUPQ; process, except that any interactive
75
function interacting with the process and passing new values for these
76
options will over-ride the global values.
77
</Description>
78
</ManSection>
79
80
<ManSection>
81
<Func Name="PqQuit" Arg="i"/>
82
<Func Name="PqQuit" Arg="" Label="for default process"/>
83
<Description>
84
closes the stream of the <A>i</A>th or default interactive &ANUPQ; process
85
and unbinds its <C>ANUPQData.io</C> record.
86
<P/>
87
88
<E>Note:</E>
89
It can happen that the <C>pq</C> process, and hence the &GAP; iostream
90
assigned to communicate with it, can die, e.g.&nbsp;by the user typing a
91
<C>Ctrl-C</C> while the <C>pq</C> process is engaged in a long calculation.
92
<C>IsPqProcessAlive</C> (see&nbsp;<Ref Func="IsPqProcessAlive" Style="Text"/>) is provided to check the
93
status of the &GAP; iostream (and hence the status of the <C>pq</C> process
94
it was communicating with).
95
</Description>
96
</ManSection>
97
98
<ManSection>
99
<Func Name="PqQuitAll" Arg=""/>
100
<Description>
101
is provided as a convenience, to terminate all active interactive
102
&ANUPQ; processes with a single command. It is equivalent to executing
103
<C>PqQuit(<A>i</A>)</C> for all active interactive &ANUPQ; processes <A>i</A>
104
(see&nbsp;<Ref Func="PqQuit" Style="Text"/>).
105
</Description>
106
</ManSection>
107
108
</Section>
109
110
111
<Section Label="Interactive ANUPQ Process Utility Functions">
112
<Heading>Interactive ANUPQ Process Utility Functions</Heading>
113
114
<ManSection>
115
<Func Name="PqProcessIndex" Arg="i"/>
116
<Func Name="PqProcessIndex" Arg="" Label="for default process"/>
117
<Description>
118
With argument <A>i</A>, which must be a positive integer, <C>PqProcessIndex</C>
119
returns <A>i</A> if it corresponds to an active interactive process, or raises
120
an error. With no arguments it returns the default active interactive
121
process or returns <K>fail</K> and emits a warning message to <C>Info</C> at
122
<C>InfoANUPQ</C> or <C>InfoWarning</C> level 1.
123
<P/>
124
125
<E>Note:</E>
126
Essentially, an interactive &ANUPQ; process <A>i</A> is <Q>active</Q> if
127
<C>ANUPQData.io[<A>i</A>]</C> is bound (i.e.&nbsp;we still have some data telling us
128
about it). Also see&nbsp;<Ref Func="PqStart" Style="Text"/>.
129
</Description>
130
</ManSection>
131
132
<ManSection>
133
<Func Name="PqProcessIndices" Arg=""/>
134
<Description>
135
returns the list of integer indices of all active interactive &ANUPQ;
136
processes (see&nbsp;<Ref Func="PqProcessIndex" Style="Text"/> for the meaning of <Q>active</Q>).
137
</Description>
138
</ManSection>
139
140
<ManSection>
141
<Func Name="IsPqProcessAlive" Arg="i"/>
142
<Func Name="IsPqProcessAlive" Arg="" Label="for default process"/>
143
<Description>
144
return <K>true</K> if the &GAP; iostream of the <A>i</A>th (or default)
145
interactive &ANUPQ; process started by <C>PqStart</C> is alive (i.e.&nbsp;can
146
still be written to), or <K>false</K>, otherwise. (See the notes for&nbsp;<Ref Func="PqStart" Style="Text"/>
147
and&nbsp;<Ref Func="PqQuit" Style="Text"/>.)
148
<P/>
149
150
<Index>interruption</Index><!-- @interruption of an interactive ANUPQ process -->
151
If the user does not yet have a <C>gap></C> prompt then usually the <C>pq</C>
152
program is still away doing something and an &ANUPQ; interface function
153
is still waiting for a reply. Typing a <C>Ctrl-C</C> (i.e.&nbsp;holding down the
154
<C>Ctrl</C> key and typing <C>c</C>) will stop the waiting and send &GAP; into a
155
<C>break</C>-loop, from which one has no option but to <C>quit;</C>. The typing of
156
<C>Ctrl-C</C>, in such a circumstance, usually causes the stream of the
157
interactive &ANUPQ; process to die; to check this we provide
158
<C>IsPqProcessAlive</C> (see&nbsp;<Ref Func="IsPqProcessAlive" Style="Text"/>).
159
<P/>
160
161
The &GAP; iostream of an interactive &ANUPQ; process will also die if
162
the <C>pq</C> program has a segmentation fault. We do hope that this never
163
happens to you, but if it does and the failure is reproducible, then it's
164
a bug and we'd like to know about it. Please read the <C>README</C> that comes
165
with the &ANUPQ; package to find out what to include in a bug report and
166
who to email it to.
167
</Description>
168
</ManSection>
169
170
</Section>
171
172
173
<Section Label="Interactive Versions of Non-interactive ANUPQ Functions">
174
<Heading>Interactive Versions of Non-interactive ANUPQ Functions</Heading>
175
176
<ManSection>
177
<Func Name="Pq" Arg="i : options" Label="interactive"/>
178
<Func Name="Pq" Arg=": options" Label="interactive, for default process"/>
179
<Description>
180
return, for the fp or pc group (let us call it <A>F</A>), of the <A>i</A>th or
181
default interactive &ANUPQ; process, the <M>p</M>-quotient of <A>F</A>
182
specified by <A>options</A>, as a pc group; <A>F</A> must previously have been
183
given (as first argument) to <C>PqStart</C> to start the interactive
184
&ANUPQ; process (see&nbsp;<Ref Func="PqStart" Style="Text"/>) or restored from file using the
185
function <C>PqRestorePcPresentation</C> (see&nbsp;<Ref Func="PqRestorePcPresentation" Style="Text"/>).
186
Following the colon <A>options</A> is a selection of the options listed for
187
the non-interactive <C>Pq</C> function (see&nbsp;<Ref Func="Pq" Style="Text"/>), separated by commas like
188
record components (see Section&nbsp;<Ref BookName="ref" Label="Function Call With Options" Style="Text"/> in the
189
&GAP; Reference Manual), except that the options <C>SetupFile</C> or
190
<C>PqWorkspace</C> are ignored by the interactive <C>Pq</C>, and <C>RedoPcp</C> is an
191
option only recognised by the interactive <C>Pq</C> i.e.&nbsp;the following
192
options are recognised by the interactive <C>Pq</C> function:
193
194
<List>
195
<Item>
196
<C>Prime := <A>p</A></C><Index>option Prime</Index>
197
</Item>
198
<Item>
199
<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>
200
</Item>
201
<Item>
202
<C>Exponent := <A>n</A></C><Index>option Exponent</Index>
203
</Item>
204
<Item>
205
<C>Relators := <A>rels</A></C><Index>option Relators</Index>
206
</Item>
207
<Item>
208
<C>Metabelian</C><Index>option Metabelian</Index>
209
</Item>
210
<Item>
211
<C>Identities := <A>funcs</A></C><Index>option Identities</Index>
212
</Item>
213
<Item>
214
<C>GroupName := <A>name</A></C><Index>option GroupName</Index>
215
</Item>
216
<Item>
217
<C>OutputLevel := <A>n</A></C><Index>option OutputLevel</Index>
218
</Item>
219
<Item>
220
<C>RedoPcp</C><Index>option RedoPcp</Index>
221
</Item>
222
</List>
223
224
Detailed descriptions of the above options may be found in Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/>.
225
<P/>
226
227
As a minimum the <C>Pq</C> function <E>must</E> have a value for the <C>Prime</C>
228
option, though <C>Prime</C> need not be passed again in the case it has
229
previously been provided, e.g. to <C>PqStart</C> (see&nbsp;<Ref Func="PqStart" Style="Text"/>) when starting
230
the interactive process.
231
<P/>
232
233
The behaviour of the interactive <C>Pq</C> function depends on the current
234
state of the pc presentation stored by the <C>pq</C> program:
235
236
<Enum>
237
<Item>
238
If no pc presentation has yet been computed (the case immediately after
239
the <C>PqStart</C> call initiating the process) then the quotient group of the
240
input group of the process of largest lower exponent-<A>p</A> class bounded by
241
the value of the <C>ClassBound</C> option (see&nbsp;<Ref Label="option ClassBound" Style="Text"/>) is
242
returned.
243
</Item>
244
245
<Item>
246
If the current pc presentation of the process was determined by a
247
previous call to <C>Pq</C> or <C>PqEpimorphism</C>, and the current call has a
248
larger value <C>ClassBound</C> then the class is extended as much as is
249
possible and the quotient group of the input group of the process of the
250
new lower exponent-<A>p</A> class is returned.
251
</Item>
252
253
<Item>
254
If the current pc presentation of the process was determined by a
255
previous call to <C>PqPCover</C> then a consistent pc presentation of a
256
quotient for the current class is determined before proceeding as in 2.
257
</Item>
258
259
<Item>
260
If the <C>RedoPcp</C> option is supplied the current pc presentation is
261
scrapped, all options must be re-supplied (in particular, <C>Prime</C> <E>must</E>
262
be supplied) and then the <C>Pq</C> function proceeds as in 1.
263
</Item>
264
</Enum>
265
266
See Section&nbsp;<Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/> for the
267
attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and
268
<C>IsCapable</C> which may be applied to the group returned by <C>Pq</C>.
269
<P/>
270
271
The following is one of the examples for the non-interactive <C>Pq</C> redone
272
with the interactive version. Also, we set the option <C>OutputLevel</C> to 1
273
(see&nbsp;<Ref Label="option OutputLevel" Style="Text"/>), in order to see the orders of the quotients
274
of all the classes determined, and we set the <C>InfoANUPQ</C> level to 2
275
(see&nbsp;<Ref Func="InfoANUPQ" Style="Text"/>), so that we catch the timing information.
276
277
<Example><![CDATA[
278
gap> F := FreeGroup("a", "b");; a := F.1;; b := F.2;;
279
gap> G := F / [a^4, b^4];
280
<fp group on the generators [ a, b ]>
281
gap> PqStart(G);
282
1
283
gap> SetInfoLevel(InfoANUPQ, 2); #To see timing information
284
gap> Pq(: Prime := 2, ClassBound := 3, OutputLevel := 1 );
285
#I Lower exponent-2 central series for [grp]
286
#I Group: [grp] to lower exponent-2 central class 1 has order 2^2
287
#I Group: [grp] to lower exponent-2 central class 2 has order 2^5
288
#I Group: [grp] to lower exponent-2 central class 3 has order 2^8
289
#I Computation of presentation took 0.00 seconds
290
<pc group of size 256 with 8 generators>
291
]]></Example>
292
</Description>
293
</ManSection>
294
295
<ManSection>
296
<Func Name="PqEpimorphism" Arg="i : options" Label="interactive"/>
297
<Func Name="PqEpimorphism" Arg=": options" Label="interactive, for default process"/>
298
<Description>
299
return, for the fp or pc group (let us call it <A>F</A>), of the <A>i</A>th or
300
default interactive &ANUPQ; process, an epimorphism from <A>F</A> onto the
301
<M>p</M>-quotient of <A>F</A> specified by <A>options</A>; <A>F</A> must previously have been
302
given (as first argument) to <C>PqStart</C> to start the interactive &ANUPQ;
303
process (see&nbsp;<Ref Func="PqStart" Style="Text"/>). Since the underlying interactions with the <C>pq</C>
304
program effected by the interactive <C>PqEpimorphism</C> are identical to
305
those effected by the interactive <C>Pq</C>, everything said regarding the
306
requirements and behaviour of the interactive <C>Pq</C> function
307
(see&nbsp;<Ref Func="Pq" Label="interactive" Style="Text"/>) is also the case for the interactive
308
<C>PqEpimorphism</C>.
309
<P/>
310
311
<E>Note:</E>
312
See Section&nbsp;<Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/> for the
313
attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and
314
<C>IsCapable</C> which may be applied to the image group of the epimorphism
315
returned by <C>PqEpimorphism</C>.
316
</Description>
317
</ManSection>
318
319
<ManSection>
320
<Func Name="PqPCover" Arg="i : options" Label="interactive"/>
321
<Func Name="PqPCover" Arg=": options" Label="interactive, for default process"/>
322
<Description>
323
return, for the fp or pc group of the <A>i</A>th or default interactive
324
&ANUPQ; process, the <M>p</M>-covering group of the <M>p</M>-quotient <C>Pq(<A>i</A> :
325
<A>options</A>)</C> or <C>Pq(: <A>options</A>)</C>, modulo the following:
326
327
<Enum>
328
<Item>
329
If no pc presentation has yet been computed (the case immediately after
330
the <C>PqStart</C> call initiating the process) and the group <A>F</A> of the
331
process is already a <M>p</M>-group, in the sense that <C>HasIsPGroup(<A>F</A>) and
332
IsPGroup(<A>F</A>)</C> is <K>true</K>, then
333
<List>
334
<Mark><C>Prime</C></Mark>
335
<Item>
336
defaults to <C>PrimePGroup(<A>F</A>)</C>, if not supplied and <C>HasPrimePGroup(<A>F</A>)
337
= true</C>; and
338
</Item>
339
<Mark><C>ClassBound</C></Mark>
340
<Item>
341
defaults to <C>PClassPGroup(<A>F</A>)</C> if <C>HasPClassPGroup(<A>F</A>) = true</C> if not
342
supplied, or to the usual default of 63, otherwise.
343
</Item>
344
</List>
345
</Item>
346
347
<Item>
348
If a pc presentation has been computed and none of <A>options</A> is <C>RedoPcp</C>
349
or if no pc presentation has yet been computed but 1. does not apply then
350
<C>PqPCover(<A>i</A> : <A>options</A>);</C> is equivalent to:
351
352
<Listing><![CDATA[
353
Pq(i : options);
354
PqPCover(i);
355
]]></Listing>
356
</Item>
357
358
<Item>
359
If the <C>RedoPcp</C> option is supplied the current pc presentation is
360
scrapped, and <C>PqPCover</C> proceeds as in 1. or 2. but without the
361
<C>RedoPcp</C> option.
362
</Item>
363
</Enum>
364
</Description>
365
</ManSection>
366
367
<Index>automorphisms<Subkey>of <M>p</M>-groups</Subkey></Index>
368
<ManSection>
369
<Func Name="PqStandardPresentation" Arg="[ i ]: options" Label="interactive"/>
370
<Func Name="StandardPresentation" Arg="[ i ]: options" Label="interactive"/>
371
<Description>
372
return, for the <A>i</A>th or default interactive &ANUPQ; process, the
373
<A>p</A>-quotient of the group <A>F</A> of the process, specified by <A>options</A>, as
374
an <E>fp group</E> which has a standard presentation. Here <A>options</A> is a
375
selection of the options from the following list (see Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/> for detailed descriptions); this list is the same as for the
376
non-interactive version of <C>PqStandardPresentation</C> except for the
377
omission of options <C>SetupFile</C> and <C>PqWorkspace</C>
378
(see&nbsp;<Ref Func="PqStandardPresentation" Style="Text"/>).
379
380
<List>
381
<Item>
382
<C>Prime := <A>p</A></C><Index>option Prime</Index>
383
</Item>
384
<Item>
385
<C>pQuotient := <A>Q</A></C><Index>option pQuotient</Index>
386
</Item>
387
<Item>
388
<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>
389
</Item>
390
<Item>
391
<C>Exponent := <A>n</A></C><Index>option Exponent</Index>
392
</Item>
393
<Item>
394
<C>Metabelian</C><Index>option Metabelian</Index>
395
</Item>
396
<Item>
397
<C>GroupName := <A>name</A></C><Index>option GroupName</Index>
398
</Item>
399
<Item>
400
<C>OutputLevel := <A>n</A></C><Index>option OutputLevel</Index>
401
</Item>
402
<Item>
403
<C>StandardPresentationFile := <A>filename</A></C><Index>option StandardPresentationFile</Index>
404
</Item>
405
</List>
406
407
Unless <A>F</A> is a pc <A>p</A>-group, or the option <C>Prime</C> has been passed to a
408
previous interactive function for the process to compute a <A>p</A>-quotient
409
for <A>F</A>, the user <E>must</E> supply either the option <C>Prime</C> or the option
410
<C>pQuotient</C> (if both <C>Prime</C> and <C>pQuotient</C> are supplied, the prime <A>p</A>
411
is determined by applying <C>PrimePGroup</C> (see&nbsp;<Ref BookName="ref" Attr="PrimePGroup" Style="Text"/> in the
412
Reference Manual) to the value of <C>pQuotient</C>).
413
<P/>
414
415
Taking one of the examples for the non-interactive version of
416
<C>StandardPresentation</C> (see&nbsp;<Ref Func="StandardPresentation" Style="Text"/>) that required two
417
separate calls to the <C>pq</C> program, we now show how it can be done by
418
setting up a dialogue with just the one <C>pq</C> process, using the
419
interactive version of <C>StandardPresentation</C>:
420
421
<Example><![CDATA[
422
gap> F4 := FreeGroup( "a", "b", "c", "d" );;
423
gap> a := F4.1;; b := F4.2;; c := F4.3;; d := F4.4;;
424
gap> G4 := F4 / [ b^4, b^2 / Comm(Comm (b, a), a), d^16,
425
> a^16 / (c * d), b^8 / (d * c^4) ];
426
<fp group on the generators [ a, b, c, d ]>
427
gap> SetInfoLevel(InfoANUPQ, 1); #Only essential Info please
428
gap> PqStart(G4); #Start a new interactive process for a new group
429
2
430
gap> K := Pq( 2 : Prime := 2, ClassBound := 1 ); #`pq' process no. is 2
431
<pc group of size 4 with 2 generators>
432
gap> StandardPresentation( 2 : pQuotient := K, ClassBound := 14 );
433
<fp group with 53 generators>
434
]]></Example>
435
436
<E>Notes</E>
437
<P/>
438
439
In contrast to the function <C>Pq</C> (see&nbsp;<Ref Func="Pq" Style="Text"/>) which returns a pc group,
440
<C>PqStandardPresentation</C> or <C>StandardPresentation</C> returns an fp group.
441
This is because the output is mainly used for isomorphism testing for
442
which an fp group is enough. However, the presentation is a polycyclic
443
presentation and if you need to do any further computation with this
444
group (e.g.&nbsp;to find the order) you can use the function <C>PcGroupFpGroup</C>
445
(see&nbsp;<Ref BookName="ref" Func="PcGroupFpGroup" Style="Text"/> in the
446
&GAP; Reference Manual) to form a pc group.
447
<P/>
448
449
If the user does not supply a <A>p</A>-quotient <A>Q</A> via the
450
<C>pQuotient</C> option, and the prime <A>p</A> is either supplied, stored, or
451
<A>F</A> is a pc <A>p</A>-group, then a <A>p</A>-quotient <A>Q</A> is
452
computed. (The value of the prime <A>p</A> is stored if passed initially to
453
<C>PqStart</C> or to a subsequent interactive process.) Note that a stored
454
value for <C>pQuotient</C> (from a prior call to <C>Pq</C>) does <E>not</E>
455
have precedence over a value for the prime <A>p</A>. If the user does supply a
456
<A>p</A>-quotient <A>Q</A> via the <C>pQuotient</C> option, the package
457
&AutPGrp; is called to compute the automorphism group of <A>Q</A>; an error
458
will occur that asks the user to install the package &AutPGrp; if the
459
automorphism group cannot be computed.
460
<P/>
461
462
If any of the interactive functions <C>PqStandardPresentation</C>,
463
<C>StandardPresentation</C>, <C>EpimorphismPqStandardPresentation</C> or
464
<C>EpimorphismStandardPresentation</C> has been called previously for an
465
interactive process, a subsequent call to any of these functions for the same
466
process returns the previously computed value. Note that all these functions
467
compute both an epimorphism and an fp group and store the results in the
468
<C>SPepi</C> and <C>SP</C> fields of the data record associated with the
469
process. See the example for the interactive
470
<C>EpimorphismStandardPresentation</C>
471
(<Ref Func="EpimorphismStandardPresentation" Label="interactive" Style="Text"/>).
472
<P/>
473
474
The attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and
475
<C>IsCapable</C> are set for the group returned by <C>PqStandardPresentation</C> or
476
<C>StandardPresentation</C> (see Section&nbsp;<Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/>).
477
</Description>
478
</ManSection>
479
480
<ManSection>
481
<Func Name="EpimorphismPqStandardPresentation" Arg="[ i ]: options" Label="interactive"/>
482
<Meth Name="EpimorphismStandardPresentation" Arg="[ i ]: options" Label="interactive"/>
483
<Description>
484
Each of the above functions accepts the same arguments and options as the
485
interactive form of <C>StandardPresentation</C>
486
(see&nbsp;<Ref Func="StandardPresentation" Label="interactive" Style="Text"/>) and returns an epimorphism from
487
the fp or pc group <A>F</A> of the <A>i</A>th or default interactive &ANUPQ;
488
process onto the finitely presented group given by a standard
489
presentation, i.e.&nbsp;if <A>S</A> is the standard presentation computed for the
490
<M>p</M>-quotient of <A>F</A> by <C>StandardPresentation</C> then
491
<C>EpimorphismStandardPresentation</C> returns the epimorphism from <A>F</A> to the
492
group with presentation <A>S</A>. The group <A>F</A> must have been given (as first
493
argument) to <C>PqStart</C> to start the interactive &ANUPQ; process
494
(see&nbsp;<Ref Func="PqStart" Style="Text"/>).
495
<P/>
496
497
Taking our earlier non-interactive example
498
(see&nbsp;<Ref Func="EpimorphismPqStandardPresentation" Style="Text"/>) and modifying it a little, we
499
illustrate, as for the interactive <C>StandardPresentation</C>
500
(see&nbsp;<Ref Func="StandardPresentation" Label="interactive" Style="Text"/>), how something that required two
501
separate calls to the <C>pq</C> program can now be achieved with a dialogue
502
with just one <C>pq</C> process. Also, observe that calls to one of the
503
standard presentation functions (as mentioned in the notes
504
of&nbsp;<Ref Func="StandardPresentation" Label="interactive" Style="Text"/>) computes and stores both an fp
505
group with a standard presentation and an epimorphism; subsequent calls
506
to a standard presentation function for the same process simply return
507
the appropriate stored value.
508
509
<Example><![CDATA[
510
gap> F := FreeGroup(6, "F");;
511
gap> x := F.1;; y := F.2;; z := F.3;; w := F.4;; a := F.5;; b := F.6;;
512
gap> R := [x^3 / w, y^3 / w * a^2 * b^2, w^3 / b,
513
> Comm (y, x) / z, Comm (z, x), Comm (z, y) / a, z^3 ];
514
[ F1^3*F4^-1, F2^3*F4^-1*F5^2*F6^2, F4^3*F6^-1, F2^-1*F1^-1*F2*F1*F3^-1,
515
F3^-1*F1^-1*F3*F1, F3^-1*F2^-1*F3*F2*F5^-1, F3^3 ]
516
gap> Q := F / R;
517
<fp group on the generators [ F1, F2, F3, F4, F5, F6 ]>
518
gap> PqStart( Q );
519
3
520
gap> G := Pq( 3 : Prime := 3, ClassBound := 3 );
521
<pc group of size 729 with 6 generators>
522
gap> lev := InfoLevel(InfoANUPQ);; # Save current InfoANUPQ level
523
gap> SetInfoLevel(InfoANUPQ, 2); # To see computation times
524
gap> # It is not necessary to pass the `Prime' option to
525
gap> # `EpimorphismStandardPresentation' since it was previously
526
gap> # passed to `Pq':
527
gap> phi := EpimorphismStandardPresentation( 3 : ClassBound := 3 );
528
#I Class 1 3-quotient and its 3-covering group computed in 0.00 seconds
529
#I Order of GL subgroup is 48
530
#I No. of soluble autos is 0
531
#I dim U = 1 dim N = 3 dim M = 3
532
#I nice stabilizer with perm rep
533
#I Computing standard presentation for class 2 took 0.00 seconds
534
#I Computing standard presentation for class 3 took 0.01 seconds
535
[ F1, F2, F3, F4, F5, F6 ] -> [ f1*f2^2*f3*f4^2*f5^2, f1*f2*f3*f5, f3^2,
536
f4*f6^2, f5, f6 ]
537
gap> # Image of phi should be isomorphic to G ...
538
gap> # let's check the order is correct:
539
gap> Size( Image(phi) );
540
729
541
gap> # `StandardPresentation' and `EpimorphismStandardPresentation'
542
gap> # behave like attributes, so no computation is done when
543
gap> # either is called again for the same process ...
544
gap> StandardPresentation( 3 : ClassBound := 3 );
545
<fp group of size 729 on the generators [ f1, f2, f3, f4, f5, f6 ]>
546
gap> # No timing data was Info-ed since no computation was done
547
gap> SetInfoLevel(InfoANUPQ, lev); # Restore previous InfoANUPQ level
548
]]></Example>
549
550
A very similar (essential details are the same) example to the above may
551
be executed live, by typing:
552
<C>PqExample( "EpimorphismStandardPresentation-i" );</C>.
553
<P/>
554
555
<E>Note:</E>
556
The notes for <C>PqStandardPresentation</C> or <C>StandardPresentation</C>
557
(see&nbsp;<Ref Func="PqStandardPresentation" Label="interactive" Style="Text"/>) apply also to
558
<C>EpimorphismPqStandardPresentation</C> or <C>EpimorphismStandardPresentation</C>
559
except that their return value is an <E>epimorphism onto</E> an fp group,
560
i.e.&nbsp;one should interpret the phrase <Q>returns an fp group</Q> as <Q>returns
561
an epimorphism onto an fp group</Q> etc.
562
</Description>
563
</ManSection>
564
565
<ManSection>
566
<Func Name="PqDescendants" Arg="i : options" Label="interactive"/>
567
<Func Name="PqDescendants" Arg=": options" Label="interactive, for default process"/>
568
<Description>
569
return for the pc group <A>G</A> of the <A>i</A>th or default interactive &ANUPQ;
570
process, which must be of prime power order with a confluent pc
571
presentation (see&nbsp;<Ref BookName="ref" Func="IsConfluent" Label="for pc groups" Style="Text"/> in the &GAP; Reference
572
Manual), a list of descendants (pc groups) of <A>G</A>. The group <A>G</A> is
573
usually given as first argument to <C>PqStart</C> when starting the
574
interactive &ANUPQ; process (see&nbsp;<Ref Func="PqStart" Style="Text"/>). Alternatively, one may
575
initiate the process with an fp group, use <C>Pq</C> interactively
576
(see&nbsp;<Ref Func="Pq" Label="interactive" Style="Text"/>) to create a pc group and use
577
<C>PqSetPQuotientToGroup</C> (see&nbsp;<Ref Func="PqSetPQuotientToGroup" Style="Text"/>), which involves
578
<E>no</E> computation, to set the pc group returned by <C>Pq</C> as the group of
579
the process. Note that repeating a call to <C>PqDescendants</C> for the same
580
interactive &ANUPQ; process simply returns the list of descendants
581
originally calculated; a warning is emitted at <C>InfoANUPQ</C> level 1
582
reminding you of this should you do this.
583
<P/>
584
585
After the colon, <A>options</A> a selection of the options listed for the
586
non-interactive <C>PqDescendants</C> function (see&nbsp;<Ref Func="PqDescendants" Style="Text"/>), should be
587
given, separated by commas like record components (see
588
Section&nbsp;<Ref BookName="ref" Label="Function Call With Options" Style="Text"/> in the &GAP; Reference Manual),
589
except that the options <C>SetupFile</C> or <C>PqWorkspace</C> are ignored by the
590
interactive <C>PqDescendants</C>, i.e.&nbsp;the following options are recognised by
591
the interactive <C>PqDescendants</C> function:
592
593
<List>
594
<Item>
595
<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>
596
</Item>
597
<Item>
598
<C>Relators := <A>rels</A></C><Index>option Relators</Index>
599
</Item>
600
<Item>
601
<C>OrderBound := <A>n</A></C><Index>option OrderBound</Index>
602
</Item>
603
<Item>
604
<C>StepSize := <A>n</A></C>, <C>StepSize := <A>list</A></C>
605
<Index>option StepSize</Index>
606
</Item>
607
<Item>
608
<C>RankInitialSegmentSubgroups := <A>n</A></C><Index>option RankInitialSegmentSubgroups</Index>
609
</Item>
610
<Item>
611
<C>SpaceEfficient</C><Index>option SpaceEfficient</Index>
612
</Item>
613
<Item>
614
<C>CapableDescendants</C><Index>option CapableDescendants</Index>
615
</Item>
616
<Item>
617
<C>AllDescendants := false</C><Index>option AllDescendants</Index>
618
</Item>
619
<Item>
620
<C>Exponent := <A>n</A></C><Index>option Exponent</Index>
621
</Item>
622
<Item>
623
<C>Metabelian</C><Index>option Metabelian</Index>
624
</Item>
625
<Item>
626
<C>GroupName := <A>name</A></C><Index>option GroupName</Index>
627
</Item>
628
<Item>
629
<C>SubList := <A>sub</A></C><Index>option SubList</Index>
630
</Item>
631
<Item>
632
<C>BasicAlgorithm</C><Index>option BasicAlgorithm</Index>
633
</Item>
634
<Item>
635
<C>CustomiseOutput := <A>rec</A></C><Index>option CustomiseOutput</Index>
636
</Item>
637
</List>
638
639
<E>Notes:</E> The function <C>PqDescendants</C> uses the automorphism group of <A>G</A>
640
which it computes via the package &AutPGrp; if the automorphism group of
641
<A>G</A> is not already present. If &AutPGrp; is not installed an error may
642
be raised. If the automorphism group of <A>G</A> is insoluble the <C>pq</C>
643
program will call &GAP; together with the &AutPGrp; package for certain
644
orbit-stabilizer calculations.
645
<P/>
646
647
The attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and
648
<C>IsCapable</C> are set for each group of the list returned by
649
<C>PqDescendants</C> (see Section&nbsp;<Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/>).
650
<P/>
651
652
Let us now repeat the examples previously given for the non-interactive
653
<C>PqDescendants</C>, but this time with the interactive version of
654
<C>PqDescendants</C>:
655
656
<Example><![CDATA[
657
gap> F := FreeGroup( "a", "b" );; a := F.1;; b := F.2;;
658
gap> G := PcGroupFpGroup( F / [ a^2, b^2, Comm(b, a) ] );
659
<pc group of size 4 with 2 generators>
660
gap> PqStart(G); #This will now be the 4th interactive process running
661
4
662
gap> des := PqDescendants( 4 : OrderBound := 6, ClassBound := 5 );;
663
gap> Length(des);
664
83
665
gap> List(des, Size);
666
[ 8, 8, 8, 16, 16, 16, 32, 16, 16, 16, 16, 16, 32, 32, 64, 64, 32, 32, 32,
667
32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32,
668
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32, 32, 64, 64, 64,
669
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
670
64, 64, 64, 64, 64, 64, 64 ]
671
gap> List(des, d -> Length( PCentralSeries( d, 2 ) ) - 1 );
672
[ 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,
673
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
674
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
675
4, 4, 4, 5, 5, 5, 5, 5 ]
676
]]></Example>
677
678
In the second example we compute all capable descendants of order 27 of
679
the elementary abelian group of order 9.
680
681
<Example><![CDATA[
682
gap> F := FreeGroup( 2, "g" );;
683
gap> G := PcGroupFpGroup( F / [ F.1^3, F.2^3, Comm(F.1, F.2) ] );
684
<pc group of size 9 with 2 generators>
685
gap> PqStart(G); #This will now be the 5th interactive process running
686
5
687
gap> des := PqDescendants( 5 : OrderBound := 3, ClassBound := 2,
688
> CapableDescendants );
689
[ <pc group of size 27 with 3 generators>,
690
<pc group of size 27 with 3 generators> ]
691
gap> List(des, d -> Length( PCentralSeries( d, 3 ) ) - 1 );
692
[ 2, 2 ]
693
gap> # For comparison let us now compute all descendants
694
gap> # (using the non-interactive Pq function)
695
gap> PqDescendants( G : OrderBound := 3, ClassBound := 2);
696
[ <pc group of size 27 with 3 generators>,
697
<pc group of size 27 with 3 generators>,
698
<pc group of size 27 with 3 generators> ]
699
]]></Example>
700
701
In the third example, we compute all capable descendants of the
702
elementary abelian group of order <M>5^2</M> which have exponent-<M>5</M> class at
703
most <M>3</M>, exponent <M>5</M>, and are metabelian.
704
705
<Example><![CDATA[
706
gap> F := FreeGroup( 2, "g" );;
707
gap> G := PcGroupFpGroup( F / [ F.1^5, F.2^5, Comm(F.2, F.1) ] );
708
<pc group of size 25 with 2 generators>
709
gap> PqStart(G); #This will now be the 6th interactive process running
710
6
711
gap> des := PqDescendants( 6 : Metabelian, ClassBound := 3,
712
> Exponent := 5, CapableDescendants );
713
[ <pc group of size 125 with 3 generators>,
714
<pc group of size 625 with 4 generators>,
715
<pc group of size 3125 with 5 generators> ]
716
gap> List(des, d -> Length( PCentralSeries( d, 5 ) ) - 1 );
717
[ 2, 3, 3 ]
718
gap> List(des, d -> Length( DerivedSeries( d ) ) );
719
[ 3, 3, 3 ]
720
gap> List(des, d -> Maximum( List( Elements(d), Order ) ) );
721
[ 5, 5, 5 ]
722
]]></Example>
723
</Description>
724
</ManSection>
725
726
<ManSection>
727
<Func Name="PqSetPQuotientToGroup" Arg="i"/>
728
<Func Name="PqSetPQuotientToGroup" Arg="" Label="for default process"/>
729
<Description>
730
for the <A>i</A>th or default interactive &ANUPQ; process, set the
731
<M>p</M>-quotient previously computed by the interactive <C>Pq</C> function
732
(see&nbsp;<Ref Func="Pq" Label="interactive" Style="Text"/>) to be the group of the process. This function is
733
supplied to enable the computation of descendants of a <M>p</M>-quotient that
734
is already known to the <C>pq</C> program, via the interactive <C>PqDescendants</C>
735
function (see&nbsp;<Ref Func="PqDescendants" Label="interactive" Style="Text"/>), thus avoiding the need to
736
re-submit it and have the <C>pq</C> program recompute it.
737
<P/>
738
739
<E>Note:</E> See the function <C>PqPGSetDescendantToPcp</C>
740
(<Ref Func="PqPGSetDescendantToPcp" Style="Text"/>) for a mechanism to make (the <M>p</M>-cover of) a
741
particular descendants the current group of the process.
742
<P/>
743
744
The following example of the usage of <C>PqSetPQuotientToGroup</C>, which is
745
essentially equivalent to what is obtained by running
746
<C>PqExample("PqDescendants-1-i");</C>, redoes the first example of
747
<Ref Func="PqDescendants" Label="interactive" Style="Text"/> (which computes the descendants of the Klein
748
four group).
749
750
<Example><![CDATA[
751
gap> F := FreeGroup( "a", "b" );
752
<free group on the generators [ a, b ]>
753
gap> procId := PqStart( F : Prime := 2 );
754
7
755
gap> Pq( procId : ClassBound := 1 );
756
<pc group of size 4 with 2 generators>
757
gap> PqSetPQuotientToGroup( procId );
758
gap> des := PqDescendants( procId : OrderBound := 6, ClassBound := 5 );;
759
gap> Length(des);
760
83
761
gap> List(des, Size);
762
[ 8, 8, 8, 16, 16, 16, 32, 16, 16, 16, 16, 16, 32, 32, 64, 64, 32, 32, 32,
763
32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32,
764
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 32, 32, 64, 64, 64,
765
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
766
64, 64, 64, 64, 64, 64, 64 ]
767
gap> List(des, d -> Length( PCentralSeries( d, 2 ) ) - 1 );
768
[ 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,
769
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
770
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
771
4, 4, 4, 5, 5, 5, 5, 5 ]
772
]]></Example>
773
</Description>
774
</ManSection>
775
776
</Section>
777
778
779
<Section Label="Low-level Interactive ANUPQ functions based on menu items of the pq program">
780
<Heading>Low-level Interactive ANUPQ functions based on menu items of the
781
pq program</Heading>
782
783
The <C>pq</C> program has 5 menus, the details of which the reader will not
784
normally need to know, but if she wishes to know the details they may be
785
found in the standalone manual: <C>guide.dvi</C>. Both <C>guide.dvi</C> and the
786
<C>pq</C> program refer to the items of these 5 menus as <Q>options</Q>, which do
787
<E>not</E> correspond in any way to the options used by any of the &GAP;
788
functions that interface with the <C>pq</C> program.
789
<P/>
790
791
<E>Warning:</E>
792
The commands provided in this section are intended to provide something
793
like the interactive functionality one has when running the standalone,
794
from within &GAP;. The <C>pq</C> standalone (in particular, its <Q>advanced</Q>
795
menus) assumes some expertise of the user; doing the <Q>wrong</Q> thing can
796
cause the program to crash. While a number of safeguards have been
797
provided in the &GAP; interface to the <C>pq</C> program, these are <E>not</E>
798
foolproof, and the user should exercise care and ensure pre-requisites of
799
the various commands are met.
800
</Section>
801
802
<Section><Heading>General commands</Heading>
803
804
The following commands either use a menu item from whatever menu is
805
<Q>current</Q> for the <C>pq</C> program, or have general application and are not
806
associated with just one menu item of the <C>pq</C> program.
807
808
<ManSection>
809
<Func Name="PqNrPcGenerators" Arg="i"/>
810
<Func Name="PqNrPcGenerators" Arg="" Label="for default process"/>
811
<Description>
812
for the <A>i</A>th or default interactive &ANUPQ; process, return the number
813
of pc generators of the lower exponent <M>p</M>-class quotient of the group
814
currently determined by the process. This also applies if the pc
815
presentation is not consistent.
816
</Description>
817
</ManSection>
818
819
<ManSection>
820
<Func Name="PqFactoredOrder" Arg="i"/>
821
<Func Name="PqFactoredOrder" Arg="" Label="for default process"/>
822
<Description>
823
for the <A>i</A>th or default interactive &ANUPQ; process, return an integer
824
pair <C>[<A>p</A>, <A>n</A>]</C> where <A>p</A> is a prime and <A>n</A> is the number of pc
825
generators (see&nbsp;<Ref Func="PqNrPcGenerators" Style="Text"/>) in the pc presentation of the
826
quotient group currently determined by the process. If this presentation
827
is consistent, then <M>p^n</M> is the order of the quotient group. Otherwise
828
(if tails have been added but the necessary consistency checks, relation
829
collections, exponent law checks and redundant generator eliminations
830
have not yet been done), <M>p^n</M> is an upper bound for the order of the
831
group.
832
</Description>
833
</ManSection>
834
835
<ManSection>
836
<Func Name="PqOrder" Arg="i"/>
837
<Func Name="PqOrder" Arg="" Label="for default process"/>
838
<Description>
839
for the <A>i</A>th or default interactive &ANUPQ; process, return <M>p^n</M>
840
where <C>[<A>p</A>, <A>n</A>]</C> is the pair as returned by <C>PqFactoredOrder</C>
841
(see&nbsp;<Ref Func="PqFactoredOrder" Style="Text"/>).
842
</Description>
843
</ManSection>
844
845
<ManSection>
846
<Func Name="PqPClass" Arg="i"/>
847
<Func Name="PqPClass" Arg="" Label="for default process"/>
848
<Description>
849
for the <A>i</A>th or default interactive &ANUPQ; process, return the lower
850
exponent <M>p</M>-class of the quotient group currently determined by the
851
process.
852
</Description>
853
</ManSection>
854
855
<ManSection>
856
<Func Name="PqWeight" Arg="i, j"/>
857
<Func Name="PqWeight" Arg="j" Label="for default process"/>
858
<Description>
859
for the <A>i</A>th or default interactive &ANUPQ; process, return the weight
860
of the <A>j</A>th pc generator of the lower exponent <M>p</M>-class quotient of the
861
group currently determined by the process, or <K>fail</K> if there is no such
862
numbered pc generator.
863
</Description>
864
</ManSection>
865
866
<ManSection>
867
<Func Name="PqCurrentGroup" Arg="i"/>
868
<Func Name="PqCurrentGroup" Arg="" Label="for default process"/>
869
<Description>
870
for the <A>i</A>th or default interactive &ANUPQ; process, return the group
871
whose pc presentation is determined by the process as a &GAP; pc group
872
(either a lower exponent <M>p</M>-class quotient of the start group or the
873
<M>p</M>-cover of such a quotient).
874
<P/>
875
876
<E>Notes:</E>
877
See Section&nbsp;<Ref Sect="Attributes and a Property for fp and pc p-groups" Style="Text"/> for the
878
attributes and property <C>NuclearRank</C>, <C>MultiplicatorRank</C> and
879
<C>IsCapable</C> which may be applied to the group returned by
880
<C>PqCurrentGroup</C>.
881
</Description>
882
</ManSection>
883
884
<ManSection>
885
<Func Name="PqDisplayPcPresentation" Arg="i : [OutputLevel := lev ]"/>
886
<Func Name="PqDisplayPcPresentation" Arg=": [OutputLevel := lev ]" Label="for default process"/>
887
<Description>
888
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
889
program to display the pc presentation of the lower exponent <M>p</M>-class
890
quotient of the group currently determined by the process.
891
<P/>
892
893
Except if the last command communicating with the <C>pq</C> program was a
894
<M>p</M>-group generation command (for which there is only a verbose output
895
level), to set the amount of information this command displays you may
896
wish to call <C>PqSetOutputLevel</C> first (see&nbsp;<Ref Func="PqSetOutputLevel" Style="Text"/>), or
897
equivalently pass the option <C>OutputLevel</C> (see&nbsp;<Ref Label="option OutputLevel" Style="Text"/>).
898
<P/>
899
900
<E>Note:</E>
901
For those familiar with the <C>pq</C> program, <C>PqDisplayPcPresentation</C>
902
performs menu item 4 of the current menu of the <C>pq</C> program.
903
</Description>
904
</ManSection>
905
906
<ManSection>
907
<Func Name="PqSetOutputLevel" Arg="i, lev"/>
908
<Func Name="PqSetOutputLevel" Arg="lev" Label="for default process"/>
909
<Description>
910
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
911
program to set the output level of the <C>pq</C> program to <A>lev</A>.
912
<P/>
913
914
<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSetOutputLevel</C>
915
performs menu item 5 of the main (or advanced) <M>p</M>-Quotient menu, or the
916
Standard Presentation menu.
917
</Description>
918
</ManSection>
919
920
<ManSection>
921
<Func Name="PqEvaluateIdentities" Arg="i : [ Identities := funcs ]"/>
922
<Func Name="PqEvaluateIdentities" Arg=": [ Identities := funcs ]" Label="for default process"/>
923
<Description>
924
for the <A>i</A>th or default interactive &ANUPQ; process, invoke the
925
evaluation of identities defined by the <C>Identities</C> option, and
926
eliminate any redundant pc generators formed. Since a previous value of
927
<C>Identities</C> is saved in the data record of the process, it is
928
unnecessary to pass the <C>Identities</C> if set previously.
929
<P/>
930
931
<E>Note:</E> This function is mainly implemented at the &GAP; level. It does
932
not correspond to a menu item of the <C>pq</C> program.
933
</Description>
934
</ManSection>
935
936
</Section>
937
938
<Section><Heading>Commands from the Main <M>p</M>-Quotient menu</Heading>
939
940
<ManSection>
941
<Func Name="PqPcPresentation" Arg="i : options"/>
942
<Func Name="PqPcPresentation" Arg=": options" Label="for default process"/>
943
<Description>
944
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
945
program to compute the pc presentation of the quotient (determined by
946
<A>options</A>) of the group of the process, which for process <A>i</A> is stored
947
as <C>ANUPQData.io[<A>i</A>].group</C>.
948
<P/>
949
950
The possible <A>options</A> are the same as for the interactive <C>Pq</C>
951
(see&nbsp;<Ref Func="Pq" Label="interactive" Style="Text"/>) function, except for <C>RedoPcp</C> (which, in any
952
case, would be superfluous), namely: <C>Prime</C>, <C>ClassBound</C>, <C>Exponent</C>,
953
<C>Relators</C>, <C>GroupName</C>, <C>Metabelian</C>, <C>Identities</C> and <C>OutputLevel</C>
954
(see Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/> for a detailed description for these
955
options). The option <C>Prime</C> is required unless already provided to
956
<C>PqStart</C>.
957
<P/>
958
959
<E>Notes</E>
960
<P/>
961
962
The pc presentation is held by the <C>pq</C> program. In contrast to <C>Pq</C>
963
(see&nbsp;<Ref Func="Pq" Label="interactive" Style="Text"/>), no &GAP; pc group is returned;
964
see&nbsp;<C>PqCurrentGroup</C> (<Ref Func="PqCurrentGroup" Style="Text"/>) if you need the corresponding
965
&GAP; pc group.
966
<P/>
967
968
<C>PqPcPresentation(<A>i</A>: <A>options</A>);</C> is roughly equivalent to the
969
following sequence of low-level commands:
970
<P/>
971
972
<Listing><![CDATA[
973
PqPcPresentation(i: opts); #class 1 call
974
for c in [2 .. class] do
975
PqNextClass(i);
976
od;
977
]]></Listing>
978
979
where <A>opts</A> is <A>options</A> except with the <C>ClassBound</C> option set to 1,
980
and <A>class</A> is either the maximum class of a <A>p</A>-quotient of the group of
981
the process or the user-supplied value of the option <C>ClassBound</C>
982
(whichever is smaller). If the <C>Identities</C> option has been set, both the
983
first <C>PqPcPresentation</C> class 1 call and the <C>PqNextClass</C> calls invoke
984
<C>PqEvaluateIdentities(<A>i</A>);</C> as their final step.
985
<P/>
986
987
For those familiar with the <C>pq</C> program, <C>PqPcPresentation</C> performs
988
menu item 1 of the main <M>p</M>-Quotient menu.
989
</Description>
990
</ManSection>
991
992
<ManSection>
993
<Func Name="PqSavePcPresentation" Arg="i, filename"/>
994
<Func Name="PqSavePcPresentation" Arg="filename" Label="for default process"/>
995
<Description>
996
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
997
program to save the pc presentation previously computed for the quotient
998
of the group of that process to the file with name <A>filename</A>. If the
999
first character of the string <A>filename</A> is not <C>/</C>, <A>filename</A> is
1000
assumed to be the path of a writable file relative to the directory in
1001
which &GAP; was started. A saved file may be restored by
1002
<C>PqRestorePcPresentation</C> (see&nbsp;<Ref Func="PqRestorePcPresentation" Style="Text"/>).
1003
<P/>
1004
1005
<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSavePcPresentation</C>
1006
performs menu item 2 of the main <M>p</M>-Quotient menu.
1007
</Description>
1008
</ManSection>
1009
1010
<ManSection>
1011
<Func Name="PqRestorePcPresentation" Arg="i, filename"/>
1012
<Func Name="PqRestorePcPresentation" Arg="filename" Label="for default process"/>
1013
<Description>
1014
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1015
program to restore the pc presentation previously saved to <A>filename</A>, by
1016
<C>PqSavePcPresentation</C> (see&nbsp;<Ref Func="PqSavePcPresentation" Style="Text"/>). If the first
1017
character of the string <A>filename</A> is not <C>/</C>, <A>filename</A> is assumed to
1018
be the path of a readable file relative to the directory in which &GAP;
1019
was started.
1020
<P/>
1021
1022
<E>Note:</E>
1023
For those familiar with the <C>pq</C> program, <C>PqRestorePcPresentation</C>
1024
performs menu item 3 of the main <M>p</M>-Quotient menu.
1025
</Description>
1026
</ManSection>
1027
1028
<ManSection>
1029
<Func Name="PqNextClass" Arg="i : [ QueueFactor ]"/>
1030
<Func Name="PqNextClass" Arg=": [ QueueFactor ]" Label="for default process"/>
1031
<Description>
1032
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1033
program to calculate the next class of <C>ANUPQData.io[<A>i</A>].group</C>.
1034
<P/>
1035
1036
<Index>option QueueFactor</Index>
1037
<C>PqNextClass</C> accepts the option <C>QueueFactor</C> (see also&nbsp;<Ref Label="option QueueFactor" Style="Text"/>) which should be a positive integer if automorphisms have
1038
been previously supplied. If the <C>pq</C> program requires a queue factor and
1039
none is supplied via the option <C>QueueFactor</C> a default of 15 is taken.
1040
<P/>
1041
1042
<E>Notes</E>
1043
<P/>
1044
1045
The single command: <C>PqNextClass(<A>i</A>);</C> is equivalent to executing
1046
1047
<Listing><![CDATA[
1048
PqComputePCover(i);
1049
PqCollectDefiningRelations(i);
1050
PqDoExponentChecks(i);
1051
PqEliminateRedundantGenerators(i);
1052
]]></Listing>
1053
1054
If the <C>Identities</C> option is set the <C>PqEliminateRedundantGenerators(<A>i</A>);</C>
1055
step is essentially replaced by <C>PqEvaluateIdentities(<A>i</A>);</C> (which invokes
1056
its own elimination of redundant generators).
1057
<P/>
1058
1059
For those familiar with the <C>pq</C> program, <C>PqNextClass</C> performs menu item
1060
6 of the main <M>p</M>-Quotient menu.
1061
</Description>
1062
</ManSection>
1063
1064
<ManSection>
1065
<Func Name="PqComputePCover" Arg="i"/>
1066
<Func Name="PqComputePCover" Arg="" Label="for default process"/>
1067
<Description>
1068
for the <A>i</A>th or default interactive &ANUPQ; processi, directi, the <C>pq</C>
1069
program to compute the <M>p</M>-covering group of <C>ANUPQData.io[<A>i</A>].group</C>.
1070
In contrast to the function <C>PqPCover</C> (see&nbsp;<Ref Func="PqPCover" Style="Text"/>), this function does
1071
not return a &GAP; pc group.
1072
<P/>
1073
1074
<E>Notes</E>
1075
<P/>
1076
1077
The single command: <C>PqComputePCover(<A>i</A>);</C> is equivalent to executing
1078
1079
<Listing><![CDATA[
1080
PqSetupTablesForNextClass(i);
1081
PqTails(i, 0);
1082
PqDoConsistencyChecks(i, 0, 0);
1083
PqEliminateRedundantGenerators(i);
1084
]]></Listing>
1085
1086
For those familiar with the <C>pq</C> program, <C>PqComputePCover</C> performs menu
1087
item 7 of the main <M>p</M>-Quotient menu.
1088
</Description>
1089
</ManSection>
1090
1091
</Section>
1092
1093
<Section><Heading>Commands from the Advanced <M>p</M>-Quotient menu</Heading>
1094
1095
<ManSection>
1096
<Func Name="PqCollect" Arg="i, word"/>
1097
<Func Name="PqCollect" Arg="word" Label="for default process"/>
1098
<Description>
1099
for the <A>i</A>th or default interactive &ANUPQ; process, instruct the <C>pq</C>
1100
program to do a collection on <A>word</A>, a word in the current pc generators
1101
(the form of <A>word</A> required is described below). <C>PqCollect</C> returns the
1102
resulting word of the collection as a list of generator number, exponent
1103
pairs (the same form as the second allowed input form of <A>word</A>; see
1104
below).
1105
<P/>
1106
1107
The argument <A>word</A> may be input in either of the following ways:
1108
1109
<Enum>
1110
<Item>
1111
<A>word</A> may be a string, where the <A>i</A>th pc generator is represented by
1112
<C>x<A>i</A></C>, e.g.&nbsp;<C>"x3*x2^2*x1"</C>. This way is quite versatile as parentheses
1113
and left-normed commutators -- using square brackets, in the same way as
1114
<C>PqGAPRelators</C> (see&nbsp;<Ref Func="PqGAPRelators" Style="Text"/>) -- are permitted; <A>word</A> is checked
1115
for correct syntax via <C>PqParseWord</C> (see&nbsp;<Ref Func="PqParseWord" Style="Text"/>).
1116
</Item>
1117
1118
<Item>
1119
Otherwise, <A>word</A> must be a list of generator number, exponent pairs of
1120
integers, i.e.&nbsp; each pair represents a <Q>syllable</Q> so that <C>[ [3, 1],
1121
[2, 2], [1, 1] ]</C> represents the same word as that of the example given
1122
for the first allowed form of <A>word</A>.
1123
</Item>
1124
</Enum>
1125
1126
<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqCollect</C> performs
1127
menu item 1 of the Advanced <M>p</M>-Quotient menu.
1128
</Description>
1129
</ManSection>
1130
1131
<ManSection>
1132
<Func Name="PqSolveEquation" Arg="i, a, b"/>
1133
<Func Name="PqSolveEquation" Arg="a, b" Label="for default process"/>
1134
<Description>
1135
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1136
program 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 words
1137
in the pc generators. For the representation of these words see the
1138
description of the function <C>PqCollect</C> (<Ref Func="PqCollect" Style="Text"/>).
1139
<P/>
1140
1141
<E>Note:</E>
1142
For those familiar with the <C>pq</C> program, <C>PqSolveEquation</C> performs
1143
menu item 2 of the Advanced <M>p</M>-Quotient menu.
1144
</Description>
1145
</ManSection>
1146
1147
<ManSection>
1148
<Func Name="PqCommutator" Arg="i, words, pow"/>
1149
<Func Name="PqCommutator" Arg="words, pow" Label="for default process"/>
1150
<Description>
1151
for the <A>i</A>th or default interactive &ANUPQ; process, instruct the <C>pq</C>
1152
program to compute the left normed commutator of the list <A>words</A> of
1153
words in the current pc generators raised to the integer power <A>pow</A>, and
1154
return the resulting word as a list of generator number, exponent pairs.
1155
The form required for each word of <A>words</A> is the same as that required
1156
for the <A>word</A> argument of <C>PqCollect</C> (see&nbsp;<Ref Func="PqCollect" Style="Text"/>). The form of the
1157
output word is also the same as for <C>PqCollect</C>.
1158
<P/>
1159
1160
<E>Note:</E>
1161
For those familiar with the <C>pq</C> program, <C>PqCommutator</C> performs menu
1162
item 3 of the Advanced <M>p</M>-Quotient menu.
1163
</Description>
1164
</ManSection>
1165
1166
<ManSection>
1167
<Func Name="PqSetupTablesForNextClass" Arg="i"/>
1168
<Func Name="PqSetupTablesForNextClass" Arg="" Label="for default process"/>
1169
<Description>
1170
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1171
program to set up tables for the next class. As as side-effect,
1172
after <C>PqSetupTablesForNextClass(<A>i</A>)</C> the value returned by
1173
<C>PqPClass(<A>i</A>)</C> will be one more than it was previously.
1174
<P/>
1175
1176
<E>Note:</E>
1177
For those familiar with the <C>pq</C> program, <C>PqSetupTablesForNextClass</C>
1178
performs menu item 6 of the Advanced <M>p</M>-Quotient menu.
1179
</Description>
1180
</ManSection>
1181
1182
<ManSection>
1183
<Func Name="PqTails" Arg="i, weight"/>
1184
<Func Name="PqTails" Arg="weight" Label="for default process"/>
1185
<Description>
1186
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1187
program to compute and add tails of weight <A>weight</A> if <A>weight</A> is in the
1188
integer range <C>[2 .. PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the
1189
process, even in the default case) or for all weights if <C><A>weight</A> = 0</C>.
1190
<P/>
1191
1192
If <A>weight</A> is non-zero, then tails that introduce new generators for
1193
only weight <A>weight</A> are computed and added, and in this case and if
1194
<C><A>weight</A> &lt; PqPClass(<A>i</A>)</C>, it is assumed that the tails that introduce
1195
new generators for each weight from <C>PqPClass(<A>i</A>)</C> down to weight
1196
<C><A>weight</A> + 1</C> have already been added. You may wish to call
1197
<C>PqSetMetabelian</C> (see&nbsp;<Ref Func="PqSetMetabelian" Style="Text"/>) prior to calling <C>PqTails</C>.
1198
<P/>
1199
1200
<E>Notes</E>
1201
<P/>
1202
1203
For its use in the context of finding the next class see <Ref Func="PqNextClass" Style="Text"/>;
1204
in particular, a call to <C>PqSetupTablesForNextClass</C>
1205
(see&nbsp;<Ref Func="PqSetupTablesForNextClass" Style="Text"/>) needs to have been made prior to
1206
calling <C>PqTails</C>.
1207
<P/>
1208
1209
The single command: <C>PqTails(<A>i</A>, <A>weight</A>);</C> is equivalent to
1210
1211
<Listing><![CDATA[
1212
PqComputeTails(i, weight);
1213
PqAddTails(i, weight);
1214
]]></Listing>
1215
1216
For those familiar with the <C>pq</C> program, <C>PqTails</C> uses menu item 7 of
1217
the Advanced <M>p</M>-Quotient menu.
1218
</Description>
1219
</ManSection>
1220
1221
<ManSection>
1222
<Func Name="PqComputeTails" Arg="i, weight"/>
1223
<Func Name="PqComputeTails" Arg="weight" Label="for default process"/>
1224
<Description>
1225
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1226
program to compute tails of weight <A>weight</A> if <A>weight</A> is in the integer
1227
range <C>[2 .. PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the process,
1228
even in the default case) or for all weights if <C><A>weight</A> = 0</C>. See
1229
<C>PqTails</C> (<Ref Func="PqTails" Style="Text"/>) for more details.
1230
<P/>
1231
1232
<E>Note:</E>
1233
For those familiar with the <C>pq</C> program, <C>PqComputeTails</C> uses menu item
1234
7 of the Advanced <M>p</M>-Quotient menu.
1235
</Description>
1236
</ManSection>
1237
1238
<ManSection>
1239
<Func Name="PqAddTails" Arg="i, weight"/>
1240
<Func Name="PqAddTails" Arg="weight" Label="for default process"/>
1241
<Description>
1242
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1243
program to add the tails of weight <A>weight</A>, previously computed by
1244
<C>PqComputeTails</C> (see&nbsp;<Ref Func="PqComputeTails" Style="Text"/>), if <A>weight</A> is in the integer
1245
range <C>[2 .. PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the process,
1246
even in the default case) or for all weights if <C><A>weight</A> = 0</C>. See
1247
<C>PqTails</C> (<Ref Func="PqTails" Style="Text"/>) for more details.
1248
<P/>
1249
1250
<E>Note:</E>
1251
For those familiar with the <C>pq</C> program, <C>PqAddTails</C> uses menu item 7 of
1252
the Advanced <M>p</M>-Quotient menu.
1253
</Description>
1254
</ManSection>
1255
1256
<ManSection>
1257
<Func Name="PqDoConsistencyChecks" Arg="i, weight, type"/>
1258
<Func Name="PqDoConsistencyChecks" Arg="weight, type" Label="for default process"/>
1259
<Description>
1260
for the <A>i</A>th or default interactive &ANUPQ; process, do consistency
1261
checks for weight <A>weight</A> if <A>weight</A> is in the integer range <C>[3 ..
1262
PqPClass(<A>i</A>)]</C> (assuming <A>i</A> is the number of the process) or for all
1263
weights if <C><A>weight</A> = 0</C>, and for type <A>type</A> if <A>type</A> is in the range
1264
<C>[1, 2, 3]</C> (see below) or for all types if <C><A>type</A> = 0</C>. (For its use in
1265
the context of finding the next class see <Ref Func="PqNextClass" Style="Text"/>.)
1266
<P/>
1267
1268
The <E>type</E> of a consistency check is defined as follows.
1269
<C>PqDoConsistencyChecks(<A>i</A>, <A>weight</A>, <A>type</A>)</C> for <A>weight</A> in <C>[3 ..
1270
PqPClass(<A>i</A>)]</C> and the given value of <A>type</A> invokes the equivalent of
1271
the following <C>PqDoConsistencyCheck</C> calls (see&nbsp;<Ref Func="PqDoConsistencyCheck" Style="Text"/>):
1272
1273
<List>
1274
<Mark><C><A>type</A> = 1</C>:</Mark>
1275
<Item>
1276
<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>)
1277
+ 1 = <A>weight</A></C>, for pc generators of index <A>a</A>.
1278
</Item>
1279
<Mark><C><A>type</A> = 2</C>:</Mark>
1280
<Item>
1281
<C>PqDoConsistencyCheck(<A>i</A>, <A>b</A>, <A>b</A>, <A>a</A>)</C> checks for pc generators of
1282
indices <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>) +
1283
PqWeight(<A>i</A>, <A>a</A>) + 1 = <A>weight</A></C>.
1284
</Item>
1285
<Mark><C><A>type</A> = 3</C>:</Mark>
1286
<Item>
1287
<C>PqDoConsistencyCheck(<A>i</A>, <A>c</A>, <A>b</A>, <A>a</A>)</C> checks for pc generators of
1288
indices <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 the
1289
weights of these generators equals <A>weight</A>.
1290
</Item>
1291
</List>
1292
1293
1294
<E>Notes</E>
1295
<P/>
1296
1297
<C>PqWeight(<A>i</A>, <A>j</A>)</C> returns the weight of the <A>j</A>th pc generator, for
1298
process <A>i</A> (see&nbsp;<Ref Func="PqWeight" Style="Text"/>).
1299
<P/>
1300
1301
It is assumed that tails for the given weight (or weights) have already
1302
been added (see&nbsp;<Ref Func="PqTails" Style="Text"/>).
1303
<P/>
1304
1305
For those familiar with the <C>pq</C> program, <C>PqDoConsistencyChecks</C> performs
1306
menu item 8 of the Advanced <M>p</M>-Quotient menu.
1307
</Description>
1308
</ManSection>
1309
1310
<ManSection>
1311
<Func Name="PqCollectDefiningRelations" Arg="i"/>
1312
<Func Name="PqCollectDefiningRelations" Arg="" Label="for default process"/>
1313
<Description>
1314
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1315
program to collect the images of the defining relations of the original fp
1316
group of the process, with respect to the current pc presentation, in the
1317
context of finding the next class (see&nbsp;<Ref Func="PqNextClass" Style="Text"/>). If the tails
1318
operation is not complete then the relations may be evaluated
1319
incorrectly.
1320
<P/>
1321
1322
<E>Note:</E>
1323
For those familiar with the <C>pq</C> program, <C>PqCollectDefiningRelations</C>
1324
performs menu item 9 of the Advanced <M>p</M>-Quotient menu.
1325
</Description>
1326
</ManSection>
1327
1328
<ManSection>
1329
<Func Name="PqCollectWordInDefiningGenerators" Arg="i, word"/>
1330
<Func Name="PqCollectWordInDefiningGenerators" Arg="word" Label="for default process"/>
1331
<Description>
1332
for the <A>i</A>th or default interactive &ANUPQ; process, take a
1333
user-defined word <A>word</A> in the defining generators of the original
1334
presentation of the fp or pc group of the process. Each generator is
1335
mapped into the current pc presentation, and the resulting word is
1336
collected with respect to the current pc presentation. The result of the
1337
collection is returned as a list of generator number, exponent pairs.
1338
<P/>
1339
1340
The <A>word</A> argument may be input in either of the two ways described for
1341
<C>PqCollect</C> (see&nbsp;<Ref Func="PqCollect" Style="Text"/>).
1342
<P/>
1343
1344
<E>Note:</E>
1345
For those familiar with the <C>pq</C> program, <C>PqCollectDefiningGenerators</C>
1346
performs menu item 23 of the Advanced <M>p</M>-Quotient menu.
1347
</Description>
1348
</ManSection>
1349
1350
<ManSection>
1351
<Func Name="PqCommutatorDefiningGenerators" Arg="i, words, pow"/>
1352
<Func Name="PqCommutatorDefiningGenerators" Arg="words, pow" Label="for default process"/>
1353
<Description>
1354
for the <A>i</A>th or default interactive &ANUPQ; process, take a list
1355
<A>words</A> of user-defined words in the defining generators of the original
1356
presentation of the fp or pc group of the process, and an integer power
1357
<A>pow</A>. Each generator is mapped into the current pc presentation. The
1358
list <A>words</A> is interpreted as a left-normed commutator which is then
1359
raised to <A>pow</A> and collected with respect to the current pc
1360
presentation. The result of the collection is returned as a list of
1361
generator number, exponent pairs.
1362
<P/>
1363
1364
<E>Note</E>
1365
For those familiar with the <C>pq</C> program, <C>PqCommutatorDefiningGenerators</C>
1366
performs menu item 24 of the Advanced <M>p</M>-Quotient menu.
1367
</Description>
1368
</ManSection>
1369
1370
<ManSection>
1371
<Func Name="PqDoExponentChecks" Arg="i : [ Bounds := list ]"/>
1372
<Func Name="PqDoExponentChecks" Arg=": [ Bounds := list ]" Label="for default process"/>
1373
<Description>
1374
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1375
program to do exponent checks for weights (inclusively) between the bounds
1376
of <C>Bounds</C> or for all weights if <C>Bounds</C> is not given. The value <A>list</A>
1377
of <C>Bounds</C> (assuming the interactive process is numbered <A>i</A>) should be a
1378
list of two integers <A>low</A>, <A>high</A> satisfying
1379
<!-- FIXME: hack to move C outside of M -->
1380
<M>1 \le <A>low</A> \le <A>high</A> \le </M>
1381
<C>PqPClass(<A>i</A>)</C> (see&nbsp;<Ref Func="PqPClass" Style="Text"/>). If no exponent law has been specified,
1382
no exponent checks are performed.
1383
<P/>
1384
1385
<E>Note:</E>
1386
For those familiar with the <C>pq</C> program, <C>PqDoExponentChecks</C> performs
1387
menu item 10 of the Advanced <M>p</M>-Quotient menu.
1388
</Description>
1389
</ManSection>
1390
1391
<ManSection>
1392
<Func Name="PqEliminateRedundantGenerators" Arg="i"/>
1393
<Func Name="PqEliminateRedundantGenerators" Arg="" Label="for default process"/>
1394
<Description>
1395
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1396
program to eliminate redundant generators of the current <M>p</M>-quotient.
1397
<P/>
1398
1399
<E>Note:</E>
1400
For those familiar with the <C>pq</C> program, <C>PqEliminateRedundantGenerators</C>
1401
performs menu item 11 of the Advanced <M>p</M>-Quotient menu.
1402
</Description>
1403
</ManSection>
1404
1405
<ManSection>
1406
<Func Name="PqRevertToPreviousClass" Arg="i"/>
1407
<Func Name="PqRevertToPreviousClass" Arg="" Label="for default process"/>
1408
<Description>
1409
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1410
program to abandon the current class and revert to the previous class.
1411
<P/>
1412
1413
<E>Note:</E>
1414
For those familiar with the <C>pq</C> program, <C>PqRevertToPreviousClass</C>
1415
performs menu item 12 of the Advanced <M>p</M>-Quotient menu.
1416
</Description>
1417
</ManSection>
1418
1419
<ManSection>
1420
<Func Name="PqSetMaximalOccurrences" Arg="i, noccur"/>
1421
<Func Name="PqSetMaximalOccurrences" Arg="noccur" Label="for default process"/>
1422
<Description>
1423
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1424
program to set maximal occurrences of the weight 1 generators in the
1425
definitions of pcp generators of the group of the process. This can be
1426
used to avoid the definition of generators of which one knows for
1427
theoretical reasons that they would be eliminated later on.
1428
<P/>
1429
1430
The argument <A>noccur</A> must be a list of non-negative integers of length
1431
the number of weight 1 generators (i.e.&nbsp;the rank of the class 1
1432
<M>p</M>-quotient of the group of the process). An entry of <C>0</C> for a
1433
particular generator indicates that there is no limit on the number of
1434
occurrences for the generator.
1435
<P/>
1436
1437
<E>Note:</E>
1438
For those familiar with the <C>pq</C> program, <C>PqSetMaximalOccurrences</C>
1439
performs menu item 13 of the Advanced <M>p</M>-Quotient menu.
1440
</Description>
1441
</ManSection>
1442
1443
<ManSection>
1444
<Func Name="PqSetMetabelian" Arg="i"/>
1445
<Func Name="PqSetMetabelian" Arg="" Label="for default process"/>
1446
<Description>
1447
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1448
program to enforce metabelian-ness.
1449
<P/>
1450
1451
<E>Note:</E>
1452
For those familiar with the <C>pq</C> program, <C>PqSetMetabelian</C> performs
1453
menu item 14 of the Advanced <M>p</M>-Quotient menu.
1454
</Description>
1455
</ManSection>
1456
1457
<ManSection>
1458
<Func Name="PqDoConsistencyCheck" Arg="i, c, b, a"/>
1459
<Func Name="PqDoConsistencyCheck" Arg="c, b, a" Label="for default process"/>
1460
<Func Name="PqJacobi" Arg="i, c, b, a"/>
1461
<Func Name="PqJacobi" Arg="c, b, a" Label="for default process"/>
1462
<Description>
1463
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1464
program to do the consistency check for the pc generators with indices
1465
<A>c</A>, <A>b</A>, <A>a</A> which should be non-increasing positive integers, i.e.&nbsp;<M><A>c</A>
1466
\ge <A>b</A> \ge <A>a</A></M>.
1467
<P/>
1468
1469
There are 3 types of consistency checks:
1470
<Display>
1471
\begin{array}{rclrl}
1472
(a^n)a &amp;=&amp; a(a^n) &amp;&amp; {\rm (Type\ 1)} \\
1473
(b^n)a &amp;=&amp; b^{(n-1)}(ba), b(a^n) = (ba)a^{(n-1)} &amp;&amp; {\rm (Type\ 2)} \\
1474
c(ba) &amp;=&amp; (cb)a &amp;&amp; {\rm (Type\ 3)} \\
1475
\end{array}
1476
</Display>
1477
The reason some people talk about Jacobi relations instead of consistency
1478
checks becomes clear when one looks at the consistency check of type 3:
1479
<Display>
1480
\begin{array}{rcl}
1481
c(ba) &amp;=&amp; a c[c,a] b[b,a] = acb [c,a][c,a,b][b,a] = \dots \\
1482
(cb)a &amp;=&amp; b c[c,b] a = a b[b,a] c[c,a] [c,b][c,b,a] \\
1483
&amp;=&amp; abc [b,a] [b,a,c] [c,a] [c,b] [c,b,a] = \dots \\
1484
\end{array}
1485
</Display>
1486
Each collection would normally carry on further. But one can see
1487
already that no other commutators of weight 3 will occur. After all terms
1488
of weight one and weight two have been moved to the left we end up with:
1489
<Display>
1490
\begin{array}{rcl}
1491
&amp; &amp;abc [b,a] [c,a] [c,b] [c,a,b] \dots \\
1492
&amp;=&amp;abc [b,a] [c,a] [c,b] [c,b,a] [b,a,c] \dots \\
1493
\end{array}
1494
</Display>
1495
Modulo terms of weight 4 this is equivalent to
1496
<Display>
1497
[c,a,b] [b,c,a] [a,b,c] = 1
1498
</Display>
1499
which is the Jacobi identity.
1500
<P/>
1501
1502
See also <C>PqDoConsistencyChecks</C> (<Ref Func="PqDoConsistencyChecks" Style="Text"/>).
1503
<P/>
1504
1505
<E>Note:</E>
1506
For those familiar with the <C>pq</C> program, <C>PqDoConsistencyCheck</C> and
1507
<C>PqJacobi</C> perform menu item 15 of the Advanced <M>p</M>-Quotient menu.
1508
</Description>
1509
</ManSection>
1510
1511
<ManSection>
1512
<Func Name="PqCompact" Arg="i"/>
1513
<Func Name="PqCompact" Arg="" Label="for default process"/>
1514
<Description>
1515
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1516
program to do a compaction of its work space. This function is safe to
1517
perform only at certain points in time.
1518
<P/>
1519
1520
<E>Note:</E>
1521
For those familiar with the <C>pq</C> program, <C>PqCompact</C> performs menu item
1522
16 of the Advanced <M>p</M>-Quotient menu.
1523
</Description>
1524
</ManSection>
1525
1526
<ManSection>
1527
<Func Name="PqEchelonise" Arg="i"/>
1528
<Func Name="PqEchelonise" Arg="" Label="for default process"/>
1529
<Description>
1530
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1531
program to echelonise the word most recently collected by <C>PqCollect</C> or
1532
<C>PqCommutator</C> against the relations of the current pc presentation, and
1533
return the number of the generator made redundant or <K>fail</K> if no
1534
generator was made redundant. A call to <C>PqCollect</C> (see&nbsp;<Ref Func="PqCollect" Style="Text"/>) or
1535
<C>PqCommutator</C> (see&nbsp;<Ref Func="PqCommutator" Style="Text"/>) needs to be performed prior to using
1536
this command.
1537
<P/>
1538
1539
<E>Note:</E>
1540
For those familiar with the <C>pq</C> program, <C>PqEchelonise</C> performs menu
1541
item 17 of the Advanced <M>p</M>-Quotient menu.
1542
</Description>
1543
</ManSection>
1544
1545
<ManSection>
1546
<Func Name="PqSupplyAutomorphisms" Arg="i, mlist"/>
1547
<Func Name="PqSupplyAutomorphisms" Arg="mlist" Label="for default process"/>
1548
<Description>
1549
for the <A>i</A>th or default interactive &ANUPQ; process, supply the
1550
automorphism data provided by the list <A>mlist</A> of matrices with
1551
non-negative integer coefficients. Each matrix in <A>mlist</A> describes one
1552
automorphism in the following way.
1553
1554
<List>
1555
<Item>
1556
The rows of each matrix correspond to the pc generators of
1557
weight one.
1558
</Item>
1559
<Item>
1560
Each row is the exponent vector of the image of the
1561
corresponding weight one generator under the respective automorphism.
1562
</Item>
1563
</List>
1564
1565
<E>Note:</E>
1566
For those familiar with the <C>pq</C> program, <C>PqSupplyAutomorphisms</C> uses
1567
menu item 18 of the Advanced <M>p</M>-Quotient menu.
1568
</Description>
1569
</ManSection>
1570
1571
<ManSection>
1572
<Func Name="PqExtendAutomorphisms" Arg="i"/>
1573
<Func Name="PqExtendAutomorphisms" Arg="" Label="for default process"/>
1574
<Description>
1575
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1576
program to extend automorphisms of the <M>p</M>-quotient of the previous class
1577
to the <M>p</M>-quotient of the present class.
1578
<P/>
1579
1580
<E>Note:</E>
1581
For those familiar with the <C>pq</C> program, <C>PqExtendAutomorphisms</C> uses
1582
menu item 18 of the Advanced <M>p</M>-Quotient menu.
1583
</Description>
1584
</ManSection>
1585
1586
<ManSection>
1587
<Func Name="PqApplyAutomorphisms" Arg="i, qfac"/>
1588
<Func Name="PqApplyAutomorphisms" Arg="qfac" Label="for default process"/>
1589
<Description>
1590
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1591
program to apply automorphisms; <A>qfac</A> is the queue factor e.g. <C>15</C>.
1592
<P/>
1593
1594
<E>Note:</E>
1595
For those familiar with the <C>pq</C> program, <C>PqCloseRelations</C> performs
1596
menu item 19 of the Advanced <M>p</M>-Quotient menu.
1597
</Description>
1598
</ManSection>
1599
1600
<ManSection>
1601
<Func Name="PqDisplayStructure" Arg="i : [ Bounds := list ]"/>
1602
<Func Name="PqDisplayStructure" Arg=": [ Bounds := list ]" Label="for default process"/>
1603
<Description>
1604
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1605
program to display the structure for the pcp generators numbered
1606
(inclusively) between the bounds of <C>Bounds</C> or for all generators if
1607
<C>Bounds</C> is not given. The value <A>list</A> of <C>Bounds</C> (assuming the
1608
interactive process is numbered <A>i</A>) should be a list of two integers
1609
<!-- FIXME: hack to move C outside of M -->
1610
<A>low</A>, <A>high</A> satisfying <M>1 \le <A>low</A> \le <A>high</A> \le </M>
1611
<C>PqNrPcGenerators(<A>i</A>)</C> (see&nbsp;<Ref Func="PqNrPcGenerators" Style="Text"/>). <C>PqDisplayStructure</C>
1612
also accepts the option <C>OutputLevel</C> (see <Ref Label="option OutputLevel" Style="Text"/>).
1613
<P/>
1614
1615
<E>Explanation of output</E>
1616
<P/>
1617
1618
New generators are defined as commutators of previous generators and
1619
generators of class 1 or as <M>p</M>-th powers of generators that have
1620
themselves been defined as <M>p</M>-th powers. A generator is never defined as
1621
<M>p</M>-th power of a commutator.
1622
<P/>
1623
1624
Therefore, there are two cases: all the numbers on the righthand side are
1625
either the same or they differ. Below, <C>g<A>i</A></C> refers to the <A>i</A>th
1626
defining generator.
1627
1628
<List>
1629
<Item>
1630
If the righthand side numbers are all the same, then the generator is a
1631
<M>p</M>-th power (of a <M>p</M>-th power of a <M>p</M>-th power, etc.). The number of
1632
repeated digits say how often a <M>p</M>-th power has to be taken.
1633
<P/>
1634
1635
In the following example, the generator number 31 is the eleventh power
1636
of generator 17 which in turn is an eleventh power and so on:
1637
<P/>
1638
1639
\begintt
1640
#I 31 is defined on 17^11 = 1 1 1 1 1
1641
\endtt
1642
1643
So generator 31 is obtained by taking the eleventh power of generator 1
1644
five times.
1645
</Item>
1646
<Item>
1647
1648
If the numbers are not all the same, the generator is defined by a
1649
commutator. If the first two generator numbers differ, the generator is
1650
defined as a left-normed commutator of the weight one generators, e.g.
1651
<P/>
1652
1653
\begintt
1654
#I 19 is defined on [11, 1] = 2 1 1 1 1
1655
\endtt
1656
1657
Here, generator 19 is defined as the commutator of generator 11 and
1658
generator 1 which is the same as the left-normed commutator
1659
<C>[x2, x1, x1, x1, x1]</C>. One can check this by tracing back the definition
1660
of generator 11 until one gets to a generator of class 1.
1661
</Item>
1662
<Item>
1663
1664
If the first two generator numbers are identical, then the left most
1665
component of the left-normed commutator is a <M>p</M>-th power, e.g.
1666
<P/>
1667
1668
\begintt
1669
#I 25 is defined on [14, 1] = 1 1 2 1 1
1670
\endtt
1671
<P/>
1672
1673
In this example, generator 25 is defined as commutator of generator 14
1674
and generator 1. The left-normed commutator is
1675
<Display>
1676
[(x1^{11})^{11}, x2, x1, x1]
1677
</Display>
1678
Again, this can be verified by tracing back the definitions.
1679
</Item>
1680
</List>
1681
1682
<E>Note:</E>
1683
For those familiar with the <C>pq</C> program, <C>PqDisplayStructure</C> performs
1684
menu item 20 of the Advanced <M>p</M>-Quotient menu.
1685
</Description>
1686
</ManSection>
1687
1688
<ManSection>
1689
<Func Name="PqDisplayAutomorphisms" Arg="i : [ Bounds := list ]"/>
1690
<Func Name="PqDisplayAutomorphisms" Arg=": [ Bounds := list ]" Label="for default process"/>
1691
<Description>
1692
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1693
program to display the automorphism actions on the pcp generators numbered
1694
(inclusively) between the bounds of <C>Bounds</C> or for all generators if
1695
<C>Bounds</C> is not given. The value <A>list</A> of <C>Bounds</C> (assuming the
1696
interactive process is numbered <A>i</A>) should be a list of two integers
1697
<!-- FIXME: hack to move C outside of M -->
1698
<A>low</A>, <A>high</A> satisfying <M>1 \le <A>low</A> \le <A>high</A> \le </M>
1699
<C>PqNrPcGenerators(<A>i</A>)</C> (see&nbsp;<Ref Func="PqNrPcGenerators" Style="Text"/>). <C>PqDisplayStructure</C>
1700
also accepts the option <C>OutputLevel</C> (see <Ref Label="option OutputLevel" Style="Text"/>).
1701
<P/>
1702
1703
<E>Note:</E>
1704
For those familiar with the <C>pq</C> program, <C>PqDisplayAutomorphisms</C>
1705
performs menu item 21 of the Advanced <M>p</M>-Quotient menu.
1706
</Description>
1707
</ManSection>
1708
1709
<ManSection>
1710
<Func Name="PqWritePcPresentation" Arg="i, filename"/>
1711
<Func Name="PqWritePcPresentation" Arg="filename" Label="for default process"/>
1712
<Description>
1713
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1714
program to write a pc presentation of a previously-computed quotient of
1715
the group of that process, to the file with name <A>filename</A>. Here the
1716
group of a process is the one given as first argument when <C>PqStart</C> was
1717
called to initiate that process (for process <A>i</A> the group is stored as
1718
<C>ANUPQData.io[<A>i</A>].group</C>). If the first character of the string
1719
<A>filename</A> is not <C>/</C>, <A>filename</A> is assumed to be the path of a writable
1720
file relative to the directory in which &GAP; was started. If a pc
1721
presentation has not been previously computed by the <C>pq</C> program, then
1722
<C>pq</C> is called to compute it first, effectively invoking
1723
<C>PqPcPresentation</C> (see&nbsp;<Ref Func="PqPcPresentation" Style="Text"/>).
1724
<P/>
1725
1726
<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqPcWritePresentation</C>
1727
performs menu item 25 of the Advanced <M>p</M>-Quotient menu.
1728
<P/>
1729
1730
<!-- %We may include this in the future. -->
1731
<!-- %\>PqWriteCompactDescription( <A>i</A> ) F -->
1732
<!-- %\>PqWriteCompactDescription() F -->
1733
<!-- % -->
1734
<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->
1735
<!-- %program to write a compact description -->
1736
<!-- % -->
1737
<!-- %<E>OF ....</E> -->
1738
<!-- % -->
1739
<!-- %to a file. -->
1740
<!-- % -->
1741
<!-- %<E>Note:</E> -->
1742
<!-- %For those familiar with the <C>pq</C> program, <C>PqWriteCompactDescription</C> -->
1743
<!-- %performs menu item 26 of the Advanced <M>p</M>-Quotient menu. -->
1744
</Description>
1745
</ManSection>
1746
1747
</Section>
1748
1749
<Section><Heading>Commands from the Standard Presentation menu</Heading>
1750
1751
<ManSection>
1752
<Func Name="PqSPComputePcpAndPCover" Arg="i : options"/>
1753
<Func Name="PqSPComputePcpAndPCover" Arg=": options" Label="for default process"/>
1754
<Description>
1755
for the <A>i</A>th or default interactive &ANUPQ; process, directs the <C>pq</C>
1756
program to compute for the group of that process a pc presentation up to
1757
the <M>p</M>-quotient of maximum class or the value of the option <C>ClassBound</C>
1758
and the <M>p</M>-cover of that quotient, and sets up tabular information
1759
required for computation of a standard presentation. Here the group of a
1760
process is the one given as first argument when <C>PqStart</C> was called to
1761
initiate that process (for process <A>i</A> the group is stored as
1762
<C>ANUPQData.io[<A>i</A>].group</C>).
1763
<P/>
1764
1765
The possible <A>options</A> are <C>Prime</C>, <C>ClassBound</C>, <C>Relators</C>, <C>Exponent</C>,
1766
<C>Metabelian</C> and <C>OutputLevel</C> (see Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/> for detailed
1767
descriptions of these options). The option <C>Prime</C> is normally determined
1768
via <C>PrimePGroup</C>, and so is not required unless the group doesn't know
1769
it's a <M>p</M>-group and <C>HasPrimePGroup</C> returns <K>false</K>.
1770
<P/>
1771
1772
<E>Note:</E>
1773
For those familiar with the <C>pq</C> program, <C>PqSPComputePcpAndPCover</C>
1774
performs option 1 of the Standard Presentation menu.
1775
</Description>
1776
</ManSection>
1777
1778
<ManSection>
1779
<Func Name="PqSPStandardPresentation" Arg="i[, mlist] : [ options]"/>
1780
<Func Name="PqSPStandardPresentation" Arg="[mlist] : [ options]" Label="for default process"/>
1781
<Description>
1782
for the <A>i</A>th or default interactive &ANUPQ; process, inputs data given
1783
by <A>options</A> to compute a standard presentation for the group of that
1784
process. If argument <A>mlist</A> is given it is assumed to be the
1785
automorphism group data required. Otherwise it is assumed that a call to
1786
either <C>Pq</C> (see&nbsp;<Ref Func="Pq" Label="interactive" Style="Text"/>) or <C>PqEpimorphism</C>
1787
(see&nbsp;<Ref Func="PqEpimorphism" Label="interactive" Style="Text"/>) has generated a <M>p</M>-quotient and that
1788
&GAP; can compute its automorphism group from which the necessary
1789
automorphism group data can be derived. The group of the process is the
1790
one given as first argument when <C>PqStart</C> was called to initiate the
1791
process (for process <A>i</A> the group is stored as <C>ANUPQData.io[<A>i</A>].group</C>
1792
and the <M>p</M>-quotient if existent is stored as
1793
<C>ANUPQData.io[<A>i</A>].pQuotient</C>). If <A>mlist</A> is not given and a
1794
<M>p</M>-quotient of the group has not been previously computed a class 1
1795
<M>p</M>-quotient is computed.
1796
<P/>
1797
1798
<C>PqSPStandardPresentation</C> accepts three options, all optional:
1799
1800
<List>
1801
<Item>
1802
<C>ClassBound := <A>n</A></C><Index>option ClassBound</Index>
1803
</Item>
1804
<Item>
1805
<C>PcgsAutomorphisms</C><Index>option PcgsAutomorphisms</Index>
1806
</Item>
1807
<Item>
1808
<C>StandardPresentationFile := <A>filename</A></C><Index>option StandardPresentationFile</Index>
1809
</Item>
1810
</List>
1811
1812
If <C>ClassBound</C> is omitted it defaults to 63.
1813
<P/>
1814
1815
Detailed descriptions of the above options may be found in Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/>.
1816
<P/>
1817
1818
<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSPPcPresentation</C>
1819
performs menu item 2 of the Standard Presentation menu.
1820
</Description>
1821
</ManSection>
1822
1823
<ManSection>
1824
<Func Name="PqSPSavePresentation" Arg="i, filename"/>
1825
<Func Name="PqSPSavePresentation" Arg="filename" Label="for default process"/>
1826
<Description>
1827
for the <A>i</A>th or default interactive &ANUPQ; process, directs the <C>pq</C>
1828
program to save the standard presentation previously computed for the
1829
group of that process to the file with name <A>filename</A>, where the group
1830
of a process is the one given as first argument when <C>PqStart</C> was called
1831
to initiate that process. If the first character of the string <A>filename</A>
1832
is not <C>/</C>, <A>filename</A> is assumed to be the path of a writable file
1833
relative to the directory in which &GAP; was started.
1834
<P/>
1835
1836
<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSPSavePresentation</C>
1837
performs menu item 3 of the Standard Presentation menu.
1838
</Description>
1839
</ManSection>
1840
1841
<ManSection>
1842
<Func Name="PqSPCompareTwoFilePresentations" Arg="i, f1, f2"/>
1843
<Func Name="PqSPCompareTwoFilePresentations" Arg="f1, f2" Label="for default process"/>
1844
<Description>
1845
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1846
program to compare the presentations in the files with names <A>f1</A> and <A>f2</A>
1847
and returns <K>true</K> if they are identical and <K>false</K> otherwise. For each
1848
of the strings <A>f1</A> and <A>f2</A>, if the first character is not a <C>/</C> then it
1849
is assumed to be the path of a readable file relative to the directory in
1850
which &GAP; was started.
1851
<P/>
1852
1853
<E>Notes</E>
1854
<P/>
1855
1856
The presentations in files <A>f1</A> and <A>f2</A> must have been generated by the
1857
<C>pq</C> program but they do <E>not</E> need to be <E>standard</E> presentations. If If
1858
the presentations in files <A>f1</A> and <A>f2</A> <E>have</E> been generated by
1859
<C>PqSPStandardPresentation</C> (see&nbsp;<Ref Func="PqSPStandardPresentation" Style="Text"/>) then a
1860
<K>false</K> response from <C>PqSPCompareTwoFilePresentations</C> says the groups
1861
defined by those presentations are <E>not</E> isomorphic.
1862
<P/>
1863
1864
For those familiar with the <C>pq</C> program,
1865
<C>PqSPCompareTwoFilePresentations</C> performs menu item 6 of the Standard
1866
Presentation menu.
1867
</Description>
1868
</ManSection>
1869
1870
<ManSection>
1871
<Func Name="PqSPIsomorphism" Arg="i"/>
1872
<Func Name="PqSPIsomorphism" Arg="" Label="for default process"/>
1873
<Description>
1874
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1875
program to compute the isomorphism mapping from the <M>p</M>-group of the
1876
process to its standard presentation. This function provides a
1877
description only; for a &GAP; object, use
1878
<C>EpimorphismStandardPresentation</C>
1879
(see&nbsp;<Ref Func="EpimorphismStandardPresentation" Label="interactive" Style="Text"/>).
1880
<P/>
1881
1882
<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqSPIsomorphism</C>
1883
performs menu item 8 of the Standard Presentation menu.
1884
</Description>
1885
</ManSection>
1886
1887
</Section>
1888
1889
<Section><Heading>Commands from the Main <M>p</M>-Group Generation menu</Heading>
1890
1891
Note that the <M>p</M>-group generation commands can only be applied once the
1892
<C>pq</C> program has produced a pc presentation of some quotient group of the
1893
<Q>group of the process</Q>.
1894
1895
<ManSection>
1896
<Func Name="PqPGSupplyAutomorphisms" Arg="i[, mlist] : options"/>
1897
<Func Name="PqPGSupplyAutomorphisms" Arg="[mlist] : options" Label="for default process"/>
1898
<Description>
1899
for the <A>i</A>th or default interactive &ANUPQ; process, supply the <C>pq</C>
1900
program with the automorphism group data needed for the current quotient
1901
of the group of that process (for process <A>i</A> the group is stored as
1902
<C>ANUPQData.io[<A>i</A>].group</C>). For a description of the format of <A>mlist</A>
1903
see&nbsp;<Ref Func="PqSupplyAutomorphisms" Style="Text"/>. The options possible are
1904
<C>NumberOfSolubleAutomorphisms</C> and <C>RelativeOrders</C>. (Detailed
1905
descriptions of these options may be found in Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/>.)
1906
<P/>
1907
1908
If <A>mlist</A> is omitted, the automorphism data is determined from the group
1909
of the process which must have been a <M>p</M>-group in pc presentation.
1910
<P/>
1911
1912
<E>Note:</E>
1913
For those familiar with the <C>pq</C> program, <C>PqPGSupplyAutomorphisms</C>
1914
performs menu item 1 of the main <M>p</M>-Group Generation menu.
1915
</Description>
1916
</ManSection>
1917
1918
<ManSection>
1919
<Func Name="PqPGExtendAutomorphisms" Arg="i"/>
1920
<Func Name="PqPGExtendAutomorphisms" Arg="" Label="for default process"/>
1921
<Description>
1922
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1923
program to compute the extensions of the automorphisms of the
1924
<M>p</M>-quotient of the previous class to the <M>p</M>-quotient of the current
1925
class. You may wish to set the <C>InfoLevel</C> of <C>InfoANUPQ</C> to 2 (or more)
1926
in order to see the output from the <C>pq</C> program (see&nbsp;<Ref Func="InfoANUPQ" Style="Text"/>).
1927
<P/>
1928
1929
<E>Note:</E>
1930
For those familiar with the <C>pq</C> program, <C>PqPGExtendAutomorphisms</C>
1931
performs menu item 2 of the main or advanced <M>p</M>-Group Generation menu.
1932
</Description>
1933
</ManSection>
1934
1935
<ManSection>
1936
<Func Name="PqPGConstructDescendants" Arg="i : options"/>
1937
<Func Name="PqPGConstructDescendants" Arg=": options" Label="for default process"/>
1938
<Description>
1939
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1940
program to construct descendants prescribed by <A>options</A>, and return the
1941
number of descendants constructed (compare function&nbsp;<Ref Func="PqDescendants" Style="Text"/> which
1942
returns the list of descendants). The options possible are <C>ClassBound</C>,
1943
<C>OrderBound</C>, <C>StepSize</C>, <C>PcgsAutomorphisms</C>,
1944
<C>RankInitialSegmentSubgroups</C>, <C>SpaceEfficient</C>, <C>CapableDescendants</C>,
1945
<C>AllDescendants</C>, <C>Exponent</C>, <C>Metabelian</C>, <C>BasicAlgorithm</C>,
1946
<C>CustomiseOutput</C>. (Detailed descriptions of these options may be found
1947
in Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/>.)
1948
<P/>
1949
1950
<C>PqPGConstructDescendants</C> requires that the <C>pq</C> program has previously
1951
computed a pc presentation and a <M>p</M>-cover for a <M>p</M>-quotient of some
1952
class of the group of the process.
1953
<P/>
1954
1955
<E>Note:</E>
1956
For those familiar with the <C>pq</C> program, <C>PqPGConstructDescendants</C>
1957
performs menu item 5 of the main <M>p</M>-Group Generation menu.
1958
</Description>
1959
</ManSection>
1960
1961
<ManSection>
1962
<Func Name="PqPGSetDescendantToPcp" Arg="i, cls, n" Label="with class"/>
1963
<Func Name="PqPGSetDescendantToPcp" Arg="cls, n" Label="with class, for default process"/>
1964
<Func Name="PqPGSetDescendantToPcp" Arg="i : [ Filename := name ]"/>
1965
<Func Name="PqPGSetDescendantToPcp" Arg=": [ Filename := name ]" Label="for default process"/>
1966
<Func Name="PqPGRestoreDescendantFromFile" Arg="i, cls, n" Label="with class"/>
1967
<Func Name="PqPGRestoreDescendantFromFile" Arg="cls, n" Label="with class, for default process"/>
1968
<Func Name="PqPGRestoreDescendantFromFile" Arg="i : [ Filename := name ]"/>
1969
<Func Name="PqPGRestoreDescendantFromFile" Arg=": [ Filename := name ]" Label="for default process"/>
1970
<Description>
1971
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
1972
program to restore group <A>n</A> of class <A>cls</A> from a temporary file, where
1973
<A>cls</A> and <A>n</A> are positive integers, or the group stored in <A>name</A>.
1974
<C>PqPGSetDescendantToPcp</C> and <C>PqPGRestoreDescendantFromFile</C> are
1975
synonyms; they make sense only after a prior call to construct
1976
descendants by say <C>PqPGConstructDescendants</C>
1977
(see&nbsp;<Ref Func="PqPGConstructDescendants" Style="Text"/>) or the interactive <C>PqDescendants</C>
1978
(see&nbsp;<Ref Func="PqDescendants" Label="interactive" Style="Text"/>). In the <C>Filename</C> option forms, the
1979
option defaults to the last filename in which a presentation was stored
1980
by the <C>pq</C> program.
1981
<P/>
1982
1983
<E>Notes</E>
1984
<P/>
1985
1986
Since the <C>PqPGSetDescendantToPcp</C> and <C>PqPGRestoreDescendantFromFile</C>
1987
are intended to be used in calculation of further descendants the <C>pq</C>
1988
program computes the <M>p</M>-cover of the restored descendant. Hence,
1989
<C>PqCurrentGroup</C> used immediately after one of these commands returns the
1990
<M>p</M>-cover of the restored descendant rather than the descendant itself.
1991
<P/>
1992
1993
For those familiar with the <C>pq</C> program, <C>PqPGSetDescendantToPcp</C> and
1994
<C>PqPGRestoreDescendantFromFile</C> perform menu item 3 of the main or
1995
advanced <M>p</M>-Group Generation menu.
1996
</Description>
1997
</ManSection>
1998
1999
</Section>
2000
2001
<Section><Heading>Commands from the Advanced <M>p</M>-Group Generation menu</Heading>
2002
2003
The functions below perform the component algorithms of
2004
<C>PqPGConstructDescendants</C> (see&nbsp;<Ref Func="PqPGConstructDescendants" Style="Text"/>). You can get
2005
some idea of their usage by trying <C>PqExample("Nott-APG-Rel-i");</C>. You
2006
can get some idea of the breakdown of <C>PqPGConstructDescendants</C> into
2007
these functions by comparing the previous output with
2008
<C>PqExample("Nott-PG-Rel-i");</C>.
2009
<P/>
2010
2011
These functions are intended for use only by <Q>experts</Q>; please contact
2012
the authors of the package if you genuinely have a need for them and need
2013
any amplified descriptions.
2014
2015
<ManSection>
2016
<Func Name="PqAPGDegree" Arg="i, step, rank : [ Exponent := n ]"/>
2017
<Func Name="PqAPGDegree" Arg="step, rank : [ Exponent := n ]" Label="for default process"/>
2018
<Description>
2019
<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->
2020
<!-- %program to compute definition sets and return the degree of the -->
2021
<!-- %permutation group. Here the step-size <A>step</A> and the rank <A>rank</A> of the -->
2022
<!-- %initial segment subgroup are positive integers. See&nbsp;<Ref Label="option Exponent" Style="Text"/> for -->
2023
<!-- %the one recognised option <C>Exponent</C>. -->
2024
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
2025
program to invoke menu item 6 of the Advanced <M>p</M>-Group Generation menu.
2026
Here the step-size <A>step</A> and the rank <A>rank</A> are positive integers and
2027
are the arguments required by the <C>pq</C> program. See&nbsp;<Ref Label="option Exponent" Style="Text"/>
2028
for the one recognised option <C>Exponent</C>.
2029
<!-- %<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqAPGDegree</C> performs -->
2030
<!-- %menu item 6 of the Advanced <M>p</M>-Group Generation menu. -->
2031
</Description>
2032
</ManSection>
2033
2034
<ManSection>
2035
<Func Name="PqAPGPermutations" Arg="i : options"/>
2036
<Func Name="PqAPGPermutations" Arg=": options" Label="for default process"/>
2037
<Description>
2038
<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->
2039
<!-- %program to compute permutations of subgroups. -->
2040
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
2041
program to perform menu item 7 of the Advanced <M>p</M>-Group Generation menu.
2042
Here the options <A>options</A> recognised are <C>PcgsAutomorphisms</C>,
2043
<C>SpaceEfficient</C>, <C>PrintAutomorphisms</C> and <C>PrintPermutations</C> (see
2044
Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/> for details).
2045
<!-- %<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqAPGPermutations</C> -->
2046
<!-- %performs menu item 7 of the Advanced <M>p</M>-Group Generation menu. -->
2047
</Description>
2048
</ManSection>
2049
2050
<ManSection>
2051
<Func Name="PqAPGOrbits" Arg="i : options"/>
2052
<Func Name="PqAPGOrbits" Arg=": options" Label="for default process"/>
2053
<Description>
2054
<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->
2055
<!-- %program to compute the orbits of the automorphism group, and return the -->
2056
<!-- %number of orbits, if either a summary or a complete listing (or both) of -->
2057
<!-- %orbit information was requested. -->
2058
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
2059
to perform menu item 8 of the Advanced <M>p</M>-Group Generation menu.
2060
<P/>
2061
2062
Here the options <A>options</A> recognised are <C>PcgsAutomorphisms</C>,
2063
<C>SpaceEfficient</C> and <C>CustomiseOutput</C> (see Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/> for
2064
details). For the <C>CustomiseOutput</C> option only the setting of the
2065
<C>orbit</C> is recognised (all other fields if set are ignored).
2066
<!-- %<E>Note:</E> For those familiar with the <C>pq</C> program, <C>PqAPGOrbits</C> performs -->
2067
<!-- %menu item 8 of the Advanced <M>p</M>-Group Generation menu. -->
2068
</Description>
2069
</ManSection>
2070
2071
<ManSection>
2072
<Func Name="PqAPGOrbitRepresentatives" Arg="i : options"/>
2073
<Func Name="PqAPGOrbitRepresentatives" Arg=": options" Label="for default process"/>
2074
<Description>
2075
<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->
2076
<!-- %program to process the orbit representatives and output the reduced -->
2077
<!-- %<M>p</M>-cover to a file. -->
2078
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
2079
to perform item 9 of the Advanced <M>p</M>-Group Generation menu.
2080
<P/>
2081
2082
The options <A>options</A> may be any selection of the following:
2083
<C>PcgsAutomorphisms</C>, <C>SpaceEfficient</C>, <C>Exponent</C>, <C>Metabelian</C>,
2084
<C>CapableDescendants</C> (or <C>AllDescendants</C>), <C>CustomiseOutput</C> (where only
2085
the <C>group</C> and <C>autgroup</C> fields are recognised) and <C>Filename</C> (see
2086
Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/> for details). If <C>Filename</C> is omitted the
2087
reduced <M>p</M>-cover is written to the file <C>"redPCover"</C> in the temporary
2088
directory whose name is stored in <C>ANUPQData.tmpdir</C>.
2089
<!-- %<E>Note:</E> -->
2090
<!-- %For those familiar with the <C>pq</C> program, <C>PqAPGOrbitRepresentatives</C> -->
2091
<!-- %performs option 9 of the Advanced <M>p</M>-Group Generation menu. -->
2092
</Description>
2093
</ManSection>
2094
2095
<ManSection>
2096
<Func Name="PqAPGSingleStage" Arg="i : options"/>
2097
<Func Name="PqAPGSingleStage" Arg=": options" Label="for default process"/>
2098
<Description>
2099
<!-- %for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C> -->
2100
<!-- %program to do a single stage of the descendants construction algorithm as -->
2101
<!-- %prescribed by <A>options</A>. -->
2102
for the <A>i</A>th or default interactive &ANUPQ; process, direct the <C>pq</C>
2103
to perform option 5 of the Advanced <M>p</M>-Group Generation menu.
2104
<P/>
2105
2106
The possible options are <C>StepSize</C>, <C>PcgsAutomorphisms</C>,
2107
<C>RankInitialSegmentSubgroups</C>, <C>SpaceEfficient</C>, <C>CapableDescendants</C>,
2108
<C>AllDescendants</C>, <C>Exponent</C>, <C>Metabelian</C>, <C>BasicAlgorithm</C> and
2109
<C>CustomiseOutput</C>. (Detailed descriptions of these options may be found
2110
in Chapter&nbsp;<Ref Chap="ANUPQ Options" Style="Text"/>.)
2111
<!-- %<E>Note:</E> -->
2112
<!-- %For those familiar with the <C>pq</C> program, <C>PqAPGSingleStage</C> performs -->
2113
<!-- %option 5 of the Advanced <M>p</M>-Group Generation menu. -->
2114
</Description>
2115
</ManSection>
2116
2117
</Section>
2118
2119
2120
<Section Label="Primitive Interactive ANUPQ Process Read/Write Functions">
2121
<Heading>Primitive Interactive ANUPQ Process Read/Write Functions</Heading>
2122
2123
For those familiar with using the <C>pq</C> program as a standalone we provide
2124
primitive read/write tools to communicate directly with an interactive
2125
&ANUPQ; process, started via <C>PqStart</C>. For the most part, it is up to
2126
the user to translate the output strings from <C>pq</C> program into a form
2127
useful in &GAP;.
2128
2129
<ManSection>
2130
<Func Name="PqRead" Arg="i"/>
2131
<Func Name="PqRead" Arg="" Label="for default process"/>
2132
<Description>
2133
read a complete line of &ANUPQ; output, from the <A>i</A>th or default
2134
interactive &ANUPQ; process, if there is output to be read and returns
2135
<K>fail</K> otherwise. When successful, the line is returned as a string
2136
complete with trailing newline, colon, or question-mark character. Please
2137
note that it is possible to be <Q>too quick</Q> (i.e.&nbsp;the return can be
2138
<K>fail</K> purely because the output from &ANUPQ; is not there yet), but if
2139
<C>PqRead</C> finds any output at all, it waits for a complete line. <C>PqRead</C>
2140
also writes the line read via <C>Info</C> at <C>InfoANUPQ</C> level 2. It doesn't
2141
try to distinguish banner and menu output from other output of the <C>pq</C>
2142
program.
2143
</Description>
2144
</ManSection>
2145
2146
<ManSection>
2147
<Func Name="PqReadAll" Arg="i"/>
2148
<Func Name="PqReadAll" Arg="" Label="for default process"/>
2149
<Description>
2150
read and return as many <E>complete</E> lines of &ANUPQ; output, from the
2151
<A>i</A>th or default interactive &ANUPQ; process, as there are to be read,
2152
<E>at the time of the call</E>, as a list of strings with any trailing
2153
newlines removed and returns the empty list otherwise. <C>PqReadAll</C> also
2154
writes each line read via <C>Info</C> at <C>InfoANUPQ</C> level 2. It doesn't try
2155
to distinguish banner and menu output from other output of the <C>pq</C>
2156
program. Whenever <C>PqReadAll</C> finds only a partial line, it waits for the
2157
complete line, thus increasing the probability that it has captured all
2158
the output to be had from &ANUPQ;.
2159
</Description>
2160
</ManSection>
2161
2162
<ManSection>
2163
<Func Name="PqReadUntil" Arg="i, IsMyLine"/>
2164
<Func Name="PqReadUntil" Arg="IsMyLine" Label="for default process"/>
2165
<Func Name="PqReadUntil" Arg="i, IsMyLine, Modify" Label="with modify map"/>
2166
<Func Name="PqReadUntil" Arg="IsMyLine, Modify" Label="with modify map, for default process"/>
2167
<Description>
2168
read complete lines of &ANUPQ; output, from the <A>i</A>th or default
2169
interactive &ANUPQ; process, <Q>chomps</Q> them (i.e.&nbsp;removes any trailing
2170
newline character), emits them to <C>Info</C> at <C>InfoANUPQ</C> level 2 (without
2171
trying to distinguish banner and menu output from other output of the
2172
<C>pq</C> program), and applies the function <A>Modify</A> (where <A>Modify</A> is just
2173
the identity map/function for the first two forms) until a <Q>chomped</Q>
2174
line <A>line</A> for which <C><A>IsMyLine</A>( <A>Modify</A>(<A>line</A>) )</C> is true.
2175
<C>PqReadUntil</C> returns the list of <A>Modify</A>-ed <Q>chomped</Q> lines read.
2176
<P/>
2177
2178
<E>Notes:</E>
2179
When provided by the user, <A>Modify</A> should be a function that accepts a
2180
single string argument.
2181
<P/>
2182
2183
<A>IsMyLine</A> should be a function that is able to accept the output of
2184
<A>Modify</A> (or take a single string argument when <A>Modify</A> is not provided)
2185
and should return a boolean.
2186
<P/>
2187
2188
If <C><A>IsMyLine</A>( <A>Modify</A>(<A>line</A>) )</C> is never true, <C>PqReadUntil</C> will
2189
wait indefinitely.
2190
</Description>
2191
</ManSection>
2192
2193
<ManSection>
2194
<Func Name="PqWrite" Arg="i, string"/>
2195
<Func Name="PqWrite" Arg="string" Label="for default process"/>
2196
<Description>
2197
write <A>string</A> to the <A>i</A>th or default interactive &ANUPQ; process;
2198
<A>string</A> must be in exactly the form the &ANUPQ; standalone expects. The
2199
command is echoed via <C>Info</C> at <C>InfoANUPQ</C> level 3 (with a <Q><C>ToPQ> </C></Q>
2200
prompt); i.e.&nbsp;do <C>SetInfoLevel(InfoANUPQ, 3);</C> to see what is transmitted
2201
to the <C>pq</C> program. <C>PqWrite</C> returns <K>true</K> if successful in writing to
2202
the stream of the interactive &ANUPQ; process, and <K>fail</K> otherwise.
2203
<P/>
2204
2205
<E>Note:</E>
2206
If <C>PqWrite</C> returns <K>fail</K> it means that the &ANUPQ; process has died.
2207
</Description>
2208
</ManSection>
2209
2210
</Section>
2211
</Chapter>
2212
2213