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

Path: gap4r8 / pkg / ace-5.2 / doc / ace.tex
Views: 418346
1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
%%
3
%W ace.tex ACE documentation introduction Alexander Hulpke
4
%W Joachim Neub"user
5
%W Greg Gamble
6
%%
7
%H $Id$
8
%%
9
%Y Copyright (C) 2000 Centre for Discrete Mathematics and Computing
10
%Y Department of Information Tech. & Electrical Eng.
11
%Y University of Queensland, Australia.
12
%%
13
14
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15
\Chapter{The ACE Package}
16
17
\index{ACE}
18
The ``Advanced Coset Enumerator'' {\ACE}:
19
20
\begintt
21
ACE coset enumerator (C) 1995-2001 by George Havas and Colin Ramsay
22
\endtt
23
\URL{http://staff.itee.uq.edu.au/havas}
24
25
can be called from within {\GAP} through an interface, written by
26
Alexander Hulpke and Greg Gamble, which is described in this manual.
27
28
The interface links to an external binary and therefore is only usable
29
under UNIX (see Section~"Installing the ACE Package" for how to
30
install {\ACE}). It will not work on Windows.
31
The current version requires at least {\GAP}~4.4. Users who
32
still have {\GAP}~4.3, must use {\ACE} 4.1. (The first versions
33
supported {\GAP}~4.2.) {\ACE} can be used through this interface in a
34
variety of ways:
35
36
\beginlist%unordered
37
38
\item{--} one may supplant the usual {\GAP} coset enumerator (see
39
Section~"Using ACE as a Default for Coset Enumerations"),
40
41
\item{--} one may generate a coset table using {\ACE} without
42
redefining the usual {\GAP} coset enumerator (see Section~"Using ACE
43
Directly to Generate a Coset Table"),
44
45
\item{--} one may simply test whether a coset enumeration will
46
terminate (see Section~"Using ACE Directly to Test whether a Coset
47
Enumeration Terminates"),
48
49
\item{--} one may use {\GAP} to write a script for the {\ACE}
50
standalone (see Section~"Writing ACE Standalone Input Files to
51
Generate a Coset Table"), and
52
53
\item{--} one may interact with the {\ACE} standalone from within
54
{\GAP} (see Section~"Using ACE Interactively"). Among other things,
55
the interactive {\ACE} interface functions (described in
56
Chapter~"Functions for Using ACE Interactively") enable the user to
57
search for subgroups of a group (see the note of Section~"Using ACE
58
Interactively").
59
60
\endlist
61
62
Each of these ways gives the user access to a welter of options, which
63
are discussed in full in Chapters~"Options for ACE" and~"Strategy
64
Options for ACE". Yet more options are provided in Appendix~"Other ACE
65
Options", but please take note of the Appendix's introductory
66
paragraph. Check out Appendix~"Examples" for numerous examples of the
67
{\ACE} commands.
68
69
*Note*: Some care needs to be taken with options; be sure to read
70
Section~"General Warnings regarding the Use of Options" and the
71
introductory sections of Chapter~"Options for ACE" for some warnings
72
regarding them and a general discussion of their use, before using any
73
of the functions provided by this interface to the {\ACE} binary.
74
75
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76
\Section{Using ACE as a Default for Coset Enumerations}
77
78
After loading {\ACE} (see Section~"Loading the ACE Package"), if you
79
want to use the {\ACE} coset enumerator as a default for all coset
80
enumerations done by {\GAP} (which may also get called indirectly),
81
you can achieve this by setting the global variable `TCENUM' to
82
`ACETCENUM'.
83
84
\beginexample
85
gap> TCENUM:=ACETCENUM;;
86
87
\endexample
88
89
This sets the function `CosetTableFromGensAndRels' (see
90
Section~"ref:Coset Tables and Coset Enumeration" in the {\GAP}
91
Reference Manual) to be the function `ACECosetTableFromGensAndRels'
92
(described in Section~"Using ACE Directly to Generate a Coset Table"),
93
which then can be called with all the options defined for the {\ACE}
94
interface, not just the options `max' and `silent'. If `TCENUM' is set
95
to `ACETCENUM' without any further action, the `default' strategy
96
(option) of the {\ACE} enumerator will be used (see Chapter~"Strategy
97
Options for ACE").
98
99
You can switch back to the coset enumerator built into the {\GAP}
100
library by assigning `TCENUM' to `GAPTCENUM'.
101
102
\beginexample
103
gap> TCENUM:=GAPTCENUM;;
104
105
\endexample
106
107
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108
\Section{Using ACE Directly to Generate a Coset Table}
109
110
If, on the other hand you do not want to set up {\ACE} globally for
111
your coset enumerations, you may call the {\ACE} interface directly,
112
which will allow you to decide for yourself, for each such call, which
113
options you want to use for running {\ACE}. Please note the warnings
114
regarding options in Section~"General Warnings regarding the Use of
115
Options". The functions discussed in this and the following section
116
(`ACECosetTableFromGensAndRels' and `ACEStats') are non-interactive,
117
i.e.~by their use, a file with your input data in {\ACE} readable
118
format will be handed to {\ACE} and you will get the answer back in
119
{\GAP} format. At that moment however the {\ACE} job is terminated,
120
that is, you cannot send any further questions or requests about the
121
result of that job to {\ACE}. For an interactive use of {\ACE} from
122
{\GAP} see Section~"Using ACE Interactively" and Chapter~"Functions
123
for Using ACE Interactively".
124
125
Using the {\ACE} interface directly to generate a coset table is done
126
by either of
127
128
\atindex{ACECosetTable}{@\noexpand`ACECosetTable'!non-interactive}
129
\>ACECosetTableFromGensAndRels( <fgens>, <rels>, <sgens> [: <options>] ) F
130
\>ACECosetTable( <fgens>, <rels>, <sgens> [: <options>] ) F
131
132
Here <fgens> is a list of free generators, <rels> a list of words in
133
these generators giving relators for a finitely presented group, and
134
<sgens> the list of subgroup generators, again expressed as words in
135
the free generators. All these are given in the standard {\GAP} format
136
(see Chapter~"ref:Finitely Presented Groups" of the {\GAP} Reference
137
Manual). Note that the 3-argument form of `ACECosetTable' described
138
here is merely a synonym for `ACECosetTableFromGensAndRels', and that
139
`ACECosetTable' may be called in a different way in an interactive
140
{\ACE} session (see Sections~"Using ACE Interactively"
141
and~"ACECosetTable!interactive").
142
143
Behind the colon any selection of the options available for the
144
interface (see Chapters~"Options for ACE" and~"Strategy Options for
145
ACE") can be given, separated by commas like record components. These
146
can be used e.g.~to preset limits of space and time to be used, to
147
modify input and output and to modify the enumeration procedure. Note
148
that strategies are simply special options that set a number of the
149
options, detailed in Chapter~"Options for ACE", all at once.
150
151
Please see Section~"General Warnings regarding the Use of Options" for
152
a discussion regarding global and local passing of options, and the
153
non-orthogonal nature of {\ACE}'s options.
154
155
Each of `ACECosetTableFromGensAndRels' and `ACECosetTable' calls the
156
{\ACE} binary and, if successful, returns a standard coset table, as a
157
{\GAP} list of lists. At the time of writing, two coset table
158
standardisations schemes were possible: `lenlex' and `semilenlex' (see
159
Section~"Coset Table Standardisation Schemes"). The user may control
160
which standardisation scheme is used by selecting either the `lenlex'
161
(see~"option lenlex") or `semilenlex' (see~"option semilenlex")
162
option; otherwise (since {\GAP}~4.3) the table is standardised
163
according to {\GAP}'s the value of `CosetTableStandard' (which by
164
default is `lenlex'; for {\GAP}~4.2, the variable `CosetTableStandard'
165
didn't exist and the default standardisation scheme was `semilenlex').
166
We provide `IsACEStandardCosetTable' (see~"IsACEStandardCosetTable")
167
to determine whether a table (list of lists) is standard relative to
168
{\GAP}'s default standardisation scheme, or with the use of options
169
(e.g.~`lenlex' or `semilenlex') to another standardisation scheme.
170
171
If the determination of a coset table is unsuccessful, then one of the
172
following occurs:
173
174
\beginlist%unordered
175
176
\item{--} with the `incomplete' option (see~"option incomplete") an
177
incomplete coset table is returned (as a list of lists), with zeros in
178
positions where valid coset numbers could not be determined; or
179
180
\item{--} with the `silent' option (see~"option silent"), `fail' is
181
returned; or
182
183
\item{--} a `break'-loop is entered. This last possibility is
184
discussed in detail via the example that follows.
185
186
\endlist
187
188
The example given below is the call for a presentation of the
189
Fibonacci group F(2,7) for which we shall discuss the impact of
190
various options in Section~"Fun with ACEExample". Observe that in the
191
example, no options are passed, which means that {\ACE} uses the
192
`default' strategy (see Chapter~"Strategy Options for ACE").
193
194
\beginexample
195
gap> F:= FreeGroup( "a", "b", "c", "d", "e", "x", "y");;
196
gap> a:= F.1;; b:= F.2;; c:= F.3;; d:= F.4;; e:= F.5;; x:= F.6;; y:= F.7;;
197
gap> fgens:= [a, b, c, d, e, x, y];;
198
gap> rels:= [ a*b*c^-1, b*c*d^-1, c*d*e^-1, d*e*x^-1,
199
> e*x*y^-1, x*y*a^-1, y*a*b^-1];;
200
gap> ACECosetTable(fgens, rels, [c]);;
201
202
\endexample
203
204
\atindex{break-loop}{@\noexpand`break'-loop}
205
In computing the coset table, `ACECosetTableFromGensAndRels' must
206
first do a coset enumeration (which is where {\ACE} comes in!). If the
207
coset enumeration does not finish in the preset limits a `break'-loop
208
is entered, unless the `incomplete' (see~"option incomplete") or
209
`silent' (see~"option silent") options is set. In the event that a
210
`break'-loop is entered, don't despair or be frightened by the word
211
`Error'; by tweaking {\ACE}'s options via the `SetACEOptions' function
212
that becomes available in the `break'-loop and then typing `return;'
213
it may be possible to help {\ACE} complete the coset enumeration (and
214
hence successfully compute the coset table); if not, you will end up
215
in the `break'-loop again, and you can have another go (or `quit;' if
216
you've had enough). The `SetACEOptions' function is a no-argument
217
function; it's there *purely* to pass *options* (which, of course, are
218
listed behind a colon (`:') with record components syntax). Let's
219
continue the Fibonacci example above, redoing the last command but
220
with the option `max := 2' (see~"option max"), so that the coset
221
enumeration has only two coset numbers to play with and hence is bound
222
to fail to complete, putting us in a `break'-loop.
223
224
\atindex{ACECosetTable}{@\noexpand`ACECosetTable'!\noexpand`break'-loop example}
225
\beginexample
226
gap> ACECosetTable(fgens, rels, [c] : max := 2);
227
Error, no coset table ...
228
the `ACE' coset enumeration failed with the result:
229
OVERFLOW (a=2 r=1 h=1 n=3; l=5 c=0.00; m=2 t=2)
230
called from
231
<function "ACECosetTable">( <arguments> ) called from read-eval-loop
232
Entering break read-eval-print loop ...
233
try relaxing any restrictive options
234
e.g. try the `hard' strategy or increasing `workspace'
235
type: '?strategy options' for info on strategies
236
type: '?options for ACE' for info on options
237
type: 'DisplayACEOptions();' to see current ACE options;
238
type: 'SetACEOptions(:<option1> := <value1>, ...);'
239
to set <option1> to <value1> etc.
240
(i.e. pass options after the ':' in the usual way)
241
... and then, type: 'return;' to continue.
242
Otherwise, type: 'quit;' to quit to outer loop.
243
brk> SetACEOptions(: max := 0);
244
brk> return;
245
[ [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ],
246
[ 1 ], [ 1 ], [ 1 ], [ 1 ] ]
247
248
\endexample
249
250
Observe how the lines after the ```Entering break read-eval-print
251
loop''' announcement tell you *exactly* what to do (for {\GAP} 4.2
252
these lines are instead `Info'-ed *before* the `break'-loop
253
announcement). At the `break'-loop prompt `brk>' we relaxed all
254
restrictions on `max' (by re-setting it to 0) and typed `return;' to
255
leave the `break'-loop. The coset enumeration was then successful,
256
allowing the computation of what turned out to be a trivial coset
257
table. Despite the fact that the eventual coset table only has one
258
line (i.e.~there is exactly one coset number) {\ACE} *did* need to
259
define more than 2 coset numbers. To find out just how many were
260
required before the final collapse, let's set the `InfoLevel' of
261
`InfoACE' (see~"SetInfoACELevel") to 2, so that the {\ACE} enumeration
262
result is printed.
263
264
\beginexample
265
gap> SetInfoACELevel(2);
266
gap> ACECosetTable(fgens, rels, [c]);
267
#I INDEX = 1 (a=1 r=2 h=2 n=2; l=6 c=0.00; m=2049 t=3127)
268
[ [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ],
269
[ 1 ], [ 1 ], [ 1 ], [ 1 ] ]
270
271
\endexample
272
273
The enumeration result line is the `Info' line beginning ```\#I '''.
274
Appendix~"The Meanings of ACE's Output Messages" explains how to
275
interpret such output messages from {\ACE}. In particular, it explains
276
that `t=3127' tells us that a `t'otal number of 3127 coset numbers
277
needed to be defined before the final collapse to 1 coset number.
278
Using some of the many options that {\ACE} provides, one may achieve
279
this result more efficiently, e.g.~with the `purec' strategy
280
(see~"option purec"):
281
282
\beginexample
283
gap> ACECosetTable(fgens, rels, [c] : purec);
284
#I INDEX = 1 (a=1 r=2 h=2 n=2; l=4 c=0.00; m=332 t=332)
285
[ [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ],
286
[ 1 ], [ 1 ], [ 1 ], [ 1 ] ]
287
288
\endexample
289
290
{\ACE} needs to define a `t'otal number of only (relatively-speaking)
291
332 coset numbers before the final collapse to 1 coset number.
292
293
*Notes:*
294
To initiate the coset enumeration, the `start' option (see~"option
295
start") is quietly inserted after the user's supplied options, unless
296
the user herself supplies one of the enumeration-invoking options,
297
which are: `start', or one of its synonyms, `aep' (see~"option aep")
298
or `rep' (see~"option rep").
299
300
When a user calls `ACECosetTable' with the `lenlex' option
301
(see~"option lenlex"), occasionally it is necessary to enforce
302
`asis'${}=1$ (see~"option asis"), which may be counter to the desires
303
of the user. The occasions where this action is necessary are
304
precisely those for which, for the arguments <gens> and <rels> of
305
`ACECosetTable', `IsACEGeneratorsInPreferredOrder' would return
306
`false'.
307
308
The non-interactive `ACECosetTable' and `ACECosetTableFromGensAndRels'
309
now use an iostream to communicate with the {\ACE} binary in order to
310
avoid filling up a temporary directory with an incomplete coset table
311
in the case where an enumeration overflows. This is generally
312
advantageous. However, on some systems, it may *not* be advisable to
313
repeatedly call `ACECosetTable' or `ACECosetTableFromGensAndRels'
314
(e.g.~in a loop), since one may run out of the pseudo ttys used for
315
iostreams. If you encounter this problem, consider using an adaptation
316
of the usage of the interactive forms of `ACECosetTable' and
317
`ACEStats' (see~"ACECosetTable!interactive"
318
and~"ACEStats!interactive"), together with `ACEStart' initialisation
319
steps, that is sketched in the schema below. For the following code,
320
it is imagined the scenario is one of looping over several
321
possibilities of <fgens>, <rels> and <sgens>; the two special forms of
322
`ACEStart' used, allow one to continually re-use a single interactive
323
{\ACE} process (i.e.~only *one* iostream is used).
324
325
\){\kernttindent}\# start the interactive ACE process with no group information
326
\){\kernttindent}procId := ACEStart(0);
327
\){\kernttindent}while <expr> do
328
\){\kernttindent\quad}fgens := ...; rels := ...; sgens := ...;
329
\){\kernttindent\quad}ACEStart(procId, fgens, rels, sgens : <options>);
330
\){\kernttindent\quad}if ACEStats(procId).index > 0 then
331
\){\kernttindent\quad\quad}table := ACECosetTable(procId);
332
\){\kernttindent\quad\quad}...
333
\){\kernttindent\quad}fi;
334
\){\kernttindent}od;
335
336
For an already calculated coset table, we provide the following
337
function to determine whether or not it has been standardised.
338
339
\>IsACEStandardCosetTable( <table> [: <option>] ) F
340
341
returns `true' if <table> (a list of lists of integers) is standard
342
according to {\GAP}'s default or the <option> (either `lenlex' or
343
`semilenlex') standardisation scheme, or `false' otherwise. See
344
Section~"Coset Table Standardisation Schemes" for a detailed
345
discussion of the `lenlex' and `semilenlex' standardisation schemes.
346
347
*Note:*
348
Essentially, `IsACEStandardCosetTable' extends the {\GAP} function
349
`IsStandardized'.
350
351
\atindex{lenlex standardisation}{@\noexpand`lenlex' standardisation}
352
Users who wish their coset tables to use `ACECosetTable' with the
353
`lenlex' (see~"option lenlex") option, which causes
354
`lenlex' standardisation to occur at the {\ACE} (rather than {\GAP})
355
level, should be aquainted with the following function.
356
357
\atindex{IsACEGeneratorsInPreferredOrder}%
358
{@\noexpand`IsACEGeneratorsInPreferredOrder'!non-interactive}
359
\>IsACEGeneratorsInPreferredOrder( <gens>, <rels> ) F
360
361
returns `true' if <gens>, a list of free group generators, are in an
362
order which will not be changed by {\ACE}, for the group with
363
presentation $\langle <gens> \mid <rels>\rangle$, where <rels> is a
364
list of relators (i.e.~words in the generators <gens>).
365
`IsACEGeneratorsInPreferredOrder' may also be called in a different
366
way for interactive {\ACE} processes
367
(see~"IsACEGeneratorsInPreferredOrder!interactive").
368
369
For a presentation with more than one generator, the first generator
370
of which is an involution and the second is not, {\ACE} prefers to
371
switch the first two generators. `IsACEGeneratorsInPreferredOrder'
372
returns `true' if the order of the generators <gens> would not be
373
changed within {\ACE} and `false', otherwise. (Technically, by
374
``involution'' above, we really mean ``a generator `x' for which there
375
is a relator in <rels> of form `x*x' or `x^2'''. Such a generator may,
376
of course, turn out to actually be the identity.)
377
378
*Guru Notes:*
379
If `IsACEGeneratorsInPreferredOrder(<gens>, <rels>)' would return
380
`false', it is possible to enforce a user's order of the generators
381
within {\ACE}, by setting the option `asis' (see~"option asis") to 1
382
and, by passing the relator that determines that `<gens>[1]' (which we
383
will assume is `x') has order at most 2, as: `x*x' (rather than
384
`x^2'). Behind the scenes this is precisely what is done, if
385
necessary, when `ACECosetTable' is called with the `lenlex' option.
386
387
The user may avoid all the technicalities by either not using the
388
`lenlex' option (and allowing {\GAP} to take care of the `lenlex'
389
standardisation), or by swapping the first two generators in those
390
cases where `IsACEGeneratorsInPreferredOrder(<gens>, <rels>)' would
391
return `false'.
392
393
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
394
\Section{Using ACE Directly to Test whether a Coset Enumeration Terminates}
395
396
If you only want to test, whether a coset enumeration terminates, and
397
don't want to transfer the whole coset table to {\GAP}, you can call
398
399
\atindex{ACEStats}{@\noexpand`ACEStats'!non-interactive}
400
\>ACEStats( <fgens>, <rels>, <sgens> [: <options>] ) F
401
402
which calls {\ACE} non-interactively to do the coset enumeration, the
403
result of which is parsed and returned as a {\GAP} record with fields
404
405
\beginitems
406
407
\quad`index' &the index of the subgroup $\langle <sgens> \rangle$ in
408
$\langle <fgens> \mid <rels> \rangle$, or $0$ if the enumeration does
409
not succeed;
410
411
\quad`cputime' &the total CPU time used as an integer number of
412
`cputimeUnits' (the next field);
413
414
\quad`cputimeUnits' &the units of the `cputime' field, e.g.~`"10^-2
415
seconds"';
416
417
\indextt{activecosets}
418
\quad`activecosets' &the number of currently *active* (i.e.~*alive*)
419
coset numbers (see Section~"Coset Statistics Terminology");
420
421
\indextt{maxcosets}
422
\quad`maxcosets' &the *maximum* number of alive coset numbers at any
423
one time in the enumeration (see Section~"Coset Statistics
424
Terminology"); and
425
426
\indextt{totcosets}
427
\quad`totcosets' &the *total* number of coset numbers that were
428
defined in the enumeration (see Section~"Coset Statistics
429
Terminology").
430
431
\enditems
432
433
Options (see Chapters~"Options for ACE" and~"Strategy Options for
434
ACE") are used in exactly the same way as for
435
`ACECosetTableFromGensAndRels', discussed in the previous section; and
436
the same warnings alluded to previously, regarding options (see
437
Section~"General Warnings regarding the Use of Options"), apply.
438
439
*Notes:*
440
To initiate the coset enumeration, the `start' option (see~"option
441
start") is quietly inserted after the user's supplied options, unless
442
the user herself supplies one of the enumeration-invoking options,
443
which are: `start', or one of its synonyms, `aep' (see~"option aep")
444
or `rep' (see~"option rep").
445
446
The fields of the `ACEStats' record are determined by parsing a
447
``results message'' (see Appendix~"The Meanings of ACE's Output
448
Messages") from {\ACE}.
449
450
`ACEStats' may also be called in a different way in an interactive
451
{\ACE} session (see~"ACEStats!interactive").
452
453
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
454
\Section{Writing ACE Standalone Input Files to Generate a Coset Table}
455
456
If you want to use {\ACE} as a standalone with its own syntax, you can
457
write an {\ACE} standalone input file by calling `ACECosetTable' with
458
three arguments (see "ACECosetTableFromGensAndRels") and the option
459
`aceinfile := <filename>' (see~"option aceinfile"). This will keep the
460
input file for the {\ACE} standalone produced by the {\GAP} interface
461
under the file name <filename> (and just return) so that you can
462
perform interactive work in the standalone.
463
464
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
465
\Section{Using ACE Interactively}
466
467
An interactive {\ACE} process is initiated with the command
468
469
\>ACEStart( <fgens>, <rels>, <sgens> [:<options>] )!{introduction} F
470
471
whose arguments and options are exactly as for
472
`ACECosetTableFromGensAndRels' and `ACEStats', as discussed in
473
Sections~"Using ACE Directly to Generate a Coset Table" and~"Using ACE
474
Directly to Test whether a Coset Enumeration Terminates". The usual
475
warnings regarding options apply (see Section~"General Warnings
476
regarding the Use of Options"). `ACEStart' has a number of other forms
477
(see~"ACEStart!details").
478
479
The return value is an integer (numbering from 1) which represents the
480
running process. (It is possible to have more than one interactive
481
process running at once.) The integer returned may be used to index
482
which of these processes an interactive {\ACE} function should be
483
applied to.
484
485
An interactive {\ACE} process is terminated with the command
486
487
\>ACEQuit( <i> )!{introduction} F
488
489
where <i> is the integer returned by `ACEStart' when the process was
490
begun. `ACEQuit' may also be called with no arguments
491
(see~"ACEQuit!details").
492
493
We discuss each of these commands, as well as the range of functions
494
which enable one to access features of the {\ACE} standalone not
495
available non-interactively, in depth, in Chapter~"Functions for Using
496
ACE interactively".
497
498
*Note:*
499
500
\index{coincidence}
501
{\ACE} not only allows one to do a coset enumeration of a group by a
502
given (and then fixed) subgroup but it also allows one to search for
503
subgroups by starting from a given one (possibly the trivial subgroup)
504
and then augmenting it by adding new subgroup generators either
505
explicitly via `ACEAddSubgroupGenerators'
506
(see~"ACEAddSubgroupGenerators") or implicitly by introducing
507
*coincidences* (see `ACECosetCoincidence': "ACECosetCoincidence", or
508
`ACERandomCoincidences': "ACERandomCoincidences"); or one can find
509
smaller subgroups by deleting subgroup generators via
510
`ACEDeleteSubgroupGenerators' (see~"ACEDeleteSubgroupGenerators").
511
512
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
513
\Section{Accessing ACE Examples with ACEExample and ACEReadResearchExample}
514
515
There are a number of examples available in the `examples' directory,
516
which may be accessed via
517
518
\>ACEExample() F
519
\>ACEExample( <examplename> [:<options>] ) F
520
\>ACEExample( <examplename>, <ACEfunc> [:<options>] ) F
521
522
where <examplename> is a string, the name of an example (and
523
corresponding file in the `examples' directory); and <ACEfunc> is the
524
{\ACE} function with which the example is to be executed.
525
526
If `ACEExample' is called with no arguments, or with the argument:
527
`"index"' (meant in the sense of ``list''), or with a non-existent
528
example name, a list of available examples is displayed. See
529
Section~"Fun with ACEExample" where the list is displayed.
530
531
By default, examples are executed via `ACEStats'. However, if
532
`ACEExample' is called with a second argument (choose from the (other)
533
alternatives: `ACECosetTableFromGensAndRels' (or, equivalently
534
`ACECosetTable'), or `ACEStart'), the example is executed using that
535
function, instead. Note that, whereas the first argument appears in
536
double quotes (since it's a string), the second argument does not
537
(since it's a function); e.g.~to execute example `"A5"' with function
538
`ACECosetTable', one would type: `ACEExample("A5", ACECosetTable);'.
539
540
`ACEExample' also accepts user options, which may be passed either
541
globally (i.e.~by using `PushOptions' to push them onto the
542
`OptionsStack') or locally behind a colon after the `ACEExample'
543
arguments, and they are passed to `ACEStats' or <ACEfunc> as if they
544
were *appended* to the existing options of <examplename>; in this way,
545
the user may *over-ride* any or all of the options of <examplename>.
546
This is done by passing an option `aceexampleoptions' (see~"option
547
aceexampleoptions"), which sets up a mechanism to reverse the usual
548
order in which options of recursively called functions are pushed onto
549
the `OptionsStack'. The option `aceexampleoptions' is *not* a user
550
option; it is intended only for *internal* use by `ACEExample', for
551
the above purpose. In the portion of the output due to the `echo'
552
option, if one has passed options to `ACEExample', one will see
553
`aceexampleoptions' listed first and the result of the interaction of
554
<examplename>'s options and the additional options.
555
556
Consider the example `"A5"'. The effect of running
557
558
\beginexample
559
gap> ACEExample("A5", ACEStart);
560
561
\endexample
562
563
is essentially equivalent to executing:
564
565
\beginexample
566
gap> file := Filename(DirectoriesPackageLibrary("ace", "examples"), "A5");;
567
gap> ACEfunc := ACEStart;;
568
gap> ReadAsFunction(file)();
569
570
\endexample
571
572
except that some internal ``magic'' of `ACEExample' edits the example
573
file and displays equivalent commands a user ``would'' execute. If the
574
user has passed options to `ACEExample' these appear in a
575
```\# User Options''' block after the original options of the example
576
in the `Info' portion of the output. By comparing with the portion of
577
the output from the `echo' option (unless the user has over-ridden the
578
`echo' option), the user may directly observe any over-riding effects
579
of user-passed options.
580
581
Please see Section~"Fun with ACEExample" for some sample interactions
582
with `ACEExample'.
583
584
*Notes*
585
586
Most examples use the `mess' ($= `messages'$) option. To see the
587
effect of this, it is recommended to do: `SetInfoACELevel(3);' before
588
calling `ACEExample', with an example.
589
590
The coset table output from `ACEExample', when called with many of the
591
examples and with the {\ACE} function `ACECosetTableFromGensAndRels'
592
is often quite long. Recall that the output may be suppressed by
593
following the (`ACEExample') command with a double semicolon (`;;').
594
595
Also, try `SetInfoACELevel(2);' before calling `ACEExample', with an
596
example.
597
598
If you unexpectedly observe `aceexampleoptions' in your output, then
599
most probably you have unintentionally passed options by the global
600
method, by having a non-empty `OptionsStack'. One possible remedy is
601
to use `FlushOptionsStack();' (see~"FlushOptionsStack"), before trying
602
your `ACEExample' call again.
603
604
As discussed in Section~"Interpretation of ACE Options", there is
605
generally no sensible meaning that can be attributed to setting a
606
strategy option (see Chapter~"Strategy Options for ACE") to `false';
607
if you wish to nullify the effect of a strategy option, pass another
608
strategy option, e.g.~pass the `default' (see~"option default")
609
strategy option.
610
611
Also provided are:
612
613
\> ACEReadResearchExample( <filename> ) F
614
\> ACEReadResearchExample() F
615
616
which perform `Read' (see Section~"ref:Read" in the {\GAP} Reference
617
Manual) on <filename> or, with no argument, the file with filename
618
`"pgrelfind.g"' in the `res-examples' directory; e.g.~the effect of
619
running
620
621
\beginexample
622
gap> ACEReadResearchExample("pgrelfind.g");
623
624
\endexample
625
626
is equivalent to executing:
627
628
\beginexample
629
gap> Read( Filename(DirectoriesPackageLibrary("ace", "res-examples"),
630
> "pgrelfind.g") );
631
632
\endexample
633
634
The examples provided in the `res-examples' directory were used to
635
solve a genuine research problem, the results of which are reported in
636
\cite{CHHR01}. Please see Section~"Using ACEReadResearchExample" for
637
a detailed description and examples of its use.
638
639
\> ACEPrintResearchExample( <example-filename> ) F
640
\> ACEPrintResearchExample( <example-filename>, <output-filename>) F
641
642
print the ``essential'' contents of the file <example-filename> in the
643
`res-examples' directory to the terminal, or with two arguments to the
644
file <output-filename>; <example-filename> and <output-filename>
645
should be strings. `ACEPrintResearchExample' is provided to make it
646
easy for users to copy and edit the examples for their own purposes.
647
648
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
649
\Section{General Warnings regarding the Use of Options}
650
651
Firstly, let us mention (and we will remind you later) that an {\ACE}
652
strategy is merely a special option of {\ACE} that sets a number of
653
the options described in Chapter~"Options for ACE" all at once. The
654
strategy options are discussed in their own chapter (Chapter~"Strategy
655
Options for ACE").
656
657
In Section~"Passing ACE Options", we describe the two means provided
658
by {\GAP} by which {\ACE} options may be passed. In Section~"Warnings
659
regarding Options", we discuss how options ``left over'' from previous
660
calculations can upset subsequent calculations; and hence, to ``clear
661
the decks'' in such circumstances, why we have provided
662
`FlushOptionsStack' (see~"FlushOptionsStack"). However, removing
663
`OptionsStack' options does not remove the options previously passed
664
to an *interactive* {\ACE} process; Section~"Warnings regarding
665
Options" discusses that too.
666
667
Note, that the {\ACE} package treatment of options is an
668
``enhancement'' over the general way {\GAP} treats options. Firstly,
669
the {\ACE} binary allows abbreviations and mixed case of options and
670
so the {\ACE} package does also, as much as is possible
671
(see~"Abbreviations and mixed case for ACE Options"). Secondly, since
672
{\ACE}'s options are in general not orthogonal, the order in which
673
they are put to {\ACE} is, in general, honoured (see~"Honouring of the
674
order in which ACE Options are passed"). Thirdly, the {\ACE} binary's
675
concept of a boolean option is slightly different to that of {\GAP}'s;
676
Section~"Interpretation of ACE Options" discusses, in particular, how
677
an option detected by {\GAP} as `true' is passed to the {\ACE} binary.
678
679
Finally, Section~"What happens if no ACE Strategy Option or if no ACE
680
Option is passed" discusses what happens if no option is selected.
681
682
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
683
\Section{The ACEData Record}
684
685
\>`ACEData' V
686
687
is a {\GAP} record in which the essential data for an {\ACE} session
688
within {\GAP} is stored; its fields are:
689
690
\beginitems
691
692
\quad`binary' & the path of the {\ACE} binary;
693
694
\quad`tmpdir' & the path of the temporary directory containing the
695
non-interactive {\ACE} input and output files (also see
696
"ACEDirectoryTemporary" below);
697
698
\quad`ni' & the data record for a non-interactive {\ACE} process;
699
700
\quad`io' & list of data records for `ACEStart' (see below
701
and~"ACEStart") processes;
702
703
\quad`infile' & the full path of the {\ACE} input file;
704
705
\quad`outfile'& the full path of the {\ACE} output file; and
706
707
\quad`version'& the version of the current {\ACE} binary. More
708
detailed information regarding the compilation of the binary is given
709
by `ACEBinaryVersion' (see~"ACEBinaryVersion").
710
711
\enditems
712
713
Non-interactive processes used to use files rather than streams (hence
714
the fields `infile' and `outfile' above; these may disappear in a
715
later version of the {\ACE} package).
716
717
Each time an interactive {\ACE} process is initiated via `ACEStart'
718
(see~"ACEStart"), an identifying number <ioIndex> is generated for the
719
interactive process and a record `ACEData.io[<ioIndex>]' with the
720
following fields is created. A non-interactive process has similar
721
fields but is stored in the record `ACEData.ni'.
722
723
\beginitems
724
725
\quad`procId' & the identifying number of the process (<ioIndex> for
726
interactive processes, and 0 for a non-interactive process);
727
728
\quad`args' & a record with fields: `fgens', `rels', `sgens' whose
729
values are the corresponding arguments passed originally to
730
`ACEStart';
731
732
\quad`options'& the current options record of the interactive process;
733
734
\quad`acegens'& a list of strings representing the generators used by
735
{\ACE} (if the names of the generators passed via the first argument
736
<fgens> of `ACEStart' were all lowercase alphabetic characters, then
737
`acegens' is the `String' equivalent of <fgens>, i.e.~`acegens[1] =
738
String(<fgens>[1])' etc.);
739
740
\quad`stream' & the IOStream opened for an interactive {\ACE} process
741
initiated via `ACEStart'; and
742
743
\quad`enumResult' &
744
the enumeration result (string) without the trailing newline, output
745
from {\ACE};
746
747
\quad`stats' & a record as output by the function `ACEStats'.
748
749
\quad`enforceAsis' &
750
a boolean that is set to `true' whenever the `asis' option
751
(see~"option asis") must be set to `1'. It is usually `false'.
752
See~"IsACEGeneratorsInPreferredOrder" *Guru Notes* for the details.
753
754
\enditems
755
756
\>ACEDirectoryTemporary( <dir> ) F
757
758
calls the UNIX command `mkdir' to create <dir>, which must be a
759
string, and if successful a directory object for <dir> is both
760
assigned to `ACEData.tmpdir' and returned. The fields `ACEData.infile'
761
and `ACEData.outfile' are also set to be files in `ACEData.tmpdir',
762
and on exit from {\GAP} <dir> is removed. Most users will never need
763
this command; by default, {\GAP} typically chooses a ``random''
764
subdirectory of `/tmp' for `ACEData.tmpdir' which may occasionally
765
have limits on what may be written there. `ACEDirectoryTemporary'
766
permits the user to choose a directory (object) where one is not so
767
limited.
768
769
770
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
771
\Section{Setting the Verbosity of ACE via Info and InfoACE}
772
773
\>`InfoACE' V
774
775
The output of the {\ACE} binary is, by default, not displayed. However
776
the user may choose to see some, or all, of this output. This is done
777
via the `Info' mechanism (see Chapter~"ref:Info Functions" in the
778
{\GAP} Reference Manual). For this purpose, there is the <InfoClass>
779
`InfoACE'. Each line of output from {\ACE} is directed to a call to
780
`Info' and will be displayed for the user to see if the `InfoLevel' of
781
`InfoACE' is high enough. By default, the `InfoLevel' of `InfoACE' is
782
1, and it is recommended that you leave it at this level, or higher.
783
Only messages which we think that the user will really want to see are
784
directed to `Info' at `InfoACE' level 1. To turn off *all* `InfoACE'
785
messaging, set the `InfoACE' level to 0 (see~"SetInfoACELevel"). For
786
convenience, we provide the function
787
788
\>InfoACELevel() F
789
790
which returns the current `InfoLevel' of `InfoACE', i.e.~it is simply
791
a shorthand for `InfoLevel(InfoACE)'.
792
793
To set the `InfoLevel' of `InfoACE' we also provide
794
795
\>SetInfoACELevel( <level> ) F
796
\>SetInfoACELevel() F
797
798
which for a non-negative integer <level>, sets the `InfoLevel' of
799
`InfoACE' to <level> (i.e.~it is a shorthand for
800
`SetInfoLevel(InfoACE, <level>)'), or with no arguments sets the
801
`InfoACE' level to the default value 1. Currently, information from
802
{\ACE} is directed to `Info' at four `InfoACE' levels: 1, 2, 3 and 4.
803
The command
804
805
\beginexample
806
gap> SetInfoACELevel(2);
807
808
\endexample
809
810
enables the display of the results line of an enumeration from {\ACE},
811
whereas
812
813
\beginexample
814
gap> SetInfoACELevel(3);
815
816
\endexample
817
818
enables the display of all of the output from {\ACE} (including
819
{\ACE}'s banner, containing the host machine information); in
820
particular, the progress messages, emitted by {\ACE} when the
821
`messages' option (see~"option messages") is set to a non-zero value,
822
will be displayed via `Info'. Finally,
823
824
\beginexample
825
gap> SetInfoACELevel(4);
826
827
\endexample
828
829
enables the display of all the input directed to {\ACE} (behind a
830
```ToACE> ''' prompt, so you can distinguish it from other output).
831
The `InfoACE' level of 4 is really for gurus who are familiar with the
832
{\ACE} standalone.
833
834
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
835
\Section{Acknowledgements}
836
837
Large parts of this manual, in particular the description of the
838
options for running {\ACE}, are directly copied from the respective
839
descriptions in the manual~\cite{Ram99ace} for the standalone version of
840
{\ACE} by Colin Ramsay. Most of the examples, in the `examples'
841
directory and accessed via the `ACEExample' function, are direct
842
translations of Colin Ramsay's `test\#\#\#.in' files in the `src'
843
directory.
844
845
Many thanks to Joachim Neub{\accent127u}ser who not only provided one
846
of the early manual drafts and hence a template for the style of the
847
manual and conceptual hooks for the design of the Package code, but
848
also meticulously proof-read all drafts and made many insightful
849
comments.
850
851
Many thanks also to Volkmar Felsch who, in testing the {\ACE} Package,
852
discovered a number of bugs, made a number of important suggestions on
853
code improvement, thoroughly checked all the examples, and provided
854
the example found at the end of Section~"Steering ACE Interactively"
855
which demonstrates rather nicely how one can use the function
856
`ACEConjugatesForSubgroupNormalClosure'.
857
858
We also wish to acknowledge the contribution of Charles Sims. The
859
inclusion of the `incomplete' (see "option incomplete") and `lenlex'
860
(see~"option lenlex") options, were made in response to requests to
861
the {\GAP} developers to include such options for coset table
862
functions. Also, the definition of `lenlex' standardisation of coset
863
tables (see Section~"Coset Table Standardisation Schemes"), is due to
864
him.
865
866
Finally, much of the work since 2005 in modifying the {\ACE} package
867
particularly for new versions of {\GAP} and in getting {\ACE} to its
868
new home on `GitHub' has been due to Max Horn.
869
870
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
871
\Section{Changes from earlier versions}
872
873
A reasonably comprehensive history of the evolution of pre-release
874
versions of the {\ACE} Package, is contained in the file `CHANGES' in
875
the `gap' directory.
876
877
The `3.xxx' versions of the {\ACE} Package were compatible with {\GAP}
878
4.2, but were built for use with {\GAP} 4.3. However, the current
879
version of the {\ACE} Package requires at least {\GAP} 4.4. Users who
880
still have {\GAP} 4.3 will need to use {\ACE} 4.1. One important
881
change in {\GAP} from {\GAP} 4.2 to {\GAP} 4.3 that has relevance for
882
{\ACE} Package users is the change of the default standard for the
883
numbering of cosets in a coset table (see Section~"Coset Table
884
Standardisation Schemes").
885
886
\>ACEPackageVersion() F
887
888
gives the current version of the {\ACE} Package (i.e.~the {\GAP} code
889
component; the function `ACEBinaryVersion' (see~"ACEBinaryVersion")
890
gives details of the C code compilation).
891
892
*History of release versions*
893
894
\beginlist
895
896
\item{`3.001'}
897
First release.
898
899
\item{`3.002'}
900
`ACEIgnoreUnknownDefault' (see~"ACEIgnoreUnknownDefault") added.
901
902
\item{}
903
Option `continue' changed to `continu' (see~"option continu") --
904
`continue' is a keyword in {\GAP} 4.3.
905
906
\item{`3.003'}
907
Initial value of `ACEIgnoreUnknownDefault' is now `true' (previously
908
it was `false').
909
910
\item{}
911
`ACECosetTableFromGensAndRels' and the non-interactive `ACECosetTable'
912
(except when producing an input script via option `ACEinfile'), and
913
the non-interactive `ACEStats' which previously used files all now
914
invoke iostreams.
915
916
\item{}
917
Option `pkgbanner' used to control the printing of the banner on
918
loading (see~"Loading the ACE Package").
919
920
\item{`4.0'}
921
Revised for {\GAP} 4.4, for which the option `pkgbanner' is no longer
922
available (most of its function is now provided by the third argument
923
of the `LoadPackage' function; see~"ref:LoadPackage").
924
925
\item{}
926
The package version number now has a single decimal place, to avoid
927
being confused with the binary version number.
928
929
\item{`4.1'}
930
Added $M_{12}$ presentation to `res-examples/pgrelfind.g'.
931
932
\item{`5.0'}
933
Pre-{\GAP} 4.4 compatibility removed. Now at least {\GAP} 4.4 is
934
required. Option `pkgbanner' has been completely removed.
935
936
\item{`5.1'}
937
The files `configure' and `Makefile.in' were made more robust to ensure
938
they will work well with both {\GAP} 4.4 and {\GAP} 4. At the advent of
939
{\GAP} 4.5, which was about the time {\ACE} 5.1 was released, option
940
order behind the colon was no longer respected, but went unnoticed.
941
942
\item{`5.2'}
943
Added `SetInfoACELevel(3)' to `tst/aceds.tst', so that the ERROR message
944
is visible. This mistake in the test file probably goes back to version
945
4.0. Other changes are due to making the documentation compatible with
946
{\GAP} 4.7 manuals and {\ACE}'s new home on `GitHub' and using `git' for
947
version control. Fixing the lack of respect for the ordering of options
948
is deferred to the next version of {\ACE}.
949
950
\endlist
951
952
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
953
%%
954
%E
955
956