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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
%%
3
%W interact.tex ACE documentation - interactive fns Joachim Neub"user
4
%W Greg Gamble
5
%%
6
%H $Id$
7
%%
8
%Y Copyright (C) 2000 Centre for Discrete Mathematics and Computing
9
%Y Department of Information Tech. & Electrical Eng.
10
%Y University of Queensland, Australia.
11
%%
12
13
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14
\Chapter{Functions for Using ACE Interactively}
15
16
The user will probably benefit most from interactive use of {\ACE} by
17
setting the `InfoLevel' of `InfoACE' to at least 3
18
(see~"SetInfoACELevel"), particularly if she uses the `messages'
19
option with a non-zero value.
20
21
Have you read the various options warnings yet? If not, please take
22
the time to read Section~"General Warnings regarding the Use of
23
Options" which directs you to various important sections of
24
Chapter~"Options for ACE".
25
26
We describe in this chapter the functions that manipulate and initiate
27
interactive {\ACE} processes.
28
29
An interactive {\ACE} process is initiated by `ACEStart' and
30
terminated via `ACEQuit'; these functions are described in
31
Section~"Starting and Stopping Interactive ACE Processes". `ACEStart'
32
also has forms that manipulate an already started interactive {\ACE}
33
process. `ACEStart' always returns a positive integer <i>, which
34
identifies the interactive {\ACE} process that was initiated or
35
manipulated.
36
37
Most functions (there is one `ACEStart' exception), that manipulate an
38
already started interactive {\ACE} process, have a form where the
39
first argument is the integer <i> returned by the initiating
40
`ACEStart' command, and a second form with one argument fewer (where
41
the integer <i> is discovered by a default mechanism, namely by
42
determining the least integer <i> for which there is a currently
43
active interactive {\ACE} process). We will thus commonly say that
44
``for the <i>th (or default) interactive {ACE} process'' a certain
45
function performs a given action. In each case, it is an error, if <i>
46
is not the index of an active interactive process, or there are no
47
current active interactive processes.
48
49
*Notes*:
50
The global method of passing options (via `PushOptions'), should not
51
be used with any of the interactive functions. In fact, the
52
`OptionsStack' should be empty at the time any of the interactive
53
functions is called.
54
55
On `quit'ting {\GAP}, `ACEQuitAll();' is executed, which terminates
56
all active interactive {\ACE} processes. If {\GAP} is killed without
57
`quit'ting, before all interactive {\ACE} processes are terminated,
58
*zombie* processes (still living *child* processes whose *parents*
59
have died), will result. Since zombie processes do consume resources,
60
in such an event, the responsible computer user should seek out and
61
kill the still living `ace' children (e.g.~by piping the output of a
62
`ps' with appropriate options, usually `aux' or `ef', to `grep ace',
63
to find the process ids, and then using `kill'; try `man ps' and `man
64
kill' if these hints are unhelpful).
65
66
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
\Section{Starting and Stopping Interactive ACE Processes}
68
69
\>ACEStart( <fgens>, <rels>, <sgens> [:<options>] )!{details} F
70
\>ACEStart( <i> [:<options>] ) F
71
\>ACEStart( [:<options>] ) F
72
\>ACEStart( <i>, <fgens>, <rels>, <sgens> [:<options>] ) F
73
\>ACEStart( 0 [:<options>] ) F
74
\>ACEStart( 0, <fgens>, <rels>, <sgens> [:<options>] ) F
75
\>ACEStart( 0, <i> [:<options>] ) F
76
\>ACEStart( 0, <i>, <fgens>, <rels>, <sgens> [:<options>] ) F
77
78
The variables are: <i>, a positive integer numbering from 1 that
79
represents (indexes) an already running interactive {\ACE} process;
80
<fgens>, a list of free generators; <rels>, a list of words in the
81
generators <fgens> giving relators for a finitely presented group; and
82
<sgens>, a list of subgroup generators, again expressed as words in
83
the free generators <fgens>. Each of <fgens>, <rels> and <sgens> are
84
given in the standard {\GAP} format for finitely presented groups (See
85
Chapter~"ref:Finitely Presented Groups" of the {\GAP} Reference
86
Manual).
87
88
All forms of `ACEStart' accept options described in Chapters~"Options
89
for ACE" and~"Strategy Options for ACE", and Appendix~"Other ACE
90
Options", which are listed behind a colon in the usual way (see
91
"ref:Function Calls" in the {\GAP} Reference Manual). The reader is
92
strongly encouraged to read the introductory sections of
93
Chapter~"Options for ACE", with regard to options. The global
94
mechanism (via `PushOptions') of passing options is *not* recommended
95
for use with the interactive {\ACE} interface functions; please ensure
96
the `OptionsStack' is empty before calling an interactive {\ACE}
97
interface function.
98
99
The return value (for all forms of `ACEStart') is an integer
100
(numbering from 1) which represents the running process. It is
101
possible to have more than one interactive process running at once.
102
The integer returned may be used to index which of these processes an
103
interactive {\ACE} interface function should be applied to.
104
105
The first four forms of `ACEStart' insert a `start' (see~"option
106
start") directive after the user's options to invoke an enumeration.
107
The last four forms, with `0' as first argument, do not insert a
108
`start' directive. Moreover, the last 3 forms of `ACEStart', with `0'
109
as first argument only differ from the corresponding forms of
110
`ACEStart' without the `0' argument, in that they do not insert a
111
`start' directive. `ACEStart(0)', however, is special; unlike the
112
no-argument form of `ACEStart' it invokes a new interactive {\ACE}
113
process. We will now further describe each form of `ACEStart', in the
114
order they appear above.
115
116
The first form of `ACEStart' (on three arguments) is the usual way to
117
start an interactive {\ACE} process.
118
119
When `ACEStart' is called with one positive integer argument <i> it
120
starts a new enumeration on the <i>th running process, i.e.~it scrubs
121
a previously generated table and starts from scratch with the same
122
parameters (i.e.~the same arguments and options); except that if new
123
options are included these will modify those given previously. The
124
only reason for doing such a thing, without new options, is to perhaps
125
compare timings of runs (a second run is quicker because memory has
126
already been allocated). If you are interested in this sort of
127
information, however, you may be better off dealing directly with the
128
standalone.
129
130
When `ACEStart' is called with no arguments it finds the least
131
positive integer <i> for which an interactive process is running and
132
applies `ACEStart(<i>)'. (Most users will only run one interactive
133
process at a time. Hence, `ACEStart()' will be a useful shortcut for
134
`ACEStart(1)'.)
135
136
The fourth form of `ACEStart' on four arguments, invokes a new
137
enumeration on the <i>th running process, with new generators <fgens>,
138
relators <rels> and subgroup generators <sgens>. This is provided so a
139
user can re-use an already running process, rather than start a new
140
process. This may be useful when pseudo-ttys are a scarce resource.
141
See the notes for the non-interactive `ACECosetTable'
142
("ACECosetTableFromGensAndRels") which demonstrates an application of
143
a usage of this and the following form of `ACEStart' in a loop.
144
145
The fifth form of `ACEStart' (on the one argument: `0') initiates an
146
interactive {\ACE} process, processes any user options, but does not
147
insert a `start' (see~"option start") directive. This form is mainly
148
for gurus who are familiar with the {\ACE} standalone and who wish, at
149
least initially, to communicate with {\ACE} using the primitive
150
read/write tools of Section~"Primitive ACE Read/Write Functions". In
151
this case, after the group generators, relators, and subgroup
152
generators have been set in the {\ACE} process, invocations of any of
153
`ACEGroupGenerators' (see~"ACEGroupGenerators"), `ACERelators'
154
(see~"ACERelators"), `ACESubgroupGenerators'
155
(see~"ACESubgroupGenerators"), or `ACEParameters'
156
(see~"ACEParameters") will establish the corresponding {\GAP} values.
157
Be warned, though, that unless one of the general {\ACE} modes (see
158
Section~"General ACE modes"): `ACEStart' (without a zero argument),
159
`ACERedo' (see~"ACERedo") or `ACEContinue' (see~"ACEContinue"), or one
160
of the mode options: `start' (see~"option start"), `redo' (see~"option
161
redo") or `continu' (see~"option continu"), has been invoked since the
162
last change of any parameter options (see~"ACEParameterOptions"), some
163
of the values reported by `ACEParameters' may well be *incorrect*.
164
165
The sixth form of `ACEStart' (on four arguments), is like the first
166
form of `ACEStart' (on three arguments), except that it does not
167
insert a `start' (see~"option start") directive. It initiates an
168
interactive {\ACE} process, with a presentation defined by its last 3
169
arguments.
170
171
The seventh form of `ACEStart' (on two arguments), is like the second
172
form of `ACEStart' (on one argument), except that it does not insert a
173
`start' (see~"option start") directive. It processes any new options
174
for the <i>th interactive {\ACE} process. `ACEStart(0, <i> [:
175
<options> ] )', is similar to `SetACEOptions(<i> [: <options> ] )'
176
(see~"SetACEOptions"), but unlike the latter does not invoke a general
177
mode (see Section~"General ACE Modes").
178
179
The last form of `ACEStart' (on five arguments), is like the fourth
180
form of `ACEStart' (on four arguments), except that it does not insert
181
a `start' (see~"option start") directive. It re-uses an existing
182
interactive {\ACE} process, with a new presentation. There is no form
183
of `ACEStart' with the same functionality as this form, where the <i>
184
argument is omitted.
185
186
*Note:*
187
When an interactive {\ACE} process is initiated by `ACEStart' a
188
process number <i> is assigned to it (the integer <i> returned by the
189
`ACEStart' command), an {\ACE} (binary) process (in the UNIX sense) is
190
started up, a {\GAP} iostream is assigned to communicate with the
191
{\ACE} (binary) process, and the essential ``defining'' data
192
associated with the interactive {\ACE} process is saved in
193
`ACEData.io[<i>]' (see~"ACEData" for precisely what is saved).
194
195
\>ACEQuit( <i> )!{details} F
196
\>ACEQuit() F
197
198
terminate an interactive {\ACE} process, where <i> is the integer
199
returned by `ACEStart' when the process was started. If the second
200
form is used (i.e.~without arguments) then the interactive process of
201
least index that is still running is terminated.
202
203
*Note:*
204
`ACEQuit(<i>)' terminates the {\ACE} (binary) process of interactive
205
{\ACE} process <i>, and closes its {\GAP} iostream, and unbinds the
206
record `ACEData.io[<i>]' (see~"ACEStart" note).
207
208
It can happen that the {\ACE} (binary) process, and hence the {\GAP}
209
iostream assigned to communicate with it, can die, e.g.~by the user
210
typing a `Ctrl-C' while the {\ACE} (binary) process is engaged in a
211
long calculation. `IsACEProcessAlive' (see~"IsACEProcessAlive") is
212
provided to check the status of the {\GAP} iostream (and hence the
213
status of the {\ACE} (binary) process it was communicating with); in
214
the case that it is indeed dead, `ACEResurrectProcess'
215
(see~"ACEResurrectProcess") may be used to start a new {\ACE} (binary)
216
process and assign a new {\GAP} iostream to communicate with it, by
217
using the ``defining'' data of the interactive {\ACE} process saved in
218
`ACEData.io[<i>]'.
219
220
\>ACEQuitAll() F
221
222
is provided as a convenience, to terminate all active interactive
223
{\ACE} processes with a single command. It is equivalent to executing
224
`ACEQuit(<i>)' for all active interactive {\ACE} processes <i>
225
(see~"ACEQuit").
226
227
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
228
\Section{General ACE Modes}
229
230
For our purposes, we define an interactive {\ACE} interface command to
231
be an {\ACE} mode, if it delivers an enumeration result (see
232
Section~"Results messages"). Thus, `ACEStart' (see~"ACEStart"), except
233
when called with the argument 0, and the commands `ACERedo' and
234
`ACEContinue' which we describe below are {\ACE} modes; we call these
235
*general {\ACE} modes*. Additionally, there are two other commands
236
which deliver enumeration results: `ACEAllEquivPresentations'
237
(see~"ACEAllEquivPresentations") and `ACERandomEquivPresentations'
238
(see~"ACERandomEquivPresentations"); we call these ``experimentation''
239
{\ACE} modes and describe them in Section~"Experimentation ACE Modes".
240
241
*Guru Note:*
242
The {\ACE} standalone uses the term `mode' in a slightly different
243
sense. There, the commands: `start', `redo' or `continue', put the
244
{\ACE} enumerator in `start mode', `redo mode' or `continue mode'. In
245
this manual, we have used the term to mean the command itself, and
246
generalised it to include any command that produces enumeration
247
results.
248
249
After changing any of {\ACE}'s parameters, one of three *general
250
modes* is possible: one may be able to ``continue'' via `ACEContinue'
251
(see~"ACEContinue"), or ``redo'' via `ACERedo' (see~"ACERedo"), or if
252
neither of these is possible one may have to re-``start'' the
253
enumeration via `ACEStart' (see~"ACEStart"). Generally, the
254
appropriate mode is invoked automatically when options are changed; so
255
most users should be able to ignore the following three functions.
256
257
\>ACEModes( <i> ) F
258
\>ACEModes() F
259
260
for the <i>th (or default) interactive {\ACE} process, return a record
261
whose fields are the modes `ACEStart', `ACEContinue' and `ACERedo',
262
and whose values are `true' if the mode is possible for the process
263
and `false' otherwise.
264
265
\>ACEContinue( <i> [:<options>] ) F
266
\>ACEContinue( [:<options>] ) F
267
268
for the <i>th (or default) interactive {\ACE} process, apply any
269
<options> and then ``continue'' the current enumeration, building upon
270
the existing table. If a previous run stopped without producing a
271
finite index you can, in principle, change any of the options and
272
continue on. Of course, if you make any changes which invalidate the
273
current table, you won't be allowed to `ACEContinue' and an error will
274
be raised. However, after `quit'ting the `break'-loop, the interactive
275
{\ACE} process should normally still be active; after doing so, run
276
`ACEModes' (see~"ACEModes") to see which of `ACERedo' or `ACEStart' is
277
possible.
278
279
\>ACERedo( <i> [:<options>] ) F
280
\>ACERedo( [:<options>] ) F
281
282
for the <i>th (or default) interactive {\ACE} process, apply any
283
<options> and then ``redo'' the current enumeration from coset 1
284
(i.e., the subgroup), keeping any existing information in the table.
285
286
*Notes:*
287
The difference between `ACEContinue' and `ACERedo' is somewhat
288
technical, and the user should regard it as a mode that is a little
289
more expensive than `ACEContinue' but cheaper than `ACEStart'.
290
`ACERedo' is really intended for the case where additional relators
291
and/or subgroup generators have been introduced; the current table,
292
which may be incomplete or exhibit a finite index, is still ``valid''.
293
However, the new data may allow the enumeration to complete, or cause
294
a collapse to a smaller index. In some cases, `ACERedo' may not be
295
possible and an error will be raised; in this case, `quit' the
296
`break'-loop, and try `ACEStart', which will discard the current table
297
and re-``start'' the enumeration.
298
299
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
300
\Section{Interactive ACE Process Utility Functions and Interruption of
301
an Interactive ACE Process}
302
303
\>ACEProcessIndex( <i> ) F
304
\>ACEProcessIndex() F
305
306
With argument <i>, which must be a positive integer, `ACEProcessIndex'
307
returns <i> if it corresponds to an active interactive process, or
308
raises an error. With no arguments it returns the default active
309
interactive process or returns `fail' and emits a warning message to
310
`Info' at `InfoACE' or `InfoWarning' level 1.
311
312
*Note:*
313
Essentially, an interactive {\ACE} process <i> is ``active'' if
314
`ACEData.io[<i>]' is bound (i.e.~we still have some data telling us
315
about it). Also see~"ACEStart" note.
316
317
\>ACEProcessIndices() F
318
319
returns the list of integer indices of all active interactive {\ACE}
320
processes (see~"ACEProcessIndex" for the meaning of ``active'').
321
322
\>IsACEProcessAlive( <i> ) F
323
\>IsACEProcessAlive() F
324
325
return `true' if the {\GAP} iostream of the <i>th (or default)
326
interactive {\ACE} process started by `ACEStart' is alive (i.e.~can
327
still be written to), or `false', otherwise. (See the notes
328
for~"ACEStart" and~"ACEQuit".)
329
330
\atindex{interruption}{@interruption of an interactive ACE process}
331
\atindex{break-loop}{@\noexpand`break'-loop}
332
If the user does not yet have a `gap>' prompt then usually {\ACE} is
333
still away doing something and an {\ACE} interface function is still
334
waiting for a reply from {\ACE}. Typing a `Ctrl-C' (i.e.~holding down
335
the `Ctrl' key and typing `c') will stop the waiting and send {\GAP}
336
into a `break'-loop, from which one has no option but to `quit;'. The
337
typing of `Ctrl-C', in such a circumstance, usually causes the stream
338
of the interactive {\ACE} process to die; to check this we provide
339
`IsACEProcessAlive' (see~"IsACEProcessAlive"). If the stream of an
340
interactive {\ACE} process, indexed by <i>, say, has died, it may
341
still be possible to recover enough of the state, before the death of
342
the stream, from the information stored in the `ACEData.io[<i>]'
343
record (see Section~"The ACEData Record"). For such a purpose, we have
344
provided `ACEResurrectProcess' (see~"ACEResurrectProcess").
345
346
The {\GAP} iostream of an interactive {\ACE} process will also die if
347
the {\ACE} binary has a segmentation fault. We do hope that this never
348
happens to you, but if it does and the failure is reproducible, then
349
it's a bug and we'd like to know about it. Please read the `README'
350
that comes with the {\ACE} package to find out what to include in a
351
bug report and who to email it to.
352
353
\>ACEResurrectProcess( <i> [: <options>] ) F
354
\>ACEResurrectProcess( [: <options>] ) F
355
356
re-generate the {\GAP} iostream of the <i>th (or default) interactive
357
{\ACE} process started by `ACEStart' (see~"ACEStart", the final note,
358
in particular), and try to recover as much as possible of the previous
359
state from saved values of the process's arguments and parameter
360
options. The possible <options> here are `use' and `useboth' which are
361
described in detail below.
362
363
The arguments of the <i>th interactive {\ACE} process are stored in
364
`ACEData.io[<i>].args', a record with fields `fgens', `rels' and
365
`sgens', which are the {\GAP} group generators, relators and subgroup
366
generators, respectively (see Section~"The ACEData Record"). Option
367
information is saved in `ACEData.io[<i>].options' when a user uses an
368
interactive {\ACE} interface function with options or uses
369
`SetACEOptions' (see~"SetACEOptions"). Parameter option information is
370
saved in `ACEData.io[<i>].parameters' if `ACEParameters' (see~"ACEParameters")
371
is used to extract from {\ACE} the current values of the {\ACE}
372
parameter options (this is generally less reliable unless one of the
373
general {\ACE} modes (see Section~"General ACE Modes"), has been run
374
previously).
375
376
By default, `ACEResurrectProcess' recovers parameter option
377
information from `ACEData.io[<i>].options' if it is bound, or from
378
`ACEData.io[<i>].parameters' if it is bound, otherwise. The
379
`ACEData.io[<i>].options' record, however, is first filtered for
380
parameter and strategy options (see Sections~"ACEParameterOptions"
381
and~"The ACEStrategyOptions list") and the `echo' option (see~"option
382
echo"). To alter this behaviour, the user is provided two options:
383
384
\beginitems
385
386
\quad`use := <useList>'& <useList> may contain one or both of
387
`"options"' and `"parameters"'. By default, `use = ["options",
388
"parameters"]'.
389
390
\quad`useboth' & (A boolean option). By default, `useboth = false'.
391
392
\enditems
393
394
If `useboth = true', `SetACEOptions' (see~"SetACEOptions") is applied
395
to the <i>th interactive {\ACE} process with each
396
`ACEData.io[<i>].(<field>)' for each <field> (`"options"' or
397
`"parameters"') that is bound and in <useList>, in the order implied
398
by <useList>. If `useboth = false', `SetACEOptions' is applied with
399
`ACEData.io[<i>].(<field>)' for only the first <field> that is bound
400
in <useList>. The current value of the `echo' option is also preserved
401
(no matter what values the user chooses for the `use' and `useboth'
402
options).
403
404
*Notes:*
405
Do not use general {\ACE} options with `ACEResurrectProcess'; they
406
will only be superseded by those options recovered from
407
`ACEData.io[<i>].options' and/or `ACEData.io[<i>].parameters'.
408
Instead, call `SetACEOptions' first (or afterwards). When called prior
409
to `ACEResurrectProcess', `SetACEOptions' will emit a warning that the
410
stream is dead; despite this, the `ACEData.io[<i>].options' *will* be
411
updated.
412
413
`ACEResurrectProcess' does *not* invoke an {\ACE} mode (see
414
Section~"General ACE Modes"). This leaves the user free to use
415
`SetACEOptions' (which does invoke an {\ACE} mode) to further modify
416
options afterwards.
417
418
\>ToACEGroupGenerators( <fgens> ) F
419
420
This function produces, from a {\GAP} list <fgens> of free group
421
generators, the {\ACE} directive string required by the `group'
422
(see~"option group") option. (The `group' option may be used to define
423
the equivalent of <fgens> in an {\ACE} process.)
424
425
\>ToACEWords( <fgens>, <words> ) F
426
427
This function produces, from a {\GAP} list <words> in free group
428
generators <fgens>, a string that represents those <words> as an
429
{\ACE} list of words. `ToACEWords' may be used to provide suitable
430
values for the options `relators' (see~"option relators"),
431
`generators' (see~"option generators"), `sg' (see~"option sg"), and
432
`rl' (see~"option rl").
433
434
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
435
\Section{Experimentation ACE Modes}
436
437
Now we describe the two *experimentation modes*. The term *mode* was
438
defined in Section~"General ACE Modes".
439
440
\>ACEAllEquivPresentations( <i>, <val> ) F
441
\>ACEAllEquivPresentations( <val> ) F
442
443
for the <i>th (or default) interactive {\ACE} process, generates and
444
tests an enumeration for combinations of relator ordering, relator
445
rotations, and relator inversions; <val> is in the integer range 1 to
446
7.
447
448
The argument <val> is considered as a binary number. Its three bits
449
are treated as flags, and control relator rotations (the $2^0$ bit),
450
relator inversions (the $2^1$ bit) and relator orderings (the $2^2$
451
bit), respectively; where $1$ means ``active'' and $0$ means
452
``inactive''. (See below for an example).
453
454
Before we describe the {\GAP} output of `ACEAllEquivPresentations' let
455
us spend some time considering what happens before the {\ACE} binary
456
output is parsed.
457
458
The `ACEAllEquivPresentations' command first performs a ``priming
459
run'' using the options as they stand. In particular, the `asis' and
460
`messages' options are honoured.
461
462
It then turns `asis' (see~"option asis") on and `messages'
463
(see~"option messages") off (i.e.~sets `messages' to 0), and generates
464
and tests the requested equivalent presentations. The maximum and
465
minimum values attained by `m' (the maximum number of coset numbers
466
defined at any stage) and `t' (the total number of coset numbers
467
defined) are tracked, and each time the statistics are better than
468
what we've already seen, the {\ACE} binary emits a summary result line
469
for the relators used. See Appendix~"The Meanings of ACE's output
470
messages" for a discussion of the statistics `m' and `t'. To observe
471
these messages set the `InfoLevel' of `InfoACE' to 3; and it's
472
*recommended* that you do this so that you get some idea of what the
473
{\ACE} binary is doing.
474
475
The order in which the equivalent presentations are generated and
476
tested has no particular significance, but note that the presentation
477
as given *after* the initial priming run) is the *last* presentation
478
to be generated and tested, so that the group's relators are left
479
``unchanged'' by running the `ACEAllEquivPresentations' command.
480
481
As discussed by Cannon, Dimino, Havas and Watson \cite{CDHW73} and
482
Havas and Ramsay \cite{HR01} such equivalent presentations can yield
483
large variations in the number of coset numbers required in an
484
enumeration. For this command, we are interested in this variation.
485
486
After the final presentation is run, some additional status
487
information messages are printed to the {\ACE} output:
488
489
\beginlist%unordered
490
491
\item{--} the number of runs which yielded a finite index;
492
493
\item{--} the total number of runs (excluding the priming run); and
494
495
\item{--} the range of values observed for `m' and `t'.
496
497
\endlist
498
499
As an example (drawn from the discussion in \cite{HR99ace}) consider the
500
enumeration of the $448$ coset numbers of the subgroup
501
$\langle a^2,a^{-1}b \rangle$ of the group
502
$$
503
(8,7 \mid 2,3)
504
= \langle a,b \mid a^8 = b^7 = (ab)^2 = (a^{-1}b)^3 = 1 \rangle.
505
$$
506
There are $4!=24$ relator orderings and $2^4=16$ combinations of
507
relator or inverted relator. Exponents are taken into account when
508
rotating relators, so the relators given give rise to 1, 1, 2 and 2
509
rotations respectively, for a total of $1.1.2.2=4$ combinations. So,
510
for <val>${} = 7$ (resp.~$3$), $24.16.4=1536$ (resp.~$16.4=64$)
511
equivalent presentations are tested.
512
513
Now we describe the output of `ACEAllEquivPresentations'; it is a
514
record with fields:
515
516
\beginitems
517
518
\quad`primingResult' & the {\ACE} enumeration result message (see
519
Section~"Results Messages") of the priming run;
520
521
\quad`primingStats' & the enumeration result of the priming run as a
522
{\GAP} record with fields `index', `cputime', `cputimeUnits',
523
`activecosets', `maxcosets' and `totcosets', exactly as for the record
524
returned by `ACEStats' (see~"ACEStats");
525
526
\quad`equivRuns' & a list of data records, one for each progressively
527
``best'' run, where each record has fields:
528
529
\qquad`rels'& the relators in the order used for the run,
530
531
\qquad`enumResult'& the {\ACE} enumeration result message (see
532
Section~"Results Messages") of the run, and
533
534
\qquad`stats'& the enumeration result as a {\GAP} record exactly like
535
the record returned by `ACEStats' (see~"ACEStats");
536
537
\quad`summary' & a record with fields:
538
539
\qquad`successes'& the total number of successful (i.e.~having finite
540
enumeration index) runs,
541
542
\qquad`runs'& the total number of equivalent presentation runs
543
executed,
544
545
\qquad`maxcosetsRange'& the range of values as a {\GAP} list inside
546
which each `equivRuns[<i>].maxcosets' lies, and
547
548
\qquad`totcosetsRange'& the range of values as a {\GAP} list inside
549
which each `equivRuns[<i>].totcosets' lies.
550
551
\enditems
552
553
*Notes:*
554
In general, the length of the `equivRuns' field list will be less than
555
the number of runs executed.
556
557
There is no way to stop the `ACEAllEquivPresentations' command before
558
it has completed, other than killing the task. So do a reality check
559
beforehand on the size of the search space and the time for each
560
enumeration. If you are interested in finding a ``good'' enumeration,
561
it can be very helpful, in terms of running time, to put a tight limit
562
on the number of coset numbers via the `max' option. You may also have
563
to set `compaction' = $100$ to prevent time-wasting attempts to
564
recover space via compaction. This maximises throughput by causing the
565
``bad'' enumerations, which are in the majority, to overflow quickly
566
and abort. If you wish to explore a very large search-space, consider
567
firing up many copies of {\ACE}, and starting each with a ``random''
568
equivalent presentation. Alternatively, you could use the
569
`ACERandomEquivPresentations' command.
570
571
572
\>ACERandomEquivPresentations( <i>, <val> ) F
573
\>ACERandomEquivPresentations( <val> ) F
574
\>ACERandomEquivPresentations( <i>, [<val>] ) F
575
\>ACERandomEquivPresentations( [<val>] ) F
576
\>ACERandomEquivPresentations( <i>, [<val>, <Npresentations>] ) F
577
\>ACERandomEquivPresentations( [<val>, <Npresentations>] ) F
578
579
for the <i>th (or default) interactive {\ACE} process, generates and
580
tests up to <Npresentations> (or 8, in the first 4 forms) random
581
presentations; <val>, an integer in the range 1 to 7, acts as for
582
`ACEAllEquivPresentations' and <Npresentations>, when given, should be
583
a positive integer.
584
585
The routine first turns `asis' (see~"option asis") on and `messages'
586
(see~"option messages") off (i.e.~sets `messages' to 0), and then
587
generates and tests the requested number of random equivalent
588
presentations. For each presentation, the relators used and the
589
summary result line are printed by {\ACE}. To observe these messages
590
set the `InfoLevel' of `InfoACE' to at least 3.
591
592
`ACERandomEquivPresentations' parses the {\ACE} messages, translating
593
them to {\GAP}, and thus returns a list of records (similar to the
594
field `equivRuns' of the returned record of
595
`ACEAllEquivPresentations'). Each record of the returned list is the
596
data derived from a presentation run and has fields:
597
598
\beginitems
599
600
\quad`rels'& the relators in the order used for the run,
601
602
\quad`enumResult'& the {\ACE} enumeration result message (see
603
Section~"Results Messages") of the run, and
604
605
\quad`stats'& the enumeration result as a {\GAP} record exactly like
606
the record returned by `ACEStats' (see~"ACEStats").
607
608
\enditems
609
610
*Notes:*
611
The relator inversions and rotations are ``genuinely'' random. The
612
relator permuting is a little bit of a kludge, with the ``quality'' of
613
the permutations tending to improve with successive presentations.
614
When the `ACERandomEquivPresentations' command completes, the
615
presentation active is the *last* one generated.
616
617
*Guru Notes:*
618
It might appear that neglecting to restore the original presentation
619
is an error. In fact, it is a useful feature! Suppose that the space
620
of equivalent presentations is too large to exhaustively test. As
621
noted in the entry for `ACEAllEquivPresentations', we can start up
622
multiple copies of `ACEAllEquivPresentations' at random points in the
623
search-space. Manually generating `random' equivalent presentations to
624
serve as starting-points is tedious and error-prone. The
625
`ACERandomEquivPresentations' command provides a simple solution;
626
simply run `ACERandomEquivPresentations(<i>, 7);' before
627
`ACEAllEquivPresentations(<i>, 7);'.
628
629
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
630
\Section{Interactive Query Functions and an Option Setting Function}
631
632
\>ACEGroupGenerators( <i> ) F
633
\>ACEGroupGenerators() F
634
635
return the {\GAP} group generators of the <i>th (or default)
636
interactive {\ACE} process. If no generators have been saved for the
637
interactive {\ACE} process, possibly because the process was started
638
via `ACEStart(0);' (see~"ACEStart"), the {\ACE} process is
639
interrogated, and the equivalent in {\GAP} is saved and returned.
640
Essentially, `ACEGroupGenerators(<i>)' interrogates {\ACE} and
641
establishes `ACEData.io[<i>].args.fgens', if necessary, and returns
642
`ACEData.io[<i>].args.fgens'. As a side-effect, if any of the
643
remaining fields of `ACEData.io[<i>].args' or
644
`ACEData.io[<i>].acegens' are unset, they are also set. Note that
645
{\GAP} provides `GroupWithGenerators' (see~"ref:GroupWithGenerators"
646
in the {\GAP} Reference Manual) to establish a free group on a given
647
set of already-defined generators.
648
649
\>ACERelators( <i> ) F
650
\>ACERelators() F
651
652
return the {\GAP} relators of the <i>th (or default) interactive
653
{\ACE} process. If no relators have been saved for the interactive
654
{\ACE} process, possibly because the process was started via
655
`ACEStart(0);' (see~"ACEStart"), the {\ACE} process is interrogated,
656
the equivalent in {\GAP} is saved and returned. Essentially,
657
`ACERelators(<i>)' interrogates {\ACE} and establishes
658
`ACEData.io[<i>].args.rels', if necessary, and returns
659
`ACEData.io[<i>].args.rels'. As a side-effect, if any of the remaining
660
fields of `ACEData.io[<i>].args' or `ACEData.io[<i>].acegens' are
661
unset, they are also set.
662
663
\>ACESubgroupGenerators( <i> ) F
664
\>ACESubgroupGenerators() F
665
666
return the {\GAP} subgroup generators of the <i>th (or default)
667
interactive {\ACE} process. If no subgroup generators have been saved
668
for the interactive {\ACE} process, possibly because the process was
669
started via `ACEStart(0);' (see~"ACEStart"), the {\ACE} process is
670
interrogated, the equivalent in {\GAP} is saved and returned.
671
Essentially, `ACESubgroupGenerators(<i>)' interrogates {\ACE} and
672
establishes `ACEData.io[<i>].args.sgens', if necessary, and returns
673
`ACEData.io[<i>].args.sgens'. As a side-effect, if any of the
674
remaining fields of `ACEData.io[<i>].args' or
675
`ACEData.io[<i>].acegens' are unset, they are also set.
676
677
\>DisplayACEArgs( <i> ) F
678
\>DisplayACEArgs() F
679
680
display the arguments (i.e.~<fgens>, <rels> and <sgens>) of the <i>th
681
(or default) process started by `ACEStart'. In fact,
682
`DisplayACEArgs(<i>)' is just a pretty-printer of the
683
`ACEData.io[<i>].args' record. Use `GetACEArgs' (see~"GetACEOptions")
684
in assignments. Unlike `ACEGroupGenerators'
685
(see~"ACEGroupGenerators"), `ACERelators' (see~"ACERelators") and
686
`ACESubgroupGenerators' (see~"ACESubgroupGenerators"),
687
`DisplayACEArgs' does not have the side-effect of setting any of the
688
fields of `ACEData.io[<i>].args' if they are unset.
689
690
\>GetACEArgs( <i> ) F
691
\>GetACEArgs() F
692
693
return a record of the current arguments (i.e.~<fgens>, <rels> and
694
<sgens>) of the <i>th (or default) process started by `ACEStart'. In
695
fact, `GetACEOptions(<i>)' simply returns the `ACEData.io[<i>].args'
696
record, or an empty record if that record is unbound. Unlike
697
`ACEGroupGenerators' (see~"ACEGroupGenerators"), `ACERelators'
698
(see~"ACERelators") and `ACESubgroupGenerators'
699
(see~"ACESubgroupGenerators"), `GetACEOptions' does not have the
700
side-effect of setting any of the fields of `ACEData.io[<i>].args' if
701
they are unset.
702
703
\>DisplayACEOptions( <i> ) F
704
\>DisplayACEOptions() F
705
706
display the options, explicitly set by the user, of the <i>th (or default) process started by
707
`ACEStart'. In fact, `DisplayACEOptions(<i>)' is just a pretty-printer
708
of the `ACEData.io[<i>].options' record. Use `GetACEOptions'
709
(see~"GetACEOptions") in assignments. Please note that no-value {\ACE}
710
options will appear with the assigned value `true' (see
711
Section~"Interpretation of ACE Options" for how the {\ACE} interface
712
functions interpret such options).
713
714
*Notes:*
715
Any options set via `ACEWrite' (see~"ACEWrite") will *not* be
716
displayed. Also, recall that if {\ACE} is not given any options it
717
uses the `default' strategy (see Section~"What happens if no ACE
718
Strategy Option or if no ACE Option is passed"). To discover the
719
various settings of the {\ACE} Parameter Options
720
(see~"ACEParameterOptions") in vogue for the {\ACE} process, use
721
`ACEParameters' (see~"ACEParameters").
722
723
\>GetACEOptions( <i> ) F
724
\>GetACEOptions() F
725
726
return a record of the current options (those that have been
727
explicitly set by the user) of the <i>th (or default) process started
728
by `ACEStart'. Please note that no-value {\ACE} options will appear
729
with the assigned value `true' (see Section~"Interpretation of ACE
730
Options" for how the {\ACE} interface functions interpret such
731
options). The notes applying to `DisplayACEOptions'
732
(see~"DisplayACEOptions") also apply here.
733
734
\>SetACEOptions( <i> [:<options>] ) F
735
\>SetACEOptions( [:<options>] ) F
736
737
modify the current options of the <i>th (or default) process started
738
by `ACEStart'. Please ensure that the `OptionsStack' is empty before
739
calling `SetACEOptions', otherwise the options already present on the
740
`OptionsStack' will also be ``seen''. All interactive {\ACE} interface
741
functions that accept options, actually call an internal version of
742
`SetACEOptions'; so, it is generally important to keep the
743
`OptionsStack' clear while working with {\ACE} interactively.
744
745
After setting the options passed, the first mode of the following:
746
`ACEContinue' (see~"ACEContinue"), `ACERedo' (see~"ACERedo") or
747
`ACEStart' (see~"ACEStart"), that may be applied, is automatically
748
invoked.
749
750
Since a user will sometimes have options in the form of a record
751
(e.g.~via `GetACEOptions'), we provide an alternative to the
752
behind-the-colon syntax, in a manner .like `PushOptions', for the
753
passing of options via `SetACEOptions':
754
755
\>SetACEOptions( <i>, <optionsRec> )!{record version} F
756
\>SetACEOptions( <optionsRec> )!{record version} F
757
758
In this form, the record <optionsRec> is used to update the current
759
options of the <i>th (or default) process started by `ACEStart'. Note
760
that since <optionsRec> is a record each field must have an assigned
761
value; in particular, no-value {\ACE} options should be assigned the
762
value `true' (see Section~"Interpretation of ACE Options"). Please
763
don't mix these two forms of `SetACEOptions' with the previous two
764
forms; i.e.~do *not* pass both a record argument and options, since
765
this will lead to options appearing in the wrong order; if you want to
766
do this, make two separate calls to `SetACEOptions', e.g.~let's say
767
you have a process like that started by:
768
769
\beginexample
770
gap> ACEExample("A5", ACEStart);
771
772
\endexample
773
774
then the following demonstrates both usages of `SetACEOptions':
775
776
\beginexample
777
gap> SetACEOptions( rec(echo := 2) );
778
gap> SetACEOptions( : hlt);
779
780
\endexample
781
782
Each of the three commands above generates output; for brevity it has
783
not been included.
784
785
*Notes:*
786
787
\atindex{break-loop}{@\noexpand`break'-loop}
788
When `ACECosetTableFromGensAndRels' enters a `break'-loop
789
(see~"ACECosetTable"), local versions of the second form of each of
790
`DisplayACEOptions' and `SetACEOptions' become available. (Even though
791
the names are similar and their function is analogous they are in fact
792
different functions.)
793
794
\>ACEParameters( <i> ) F
795
\>ACEParameters() F
796
797
return a record of the current values of the {\ACE} Parameter Options
798
(see~"ACEParameterOptions") of the <i>th (or default) process started
799
by `ACEStart', according to {\ACE}. Please note that some options may
800
be reported with incorrect values if they have been changed recently
801
without following up with one of the modes `ACEContinue', `ACERedo' or
802
`ACEStart'. Together the commands `ACEGroupGenerators', `ACERelators',
803
`ACESubgroupGenerators' and `ACEParameters' give the equivalent {\GAP}
804
information that is obtained in {\ACE} with `sr := 1' (see~"option
805
sr"), which is the ``Run Parameters'' block obtained in the messaging
806
output (observable when the `InfoLevel' of `InfoACE' is set to at
807
least 3), when `messages' (see~"option messages") is set a non-zero
808
value.
809
810
*Notes:*
811
One use for this function might be to determine the options required
812
to replicate a previous run, but be sure that, if this is your
813
purpose, any recent change in the parameter option values has been
814
followed by an invocation of one of `ACEContinue' (see~"ACEContinue"),
815
`ACERedo' (see~"ACERedo") or `ACEStart' (see~"ACEStart").
816
817
As a side-effect, for {\ACE} process <i>, any of the fields of
818
`ACEData.io[<i>].args' or `ACEData.io[<i>].acegens' that are unset,
819
are set.
820
821
\>IsCompleteACECosetTable( <i> ) F
822
\>IsCompleteACECosetTable() F
823
824
return, for the <i>th (or default) process started by `ACEStart',
825
`true' if {\ACE}'s current coset table is complete, or `false'
826
otherwise.
827
828
*Note:*
829
The completeness of the coset table of the <i>th interactive {\ACE}
830
process is determined by checking whether
831
`ACEData.io[<i>].stats.index' is positive; a value of zero indicates
832
the last enumeration failed to complete. The record
833
`ACEData.io[<i>].stats' is what is returned by `ACEStats(<i>)'
834
(see~"ACEStats").
835
836
\>ACEDisplayCosetTable( <i> ) F
837
\>ACEDisplayCosetTable() F
838
\>ACEDisplayCosetTable( <i>, [<val>] ) F
839
\>ACEDisplayCosetTable( [<val>] ) F
840
\>ACEDisplayCosetTable( <i>, [<val>, <last>] ) F
841
\>ACEDisplayCosetTable( [<val>, <last>] ) F
842
\>ACEDisplayCosetTable( <i>, [<val>, <last>, <by>] ) F
843
\>ACEDisplayCosetTable( [<val>, <last>, <by>] ) F
844
845
compact and display the (possibly incomplete) coset table of the <i>th
846
(or default) process started by `ACEStart'; <val> must be an integer,
847
and <last> and <by> must be positive integers. In the first two forms
848
of the command, the entire coset table is displayed, without orders or
849
coset representatives. In the third and fourth forms, the absolute
850
value of <val> is taken to be the last line of the table to be
851
displayed (and 1 is taken to be the first); in the fifth and sixth
852
forms, `|<val>|' is taken to be the first line of the table to be
853
displayed, and <last> is taken to be the number of the last line to be
854
displayed. In the last two forms, the table is displayed from line
855
`|<val>|' to line <last> in steps of <by>. If <val> is negative, then
856
the orders modulo the subgroup (if available) and coset
857
representatives are displayed also.
858
859
*Note:*
860
The coset table displayed will normally only be `lenlex' standardised
861
if the call to `ACEDisplayCosetTable' is preceded by
862
`ACEStandardCosetNumbering' (see~"ACEStandardCosetNumbering"). The
863
options `lenlex' (see~"option lenlex") and `semilenlex' (see~"option
864
semilenlex") are only executed by `ACECosetTable'
865
(see~"ACECosetTable"). The {\ACE} binary does not provide `semilenlex'
866
standardisation, and hence `ACEDisplayCosetTable' will never display a
867
`semilenlex' standard coset table.
868
869
\>ACECosetRepresentative( <i>, <n> ) F
870
\>ACECosetRepresentative( <n> ) F
871
872
return, for the <i>th (or default) process started by `ACEStart', the
873
coset representative of coset <n> of the current coset table held by
874
{\ACE}, where <n> must be a positive integer.
875
876
\>ACECosetRepresentatives( <i> ) F
877
\>ACECosetRepresentatives() F
878
879
return, for the <i>th (or default) process started by `ACEStart', the
880
list of coset representatives of the current coset table held by
881
{\ACE}.
882
883
\>ACETransversal( <i> ) F
884
\>ACETransversal() F
885
886
return, for the <i>th (or default) process started by `ACEStart', the
887
list of coset representatives of the current coset table held by
888
{\ACE}, if the current table is complete, and `fail' otherwise.
889
Essentially, `ACETransversal(<i>) = ACECosetRepresentatives(<i>)' for
890
a complete table.
891
892
\>ACECycles( <i> ) F
893
\>ACECycles() F
894
\>ACEPermutationRepresentation( <i> ) F
895
\>ACEPermutationRepresentation() F
896
897
return, for the <i>th (or default) process started by `ACEStart', a
898
list of permutations corresponding to the group generators, (i.e., the
899
permutation representation), if the current coset table held by {\ACE}
900
is complete or `fail', otherwise. In the event of failure a message is
901
emitted to `Info' at `InfoACE' or `InfoWarning' level 1.
902
903
\>ACETraceWord( <i>, <n>, <word> ) F
904
\>ACETraceWord( <n>, <word> ) F
905
906
for the <i>th (or default) interactive {\ACE} process started by
907
`ACEStart', trace <word> through {\ACE}'s coset table, starting at
908
coset <n>, and return the final coset number if the trace completes,
909
and `fail' otherwise. In Group Theory terms, if the cosets of a
910
subgroup $H$ in a group $G$ are the subject of interactive {\ACE}
911
process <i> and the coset identified by that process by the integer
912
<n> corresponds to some coset $Hx$, for some $x$ in $G$, and <word>
913
represents the element $g$ of $G$, then, providing the current coset
914
table is complete enough, `ACETraceWord( <i>, <n>, <word> )' returns
915
the integer identifying the coset $Hxg$.
916
917
*Notes:*
918
You may wish to compact {\ACE}'s coset table first, either explicitly
919
via `ACERecover' (see~"ACERecover"), or, implicitly, via any function
920
call that invokes {\ACE}'s compaction routine (see~"ACERecover" note).
921
922
If you actually wanted {\ACE}'s coset representative, then, for a
923
*compact* table, feed the output of `ACETraceWord' to
924
`ACECosetRepresentative' (see~"ACECosetRepresentative").
925
926
\>ACEOrders( <i> ) F
927
\>ACEOrders() F
928
\>ACEOrders( <i> : suborder := <suborder> ) F
929
\>ACEOrders(: suborder := <suborder> ) F
930
931
for the <i>th (or default) interactive {\ACE} process started by
932
`ACEStart', search for all coset numbers whose representatives' orders
933
(modulo the subgroup) are either finite, or, if invoked with the
934
`suborder' option, are multiples of <suborder>, where <suborder>
935
should be a positive integer. `ACEOrders' returns a (possibly empty)
936
list of records, each with fields `coset', `order' and `rep', which
937
are respectively, the coset number, its order modulo the subgroup, and
938
a representative for each coset number satisfying the criteria of the
939
search.
940
941
*Note:*
942
You may wish to compact {\ACE}'s coset table first, either explicitly
943
via `ACERecover' (see~"ACERecover"), or, implicitly, via any function
944
call that invokes {\ACE}'s compaction routine (see~"ACERecover" note).
945
946
\>ACEOrder( <i>, <suborder> ) F
947
\>ACEOrder( <suborder> ) F
948
949
for the <i>th (or default) interactive {\ACE} process started by
950
`ACEStart', search for coset number(s) whose coset representatives
951
have order modulo the subgroup a multiple of <suborder>. When
952
<suborder> is a positive integer, `ACEOrder' returns just one record
953
with fields `coset', `order' and `rep', which are respectively, the
954
coset number, its order modulo the subgroup, and a representative for
955
the first coset number satisfying the criteria of the search, or
956
`fail' if there is no such coset number. The value of <suborder> may
957
also be a negative integer, in which case, `ACEOrder( <i>, <suborder>
958
)' is equivalent to `ACEOrders( <i> : suborder := |<suborder>|)'; or
959
<suborder> may be zero, in which case, `ACEOrder( <i>, 0 )' is
960
equivalent to `ACEOrders( <i> )'.
961
962
*Note:*
963
You may wish to compact {\ACE}'s coset table first, either explicitly
964
via `ACERecover' (see~"ACERecover"), or, implicitly, via any function
965
call that invokes {\ACE}'s compaction routine (see~"ACERecover" note).
966
967
\>ACECosetOrderFromRepresentative( <i>, <cosetrep> ) F
968
\>ACECosetOrderFromRepresentative( <cosetrep> ) F
969
970
for the <i>th (or default) interactive {\ACE} process return the order
971
(modulo the subgroup) of the coset with representative <cosetrep>, a
972
word in the free group generators.
973
974
*Note:*
975
`ACECosetOrderFromRepresentative' calls `ACETraceWord' to determine
976
the coset (number) to which <cosetrep> belongs, and then scans the
977
output of `ACEOrders' to determine the order of the coset (number).
978
979
\>ACECosetsThatNormaliseSubgroup( <i>, <n> ) F
980
\>ACECosetsThatNormaliseSubgroup( <n> ) F
981
982
for the <i>th (or default) interactive {\ACE} process started by
983
`ACEStart', determine non-trivial (i.e.~other than coset 1) coset
984
numbers whose representatives normalise the subgroup.
985
986
\beginlist%unordered
987
988
\item{--} If <n> $> 0$, the list of the first <n> non-trivial coset
989
numbers whose representatives normalise the subgroup is returned.
990
991
\item{--} If <n> $\< 0$, a list of records with fields `coset' and
992
`rep' which represent the coset number and a representative,
993
respectively, of the first <n> non-trivial coset numbers whose
994
representatives normalise the subgroup is returned.
995
996
\item{--} If <n> $= 0$, a list of records with fields `coset' and
997
`rep' which represent the coset number and a representative,
998
respectively, of all non-trivial coset numbers whose representatives
999
normalise the subgroup is returned.
1000
1001
\endlist
1002
1003
*Note:*
1004
You may wish to compact {\ACE}'s coset table first, either explicitly
1005
via `ACERecover' (see~"ACERecover"), or, implicitly, via any function
1006
call that invokes {\ACE}'s compaction routine (see~"ACERecover" note).
1007
1008
\>ACEStyle( <i> ) F
1009
\>ACEStyle() F
1010
1011
returns the current enumeration style as one of the strings: `"C"',
1012
`"Cr"', `"CR"', `"R"', `"R*"', `"Rc"', `"R/C"', or `"R/C (defaulted)"'
1013
(see Section~"Enumeration Style").
1014
1015
The next two functions of this section are really intended for {\ACE}
1016
standalone gurus. To fully understand their output you will need to
1017
consult the standalone manual and the C source code.
1018
1019
\>ACEDumpVariables( <i> ) F
1020
\>ACEDumpVariables() F
1021
\>ACEDumpVariables( <i>, [<level>] ) F
1022
\>ACEDumpVariables( [<level>] ) F
1023
\>ACEDumpVariables( <i>, [<level>, <detail>] ) F
1024
\>ACEDumpVariables( [<level>, <detail>] ) F
1025
1026
dump the internal variables of {\ACE} of the <i>th (or default)
1027
process started by `ACEStart'; <level> should be one of 0, 1, or 2,
1028
and <detail> should be 0 or 1.
1029
1030
The value of <level> determines which of the three levels of {\ACE} to
1031
dump. (You will need to read the standalone manual to understand what
1032
Levels 0, 1 and 2 are all about.) The value of <detail> determines the
1033
amount of detail (`<detail> = 0' means less detail). The first two
1034
forms of `ACEDumpVariables' (with no list argument) selects `<level> =
1035
0, <detail> = 0'. The third and fourth forms (with a list argument
1036
containing the integer <level>) makes `<detail> = 0'. This command is
1037
intended for gurus; the source code should be consulted to see what
1038
the output means.
1039
1040
\>ACEDumpStatistics( <i> ) F
1041
\>ACEDumpStatistics() F
1042
1043
dump {\ACE}'s internal statistics accumulated during the most recent
1044
enumeration of the <i>th (or default) process started by `ACEStart',
1045
provided the {\ACE} binary was built with the statistics package
1046
(which it is by default). Use `ACEBinaryVersion();'
1047
(see~"ACEBinaryVersion") to check for the inclusion of the statistics
1048
package. See the `enum.c' source file for the meaning of the
1049
variables.
1050
1051
\>ACEBinaryVersion( <i> ) F
1052
\>ACEBinaryVersion() F
1053
1054
for the <i>th (or default) process started by `ACEStart', print, via
1055
`Info' (at `InfoACE' level 1), version details of the {\ACE} binary
1056
you are currently running, including what compiler flags were set when
1057
the executable was built, and also returns the version number of the
1058
binary as a string. Essentially the information obtained is what is
1059
obtained via {\ACE}'s `options' option (see~"option options"), and the
1060
returned value is what is stored in `ACEData.version' (see~"ACEData").
1061
A typical output, illustrating the default build, is:
1062
1063
\beginexample
1064
gap> ACEBinaryVersion();
1065
#I No interactive ACE sessions are currently active
1066
#I ACE Binary Version: 3.001
1067
#I ACE 3.001 Sat Feb 27 11:27:15 2016
1068
#I =========================================
1069
#I Host information:
1070
#I name = banksia
1071
#I ACE 3.001 executable built:
1072
#I Wed Feb 24 15:25:26 AWST 2016
1073
#I Level 0 options:
1074
#I statistics package = on
1075
#I coinc processing messages = on
1076
#I dedn processing messages = on
1077
#I Level 1 options:
1078
#I workspace multipliers = decimal
1079
#I Level 2 options:
1080
#I host info = on
1081
"3.001"
1082
1083
\endexample
1084
1085
*Notes:*
1086
The {\ACE} binary's banner may also appear in the output (if it has
1087
not already appeared). Unlike other {\ACE} interface functions, the
1088
information obtained via `ACEBinaryVersion();' is absolutely
1089
independent of any enumeration. For this reason, we make it
1090
permissible to run `ACEBinaryVersion();' when there are no currently
1091
active interactive {\ACE} processes; and, in such a case,
1092
`ACEBinaryVersion();' emits a warning that there are no interactive
1093
{\ACE} sessions currently active and initiates (and closes again) its
1094
own stream to obtain the information from the {\ACE} binary. For the
1095
current version of the {\ACE} package (the {\GAP} code component) use
1096
`ACEPackageVersion();' (see~"ACEPackageVersion").
1097
1098
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1099
\Section{Interactive Versions of Non-interactive ACE Functions}
1100
1101
\>ACECosetTable( <i> [:<options>] )!{interactive} F
1102
\>ACECosetTable( [:<options>] )!{interactive} F
1103
1104
return a coset table as a {\GAP} object, in standard form (for
1105
{\GAP}). These functions perform the same function as
1106
`ACECosetTableFromGensAndRels' and `ACECosetTable' on three arguments
1107
(see~"ACECosetTable"), albeit interactively, on the <i>th (or default)
1108
process started by `ACEStart'. If options are passed then an internal
1109
version of `ACEModes' is run to determine which of the general {\ACE}
1110
modes (see Section~"General ACE Modes") `ACEContinue', `ACERedo' or
1111
`ACEStart' is possible; and (an internal version of) the first mode of
1112
these that is allowed is executed, to ensure the resultant table is
1113
correct for the current options.
1114
1115
\>ACEStats( <i> [:<options>] )!{interactive} F
1116
\>ACEStats( [:<options>] )!{interactive} F
1117
1118
perform the same function as `ACEStats' on three arguments
1119
(see~"ACEStats" --- non-interactive version), albeit interactively, on
1120
the <i>th (or default) process started by `ACEStart'. If options are
1121
passed then an internal version of `ACEModes' is run to determine
1122
which of the general {\ACE} modes (see Section~"General ACE Modes")
1123
`ACEContinue', `ACERedo' or `ACEStart' is possible; and (an internal
1124
version of) the first mode of these that is allowed is executed, to
1125
ensure the resultant statistics are correct for the current options.
1126
1127
See Section~"Example of Using ACE Interactively (Using ACEStart)" for
1128
an example demonstrating both these functions within an interactive
1129
process.
1130
1131
\>IsACEGeneratorsInPreferredOrder( <i> )!{interactive} F
1132
\>IsACEGeneratorsInPreferredOrder()!{interactive} F
1133
1134
for the <i>th (or default) interactive {\ACE} process started by
1135
`ACEStart', return `true' if the group generators of that process, are
1136
in an order that will not be changed by {\ACE}, and `false' otherwise.
1137
This function has greatest relevance to users who call `ACECosetTable'
1138
(see~"ACECosetTable!interactive"), with the `lenlex' option
1139
(see~"option lenlex"). For more details, see the discussion for the
1140
non-interactive version of `IsACEGeneratorsInPreferredOrder'
1141
("IsACEGeneratorsInPreferredOrder"), which is called with two
1142
arguments.
1143
1144
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1145
\Section{Steering ACE Interactively}
1146
1147
\index{dead coset (number)}
1148
\>ACERecover( <i> ) F
1149
\>ACERecover() F
1150
1151
invoke the compaction routine on the coset table of the <i>th (or
1152
default) interactive {\ACE} process started by `ACEStart', in order to
1153
recover the space used by the dead coset numbers. A `CO' message line
1154
is printed if any rows of the coset table were recovered, and a `co'
1155
line if none were. (See Appendix~"The Meanings of ACE's output
1156
messages" for the meanings of these messages.)
1157
1158
*Note:*
1159
The compaction routine is called automatically when any of
1160
`ACEDisplayCosetTable' (see~"ACEDisplayCosetTable"),
1161
`ACECosetRepresentative' (see~"ACECosetRepresentative"),
1162
`ACECosetRepresentatives' (see~"ACECosetRepresentatives"),
1163
`ACETransversal' (see~"ACETransversal"), `ACECycles'
1164
(see~"ACECycles"), `ACEStandardCosetNumbering'
1165
(see~"ACEStandardCosetNumbering"), `ACECosetTable'
1166
(see~"ACECosetTable") or `ACEConjugatesForSubgroupNormalClosure'
1167
(see~"ACEConjugatesForSubgroupNormalClosure"), is invoked.
1168
1169
\atindex{lenlex standardisation scheme}%
1170
{@\noexpand`lenlex' standardisation scheme}
1171
\>ACEStandardCosetNumbering( <i> ) F
1172
\>ACEStandardCosetNumbering() F
1173
1174
compact and then do a `lenlex' standardisation (see Section~"Coset
1175
Table Standardisation Schemes") of the numbering of cosets in the
1176
coset table of the <i>th (or default) interactive {\ACE} process
1177
started by `ACEStart'. That is, for a given ordering of the generators
1178
in the columns of the table, they produce a canonic table. A table
1179
that includes a column for each generator inverse immediately
1180
following the column for the corresponding generator, standardised
1181
according to the `lenlex' scheme, has the property that a row-major
1182
scan (i.e.~a scan of the successive rows of the *body* of the table
1183
row by row, from left to right) encounters previously unseen cosets in
1184
numeric order. This function does not display the new table; use
1185
`ACEDisplayCosetTable' (see~"ACEDisplayCosetTable") for that.
1186
1187
*Notes:*
1188
In a `lenlex' canonic table, the coset representatives are ordered
1189
first according to length and then the lexicographic order defined by
1190
the order the generators and their inverses head the columns. Note
1191
that, unless special action is taken, {\ACE} avoids having an
1192
involutory generator in the first column (by swapping the first two
1193
generators), except when there is only one generator, or when the
1194
second generator is also an involution; so the lexicographic order
1195
used by {\ACE} need not necessarily correspond with the order in which
1196
the generators were first put to {\ACE}. (We have used the term
1197
``involution'' above; what we really mean is a generator `x' for
1198
which there is a relator `x*x' or `x^2'. Such a generator may, of
1199
course, turn out to actually be the identity.) The function
1200
`IsACEGeneratorsInPreferredOrder' (see
1201
"IsACEGeneratorsInPreferredOrder") detects cases when {\ACE} would
1202
swap the first two generators.
1203
1204
Standardising the coset numbering within {\ACE} does *not* affect the
1205
{\GAP} coset table obtained via `ACECosetTable' (see~"ACECosetTable").
1206
If `ACECosetTable' is called without the `lenlex' option {\GAP}'s
1207
default standardisation is applied after conversion of {\ACE}'s
1208
output, which undoes an {\ACE} standardisation. On the other hand, if
1209
`ACECosetTable' is called with the `lenlex' option then after a check
1210
and special action, if required, the equivalent of a call to
1211
`ACEStandardCosetNumbering' is invoked, irrespective of whether it has
1212
been done by the user beforehand. The check that is done is a call to
1213
`IsACEGeneratorsInPreferredOrder' (see
1214
"IsACEGeneratorsInPreferredOrder") to ensure that {\ACE} has not
1215
swapped the first two generators. The special action taken when the
1216
call to `IsACEGeneratorsInPreferredOrder' returns `false', is the
1217
setting of the `asis' option (see~"option asis") to 1 and the
1218
resubmission of the relators to {\ACE} taking care not to submit the
1219
relator that determines the first generator as an involution as that
1220
generator squared (these two actions together avert {\ACE}'s swapping
1221
of the first two generators), followed by the re-`start'ing of the
1222
enumeration.
1223
1224
*Guru Notes:*
1225
In five of the ten standard enumeration strategies of Sims
1226
\cite{Sim94} (i.e.~the five Sims strategies not provided by {\ACE}),
1227
the table is standardised repeatedly. This is expensive
1228
computationally, but can result in fewer cosets being necessary. The
1229
effect of doing this can be investigated in {\ACE} by (repeatedly)
1230
halting the enumeration (via restrictive options), standardising the
1231
coset numbering, and continuing (see Section~"Emulating Sims" for an
1232
example).
1233
1234
\>ACEAddRelators( <i>, <wordlist> ) F
1235
\>ACEAddRelators( <wordlist> ) F
1236
1237
add, for the <i>th (or default) interactive {\ACE} process started by
1238
`ACEStart', the words in the list <wordlist> to any relators already
1239
present, and automatically invoke `ACERedo', if it can be applied, or
1240
otherwise `ACEStart'. Note that {\ACE} sorts the resultant relator
1241
list, unless the `asis' option (see~"option asis") has been set to 1;
1242
don't assume, unless `asis = 1', that the new relators have been
1243
appended in user-provided order to the previously existing relator
1244
list. `ACEAddRelators' also returns the new relator list. Use
1245
`ACERelators' (see~"ACERelators") to determine the current relator
1246
list.
1247
1248
\>ACEAddSubgroupGenerators( <i>, <wordlist> ) F
1249
\>ACEAddSubgroupGenerators( <wordlist> ) F
1250
1251
add, for the <i>th (or default) interactive {\ACE} process started by
1252
`ACEStart', the words in the list <wordlist> to any subgroup
1253
generators already present, and automatically invoke `ACERedo', if it
1254
can be applied, or otherwise `ACEStart'. Note that {\ACE} sorts the
1255
resultant subgroup generator list, unless the `asis' option
1256
(see~"option asis") has been set to 1; don't assume, unless `asis =
1257
1', that the new subgroup generators have been appended in
1258
user-provided order to the previously existing subgroup generator
1259
list. `ACEAddSubgroupGenerators' also returns the new subgroup
1260
generator list. Use `ACESubgroupGenerators'
1261
(see~"ACESubgroupGenerators") to determine the current subgroup
1262
generator list.
1263
1264
\>ACEDeleteRelators( <i>, <list> ) F
1265
\>ACEDeleteRelators( <list> ) F
1266
1267
for the <i>th (or default) interactive {\ACE} process started by
1268
`ACEStart', delete <list> from the current relators, if list is a list
1269
of words in the group generators, or those current relators indexed by
1270
the integers in <list>, if <list> is a list of positive integers, and
1271
automatically invoke `ACEStart'. `ACEDeleteRelators' also returns the
1272
new relator list. Use `ACERelators' (see~"ACERelators") to determine
1273
the current relator list.
1274
1275
\>ACEDeleteSubgroupGenerators( <i>, <list> ) F
1276
\>ACEDeleteSubgroupGenerators( <list> ) F
1277
1278
for the <i>th (or default) interactive {\ACE} process started by
1279
`ACEStart', delete <list> from the current subgroup generators, if
1280
list is a list of words in the group generators, or those current
1281
subgroup generators indexed by the integers in <list>, if <list> is a
1282
list of positive integers, and automatically invoke `ACEStart'.
1283
`ACEDeleteSubgroupGenerators' also returns the new subgroup generator
1284
list. Use `ACESubgroupGenerators' (see~"ACESubgroupGenerators") to
1285
determine the current subgroup generator list.
1286
1287
\>ACECosetCoincidence( <i>, <n> ) F
1288
\>ACECosetCoincidence( <n> ) F
1289
1290
for the <i>th (or default) interactive {\ACE} process started by
1291
`ACEStart', return the representative of coset <n>, where <n> must be
1292
a positive integer, and add it to the subgroup generators; i.e.,
1293
equates this coset with coset 1, the subgroup. `ACERedo' is
1294
automatically invoked.
1295
1296
\>ACERandomCoincidences( <i>, <subindex> ) F
1297
\>ACERandomCoincidences( <subindex> ) F
1298
\>ACERandomCoincidences( <i>, [<subindex>] ) F
1299
\>ACERandomCoincidences( [<subindex>] ) F
1300
\>ACERandomCoincidences( <i>, [<subindex>, <attempts>] ) F
1301
\>ACERandomCoincidences( [<subindex>, <attempts>] ) F
1302
1303
for the <i>th (or default) interactive {\ACE} process started by
1304
`ACEStart', attempt up to <attempts> (or, in the first four forms, 8)
1305
times to find nontrivial subgroups with index a multiple of <subindex>
1306
by repeatedly making random coset numbers coincident with coset 1 and
1307
seeing what happens. The starting coset table must be non-empty, but
1308
must *not* be complete (use `ACERandomlyApplyCosetCoincidence'
1309
(see~"ACERandomlyApplyCosetCoincidence") if your table is already
1310
complete). For each attempt, by applying {\ACE}'s `rc' option
1311
(see~"option rc") random coset representatives are repeatedly added to
1312
the subgroup and the enumeration `redo'ne. If the table becomes too
1313
small, the attempt is aborted, the original subgroup generators
1314
restored, and another attempt made. If an attempt succeeds, then the
1315
new set of subgroup generators is retained. `ACERandomCoincidences'
1316
returns the list of new subgroup generators added. Use
1317
`ACESubgroupGenerators' (see~"ACESubgroupGenerators") to determine the
1318
current subgroup generator list.
1319
1320
*Notes:*
1321
`ACERandomCoincidences' may add subgroup generators even if it failed
1322
to determine a nontrivial subgroup with index a multiple of
1323
<subindex>; in such a case, the original status may be restored by
1324
applying `ACEDeleteSubgroupGenerators'
1325
(see~"ACEDeleteSubgroupGenerators") with the list returned by
1326
`ACERandomCoincidences'.
1327
1328
`ACERandomCoincidences' applies the `rc' option (see~"option rc") of
1329
{\ACE} which takes the line that if an enumeration has already
1330
obtained a finite index then either, <subindex> is already a divisor
1331
of that finite index, or the request is impossible. Thus an invocation
1332
of `ACERandomCoincidences', in the case where the coset table is
1333
already complete, is an error.
1334
1335
*Guru Notes:* A coset can have many different representatives.
1336
Consider running `ACEStandardCosetNumbering'
1337
(see~"ACEStandardCosetNumbering") before `ACERandomCoincidences', to
1338
canonicise the table and the representatives.
1339
1340
\>ACERandomlyApplyCosetCoincidence( <i> [: <controlOptions>]) F
1341
\>ACERandomlyApplyCosetCoincidence( [: <controlOptions>]) F
1342
1343
for the <i>th (or default) interactive {\ACE} process started by
1344
`ACEStart', try to find a larger proper subgroup (i.e.~a subgroup of
1345
smaller but nontrivial index), by repeatedly applying
1346
`ACECosetCoincidence' (see~"ACECosetCoincidence") and seeing what
1347
happens; `ACERandomlyApplyCosetCoincidence' returns the (possibly
1348
empty) list of new subgroup generators added. The starting coset table
1349
must already be complete (use `ACERandomCoincidences'
1350
(see~"ACERandomCoincidences") if your table is not already complete).
1351
`ACERandomlyApplyCosetCoincidence' provides the following four options
1352
(<controlOptions>).
1353
1354
\beginitems
1355
1356
\quad`subindex := <subindex>' &
1357
Sets the restriction that the final index should be a multiple of
1358
<subindex>; <subindex> must be a positive integer divisor of the
1359
initial subgroup index.
1360
1361
\quad`hibound := <hibound>' &
1362
Sets the restriction that the final index should be (strictly) less
1363
than <hibound>; <hibound> must be an integer that is greater than 1
1364
and at most the initial subgroup index.
1365
1366
\quad`lobound := <lobound>' &
1367
Sets the restriction that the final index should be (strictly) greater
1368
than <lobound>; <lobound> must be an integer that is at least 1 and
1369
(strictly) less than the initial subgroup index.
1370
1371
\quad`attempts := <attempts>' &
1372
Sets the restriction that the number of applications of
1373
`ACECosetCoincidence' should be at most <attempts>; <attempts> must be
1374
a positive integer.
1375
1376
\enditems
1377
1378
By default, `<subindex> = 1', <hibound> is the existing subgroup
1379
index, `<lobound> = 1' and `<attempts> = 8'. If after an attempt the
1380
new index is a multiple of <subindex>, less than <hibound> and greater
1381
than <lobound> then the process terminates (and the list of new
1382
subgroup generators is returned). Otherwise, if an attempt reaches a
1383
stage where the criteria cannot be satisfied, the attempt is aborted,
1384
the original subgroup generators restored, and another attempt made.
1385
If no attempt is successful an empty list is returned. Use
1386
`ACESubgroupGenerators' (see~"ACESubgroupGenerators") to determine the
1387
current subgroup generator list.
1388
1389
\>ACEConjugatesForSubgroupNormalClosure( <i> ) F
1390
\>ACEConjugatesForSubgroupNormalClosure() F
1391
\>ACEConjugatesForSubgroupNormalClosure( <i> : add ) F
1392
\>ACEConjugatesForSubgroupNormalClosure(: add ) F
1393
1394
for the <i>th (or default) interactive {\ACE} process started by
1395
`ACEStart', test each conjugate of a subgroup generator by a group
1396
generator for membership in the subgroup, and return the (possibly
1397
empty) list of conjugates that were determined to not belong to the
1398
subgroup (coset 1); and, if called with the `add' option, these
1399
conjugates are also added to the existing list of subgroup generators.
1400
1401
*Notes:* A conjugate of a subgroup generator is tested for membership
1402
of the subgroup, by checking whether it can be traced from coset 1 to
1403
coset 1 (see `ACETraceWord':~"ACETraceWord"). For an *incomplete*
1404
coset table, such a trace may not complete, in which case
1405
`ACEConjugatesForSubgroupNormalClosure' may return an empty list even
1406
though the subgroup is *not* normally closed within the group.
1407
1408
The `add' option does *not* guarantee that the resultant subgroup is
1409
normally closed. It is still possible that some conjugates of the
1410
newly added subgroup generators will not be elements of the subgroup.
1411
1412
*Example:*
1413
To demonstrate the usage and features of
1414
`ACEConjugatesForSubgroupNormalClosure', let us consider an example
1415
where we know pretty well what to expect.
1416
1417
Let $G$ be the group, isomorphic to the symmetric group $S_6$, with
1418
the presentation
1419
$$
1420
\{ a, b \mid a^2, b^6, (ab^{-1}ab)^3, (ab^{-1}ab^2)^4, (ab)^5,
1421
(ab^{-2}ab^2)^2 \}
1422
$$
1423
(from \cite{CM72}), and let $H$ be the subgroup $\langle ab^3
1424
\rangle$. There is an isomorphism $\phi$ from $G$ to $S_6$ mapping $a$
1425
onto $(1,2)$ and $ab^3$ onto $(1,2,3,4,5,6)$. It follows that $\phi$
1426
maps $ab^3$ into $A_6$. So we know that the normal closure of $H$ has
1427
index 2 in $G$. Let us observe this via {\ACE}.
1428
1429
First we start an enumeration with `max' set to 80.
1430
1431
\beginexample
1432
gap> F := FreeGroup( "a", "b" );;
1433
gap> a := F.1;; b := F.2;;
1434
gap> fgens := GeneratorsOfGroup( F );;
1435
gap> rels := [ a^2, b^6, (a*b^-1*a*b)^3, (a*b^-1*a*b^2)^4, (a*b)^5,
1436
> (a*b^-2*a*b^2)^2 ];;
1437
gap> sgens := [ a*b^3 ];;
1438
gap> i := ACEStart( fgens, rels, sgens : max := 80 );;
1439
gap> IsCompleteACECosetTable( i );
1440
false
1441
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
1442
#I ACEConjugatesForSubgroupNormalClosure: All (traceable) conjugates in subgp
1443
[ ]
1444
1445
\endexample
1446
1447
Though we know that $H$ is not equal to its normal closure, we did not
1448
get any new elements (we had warned above of such a possibility).
1449
Apparently our incomplete table is too small. So let us increase `max'
1450
to 100 and continue.
1451
1452
\beginexample
1453
gap> ACEContinue( i : max := 100 );;
1454
gap> IsCompleteACECosetTable( i );
1455
false
1456
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
1457
[ b^-1*a*b^4 ]
1458
gap> IsCompleteACECosetTable( i );
1459
true
1460
gap> ACEStats( i ).index;
1461
20
1462
1463
\endexample
1464
1465
This time we got a new element, and after adding it to the subgroup
1466
generators we obtained a complete table. However the resulting
1467
subgroup need not yet be the normal closure of $H$ (and in fact we
1468
know that it is not). So we continue with another call to the function
1469
`ACEConjugatesForSubgroupNormalClosure'.
1470
1471
\beginexample
1472
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
1473
[ b^-2*a*b^5, b*a*b^2 ]
1474
gap> ACEStats( i ).index;
1475
2
1476
1477
\endexample
1478
1479
Now we have the index that we expected. Another call to the function
1480
`ACEConjugatesForSubgroupNormalClosure' should not yield any more
1481
conjugates. We ensure that this is indeed the case and then display
1482
the resulting list of subgroup generators.
1483
1484
\beginexample
1485
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
1486
#I ACEConjugatesForSubgroupNormalClosure: All (traceable) conjugates in subgp
1487
[ ]
1488
gap> ACESubgroupGenerators( i );
1489
[ a*b^3, b*a*b^2, b^-1*a*b^4, b^-2*a*b^5 ]
1490
1491
\endexample
1492
1493
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1494
\Section{Primitive ACE Read/Write Functions}
1495
1496
For those familiar with the workings of the {\ACE} standalone we
1497
provide primitive read/write tools to communicate directly with an
1498
interactive {\ACE} process, started via `ACEStart' (possibly with
1499
argument 0, but this is not essential). For the most part, it is up to
1500
the user to translate the output strings from {\ACE} into a form
1501
useful in {\GAP}. However, after the group generators, relators, and
1502
subgroup generators have been set in the {\ACE} process, via
1503
`ACEWrite', invocations of any of `ACEGroupGenerators'
1504
(see~"ACEGroupGenerators"), `ACERelators' (see~"ACERelators"),
1505
`ACESubgroupGenerators' (see~"ACESubgroupGenerators"), or
1506
`ACEParameters' (see~"ACEParameters") will establish the corresponding
1507
{\GAP} values. Be warned though, that unless one of the modes
1508
`ACEStart' (without a zero argument; see~"ACEStart"), `ACERedo'
1509
(see~"ACERedo") or `ACEContinue' (see~"ACEContinue"), or their
1510
equivalent for the standalone {\ACE} (`start;', `redo;', or
1511
`continue;'), has been invoked since the last change of any parameter
1512
options (see~"ACEParameterOptions"), some of the values reported by
1513
`ACEParameters' may well be *incorrect*.
1514
1515
\>ACEWrite( <i>, <string> ) F
1516
\>ACEWrite( <string> ) F
1517
1518
write <string> to the <i>th or default interactive {\ACE} process;
1519
<string> must be in exactly the form the {\ACE} standalone expects.
1520
The command is echoed via `Info' at `InfoACE' level 4 (with a
1521
```ToACE> ''' prompt); i.e.~`SetInfoACELevel(4);' will allow you to
1522
see what is transmitted to the {\ACE} binary. `ACEWrite' returns `true'
1523
if successful in writing to the stream of the interactive {\ACE} process,
1524
and `fail' otherwise.
1525
1526
*Note:*
1527
If `ACEWrite' returns `fail' (which means that the {\ACE} process has
1528
died), you may like to try resurrecting the interactive {\ACE} process
1529
via `ACEResurrectProcess' (see~"ACEResurrectProcess").
1530
1531
\>ACERead( <i> ) F
1532
\>ACERead() F
1533
1534
read a complete line of {\ACE} output, from the <i>th or default
1535
interactive {\ACE} process, if there is output to be read and returns
1536
`fail' otherwise. When successful, the line is returned as a string
1537
complete with trailing newline character. Please note that it is
1538
possible to be ``too quick'' (i.e.~the return can be `fail' purely
1539
because the output from {\ACE} is not there yet), but if `ACERead'
1540
finds any output at all, it waits for a complete line.
1541
1542
\>ACEReadAll( <i> ) F
1543
\>ACEReadAll() F
1544
1545
read and return as many *complete* lines of {\ACE} output, from the
1546
<i>th or default interactive {\ACE} process, as there are to be read,
1547
*at the time of the call*, as a list of strings with the trailing
1548
newlines removed and returns the empty list otherwise. `ACEReadAll'
1549
also writes each line read via `Info' at `InfoACE' level 3. Whenever
1550
`ACEReadAll' finds only a partial line, it waits for the complete
1551
line, thus increasing the probability that it has captured all the
1552
output to be had from {\ACE}.
1553
1554
\>ACEReadUntil( <i>, <IsMyLine> ) F
1555
\>ACEReadUntil( <IsMyLine> ) F
1556
\>ACEReadUntil( <i>, <IsMyLine>, <Modify> ) F
1557
\>ACEReadUntil( <IsMyLine>, <Modify> ) F
1558
1559
read complete lines of {\ACE} output, from the <i>th or default
1560
interactive {\ACE} process, ``chomps'' them (i.e.~removes any trailing
1561
newline character), emits them to `Info' at `InfoACE' level 3, and
1562
applies the function <Modify> (where <Modify> is just the identity
1563
map/function for the first two forms) until a ``chomped'' line <line>
1564
for which `<IsMyLine>( <Modify>(<line>) )' is true. `ACEReadUntil'
1565
returns the list of <Modify>-ed ``chomped'' lines read.
1566
1567
*Notes:*
1568
When provided by the user, <Modify> should be a function that accepts
1569
a single string argument.
1570
1571
<IsMyLine> should be a function that is able to accept the output of
1572
<Modify> (or take a single string argument when <Modify> is not
1573
provided) and should return a boolean.
1574
1575
If `<IsMyLine>( <Modify>(<line>) )' is never true, `ACEReadUntil' will
1576
wait indefinitely.
1577
1578
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1579
%%
1580
%E
1581
1582