Quelle CHAP006.htm
Sprache: HTML
|
|
| products/Sources/formale Sprachen/GAP/pkg/ace/htm/CHAP006.htm |
 |
<html><head><title>[ACE] 6 Functions for Using ACE Interactively</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href = "chapters.htm">Up</a>] [<a href ="CHAP005.htm">Previous</a>] [<a href ="CHAP00A.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<h1>6 Functions for Using ACE Interactively</h1><p>
<P>
<H3>Sections</H3>
<oL>
<li> <A HREF="CHAP006.htm#SECT001">Starting and Stopping Interactive ACE Processes</a>
<li> <A HREF="CHAP006.htm#SECT002">General ACE Modes</a>
<li> <A HREF="CHAP006.htm#SECT003">Interactive ACE Process Utility Functions and Interruption of an Interactive ACE Process</a>
<li> <A HREF="CHAP006.htm#SECT004">Experimentation ACE Modes</a>
<li> <A HREF="CHAP006.htm#SECT005">Interactive Query Functions and an Option Setting Function</a>
<li> <A HREF="CHAP006.htm#SECT006">Interactive Versions of Non-interactive ACE Functions</a>
<li> <A HREF="CHAP006.htm#SECT007">Steering ACE Interactively</a>
<li> <A HREF="CHAP006.htm#SECT008">Primitive ACE Read/Write Functions</a>
</ol><p>
<p>
The user will probably benefit most from interactive use of <font face="Gill Sans,Helvetica,Arial">ACE</font> by
setting the <code>InfoLevel</code> of <code>InfoACE</code> to at least 3
(see <a href="CHAP001.htm#SSEC009.1">InfoACE</a>), particularly if she uses the <code>messages</code>
option with a non-zero value.
<p>
Have you read the various options warnings yet? If not, please take
the time to read Section <a href="CHAP001.htm#SECT007">General Warnings regarding the Use of Options</a> which directs you to various important sections of
Chapter <a href="CHAP004.htm">Options for ACE</a>.
<p>
We describe in this chapter the functions that manipulate and initiate
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> processes.
<p>
An interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process is initiated by <code>ACEStart</code> and
terminated via <code>ACEQuit</code>; these functions are described in
Section <a href="CHAP006.htm#SECT001">Starting and Stopping Interactive ACE Processes</a>. <code>ACEStart</code>
also has forms that manipulate an already started interactive <font face="Gill Sans,Helvetica,Arial">ACE</font>
process. <code>ACEStart</code> always returns a positive integer <var>i</var>, which
identifies the interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process that was initiated or
manipulated.
<p>
Most functions (there is one <code>ACEStart</code> exception), that manipulate an
already started interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, have a form where the
first argument is the integer <var>i</var> returned by the initiating
<code>ACEStart</code> command, and a second form with one argument fewer (where
the integer <var>i</var> is discovered by a default mechanism, namely by
determining the least integer <var>i</var> for which there is a currently
active interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process). We will thus commonly say that
``for the <var>i</var>th (or default) interactive ACE process'' a certain
function performs a given action. In each case, it is an error, if <var>i</var>
is not the index of an active interactive process, or there are no
current active interactive processes.
<p>
<strong>Notes</strong>:
The global method of passing options (via <code>PushOptions</code>), should not
be used with any of the interactive functions. In fact, the
<code>OptionsStack</code> should be empty at the time any of the interactive
functions is called.
<p>
On <code>quit</code>ting <font face="Gill Sans,Helvetica,Arial">GAP</font>, <code>ACEQuitAll();</code> is executed, which terminates
all active interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> processes. If <font face="Gill Sans,Helvetica,Arial">GAP</font> is killed without
<code>quit</code>ting, before all interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> processes are terminated,
<strong>zombie</strong> processes (still living <strong>child</strong> processes whose <strong>parents</strong>
have died), will result. Since zombie processes do consume resources,
in such an event, the responsible computer user should seek out and
kill the still living <code>ace</code> children (e.g. by piping the output of a
<code>ps</code> with appropriate options, usually <code>aux</code> or <code>ef</code>, to <code>grep ace</code>,
to find the process ids, and then using <code>kill</code>; try <code>man ps</code> and <code>man
kill</code> if these hints are unhelpful).
<p>
<p>
<h2><a name="SECT001">6.1 Starting and Stopping Interactive ACE Processes</a></h2>
<p><p>
<a name = "SSEC001.1"></a>
<li><code>ACEStart( </code><var>fgens</var><code>, </code><var>rels</var><code>, </code><var>sgens</var><code> [:</code><var>options</var><code>] ) F</code>
<a name = "SSEC001.1"></a>
<li><code>ACEStart( </code><var>i</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACEStart( [:</code><var>options</var><code>] ) F</code>
<li><code>ACEStart( </code><var>i</var><code>, </code><var>fgens</var><code>, </code><var>rels</var><code>, </code><var>sgens</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACEStart( 0 [:</code><var>options</var><code>] ) F</code>
<li><code>ACEStart( 0, </code><var>fgens</var><code>, </code><var>rels</var><code>, </code><var>sgens</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACEStart( 0, </code><var>i</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACEStart( 0, </code><var>i</var><code>, </code><var>fgens</var><code>, </code><var>rels</var><code>, </code><var>sgens</var><code> [:</code><var>options</var><code>] ) F</code>
<p>
The variables are: <var>i</var>, a positive integer numbering from 1 that
represents (indexes) an already running interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process;
<var>fgens</var>, a list of free generators; <var>rels</var>, a list of words in the
generators <var>fgens</var> giving relators for a finitely presented group; and
<var>sgens</var>, a list of subgroup generators, again expressed as words in
the free generators <var>fgens</var>. Each of <var>fgens</var>, <var>rels</var> and <var>sgens</var> are
given in the standard <font face="Gill Sans,Helvetica,Arial">GAP</font> format for finitely presented groups (See
Chapter <a href="../../../doc/ref/chap47.html#X7AA982637E90B35A">Finitely Presented Groups</a> of the <font face="Gill Sans,Helvetica,Arial">GAP</font> Reference
Manual).
<p>
All forms of <code>ACEStart</code> accept options described in Chapters <a href="CHAP004.htm">Options for ACE</a> and <a href="CHAP005.htm">Strategy Options for ACE</a>, and Appendix <a href="CHAP00D.htm">Other ACE Options</a>, which are listed behind a colon in the usual way (see
<a href="../../../doc/ref/chap4.html#X78C70489791FDF43">Function Calls</a> in the <font face="Gill Sans,Helvetica,Arial">GAP</font> Reference Manual). The reader is
strongly encouraged to read the introductory sections of
Chapter <a href="CHAP004.htm">Options for ACE</a>, with regard to options. The global
mechanism (via <code>PushOptions</code>) of passing options is <strong>not</strong> recommended
for use with the interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> interface functions; please ensure
the <code>OptionsStack</code> is empty before calling an interactive <font face="Gill Sans,Helvetica,Arial">ACE</font>
interface function.
<p>
The return value (for all forms of <code>ACEStart</code>) is an integer
(numbering from 1) which represents the running process. It is
possible to have more than one interactive process running at once.
The integer returned may be used to index which of these processes an
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> interface function should be applied to.
<p>
The first four forms of <code>ACEStart</code> insert a <code>start</code> (see <a href="CHAP00D.htm#SSEC003.2">option start</a>) directive after the user's options to invoke an enumeration.
The last four forms, with <code>0</code> as first argument, do not insert a
<code>start</code> directive. Moreover, the last 3 forms of <code>ACEStart</code>, with <code>0</code>
as first argument only differ from the corresponding forms of
<code>ACEStart</code> without the <code>0</code> argument, in that they do not insert a
<code>start</code> directive. <code>ACEStart(0)</code>, however, is special; unlike the
no-argument form of <code>ACEStart</code> it invokes a new interactive <font face="Gill Sans,Helvetica,Arial">ACE</font>
process. We will now further describe each form of <code>ACEStart</code>, in the
order they appear above.
<p>
The first form of <code>ACEStart</code> (on three arguments) is the usual way to
start an interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process.
<p>
When <code>ACEStart</code> is called with one positive integer argument <var>i</var> it
starts a new enumeration on the <var>i</var>th running process, i.e. it scrubs
a previously generated table and starts from scratch with the same
parameters (i.e. the same arguments and options); except that if new
options are included these will modify those given previously. The
only reason for doing such a thing, without new options, is to perhaps
compare timings of runs (a second run is quicker because memory has
already been allocated). If you are interested in this sort of
information, however, you may be better off dealing directly with the
standalone.
<p>
When <code>ACEStart</code> is called with no arguments it finds the least
positive integer <var>i</var> for which an interactive process is running and
applies <code>ACEStart(</code><var>i</var><code>)</code>. (Most users will only run one interactive
process at a time. Hence, <code>ACEStart()</code> will be a useful shortcut for
<code>ACEStart(1)</code>.)
<p>
The fourth form of <code>ACEStart</code> on four arguments, invokes a new
enumeration on the <var>i</var>th running process, with new generators <var>fgens</var>,
relators <var>rels</var> and subgroup generators <var>sgens</var>. This is provided so a
user can re-use an already running process, rather than start a new
process. This may be useful when pseudo-ttys are a scarce resource.
See the notes for the non-interactive <code>ACECosetTable</code>
(<a href="CHAP001.htm#SSEC002.1">ACECosetTableFromGensAndRels</a>) which demonstrates an application of
a usage of this and the following form of <code>ACEStart</code> in a loop.
<p>
The fifth form of <code>ACEStart</code> (on the one argument: <code>0</code>) initiates an
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, processes any user options, but does not
insert a <code>start</code> (see <a href="CHAP00D.htm#SSEC003.2">option start</a>) directive. This form is mainly
for gurus who are familiar with the <font face="Gill Sans,Helvetica,Arial">ACE</font> standalone and who wish, at
least initially, to communicate with <font face="Gill Sans,Helvetica,Arial">ACE</font> using the primitive
read/write tools of Section <a href="CHAP006.htm#SECT008">Primitive ACE Read/Write Functions</a>. In
this case, after the group generators, relators, and subgroup
generators have been set in the <font face="Gill Sans,Helvetica,Arial">ACE</font> process, invocations of any of
<code>ACEGroupGenerators</code> (see <a href="CHAP006.htm#SSEC005.1">ACEGroupGenerators</a>), <code>ACERelators</code>
(see <a href="CHAP006.htm#SSEC005.2">ACERelators</a>), <code>ACESubgroupGenerators</code>
(see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>), or <code>ACEParameters</code>
(see <a href="CHAP006.htm#SSEC005.10">ACEParameters</a>) will establish the corresponding <font face="Gill Sans,Helvetica,Arial">GAP</font> values.
Be warned, though, that unless one of the general <font face="Gill Sans,Helvetica,Arial">ACE</font> modes (see
Section <a href="CHAP006.htm#SECT002">General ACE modes</a>): <code>ACEStart</code> (without a zero argument),
<code>ACERedo</code> (see <a href="CHAP006.htm#SSEC002.3">ACERedo</a>) or <code>ACEContinue</code> (see <a href="CHAP006.htm#SSEC002.2">ACEContinue</a>), or one
of the mode options: <code>start</code> (see <a href="CHAP00D.htm#SSEC003.2">option start</a>), <code>redo</code> (see <a href="CHAP00D.htm#SSEC003.3">option redo</a>) or <code>continu</code> (see <a href="CHAP00D.htm#SSEC003.4">option continu</a>), has been invoked since the
last change of any parameter options (see <a href="CHAP004.htm#SSEC012.1">ACEParameterOptions</a>), some
of the values reported by <code>ACEParameters</code> may well be <strong>incorrect</strong>.
<p>
The sixth form of <code>ACEStart</code> (on four arguments), is like the first
form of <code>ACEStart</code> (on three arguments), except that it does not
insert a <code>start</code> (see <a href="CHAP00D.htm#SSEC003.2">option start</a>) directive. It initiates an
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, with a presentation defined by its last 3
arguments.
<p>
The seventh form of <code>ACEStart</code> (on two arguments), is like the second
form of <code>ACEStart</code> (on one argument), except that it does not insert a
<code>start</code> (see <a href="CHAP00D.htm#SSEC003.2">option start</a>) directive. It processes any new options
for the <var>i</var>th interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process. <code>ACEStart(0, </code><var>i</var><code> [:
</code><var>options</var><code> ] )</code>, is similar to <code>SetACEOptions(</code><var>i</var><code> [: </code><var>options</var><code> ] )</code>
(see <a href="CHAP006.htm#SSEC005.8">SetACEOptions</a>), but unlike the latter does not invoke a general
mode (see Section <a href="CHAP006.htm#SECT002">General ACE Modes</a>).
<p>
The last form of <code>ACEStart</code> (on five arguments), is like the fourth
form of <code>ACEStart</code> (on four arguments), except that it does not insert
a <code>start</code> (see <a href="CHAP00D.htm#SSEC003.2">option start</a>) directive. It re-uses an existing
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, with a new presentation. There is no form
of <code>ACEStart</code> with the same functionality as this form, where the <var>i</var>
argument is omitted.
<p>
<strong>Note:</strong>
When an interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process is initiated by <code>ACEStart</code> a
process number <var>i</var> is assigned to it (the integer <var>i</var> returned by the
<code>ACEStart</code> command), an <font face="Gill Sans,Helvetica,Arial">ACE</font> (binary) process (in the UNIX sense) is
started up, a <font face="Gill Sans,Helvetica,Arial">GAP</font> iostream is assigned to communicate with the
<font face="Gill Sans,Helvetica,Arial">ACE</font> (binary) process, and the essential ``defining'' data
associated with the interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process is saved in
<code>ACEData.io[</code><var>i</var><code>]</code> (see <a href="CHAP001.htm#SSEC008.1">ACEData</a> for precisely what is saved).
<p>
<a name = "SSEC001.2"></a>
<li><code>ACEQuit( </code><var>i</var><code> ) F</code>
<a name = "SSEC001.2"></a>
<li><code>ACEQuit() F</code>
<p>
terminate an interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, where <var>i</var> is the integer
returned by <code>ACEStart</code> when the process was started. If the second
form is used (i.e. without arguments) then the interactive process of
least index that is still running is terminated.
<p>
<strong>Note:</strong>
<code>ACEQuit(</code><var>i</var><code>)</code> terminates the <font face="Gill Sans,Helvetica,Arial">ACE</font> (binary) process of interactive
<font face="Gill Sans,Helvetica,Arial">ACE</font> process <var>i</var>, and closes its <font face="Gill Sans,Helvetica,Arial">GAP</font> iostream, and unbinds the
record <code>ACEData.io[</code><var>i</var><code>]</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a> note).
<p>
It can happen that the <font face="Gill Sans,Helvetica,Arial">ACE</font> (binary) process, and hence the <font face="Gill Sans,Helvetica,Arial">GAP</font>
iostream assigned to communicate with it, can die, e.g. by the user
typing a <code>Ctrl-C</code> while the <font face="Gill Sans,Helvetica,Arial">ACE</font> (binary) process is engaged in a
long calculation. <code>IsACEProcessAlive</code> (see <a href="CHAP006.htm#SSEC003.3">IsACEProcessAlive</a>) is
provided to check the status of the <font face="Gill Sans,Helvetica,Arial">GAP</font> iostream (and hence the
status of the <font face="Gill Sans,Helvetica,Arial">ACE</font> (binary) process it was communicating with); in
the case that it is indeed dead, <code>ACEResurrectProcess</code>
(see <a href="CHAP006.htm#SSEC003.4">ACEResurrectProcess</a>) may be used to start a new <font face="Gill Sans,Helvetica,Arial">ACE</font> (binary)
process and assign a new <font face="Gill Sans,Helvetica,Arial">GAP</font> iostream to communicate with it, by
using the ``defining'' data of the interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process saved in
<code>ACEData.io[</code><var>i</var><code>]</code>.
<p>
<a name = "SSEC001.3"></a>
<li><code>ACEQuitAll() F</code>
<p>
is provided as a convenience, to terminate all active interactive
<font face="Gill Sans,Helvetica,Arial">ACE</font> processes with a single command. It is equivalent to executing
<code>ACEQuit(</code><var>i</var><code>)</code> for all active interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> processes <var>i</var>
(see <a href="CHAP006.htm#SSEC001.2">ACEQuit</a>).
<p>
<p>
<h2><a name="SECT002">6.2 General ACE Modes</a></h2>
<p><p>
For our purposes, we define an interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> interface command to
be an <font face="Gill Sans,Helvetica,Arial">ACE</font> mode, if it delivers an enumeration result (see
Section <a href="CHAP00A.htm#SECT002">Results messages</a>). Thus, <code>ACEStart</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>), except
when called with the argument 0, and the commands <code>ACERedo</code> and
<code>ACEContinue</code> which we describe below are <font face="Gill Sans,Helvetica,Arial">ACE</font> modes; we call these
<strong>general <font face="Gill Sans,Helvetica,Arial">ACE</font> modes</strong>. Additionally, there are two other commands
which deliver enumeration results: <code>ACEAllEquivPresentations</code>
(see <a href="CHAP006.htm#SSEC004.1">ACEAllEquivPresentations</a>) and <code>ACERandomEquivPresentations</code>
(see <a href="CHAP006.htm#SSEC004.2">ACERandomEquivPresentations</a>); we call these ``experimentation''
<font face="Gill Sans,Helvetica,Arial">ACE</font> modes and describe them in Section <a href="CHAP006.htm#SECT004">Experimentation ACE Modes</a>.
<p>
<strong>Guru Note:</strong>
The <font face="Gill Sans,Helvetica,Arial">ACE</font> standalone uses the term <code>mode</code> in a slightly different
sense. There, the commands: <code>start</code>, <code>redo</code> or <code>continue</code>, put the
<font face="Gill Sans,Helvetica,Arial">ACE</font> enumerator in <code>start mode</code>, <code>redo mode</code> or <code>continue mode</code>. In
this manual, we have used the term to mean the command itself, and
generalised it to include any command that produces enumeration
results.
<p>
After changing any of <font face="Gill Sans,Helvetica,Arial">ACE</font>'s parameters, one of three <strong>general
modes</strong> is possible: one may be able to ``continue'' via <code>ACEContinue</code>
(see <a href="CHAP006.htm#SSEC002.2">ACEContinue</a>), or ``redo'' via <code>ACERedo</code> (see <a href="CHAP006.htm#SSEC002.3">ACERedo</a>), or if
neither of these is possible one may have to re-``start'' the
enumeration via <code>ACEStart</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>). Generally, the
appropriate mode is invoked automatically when options are changed; so
most users should be able to ignore the following three functions.
<p>
<a name = "SSEC002.1"></a>
<li><code>ACEModes( </code><var>i</var><code> ) F</code>
<li><code>ACEModes() F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, return a record
whose fields are the modes <code>ACEStart</code>, <code>ACEContinue</code> and <code>ACERedo</code>,
and whose values are <code>true</code> if the mode is possible for the process
and <code>false</code> otherwise.
<p>
<a name = "SSEC002.2"></a>
<li><code>ACEContinue( </code><var>i</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACEContinue( [:</code><var>options</var><code>] ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, apply any
<var>options</var> and then ``continue'' the current enumeration, building upon
the existing table. If a previous run stopped without producing a
finite index you can, in principle, change any of the options and
continue on. Of course, if you make any changes which invalidate the
current table, you won't be allowed to <code>ACEContinue</code> and an error will
be raised. However, after <code>quit</code>ting the <code>break</code>-loop, the interactive
<font face="Gill Sans,Helvetica,Arial">ACE</font> process should normally still be active; after doing so, run
<code>ACEModes</code> (see <a href="CHAP006.htm#SSEC002.1">ACEModes</a>) to see which of <code>ACERedo</code> or <code>ACEStart</code> is
possible.
<p>
<a name = "SSEC002.3"></a>
<li><code>ACERedo( </code><var>i</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACERedo( [:</code><var>options</var><code>] ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, apply any
<var>options</var> and then ``redo'' the current enumeration from coset 1
(i.e., the subgroup), keeping any existing information in the table.
<p>
<strong>Notes:</strong>
The difference between <code>ACEContinue</code> and <code>ACERedo</code> is somewhat
technical, and the user should regard it as a mode that is a little
more expensive than <code>ACEContinue</code> but cheaper than <code>ACEStart</code>.
<code>ACERedo</code> is really intended for the case where additional relators
and/or subgroup generators have been introduced; the current table,
which may be incomplete or exhibit a finite index, is still ``valid''.
However, the new data may allow the enumeration to complete, or cause
a collapse to a smaller index. In some cases, <code>ACERedo</code> may not be
possible and an error will be raised; in this case, <code>quit</code> the
<code>break</code>-loop, and try <code>ACEStart</code>, which will discard the current table
and re-``start'' the enumeration.
<p>
<p>
<h2><a name="SECT003">6.3 Interactive ACE Process Utility Functions and Interruption of an Interactive ACE Process</a></h2>
<p><p>
<a name = "SSEC003.1"></a>
<li><code>ACEProcessIndex( </code><var>i</var><code> ) F</code>
<li><code>ACEProcessIndex() F</code>
<p>
With argument <var>i</var>, which must be a positive integer, <code>ACEProcessIndex</code>
returns <var>i</var> if it corresponds to an active interactive process, or
raises an error. With no arguments it returns the default active
interactive process or returns <code>fail</code> and emits a warning message to
<code>Info</code> at <code>InfoACE</code> or <code>InfoWarning</code> level 1.
<p>
<strong>Note:</strong>
Essentially, an interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process <var>i</var> is ``active'' if
<code>ACEData.io[</code><var>i</var><code>]</code> is bound (i.e. we still have some data telling us
about it). Also see <a href="CHAP006.htm#SSEC001.1">ACEStart</a> note.
<p>
<a name = "SSEC003.2"></a>
<li><code>ACEProcessIndices() F</code>
<p>
returns the list of integer indices of all active interactive <font face="Gill Sans,Helvetica,Arial">ACE</font>
processes (see <a href="CHAP006.htm#SSEC003.1">ACEProcessIndex</a> for the meaning of ``active'').
<p>
<a name = "SSEC003.3"></a>
<li><code>IsACEProcessAlive( </code><var>i</var><code> ) F</code>
<li><code>IsACEProcessAlive() F</code>
<p>
return <code>true</code> if the <font face="Gill Sans,Helvetica,Arial">GAP</font> iostream of the <var>i</var>th (or default)
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by <code>ACEStart</code> is alive (i.e. can
still be written to), or <code>false</code>, otherwise. (See the notes
for <a href="CHAP006.htm#SSEC001.1">ACEStart</a> and <a href="CHAP006.htm#SSEC001.2">ACEQuit</a>.)
<p>
<a name = "I0"></a>
<a name = "I1"></a>
If the user does not yet have a <code>gap></code> prompt then usually <font face="Gill Sans,Helvetica,Arial">ACE</font> is
still away doing something and an <font face="Gill Sans,Helvetica,Arial">ACE</font> interface function is still
waiting for a reply from <font face="Gill Sans,Helvetica,Arial">ACE</font>. Typing a <code>Ctrl-C</code> (i.e. holding down
the <code>Ctrl</code> key and typing <code>c</code>) will stop the waiting and send <font face="Gill Sans,Helvetica,Arial">GAP</font>
into a <code>break</code>-loop, from which one has no option but to <code>quit;</code>. The
typing of <code>Ctrl-C</code>, in such a circumstance, usually causes the stream
of the interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process to die; to check this we provide
<code>IsACEProcessAlive</code> (see <a href="CHAP006.htm#SSEC003.3">IsACEProcessAlive</a>). If the stream of an
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, indexed by <var>i</var>, say, has died, it may
still be possible to recover enough of the state, before the death of
the stream, from the information stored in the <code>ACEData.io[</code><var>i</var><code>]</code>
record (see Section <a href="CHAP001.htm#SECT008">The ACEData Record</a>). For such a purpose, we have
provided <code>ACEResurrectProcess</code> (see <a href="CHAP006.htm#SSEC003.4">ACEResurrectProcess</a>).
<p>
The <font face="Gill Sans,Helvetica,Arial">GAP</font> iostream of an interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process will also die if
the <font face="Gill Sans,Helvetica,Arial">ACE</font> binary has a segmentation fault. We do hope that this never
happens to you, but if it does and the failure is reproducible, then
it's a bug and we'd like to know about it. Please read the file <code>README.md</code>
that comes with the <font face="Gill Sans,Helvetica,Arial">ACE</font> package to find out what to include in a
bug report and who to email it to.
<p>
<a name = "SSEC003.4"></a>
<li><code>ACEResurrectProcess( </code><var>i</var><code> [: </code><var>options</var><code>] ) F</code>
<li><code>ACEResurrectProcess( [: </code><var>options</var><code>] ) F</code>
<p>
re-generate the <font face="Gill Sans,Helvetica,Arial">GAP</font> iostream of the <var>i</var>th (or default) interactive
<font face="Gill Sans,Helvetica,Arial">ACE</font> process started by <code>ACEStart</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>, the final note,
in particular), and try to recover as much as possible of the previous
state from saved values of the process's arguments and parameter
options. The possible <var>options</var> here are <code>use</code> and <code>useboth</code> which are
described in detail below.
<p>
The arguments of the <var>i</var>th interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process are stored in
<code>ACEData.io[</code><var>i</var><code>].args</code>, a record with fields <code>fgens</code>, <code>rels</code> and
<code>sgens</code>, which are the <font face="Gill Sans,Helvetica,Arial">GAP</font> group generators, relators and subgroup
generators, respectively (see Section <a href="CHAP001.htm#SECT008">The ACEData Record</a>). Option
information is saved in <code>ACEData.io[</code><var>i</var><code>].options</code> when a user uses an
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> interface function with options or uses
<code>SetACEOptions</code> (see <a href="CHAP006.htm#SSEC005.8">SetACEOptions</a>). Parameter option information is
saved in <code>ACEData.io[</code><var>i</var><code>].parameters</code> if <code>ACEParameters</code> (see <a href="CHAP006.htm#SSEC005.10">ACEParameters</a>)
is used to extract from <font face="Gill Sans,Helvetica,Arial">ACE</font> the current values of the <font face="Gill Sans,Helvetica,Arial">ACE</font>
parameter options (this is generally less reliable unless one of the
general <font face="Gill Sans,Helvetica,Arial">ACE</font> modes (see Section <a href="CHAP006.htm#SECT002">General ACE Modes</a>), has been run
previously).
<p>
By default, <code>ACEResurrectProcess</code> recovers parameter option
information from <code>ACEData.io[</code><var>i</var><code>].options</code> if it is bound, or from
<code>ACEData.io[</code><var>i</var><code>].parameters</code> if it is bound, otherwise. The
<code>ACEData.io[</code><var>i</var><code>].options</code> record, however, is first filtered for
parameter and strategy options (see Sections <a href="CHAP004.htm#SSEC012.1">ACEParameterOptions</a>
and <a href="CHAP004.htm#SECT009">The ACEStrategyOptions list</a>) and the <code>echo</code> option (see <a href="CHAP004.htm#SSEC011.12">option echo</a>). To alter this behaviour, the user is provided two options:
<p>
<p>
<dl compact>
<p>
<dt> <code>use := </code><var>useList</var><code></code><dd> <var>useList</var> may contain one or both of
<code>"options"</code> and <code>"parameters"</code>. By default, <code>use = ["options",
"parameters"]</code>.
<p>
<dt> <code>useboth</code> <dd> (A boolean option). By default, <code>useboth = false</code>.
<p>
</dl>
<p>
If <code>useboth = true</code>, <code>SetACEOptions</code> (see <a href="CHAP006.htm#SSEC005.8">SetACEOptions</a>) is applied
to the <var>i</var>th interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process with each
<code>ACEData.io[</code><var>i</var><code>].(</code><var>field</var><code>)</code> for each <var>field</var> (<code>"options"</code> or
<code>"parameters"</code>) that is bound and in <var>useList</var>, in the order implied
by <var>useList</var>. If <code>useboth = false</code>, <code>SetACEOptions</code> is applied with
<code>ACEData.io[</code><var>i</var><code>].(</code><var>field</var><code>)</code> for only the first <var>field</var> that is bound
in <var>useList</var>. The current value of the <code>echo</code> option is also preserved
(no matter what values the user chooses for the <code>use</code> and <code>useboth</code>
options).
<p>
<strong>Notes:</strong>
Do not use general <font face="Gill Sans,Helvetica,Arial">ACE</font> options with <code>ACEResurrectProcess</code>; they
will only be superseded by those options recovered from
<code>ACEData.io[</code><var>i</var><code>].options</code> and/or <code>ACEData.io[</code><var>i</var><code>].parameters</code>.
Instead, call <code>SetACEOptions</code> first (or afterwards). When called prior
to <code>ACEResurrectProcess</code>, <code>SetACEOptions</code> will emit a warning that the
stream is dead; despite this, the <code>ACEData.io[</code><var>i</var><code>].options</code> <strong>will</strong> be
updated.
<p>
<code>ACEResurrectProcess</code> does <strong>not</strong> invoke an <font face="Gill Sans,Helvetica,Arial">ACE</font> mode (see
Section <a href="CHAP006.htm#SECT002">General ACE Modes</a>). This leaves the user free to use
<code>SetACEOptions</code> (which does invoke an <font face="Gill Sans,Helvetica,Arial">ACE</font> mode) to further modify
options afterwards.
<p>
<a name = "SSEC003.5"></a>
<li><code>ToACEGroupGenerators( </code><var>fgens</var><code> ) F</code>
<p>
This function produces, from a <font face="Gill Sans,Helvetica,Arial">GAP</font> list <var>fgens</var> of free group
generators, the <font face="Gill Sans,Helvetica,Arial">ACE</font> directive string required by the <code>group</code>
(see <a href="CHAP00D.htm#SSEC002.1">option group</a>) option. (The <code>group</code> option may be used to define
the equivalent of <var>fgens</var> in an <font face="Gill Sans,Helvetica,Arial">ACE</font> process.)
<p>
<a name = "SSEC003.6"></a>
<li><code>ToACEWords( </code><var>fgens</var><code>, </code><var>words</var><code> ) F</code>
<p>
This function produces, from a <font face="Gill Sans,Helvetica,Arial">GAP</font> list <var>words</var> in free group
generators <var>fgens</var>, a string that represents those <var>words</var> as an
<font face="Gill Sans,Helvetica,Arial">ACE</font> list of words. <code>ToACEWords</code> may be used to provide suitable
values for the options <code>relators</code> (see <a href="CHAP00D.htm#SSEC002.2">option relators</a>),
<code>generators</code> (see <a href="CHAP00D.htm#SSEC002.3">option generators</a>), <code>sg</code> (see <a href="CHAP00D.htm#SSEC002.4">option sg</a>), and
<code>rl</code> (see <a href="CHAP00D.htm#SSEC002.5">option rl</a>).
<p>
<p>
<h2><a name="SECT004">6.4 Experimentation ACE Modes</a></h2>
<p><p>
Now we describe the two <strong>experimentation modes</strong>. The term <strong>mode</strong> was
defined in Section <a href="CHAP006.htm#SECT002">General ACE Modes</a>.
<p>
<a name = "SSEC004.1"></a>
<li><code>ACEAllEquivPresentations( </code><var>i</var><code>, </code><var>val</var><code> ) F</code>
<li><code>ACEAllEquivPresentations( </code><var>val</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, generates and
tests an enumeration for combinations of relator ordering, relator
rotations, and relator inversions; <var>val</var> is in the integer range 1 to
7.
<p>
The argument <var>val</var> is considered as a binary number. Its three bits
are treated as flags, and control relator rotations (the 2<sup>0</sup> bit),
relator inversions (the 2<sup>1</sup> bit) and relator orderings (the 2<sup>2</sup>
bit), respectively; where 1 means ``active'' and 0 means
``inactive''. (See below for an example).
<p>
Before we describe the <font face="Gill Sans,Helvetica,Arial">GAP</font> output of <code>ACEAllEquivPresentations</code> let
us spend some time considering what happens before the <font face="Gill Sans,Helvetica,Arial">ACE</font> binary
output is parsed.
<p>
The <code>ACEAllEquivPresentations</code> command first performs a ``priming
run'' using the options as they stand. In particular, the <code>asis</code> and
<code>messages</code> options are honoured.
<p>
It then turns <code>asis</code> (see <a href="CHAP004.htm#SSEC013.1">option asis</a>) on and <code>messages</code>
(see <a href="CHAP004.htm#SSEC018.1">option messages</a>) off (i.e. sets <code>messages</code> to 0), and generates
and tests the requested equivalent presentations. The maximum and
minimum values attained by <code>m</code> (the maximum number of coset numbers
defined at any stage) and <code>t</code> (the total number of coset numbers
defined) are tracked, and each time the statistics are better than
what we've already seen, the <font face="Gill Sans,Helvetica,Arial">ACE</font> binary emits a summary result line
for the relators used. See Appendix <a href="CHAP00A.htm">The Meanings of ACE's output messages</a> for a discussion of the statistics <code>m</code> and <code>t</code>. To observe
these messages set the <code>InfoLevel</code> of <code>InfoACE</code> to 3; and it's
<strong>recommended</strong> that you do this so that you get some idea of what the
<font face="Gill Sans,Helvetica,Arial">ACE</font> binary is doing.
<p>
The order in which the equivalent presentations are generated and
tested has no particular significance, but note that the presentation
as given <strong>after</strong> the initial priming run) is the <strong>last</strong> presentation
to be generated and tested, so that the group's relators are left
``unchanged'' by running the <code>ACEAllEquivPresentations</code> command.
<p>
As discussed by Cannon, Dimino, Havas and Watson <a href="biblio.htm#CDHW73"><cite>CDHW73</cite></a> and
Havas and Ramsay <a href="biblio.htm#HR01"><cite>HR01</cite></a> such equivalent presentations can yield
large variations in the number of coset numbers required in an
enumeration. For this command, we are interested in this variation.
<p>
After the final presentation is run, some additional status
information messages are printed to the <font face="Gill Sans,Helvetica,Arial">ACE</font> output:
<p>
<ul>
<p>
<li> the number of runs which yielded a finite index;
<p>
<li> the total number of runs (excluding the priming run); and
<p>
<li> the range of values observed for <code>m</code> and <code>t</code>.
<p>
</ul>
<p>
As an example (drawn from the discussion in <a href="biblio.htm#HR99ace"><cite>HR99ace</cite></a>) consider the
enumeration of the 448 coset numbers of the subgroup
〈<i>a</i><sup>2</sup>,<i>a</i><sup>−1</sup><i>b</i> 〉 of the group
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> (8,7 | 2,3) = 〈<i>a</i>,<i>b</i> | <i>a</i><sup>8</sup> = <i>b</i><sup>7</sup> = (<i>ab</i>)<sup>2</sup> = (<i>a</i><sup>−1</sup><i>b</i>)<sup>3</sup> = 1 〉·</td></tr></table></td></tr></table>
There are 4!=24 relator orderings and 2<sup>4</sup>=16 combinations of
relator or inverted relator. Exponents are taken into account when
rotating relators, so the relators given give rise to 1, 1, 2 and 2
rotations respectively, for a total of 1·1·2·2=4 combinations. So,
for <var>val</var> = 7 (resp. 3), 24·16·4=1536 (resp. 16·4=64)
equivalent presentations are tested.
<p>
Now we describe the output of <code>ACEAllEquivPresentations</code>; it is a
record with fields:
<p>
<p>
<dl compact>
<p>
<dt> <code>primingResult</code> <dd> the <font face="Gill Sans,Helvetica,Arial">ACE</font> enumeration result message (see
Section <a href="CHAP00A.htm#SECT002">Results Messages</a>) of the priming run;
<p>
<dt> <code>primingStats</code> <dd> the enumeration result of the priming run as a
<font face="Gill Sans,Helvetica,Arial">GAP</font> record with fields <code>index</code>, <code>cputime</code>, <code>cputimeUnits</code>,
<code>activecosets</code>, <code>maxcosets</code> and <code>totcosets</code>, exactly as for the record
returned by <code>ACEStats</code> (see <a href="CHAP001.htm#SSEC003.1">ACEStats</a>);
<p>
<dt> <code>equivRuns</code> <dd> a list of data records, one for each progressively
``best'' run, where each record has fields:
<p>
<dt> <code>rels</code><dd> the relators in the order used for the run,
<p>
<dt> <code>enumResult</code><dd> the <font face="Gill Sans,Helvetica,Arial">ACE</font> enumeration result message (see
Section <a href="CHAP00A.htm#SECT002">Results Messages</a>) of the run, and
<p>
<dt> <code>stats</code><dd> the enumeration result as a <font face="Gill Sans,Helvetica,Arial">GAP</font> record exactly like
the record returned by <code>ACEStats</code> (see <a href="CHAP001.htm#SSEC003.1">ACEStats</a>);
<p>
<dt> <code>summary</code> <dd> a record with fields:
<p>
<dt> <code>successes</code><dd> the total number of successful (i.e. having finite
enumeration index) runs,
<p>
<dt> <code>runs</code><dd> the total number of equivalent presentation runs
executed,
<p>
<dt> <code>maxcosetsRange</code><dd> the range of values as a <font face="Gill Sans,Helvetica,Arial">GAP</font> list inside
which each <code>equivRuns[</code><var>i</var><code>].maxcosets</code> lies, and
<p>
<dt> <code>totcosetsRange</code><dd> the range of values as a <font face="Gill Sans,Helvetica,Arial">GAP</font> list inside
which each <code>equivRuns[</code><var>i</var><code>].totcosets</code> lies.
<p>
</dl>
<p>
<strong>Notes:</strong>
In general, the length of the <code>equivRuns</code> field list will be less than
the number of runs executed.
<p>
There is no way to stop the <code>ACEAllEquivPresentations</code> command before
it has completed, other than killing the task. So do a reality check
beforehand on the size of the search space and the time for each
enumeration. If you are interested in finding a ``good'' enumeration,
it can be very helpful, in terms of running time, to put a tight limit
on the number of coset numbers via the <code>max</code> option. You may also have
to set <code>compaction</code> = 100 to prevent time-wasting attempts to
recover space via compaction. This maximises throughput by causing the
``bad'' enumerations, which are in the majority, to overflow quickly
and abort. If you wish to explore a very large search-space, consider
firing up many copies of <font face="Gill Sans,Helvetica,Arial">ACE</font>, and starting each with a ``random''
equivalent presentation. Alternatively, you could use the
<code>ACERandomEquivPresentations</code> command.
<p>
<a name = "SSEC004.2"></a>
<li><code>ACERandomEquivPresentations( </code><var>i</var><code>, </code><var>val</var><code> ) F</code>
<li><code>ACERandomEquivPresentations( </code><var>val</var><code> ) F</code>
<li><code>ACERandomEquivPresentations( </code><var>i</var><code>, [</code><var>val</var><code>] ) F</code>
<li><code>ACERandomEquivPresentations( [</code><var>val</var><code>] ) F</code>
<li><code>ACERandomEquivPresentations( </code><var>i</var><code>, [</code><var>val</var><code>, </code><var>Npresentations</var><code>] ) F</code>
<li><code>ACERandomEquivPresentations( [</code><var>val</var><code>, </code><var>Npresentations</var><code>] ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, generates and
tests up to <var>Npresentations</var> (or 8, in the first 4 forms) random
presentations; <var>val</var>, an integer in the range 1 to 7, acts as for
<code>ACEAllEquivPresentations</code> and <var>Npresentations</var>, when given, should be
a positive integer.
<p>
The routine first turns <code>asis</code> (see <a href="CHAP004.htm#SSEC013.1">option asis</a>) on and <code>messages</code>
(see <a href="CHAP004.htm#SSEC018.1">option messages</a>) off (i.e. sets <code>messages</code> to 0), and then
generates and tests the requested number of random equivalent
presentations. For each presentation, the relators used and the
summary result line are printed by <font face="Gill Sans,Helvetica,Arial">ACE</font>. To observe these messages
set the <code>InfoLevel</code> of <code>InfoACE</code> to at least 3.
<p>
<code>ACERandomEquivPresentations</code> parses the <font face="Gill Sans,Helvetica,Arial">ACE</font> messages, translating
them to <font face="Gill Sans,Helvetica,Arial">GAP</font>, and thus returns a list of records (similar to the
field <code>equivRuns</code> of the returned record of
<code>ACEAllEquivPresentations</code>). Each record of the returned list is the
data derived from a presentation run and has fields:
<p>
<p>
<dl compact>
<p>
<dt> <code>rels</code><dd> the relators in the order used for the run,
<p>
<dt> <code>enumResult</code><dd> the <font face="Gill Sans,Helvetica,Arial">ACE</font> enumeration result message (see
Section <a href="CHAP00A.htm#SECT002">Results Messages</a>) of the run, and
<p>
<dt> <code>stats</code><dd> the enumeration result as a <font face="Gill Sans,Helvetica,Arial">GAP</font> record exactly like
the record returned by <code>ACEStats</code> (see <a href="CHAP001.htm#SSEC003.1">ACEStats</a>).
<p>
</dl>
<p>
<strong>Notes:</strong>
The relator inversions and rotations are ``genuinely'' random. The
relator permuting is a little bit of a kludge, with the ``quality'' of
the permutations tending to improve with successive presentations.
When the <code>ACERandomEquivPresentations</code> command completes, the
presentation active is the <strong>last</strong> one generated.
<p>
<strong>Guru Notes:</strong>
It might appear that neglecting to restore the original presentation
is an error. In fact, it is a useful feature! Suppose that the space
of equivalent presentations is too large to exhaustively test. As
noted in the entry for <code>ACEAllEquivPresentations</code>, we can start up
multiple copies of <code>ACEAllEquivPresentations</code> at random points in the
search-space. Manually generating <code>random</code> equivalent presentations to
serve as starting-points is tedious and error-prone. The
<code>ACERandomEquivPresentations</code> command provides a simple solution;
simply run <code>ACERandomEquivPresentations(</code><var>i</var><code>, 7);</code> before
<code>ACEAllEquivPresentations(</code><var>i</var><code>, 7);</code>.
<p>
<p>
<h2><a name="SECT005">6.5 Interactive Query Functions and an Option Setting Function</a></h2>
<p><p>
<a name = "SSEC005.1"></a>
<li><code>ACEGroupGenerators( </code><var>i</var><code> ) F</code>
<li><code>ACEGroupGenerators() F</code>
<p>
return the <font face="Gill Sans,Helvetica,Arial">GAP</font> group generators of the <var>i</var>th (or default)
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process. If no generators have been saved for the
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, possibly because the process was started
via <code>ACEStart(0);</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>), the <font face="Gill Sans,Helvetica,Arial">ACE</font> process is
interrogated, and the equivalent in <font face="Gill Sans,Helvetica,Arial">GAP</font> is saved and returned.
Essentially, <code>ACEGroupGenerators(</code><var>i</var><code>)</code> interrogates <font face="Gill Sans,Helvetica,Arial">ACE</font> and
establishes <code>ACEData.io[</code><var>i</var><code>].args.fgens</code>, if necessary, and returns
<code>ACEData.io[</code><var>i</var><code>].args.fgens</code>. As a side-effect, if any of the
remaining fields of <code>ACEData.io[</code><var>i</var><code>].args</code> or
<code>ACEData.io[</code><var>i</var><code>].acegens</code> are unset, they are also set. Note that
<font face="Gill Sans,Helvetica,Arial">GAP</font> provides <code>GroupWithGenerators</code> (see <a href="../../../doc/ref/chap39.html#X8589EF9C7B658B94">GroupWithGenerators</a>
in the <font face="Gill Sans,Helvetica,Arial">GAP</font> Reference Manual) to establish a free group on a given
set of already-defined generators.
<p>
<a name = "SSEC005.2"></a>
<li><code>ACERelators( </code><var>i</var><code> ) F</code>
<li><code>ACERelators() F</code>
<p>
return the <font face="Gill Sans,Helvetica,Arial">GAP</font> relators of the <var>i</var>th (or default) interactive
<font face="Gill Sans,Helvetica,Arial">ACE</font> process. If no relators have been saved for the interactive
<font face="Gill Sans,Helvetica,Arial">ACE</font> process, possibly because the process was started via
<code>ACEStart(0);</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>), the <font face="Gill Sans,Helvetica,Arial">ACE</font> process is interrogated,
the equivalent in <font face="Gill Sans,Helvetica,Arial">GAP</font> is saved and returned. Essentially,
<code>ACERelators(</code><var>i</var><code>)</code> interrogates <font face="Gill Sans,Helvetica,Arial">ACE</font> and establishes
<code>ACEData.io[</code><var>i</var><code>].args.rels</code>, if necessary, and returns
<code>ACEData.io[</code><var>i</var><code>].args.rels</code>. As a side-effect, if any of the remaining
fields of <code>ACEData.io[</code><var>i</var><code>].args</code> or <code>ACEData.io[</code><var>i</var><code>].acegens</code> are
unset, they are also set.
<p>
<a name = "SSEC005.3"></a>
<li><code>ACESubgroupGenerators( </code><var>i</var><code> ) F</code>
<li><code>ACESubgroupGenerators() F</code>
<p>
return the <font face="Gill Sans,Helvetica,Arial">GAP</font> subgroup generators of the <var>i</var>th (or default)
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process. If no subgroup generators have been saved
for the interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, possibly because the process was
started via <code>ACEStart(0);</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>), the <font face="Gill Sans,Helvetica,Arial">ACE</font> process is
interrogated, the equivalent in <font face="Gill Sans,Helvetica,Arial">GAP</font> is saved and returned.
Essentially, <code>ACESubgroupGenerators(</code><var>i</var><code>)</code> interrogates <font face="Gill Sans,Helvetica,Arial">ACE</font> and
establishes <code>ACEData.io[</code><var>i</var><code>].args.sgens</code>, if necessary, and returns
<code>ACEData.io[</code><var>i</var><code>].args.sgens</code>. As a side-effect, if any of the
remaining fields of <code>ACEData.io[</code><var>i</var><code>].args</code> or
<code>ACEData.io[</code><var>i</var><code>].acegens</code> are unset, they are also set.
<p>
<a name = "SSEC005.4"></a>
<li><code>DisplayACEArgs( </code><var>i</var><code> ) F</code>
<li><code>DisplayACEArgs() F</code>
<p>
display the arguments (i.e. <var>fgens</var>, <var>rels</var> and <var>sgens</var>) of the <var>i</var>th
(or default) process started by <code>ACEStart</code>. In fact,
<code>DisplayACEArgs(</code><var>i</var><code>)</code> is just a pretty-printer of the
<code>ACEData.io[</code><var>i</var><code>].args</code> record. Use <code>GetACEArgs</code> (see <a href="CHAP006.htm#SSEC005.7">GetACEOptions</a>)
in assignments. Unlike <code>ACEGroupGenerators</code>
(see <a href="CHAP006.htm#SSEC005.1">ACEGroupGenerators</a>), <code>ACERelators</code> (see <a href="CHAP006.htm#SSEC005.2">ACERelators</a>) and
<code>ACESubgroupGenerators</code> (see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>),
<code>DisplayACEArgs</code> does not have the side-effect of setting any of the
fields of <code>ACEData.io[</code><var>i</var><code>].args</code> if they are unset.
<p>
<a name = "SSEC005.5"></a>
<li><code>GetACEArgs( </code><var>i</var><code> ) F</code>
<li><code>GetACEArgs() F</code>
<p>
return a record of the current arguments (i.e. <var>fgens</var>, <var>rels</var> and
<var>sgens</var>) of the <var>i</var>th (or default) process started by <code>ACEStart</code>. In
fact, <code>GetACEOptions(</code><var>i</var><code>)</code> simply returns the <code>ACEData.io[</code><var>i</var><code>].args</code>
record, or an empty record if that record is unbound. Unlike
<code>ACEGroupGenerators</code> (see <a href="CHAP006.htm#SSEC005.1">ACEGroupGenerators</a>), <code>ACERelators</code>
(see <a href="CHAP006.htm#SSEC005.2">ACERelators</a>) and <code>ACESubgroupGenerators</code>
(see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>), <code>GetACEOptions</code> does not have the
side-effect of setting any of the fields of <code>ACEData.io[</code><var>i</var><code>].args</code> if
they are unset.
<p>
<a name = "SSEC005.6"></a>
<li><code>DisplayACEOptions( </code><var>i</var><code> ) F</code>
<li><code>DisplayACEOptions() F</code>
<p>
display the options, explicitly set by the user, of the <var>i</var>th (or default) process started by
<code>ACEStart</code>. In fact, <code>DisplayACEOptions(</code><var>i</var><code>)</code> is just a pretty-printer
of the <code>ACEData.io[</code><var>i</var><code>].options</code> record. Use <code>GetACEOptions</code>
(see <a href="CHAP006.htm#SSEC005.7">GetACEOptions</a>) in assignments. Please note that no-value <font face="Gill Sans,Helvetica,Arial">ACE</font>
options will appear with the assigned value <code>true</code> (see
Section <a href="CHAP004.htm#SECT006">Interpretation of ACE Options</a> for how the <font face="Gill Sans,Helvetica,Arial">ACE</font> interface
functions interpret such options).
<p>
<strong>Notes:</strong>
Any options set via <code>ACEWrite</code> (see <a href="CHAP006.htm#SSEC008.1">ACEWrite</a>) will <strong>not</strong> be
displayed. Also, recall that if <font face="Gill Sans,Helvetica,Arial">ACE</font> is not given any options it
uses the <code>default</code> strategy (see Section <a href="CHAP004.htm#SECT005">What happens if no ACE Strategy Option or if no ACE Option is passed</a>). To discover the
various settings of the <font face="Gill Sans,Helvetica,Arial">ACE</font> Parameter Options
(see <a href="CHAP004.htm#SSEC012.1">ACEParameterOptions</a>) in vogue for the <font face="Gill Sans,Helvetica,Arial">ACE</font> process, use
<code>ACEParameters</code> (see <a href="CHAP006.htm#SSEC005.10">ACEParameters</a>).
<p>
<a name = "SSEC005.7"></a>
<li><code>GetACEOptions( </code><var>i</var><code> ) F</code>
<li><code>GetACEOptions() F</code>
<p>
return a record of the current options (those that have been
explicitly set by the user) of the <var>i</var>th (or default) process started
by <code>ACEStart</code>. Please note that no-value <font face="Gill Sans,Helvetica,Arial">ACE</font> options will appear
with the assigned value <code>true</code> (see Section <a href="CHAP004.htm#SECT006">Interpretation of ACE Options</a> for how the <font face="Gill Sans,Helvetica,Arial">ACE</font> interface functions interpret such
options). The notes applying to <code>DisplayACEOptions</code>
(see <a href="CHAP006.htm#SSEC005.6">DisplayACEOptions</a>) also apply here.
<p>
<a name = "SSEC005.8"></a>
<li><code>SetACEOptions( </code><var>i</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>SetACEOptions( [:</code><var>options</var><code>] ) F</code>
<p>
modify the current options of the <var>i</var>th (or default) process started
by <code>ACEStart</code>. Please ensure that the <code>OptionsStack</code> is empty before
calling <code>SetACEOptions</code>, otherwise the options already present on the
<code>OptionsStack</code> will also be ``seen''. All interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> interface
functions that accept options, actually call an internal version of
<code>SetACEOptions</code>; so, it is generally important to keep the
<code>OptionsStack</code> clear while working with <font face="Gill Sans,Helvetica,Arial">ACE</font> interactively.
<p>
After setting the options passed, the first mode of the following:
<code>ACEContinue</code> (see <a href="CHAP006.htm#SSEC002.2">ACEContinue</a>), <code>ACERedo</code> (see <a href="CHAP006.htm#SSEC002.3">ACERedo</a>) or
<code>ACEStart</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>), that may be applied, is automatically
invoked.
<p>
Since a user will sometimes have options in the form of a record
(e.g. via <code>GetACEOptions</code>), we provide an alternative to the
behind-the-colon syntax, in a manner .like <code>PushOptions</code>, for the
passing of options via <code>SetACEOptions</code>:
<p>
<a name = "SSEC005.9"></a>
<li><code>SetACEOptions( </code><var>i</var><code>, </code><var>optionsRec</var><code> ) F</code>
<li><code>SetACEOptions( </code><var>optionsRec</var><code> ) F</code>
<p>
In this form, the record <var>optionsRec</var> is used to update the current
options of the <var>i</var>th (or default) process started by <code>ACEStart</code>. Note
that since <var>optionsRec</var> is a record each field must have an assigned
value; in particular, no-value <font face="Gill Sans,Helvetica,Arial">ACE</font> options should be assigned the
value <code>true</code> (see Section <a href="CHAP004.htm#SECT006">Interpretation of ACE Options</a>). Please
don't mix these two forms of <code>SetACEOptions</code> with the previous two
forms; i.e. do <strong>not</strong> pass both a record argument and options, since
this will lead to options appearing in the wrong order; if you want to
do this, make two separate calls to <code>SetACEOptions</code>, e.g. let's say
you have a process like that started by:
<p>
<pre>
gap> ACEExample("A5", ACEStart);
</pre>
<p>
then the following demonstrates both usages of <code>SetACEOptions</code>:
<p>
<pre>
gap> SetACEOptions( rec(echo := 2) );
gap> SetACEOptions( : hlt);
</pre>
<p>
Each of the three commands above generates output; for brevity it has
not been included.
<p>
<strong>Notes:</strong>
<p>
<a name = "I2"></a>
When <code>ACECosetTableFromGensAndRels</code> enters a <code>break</code>-loop
(see <a href="CHAP001.htm#SSEC002.1">ACECosetTable</a>), local versions of the second form of each of
<code>DisplayACEOptions</code> and <code>SetACEOptions</code> become available. (Even though
the names are similar and their function is analogous they are in fact
different functions.)
<p>
<a name = "SSEC005.10"></a>
<li><code>ACEParameters( </code><var>i</var><code> ) F</code>
<li><code>ACEParameters() F</code>
<p>
return a record of the current values of the <font face="Gill Sans,Helvetica,Arial">ACE</font> Parameter Options
(see <a href="CHAP004.htm#SSEC012.1">ACEParameterOptions</a>) of the <var>i</var>th (or default) process started
by <code>ACEStart</code>, according to <font face="Gill Sans,Helvetica,Arial">ACE</font>. Please note that some options may
be reported with incorrect values if they have been changed recently
without following up with one of the modes <code>ACEContinue</code>, <code>ACERedo</code> or
<code>ACEStart</code>. Together the commands <code>ACEGroupGenerators</code>, <code>ACERelators</code>,
<code>ACESubgroupGenerators</code> and <code>ACEParameters</code> give the equivalent <font face="Gill Sans,Helvetica,Arial">GAP</font>
information that is obtained in <font face="Gill Sans,Helvetica,Arial">ACE</font> with <code>sr := 1</code> (see <a href="CHAP00D.htm#SSEC005.7">option sr</a>), which is the ``Run Parameters'' block obtained in the messaging
output (observable when the <code>InfoLevel</code> of <code>InfoACE</code> is set to at
least 3), when <code>messages</code> (see <a href="CHAP004.htm#SSEC018.1">option messages</a>) is set a non-zero
value.
<p>
<strong>Notes:</strong>
One use for this function might be to determine the options required
to replicate a previous run, but be sure that, if this is your
purpose, any recent change in the parameter option values has been
followed by an invocation of one of <code>ACEContinue</code> (see <a href="CHAP006.htm#SSEC002.2">ACEContinue</a>),
<code>ACERedo</code> (see <a href="CHAP006.htm#SSEC002.3">ACERedo</a>) or <code>ACEStart</code> (see <a href="CHAP006.htm#SSEC001.1">ACEStart</a>).
<p>
As a side-effect, for <font face="Gill Sans,Helvetica,Arial">ACE</font> process <var>i</var>, any of the fields of
<code>ACEData.io[</code><var>i</var><code>].args</code> or <code>ACEData.io[</code><var>i</var><code>].acegens</code> that are unset,
are set.
<p>
<a name = "SSEC005.11"></a>
<li><code>IsCompleteACECosetTable( </code><var>i</var><code> ) F</code>
<li><code>IsCompleteACECosetTable() F</code>
<p>
return, for the <var>i</var>th (or default) process started by <code>ACEStart</code>,
<code>true</code> if <font face="Gill Sans,Helvetica,Arial">ACE</font>'s current coset table is complete, or <code>false</code>
otherwise.
<p>
<strong>Note:</strong>
The completeness of the coset table of the <var>i</var>th interactive <font face="Gill Sans,Helvetica,Arial">ACE</font>
process is determined by checking whether
<code>ACEData.io[</code><var>i</var><code>].stats.index</code> is positive; a value of zero indicates
the last enumeration failed to complete. The record
<code>ACEData.io[</code><var>i</var><code>].stats</code> is what is returned by <code>ACEStats(</code><var>i</var><code>)</code>
(see <a href="CHAP001.htm#SSEC003.1">ACEStats</a>).
<p>
<a name = "SSEC005.12"></a>
<li><code>ACEDisplayCosetTable( </code><var>i</var><code> ) F</code>
<li><code>ACEDisplayCosetTable() F</code>
<li><code>ACEDisplayCosetTable( </code><var>i</var><code>, [</code><var>val</var><code>] ) F</code>
<li><code>ACEDisplayCosetTable( [</code><var>val</var><code>] ) F</code>
<li><code>ACEDisplayCosetTable( </code><var>i</var><code>, [</code><var>val</var><code>, </code><var>last</var><code>] ) F</code>
<li><code>ACEDisplayCosetTable( [</code><var>val</var><code>, </code><var>last</var><code>] ) F</code>
<li><code>ACEDisplayCosetTable( </code><var>i</var><code>, [</code><var>val</var><code>, </code><var>last</var><code>, </code><var>by</var><code>] ) F</code>
<li><code>ACEDisplayCosetTable( [</code><var>val</var><code>, </code><var>last</var><code>, </code><var>by</var><code>] ) F</code>
<p>
compact and display the (possibly incomplete) coset table of the <var>i</var>th
(or default) process started by <code>ACEStart</code>; <var>val</var> must be an integer,
and <var>last</var> and <var>by</var> must be positive integers. In the first two forms
of the command, the entire coset table is displayed, without orders or
coset representatives. In the third and fourth forms, the absolute
value of <var>val</var> is taken to be the last line of the table to be
displayed (and 1 is taken to be the first); in the fifth and sixth
forms, <code>|</code><var>val</var><code>|</code> is taken to be the first line of the table to be
displayed, and <var>last</var> is taken to be the number of the last line to be
displayed. In the last two forms, the table is displayed from line
<code>|</code><var>val</var><code>|</code> to line <var>last</var> in steps of <var>by</var>. If <var>val</var> is negative, then
the orders modulo the subgroup (if available) and coset
representatives are displayed also.
<p>
<strong>Note:</strong>
The coset table displayed will normally only be <code>lenlex</code> standardised
if the call to <code>ACEDisplayCosetTable</code> is preceded by
<code>ACEStandardCosetNumbering</code> (see <a href="CHAP006.htm#SSEC007.2">ACEStandardCosetNumbering</a>). The
options <code>lenlex</code> (see <a href="CHAP004.htm#SSEC011.4">option lenlex</a>) and <code>semilenlex</code> (see <a href="CHAP004.htm#SSEC011.5">option semilenlex</a>) are only executed by <code>ACECosetTable</code>
(see <a href="CHAP001.htm#SSEC002.1">ACECosetTable</a>). The <font face="Gill Sans,Helvetica,Arial">ACE</font> binary does not provide <code>semilenlex</code>
standardisation, and hence <code>ACEDisplayCosetTable</code> will never display a
<code>semilenlex</code> standard coset table.
<p>
<a name = "SSEC005.13"></a>
<li><code>ACECosetRepresentative( </code><var>i</var><code>, </code><var>n</var><code> ) F</code>
<li><code>ACECosetRepresentative( </code><var>n</var><code> ) F</code>
<p>
return, for the <var>i</var>th (or default) process started by <code>ACEStart</code>, the
coset representative of coset <var>n</var> of the current coset table held by
<font face="Gill Sans,Helvetica,Arial">ACE</font>, where <var>n</var> must be a positive integer.
<p>
<a name = "SSEC005.14"></a>
<li><code>ACECosetRepresentatives( </code><var>i</var><code> ) F</code>
<li><code>ACECosetRepresentatives() F</code>
<p>
return, for the <var>i</var>th (or default) process started by <code>ACEStart</code>, the
list of coset representatives of the current coset table held by
<font face="Gill Sans,Helvetica,Arial">ACE</font>.
<p>
<a name = "SSEC005.15"></a>
<li><code>ACETransversal( </code><var>i</var><code> ) F</code>
<li><code>ACETransversal() F</code>
<p>
return, for the <var>i</var>th (or default) process started by <code>ACEStart</code>, the
list of coset representatives of the current coset table held by
<font face="Gill Sans,Helvetica,Arial">ACE</font>, if the current table is complete, and <code>fail</code> otherwise.
Essentially, <code>ACETransversal(</code><var>i</var><code>) = ACECosetRepresentatives(</code><var>i</var><code>)</code> for
a complete table.
<p>
<a name = "SSEC005.16"></a>
<li><code>ACECycles( </code><var>i</var><code> ) F</code>
<li><code>ACECycles() F</code>
<a name = "SSEC005.16"></a>
<li><code>ACEPermutationRepresentation( </code><var>i</var><code> ) F</code>
<li><code>ACEPermutationRepresentation() F</code>
<p>
return, for the <var>i</var>th (or default) process started by <code>ACEStart</code>, a
list of permutations corresponding to the group generators, (i.e., the
permutation representation), if the current coset table held by <font face="Gill Sans,Helvetica,Arial">ACE</font>
is complete or <code>fail</code>, otherwise. In the event of failure a message is
emitted to <code>Info</code> at <code>InfoACE</code> or <code>InfoWarning</code> level 1.
<p>
<a name = "SSEC005.17"></a>
<li><code>ACETraceWord( </code><var>i</var><code>, </code><var>n</var><code>, </code><var>word</var><code> ) F</code>
<li><code>ACETraceWord( </code><var>n</var><code>, </code><var>word</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, trace <var>word</var> through <font face="Gill Sans,Helvetica,Arial">ACE</font>'s coset table, starting at
coset <var>n</var>, and return the final coset number if the trace completes,
and <code>fail</code> otherwise. In Group Theory terms, if the cosets of a
subgroup <i>H</i> in a group <i>G</i> are the subject of interactive <font face="Gill Sans,Helvetica,Arial">ACE</font>
process <var>i</var> and the coset identified by that process by the integer
<var>n</var> corresponds to some coset <i>Hx</i>, for some <i>x</i> in <i>G</i>, and <var>word</var>
represents the element <i>g</i> of <i>G</i>, then, providing the current coset
table is complete enough, <code>ACETraceWord( </code><var>i</var><code>, </code><var>n</var><code>, </code><var>word</var><code> )</code> returns
the integer identifying the coset <i>Hxg</i>.
<p>
<strong>Notes:</strong>
You may wish to compact <font face="Gill Sans,Helvetica,Arial">ACE</font>'s coset table first, either explicitly
via <code>ACERecover</code> (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a>), or, implicitly, via any function
call that invokes <font face="Gill Sans,Helvetica,Arial">ACE</font>'s compaction routine (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a> note).
<p>
If you actually wanted <font face="Gill Sans,Helvetica,Arial">ACE</font>'s coset representative, then, for a
<strong>compact</strong> table, feed the output of <code>ACETraceWord</code> to
<code>ACECosetRepresentative</code> (see <a href="CHAP006.htm#SSEC005.13">ACECosetRepresentative</a>).
<p>
<a name = "SSEC005.18"></a>
<li><code>ACEOrders( </code><var>i</var><code> ) F</code>
<li><code>ACEOrders() F</code>
<li><code>ACEOrders( </code><var>i</var><code> : suborder := </code><var>suborder</var><code> ) F</code>
<li><code>ACEOrders(: suborder := </code><var>suborder</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, search for all coset numbers whose representatives' orders
(modulo the subgroup) are either finite, or, if invoked with the
<code>suborder</code> option, are multiples of <var>suborder</var>, where <var>suborder</var>
should be a positive integer. <code>ACEOrders</code> returns a (possibly empty)
list of records, each with fields <code>coset</code>, <code>order</code> and <code>rep</code>, which
are respectively, the coset number, its order modulo the subgroup, and
a representative for each coset number satisfying the criteria of the
search.
<p>
<strong>Note:</strong>
You may wish to compact <font face="Gill Sans,Helvetica,Arial">ACE</font>'s coset table first, either explicitly
via <code>ACERecover</code> (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a>), or, implicitly, via any function
call that invokes <font face="Gill Sans,Helvetica,Arial">ACE</font>'s compaction routine (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a> note).
<p>
<a name = "SSEC005.19"></a>
<li><code>ACEOrder( </code><var>i</var><code>, </code><var>suborder</var><code> ) F</code>
<li><code>ACEOrder( </code><var>suborder</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, search for coset number(s) whose coset representatives
have order modulo the subgroup a multiple of <var>suborder</var>. When
<var>suborder</var> is a positive integer, <code>ACEOrder</code> returns just one record
with fields <code>coset</code>, <code>order</code> and <code>rep</code>, which are respectively, the
coset number, its order modulo the subgroup, and a representative for
the first coset number satisfying the criteria of the search, or
<code>fail</code> if there is no such coset number. The value of <var>suborder</var> may
also be a negative integer, in which case, <code>ACEOrder( </code><var>i</var><code>, </code><var>suborder</var><code>
)</code> is equivalent to <code>ACEOrders( </code><var>i</var><code> : suborder := |</code><var>suborder</var><code>|)</code>; or
<var>suborder</var> may be zero, in which case, <code>ACEOrder( </code><var>i</var><code>, 0 )</code> is
equivalent to <code>ACEOrders( </code><var>i</var><code> )</code>.
<p>
<strong>Note:</strong>
You may wish to compact <font face="Gill Sans,Helvetica,Arial">ACE</font>'s coset table first, either explicitly
via <code>ACERecover</code> (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a>), or, implicitly, via any function
call that invokes <font face="Gill Sans,Helvetica,Arial">ACE</font>'s compaction routine (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a> note).
<p>
<a name = "SSEC005.20"></a>
<li><code>ACECosetOrderFromRepresentative( </code><var>i</var><code>, </code><var>cosetrep</var><code> ) F</code>
<li><code>ACECosetOrderFromRepresentative( </code><var>cosetrep</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process return the order
(modulo the subgroup) of the coset with representative <var>cosetrep</var>, a
word in the free group generators.
<p>
<strong>Note:</strong>
<code>ACECosetOrderFromRepresentative</code> calls <code>ACETraceWord</code> to determine
the coset (number) to which <var>cosetrep</var> belongs, and then scans the
output of <code>ACEOrders</code> to determine the order of the coset (number).
<p>
<a name = "SSEC005.21"></a>
<li><code>ACECosetsThatNormaliseSubgroup( </code><var>i</var><code>, </code><var>n</var><code> ) F</code>
<li><code>ACECosetsThatNormaliseSubgroup( </code><var>n</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, determine non-trivial (i.e. other than coset 1) coset
numbers whose representatives normalise the subgroup.
<p>
<ul>
<p>
<li> If <var>n</var> > 0, the list of the first <var>n</var> non-trivial coset
numbers whose representatives normalise the subgroup is returned.
<p>
<li> If <var>n</var> < 0, a list of records with fields <code>coset</code> and
<code>rep</code> which represent the coset number and a representative,
respectively, of the first <var>n</var> non-trivial coset numbers whose
representatives normalise the subgroup is returned.
<p>
<li> If <var>n</var> = 0, a list of records with fields <code>coset</code> and
<code>rep</code> which represent the coset number and a representative,
respectively, of all non-trivial coset numbers whose representatives
normalise the subgroup is returned.
<p>
</ul>
<p>
<strong>Note:</strong>
You may wish to compact <font face="Gill Sans,Helvetica,Arial">ACE</font>'s coset table first, either explicitly
via <code>ACERecover</code> (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a>), or, implicitly, via any function
call that invokes <font face="Gill Sans,Helvetica,Arial">ACE</font>'s compaction routine (see <a href="CHAP006.htm#SSEC007.1">ACERecover</a> note).
<p>
<a name = "SSEC005.22"></a>
<li><code>ACEStyle( </code><var>i</var><code> ) F</code>
<li><code>ACEStyle() F</code>
<p>
returns the current enumeration style as one of the strings: <code>"C"</code>,
<code>"Cr"</code>, <code>"CR"</code>, <code>"R"</code>, <code>"R*"</code>, <code>"Rc"</code>, <code>"R/C"</code>, or <code>"R/C (defaulted)"</code>
(see Section <a href="CHAP003.htm#SECT001">Enumeration Style</a>).
<p>
The next two functions of this section are really intended for <font face="Gill Sans,Helvetica,Arial">ACE</font>
standalone gurus. To fully understand their output you will need to
consult the standalone manual and the C source code.
<p>
<a name = "SSEC005.23"></a>
<li><code>ACEDumpVariables( </code><var>i</var><code> ) F</code>
<li><code>ACEDumpVariables() F</code>
<li><code>ACEDumpVariables( </code><var>i</var><code>, [</code><var>level</var><code>] ) F</code>
<li><code>ACEDumpVariables( [</code><var>level</var><code>] ) F</code>
<li><code>ACEDumpVariables( </code><var>i</var><code>, [</code><var>level</var><code>, </code><var>detail</var><code>] ) F</code>
<li><code>ACEDumpVariables( [</code><var>level</var><code>, </code><var>detail</var><code>] ) F</code>
<p>
dump the internal variables of <font face="Gill Sans,Helvetica,Arial">ACE</font> of the <var>i</var>th (or default)
process started by <code>ACEStart</code>; <var>level</var> should be one of 0, 1, or 2,
and <var>detail</var> should be 0 or 1.
<p>
The value of <var>level</var> determines which of the three levels of <font face="Gill Sans,Helvetica,Arial">ACE</font> to
dump. (You will need to read the standalone manual to understand what
Levels 0, 1 and 2 are all about.) The value of <var>detail</var> determines the
amount of detail (<code></code><var>detail</var><code> = 0</code> means less detail). The first two
forms of <code>ACEDumpVariables</code> (with no list argument) selects <code></code><var>level</var><code> =
0, </code><var>detail</var><code> = 0</code>. The third and fourth forms (with a list argument
containing the integer <var>level</var>) makes <code></code><var>detail</var><code> = 0</code>. This command is
intended for gurus; the source code should be consulted to see what
the output means.
<p>
<a name = "SSEC005.24"></a>
<li><code>ACEDumpStatistics( </code><var>i</var><code> ) F</code>
<li><code>ACEDumpStatistics() F</code>
<p>
dump <font face="Gill Sans,Helvetica,Arial">ACE</font>'s internal statistics accumulated during the most recent
enumeration of the <var>i</var>th (or default) process started by <code>ACEStart</code>,
provided the <font face="Gill Sans,Helvetica,Arial">ACE</font> binary was built with the statistics package
(which it is by default). Use <code>ACEBinaryVersion();</code>
(see <a href="CHAP006.htm#SSEC005.25">ACEBinaryVersion</a>) to check for the inclusion of the statistics
package. See the <code>enum.c</code> source file for the meaning of the
variables.
<p>
<a name = "SSEC005.25"></a>
<li><code>ACEBinaryVersion( </code><var>i</var><code> ) F</code>
<li><code>ACEBinaryVersion() F</code>
<p>
for the <var>i</var>th (or default) process started by <code>ACEStart</code>, print, via
<code>Info</code> (at <code>InfoACE</code> level 1), version details of the <font face="Gill Sans,Helvetica,Arial">ACE</font> binary
you are currently running, including what compiler flags were set when
the executable was built, and also returns the version number of the
binary as a string. Essentially the information obtained is what is
obtained via <font face="Gill Sans,Helvetica,Arial">ACE</font>'s <code>options</code> option (see <a href="CHAP00D.htm#SSEC005.5">option options</a>), and the
returned value is what is stored in <code>ACEData.version</code> (see <a href="CHAP001.htm#SSEC008.1">ACEData</a>).
A typical output, illustrating the default build, is:
<p>
<pre>
gap> ACEBinaryVersion();
#I No interactive ACE sessions are currently active
#I ACE Binary Version: 3.001
#I ACE 3.001 Sat Feb 27 11:27:15 2016
#I =========================================
#I Host information:
#I name = banksia
#I ACE 3.001 executable built:
#I Wed Feb 24 15:25:26 AWST 2016
#I Level 0 options:
#I statistics package = on
#I coinc processing messages = on
#I dedn processing messages = on
#I Level 1 options:
#I workspace multipliers = decimal
#I Level 2 options:
#I host info = on
"3.001"
</pre>
<p>
<strong>Notes:</strong>
The <font face="Gill Sans,Helvetica,Arial">ACE</font> binary's banner may also appear in the output (if it has
not already appeared). Unlike other <font face="Gill Sans,Helvetica,Arial">ACE</font> interface functions, the
information obtained via <code>ACEBinaryVersion();</code> is absolutely
independent of any enumeration. For this reason, we make it
permissible to run <code>ACEBinaryVersion();</code> when there are no currently
active interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> processes; and, in such a case,
<code>ACEBinaryVersion();</code> emits a warning that there are no interactive
<font face="Gill Sans,Helvetica,Arial">ACE</font> sessions currently active and initiates (and closes again) its
own stream to obtain the information from the <font face="Gill Sans,Helvetica,Arial">ACE</font> binary. For the
current version of the <font face="Gill Sans,Helvetica,Arial">ACE</font> package (the <font face="Gill Sans,Helvetica,Arial">GAP</font> code component) use
<code>ACEPackageVersion();</code> (see <a href="CHAP001.htm#SSEC011.1">ACEPackageVersion</a>).
<p>
<p>
<h2><a name="SECT006">6.6 Interactive Versions of Non-interactive ACE Functions</a></h2>
<p><p>
<a name = "SSEC006.1"></a>
<li><code>ACECosetTable( </code><var>i</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACECosetTable( [:</code><var>options</var><code>] ) F</code>
<p>
return a coset table as a <font face="Gill Sans,Helvetica,Arial">GAP</font> object, in standard form (for
<font face="Gill Sans,Helvetica,Arial">GAP</font>). These functions perform the same function as
<code>ACECosetTableFromGensAndRels</code> and <code>ACECosetTable</code> on three arguments
(see <a href="CHAP001.htm#SSEC002.1">ACECosetTable</a>), albeit interactively, on the <var>i</var>th (or default)
process started by <code>ACEStart</code>. If options are passed then an internal
version of <code>ACEModes</code> is run to determine which of the general <font face="Gill Sans,Helvetica,Arial">ACE</font>
modes (see Section <a href="CHAP006.htm#SECT002">General ACE Modes</a>) <code>ACEContinue</code>, <code>ACERedo</code> or
<code>ACEStart</code> is possible; and (an internal version of) the first mode of
these that is allowed is executed, to ensure the resultant table is
correct for the current options.
<p>
<a name = "SSEC006.2"></a>
<li><code>ACEStats( </code><var>i</var><code> [:</code><var>options</var><code>] ) F</code>
<li><code>ACEStats( [:</code><var>options</var><code>] ) F</code>
<p>
perform the same function as <code>ACEStats</code> on three arguments
(see <a href="CHAP001.htm#SSEC003.1">ACEStats</a> --- non-interactive version), albeit interactively, on
the <var>i</var>th (or default) process started by <code>ACEStart</code>. If options are
passed then an internal version of <code>ACEModes</code> is run to determine
which of the general <font face="Gill Sans,Helvetica,Arial">ACE</font> modes (see Section <a href="CHAP006.htm#SECT002">General ACE Modes</a>)
<code>ACEContinue</code>, <code>ACERedo</code> or <code>ACEStart</code> is possible; and (an internal
version of) the first mode of these that is allowed is executed, to
ensure the resultant statistics are correct for the current options.
<p>
See Section <a href="CHAP00B.htm#SECT003">Example of Using ACE Interactively (Using ACEStart)</a> for
an example demonstrating both these functions within an interactive
process.
<p>
<a name = "SSEC006.3"></a>
<li><code>IsACEGeneratorsInPreferredOrder( </code><var>i</var><code> ) F</code>
<li><code>IsACEGeneratorsInPreferredOrder() F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, return <code>true</code> if the group generators of that process, are
in an order that will not be changed by <font face="Gill Sans,Helvetica,Arial">ACE</font>, and <code>false</code> otherwise.
This function has greatest relevance to users who call <code>ACECosetTable</code>
(see <a href="CHAP006.htm#SSEC006.1">ACECosetTable!interactive</a>), with the <code>lenlex</code> option
(see <a href="CHAP004.htm#SSEC011.4">option lenlex</a>). For more details, see the discussion for the
non-interactive version of <code>IsACEGeneratorsInPreferredOrder</code>
(<a href="CHAP001.htm#SSEC002.3">IsACEGeneratorsInPreferredOrder</a>), which is called with two
arguments.
<p>
<p>
<h2><a name="SECT007">6.7 Steering ACE Interactively</a></h2>
<p><p>
<a name = "I3"></a>
<a name = "SSEC007.1"></a>
<li><code>ACERecover( </code><var>i</var><code> ) F</code>
<li><code>ACERecover() F</code>
<p>
invoke the compaction routine on the coset table of the <var>i</var>th (or
default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by <code>ACEStart</code>, in order to
recover the space used by the dead coset numbers. A <code>CO</code> message line
is printed if any rows of the coset table were recovered, and a <code>co</code>
line if none were. (See Appendix <a href="CHAP00A.htm">The Meanings of ACE's output messages</a> for the meanings of these messages.)
<p>
<strong>Note:</strong>
The compaction routine is called automatically when any of
<code>ACEDisplayCosetTable</code> (see <a href="CHAP006.htm#SSEC005.12">ACEDisplayCosetTable</a>),
<code>ACECosetRepresentative</code> (see <a href="CHAP006.htm#SSEC005.13">ACECosetRepresentative</a>),
<code>ACECosetRepresentatives</code> (see <a href="CHAP006.htm#SSEC005.14">ACECosetRepresentatives</a>),
<code>ACETransversal</code> (see <a href="CHAP006.htm#SSEC005.15">ACETransversal</a>), <code>ACECycles</code>
(see <a href="CHAP006.htm#SSEC005.16">ACECycles</a>), <code>ACEStandardCosetNumbering</code>
(see <a href="CHAP006.htm#SSEC007.2">ACEStandardCosetNumbering</a>), <code>ACECosetTable</code>
(see <a href="CHAP001.htm#SSEC002.1">ACECosetTable</a>) or <code>ACEConjugatesForSubgroupNormalClosure</code>
(see <a href="CHAP006.htm#SSEC007.10">ACEConjugatesForSubgroupNormalClosure</a>), is invoked.
<p>
<a name = "I4"></a>
<a name = "SSEC007.2"></a>
<li><code>ACEStandardCosetNumbering( </code><var>i</var><code> ) F</code>
<li><code>ACEStandardCosetNumbering() F</code>
<p>
compact and then do a <code>lenlex</code> standardisation (see Section <a href="CHAP003.htm#SECT004">Coset Table Standardisation Schemes</a>) of the numbering of cosets in the
coset table of the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process
started by <code>ACEStart</code>. That is, for a given ordering of the generators
in the columns of the table, they produce a canonic table. A table
that includes a column for each generator inverse immediately
following the column for the corresponding generator, standardised
according to the <code>lenlex</code> scheme, has the property that a row-major
scan (i.e. a scan of the successive rows of the <strong>body</strong> of the table
row by row, from left to right) encounters previously unseen cosets in
numeric order. This function does not display the new table; use
<code>ACEDisplayCosetTable</code> (see <a href="CHAP006.htm#SSEC005.12">ACEDisplayCosetTable</a>) for that.
<p>
<strong>Notes:</strong>
In a <code>lenlex</code> canonic table, the coset representatives are ordered
first according to length and then the lexicographic order defined by
the order the generators and their inverses head the columns. Note
that, unless special action is taken, <font face="Gill Sans,Helvetica,Arial">ACE</font> avoids having an
involutory generator in the first column (by swapping the first two
generators), except when there is only one generator, or when the
second generator is also an involution; so the lexicographic order
used by <font face="Gill Sans,Helvetica,Arial">ACE</font> need not necessarily correspond with the order in which
the generators were first put to <font face="Gill Sans,Helvetica,Arial">ACE</font>. (We have used the term
``involution'' above; what we really mean is a generator <code>x</code> for
which there is a relator <code>x*x</code> or <code>x^2</code>. Such a generator may, of
course, turn out to actually be the identity.) The function
<code>IsACEGeneratorsInPreferredOrder</code> (see
<a href="CHAP001.htm#SSEC002.3">IsACEGeneratorsInPreferredOrder</a>) detects cases when <font face="Gill Sans,Helvetica,Arial">ACE</font> would
swap the first two generators.
<p>
Standardising the coset numbering within <font face="Gill Sans,Helvetica,Arial">ACE</font> does <strong>not</strong> affect the
<font face="Gill Sans,Helvetica,Arial">GAP</font> coset table obtained via <code>ACECosetTable</code> (see <a href="CHAP001.htm#SSEC002.1">ACECosetTable</a>).
If <code>ACECosetTable</code> is called without the <code>lenlex</code> option <font face="Gill Sans,Helvetica,Arial">GAP</font>'s
default standardisation is applied after conversion of <font face="Gill Sans,Helvetica,Arial">ACE</font>'s
output, which undoes an <font face="Gill Sans,Helvetica,Arial">ACE</font> standardisation. On the other hand, if
<code>ACECosetTable</code> is called with the <code>lenlex</code> option then after a check
and special action, if required, the equivalent of a call to
<code>ACEStandardCosetNumbering</code> is invoked, irrespective of whether it has
been done by the user beforehand. The check that is done is a call to
<code>IsACEGeneratorsInPreferredOrder</code> (see
<a href="CHAP001.htm#SSEC002.3">IsACEGeneratorsInPreferredOrder</a>) to ensure that <font face="Gill Sans,Helvetica,Arial">ACE</font> has not
swapped the first two generators. The special action taken when the
call to <code>IsACEGeneratorsInPreferredOrder</code> returns <code>false</code>, is the
setting of the <code>asis</code> option (see <a href="CHAP004.htm#SSEC013.1">option asis</a>) to 1 and the
resubmission of the relators to <font face="Gill Sans,Helvetica,Arial">ACE</font> taking care not to submit the
relator that determines the first generator as an involution as that
generator squared (these two actions together avert <font face="Gill Sans,Helvetica,Arial">ACE</font>'s swapping
of the first two generators), followed by the re-<code>start</code>ing of the
enumeration.
<p>
<strong>Guru Notes:</strong>
In five of the ten standard enumeration strategies of Sims
<a href="biblio.htm#Sim94"><cite>Sim94</cite></a> (i.e. the five Sims strategies not provided by <font face="Gill Sans,Helvetica,Arial">ACE</font>),
the table is standardised repeatedly. This is expensive
computationally, but can result in fewer cosets being necessary. The
effect of doing this can be investigated in <font face="Gill Sans,Helvetica,Arial">ACE</font> by (repeatedly)
halting the enumeration (via restrictive options), standardising the
coset numbering, and continuing (see Section <a href="CHAP00C.htm#SECT002">Emulating Sims</a> for an
example).
<p>
<a name = "SSEC007.3"></a>
<li><code>ACEAddRelators( </code><var>i</var><code>, </code><var>wordlist</var><code> ) F</code>
<li><code>ACEAddRelators( </code><var>wordlist</var><code> ) F</code>
<p>
add, for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, the words in the list <var>wordlist</var> to any relators already
present, and automatically invoke <code>ACERedo</code>, if it can be applied, or
otherwise <code>ACEStart</code>. Note that <font face="Gill Sans,Helvetica,Arial">ACE</font> sorts the resultant relator
list, unless the <code>asis</code> option (see <a href="CHAP004.htm#SSEC013.1">option asis</a>) has been set to 1;
don't assume, unless <code>asis = 1</code>, that the new relators have been
appended in user-provided order to the previously existing relator
list. <code>ACEAddRelators</code> also returns the new relator list. Use
<code>ACERelators</code> (see <a href="CHAP006.htm#SSEC005.2">ACERelators</a>) to determine the current relator
list.
<p>
<a name = "SSEC007.4"></a>
<li><code>ACEAddSubgroupGenerators( </code><var>i</var><code>, </code><var>wordlist</var><code> ) F</code>
<li><code>ACEAddSubgroupGenerators( </code><var>wordlist</var><code> ) F</code>
<p>
add, for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, the words in the list <var>wordlist</var> to any subgroup
generators already present, and automatically invoke <code>ACERedo</code>, if it
can be applied, or otherwise <code>ACEStart</code>. Note that <font face="Gill Sans,Helvetica,Arial">ACE</font> sorts the
resultant subgroup generator list, unless the <code>asis</code> option
(see <a href="CHAP004.htm#SSEC013.1">option asis</a>) has been set to 1; don't assume, unless <code>asis =
1</code>, that the new subgroup generators have been appended in
user-provided order to the previously existing subgroup generator
list. <code>ACEAddSubgroupGenerators</code> also returns the new subgroup
generator list. Use <code>ACESubgroupGenerators</code>
(see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>) to determine the current subgroup
generator list.
<p>
<a name = "SSEC007.5"></a>
<li><code>ACEDeleteRelators( </code><var>i</var><code>, </code><var>list</var><code> ) F</code>
<li><code>ACEDeleteRelators( </code><var>list</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, delete <var>list</var> from the current relators, if list is a list
of words in the group generators, or those current relators indexed by
the integers in <var>list</var>, if <var>list</var> is a list of positive integers, and
automatically invoke <code>ACEStart</code>. <code>ACEDeleteRelators</code> also returns the
new relator list. Use <code>ACERelators</code> (see <a href="CHAP006.htm#SSEC005.2">ACERelators</a>) to determine
the current relator list.
<p>
<a name = "SSEC007.6"></a>
<li><code>ACEDeleteSubgroupGenerators( </code><var>i</var><code>, </code><var>list</var><code> ) F</code>
<li><code>ACEDeleteSubgroupGenerators( </code><var>list</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, delete <var>list</var> from the current subgroup generators, if
list is a list of words in the group generators, or those current
subgroup generators indexed by the integers in <var>list</var>, if <var>list</var> is a
list of positive integers, and automatically invoke <code>ACEStart</code>.
<code>ACEDeleteSubgroupGenerators</code> also returns the new subgroup generator
list. Use <code>ACESubgroupGenerators</code> (see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>) to
determine the current subgroup generator list.
<p>
<a name = "SSEC007.7"></a>
<li><code>ACECosetCoincidence( </code><var>i</var><code>, </code><var>n</var><code> ) F</code>
<li><code>ACECosetCoincidence( </code><var>n</var><code> ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, return the representative of coset <var>n</var>, where <var>n</var> must be
a positive integer, and add it to the subgroup generators; i.e.,
equates this coset with coset 1, the subgroup. <code>ACERedo</code> is
automatically invoked.
<p>
<a name = "SSEC007.8"></a>
<li><code>ACERandomCoincidences( </code><var>i</var><code>, </code><var>subindex</var><code> ) F</code>
<li><code>ACERandomCoincidences( </code><var>subindex</var><code> ) F</code>
<li><code>ACERandomCoincidences( </code><var>i</var><code>, [</code><var>subindex</var><code>] ) F</code>
<li><code>ACERandomCoincidences( [</code><var>subindex</var><code>] ) F</code>
<li><code>ACERandomCoincidences( </code><var>i</var><code>, [</code><var>subindex</var><code>, </code><var>attempts</var><code>] ) F</code>
<li><code>ACERandomCoincidences( [</code><var>subindex</var><code>, </code><var>attempts</var><code>] ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, attempt up to <var>attempts</var> (or, in the first four forms, 8)
times to find nontrivial subgroups with index a multiple of <var>subindex</var>
by repeatedly making random coset numbers coincident with coset 1 and
seeing what happens. The starting coset table must be non-empty, but
must <strong>not</strong> be complete (use <code>ACERandomlyApplyCosetCoincidence</code>
(see <a href="CHAP006.htm#SSEC007.9">ACERandomlyApplyCosetCoincidence</a>) if your table is already
complete). For each attempt, by applying <font face="Gill Sans,Helvetica,Arial">ACE</font>'s <code>rc</code> option
(see <a href="CHAP00D.htm#SSEC002.9">option rc</a>) random coset representatives are repeatedly added to
the subgroup and the enumeration <code>redo</code>ne. If the table becomes too
small, the attempt is aborted, the original subgroup generators
restored, and another attempt made. If an attempt succeeds, then the
new set of subgroup generators is retained. <code>ACERandomCoincidences</code>
returns the list of new subgroup generators added. Use
<code>ACESubgroupGenerators</code> (see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>) to determine the
current subgroup generator list.
<p>
<strong>Notes:</strong>
<code>ACERandomCoincidences</code> may add subgroup generators even if it failed
to determine a nontrivial subgroup with index a multiple of
<var>subindex</var>; in such a case, the original status may be restored by
applying <code>ACEDeleteSubgroupGenerators</code>
(see <a href="CHAP006.htm#SSEC007.6">ACEDeleteSubgroupGenerators</a>) with the list returned by
<code>ACERandomCoincidences</code>.
<p>
<code>ACERandomCoincidences</code> applies the <code>rc</code> option (see <a href="CHAP00D.htm#SSEC002.9">option rc</a>) of
<font face="Gill Sans,Helvetica,Arial">ACE</font> which takes the line that if an enumeration has already
obtained a finite index then either, <var>subindex</var> is already a divisor
of that finite index, or the request is impossible. Thus an invocation
of <code>ACERandomCoincidences</code>, in the case where the coset table is
already complete, is an error.
<p>
<strong>Guru Notes:</strong> A coset can have many different representatives.
Consider running <code>ACEStandardCosetNumbering</code>
(see <a href="CHAP006.htm#SSEC007.2">ACEStandardCosetNumbering</a>) before <code>ACERandomCoincidences</code>, to
canonicise the table and the representatives.
<p>
<a name = "SSEC007.9"></a>
<li><code>ACERandomlyApplyCosetCoincidence( </code><var>i</var><code> [: </code><var>controlOptions</var><code>]) F</code>
<li><code>ACERandomlyApplyCosetCoincidence( [: </code><var>controlOptions</var><code>]) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, try to find a larger proper subgroup (i.e. a subgroup of
smaller but nontrivial index), by repeatedly applying
<code>ACECosetCoincidence</code> (see <a href="CHAP006.htm#SSEC007.7">ACECosetCoincidence</a>) and seeing what
happens; <code>ACERandomlyApplyCosetCoincidence</code> returns the (possibly
empty) list of new subgroup generators added. The starting coset table
must already be complete (use <code>ACERandomCoincidences</code>
(see <a href="CHAP006.htm#SSEC007.8">ACERandomCoincidences</a>) if your table is not already complete).
<code>ACERandomlyApplyCosetCoincidence</code> provides the following four options
(<var>controlOptions</var>).
<p>
<p>
<dl compact>
<p>
<dt> <code>subindex := </code><var>subindex</var><code></code> <dd>
Sets the restriction that the final index should be a multiple of
<var>subindex</var>; <var>subindex</var> must be a positive integer divisor of the
initial subgroup index.
<p>
<dt> <code>hibound := </code><var>hibound</var><code></code> <dd>
Sets the restriction that the final index should be (strictly) less
than <var>hibound</var>; <var>hibound</var> must be an integer that is greater than 1
and at most the initial subgroup index.
<p>
<dt> <code>lobound := </code><var>lobound</var><code></code> <dd>
Sets the restriction that the final index should be (strictly) greater
than <var>lobound</var>; <var>lobound</var> must be an integer that is at least 1 and
(strictly) less than the initial subgroup index.
<p>
<dt> <code>attempts := </code><var>attempts</var><code></code> <dd>
Sets the restriction that the number of applications of
<code>ACECosetCoincidence</code> should be at most <var>attempts</var>; <var>attempts</var> must be
a positive integer.
<p>
</dl>
<p>
By default, <code></code><var>subindex</var><code> = 1</code>, <var>hibound</var> is the existing subgroup
index, <code></code><var>lobound</var><code> = 1</code> and <code></code><var>attempts</var><code> = 8</code>. If after an attempt the
new index is a multiple of <var>subindex</var>, less than <var>hibound</var> and greater
than <var>lobound</var> then the process terminates (and the list of new
subgroup generators is returned). Otherwise, if an attempt reaches a
stage where the criteria cannot be satisfied, the attempt is aborted,
the original subgroup generators restored, and another attempt made.
If no attempt is successful an empty list is returned. Use
<code>ACESubgroupGenerators</code> (see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>) to determine the
current subgroup generator list.
<p>
<a name = "SSEC007.10"></a>
<li><code>ACEConjugatesForSubgroupNormalClosure( </code><var>i</var><code> ) F</code>
<li><code>ACEConjugatesForSubgroupNormalClosure() F</code>
<li><code>ACEConjugatesForSubgroupNormalClosure( </code><var>i</var><code> : add ) F</code>
<li><code>ACEConjugatesForSubgroupNormalClosure(: add ) F</code>
<p>
for the <var>i</var>th (or default) interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process started by
<code>ACEStart</code>, test each conjugate of a subgroup generator by a group
generator for membership in the subgroup, and return the (possibly
empty) list of conjugates that were determined to not belong to the
subgroup (coset 1); and, if called with the <code>add</code> option, these
conjugates are also added to the existing list of subgroup generators.
<p>
<strong>Notes:</strong> A conjugate of a subgroup generator is tested for membership
of the subgroup, by checking whether it can be traced from coset 1 to
coset 1 (see <code>ACETraceWord</code>: <a href="CHAP006.htm#SSEC005.17">ACETraceWord</a>). For an <strong>incomplete</strong>
coset table, such a trace may not complete, in which case
<code>ACEConjugatesForSubgroupNormalClosure</code> may return an empty list even
though the subgroup is <strong>not</strong> normally closed within the group.
<p>
The <code>add</code> option does <strong>not</strong> guarantee that the resultant subgroup is
normally closed. It is still possible that some conjugates of the
newly added subgroup generators will not be elements of the subgroup.
<p>
<strong>Example:</strong>
To demonstrate the usage and features of
<code>ACEConjugatesForSubgroupNormalClosure</code>, let us consider an example
where we know pretty well what to expect.
<p>
Let <i>G</i> be the group, isomorphic to the symmetric group <i>S</i><sub>6</sub>, with
the presentation
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> { <i>a</i>, <i>b</i> | <i>a</i><sup>2</sup>, <i>b</i><sup>6</sup>, (<i>ab</i><sup>−1</sup><i>ab</i>)<sup>3</sup>, (<i>ab</i><sup>−1</sup><i>ab</i><sup>2</sup>)<sup>4</sup>, (<i>ab</i>)<sup>5</sup>, (<i>ab</i><sup>−2</sup><i>ab</i><sup>2</sup>)<sup>2</sup> } </td></tr></table></td></tr></table>
(from <a href="biblio.htm#CM72"><cite>CM72</cite></a>), and let <i>H</i> be the subgroup 〈<i>ab</i><sup>3</sup> 〉. There is an isomorphism ϕ from <i>G</i> to <i>S</i><sub>6</sub> mapping <i>a</i>
onto (1,2) and <i>ab</i><sup>3</sup> onto (1,2,3,4,5,6). It follows that ϕ
maps <i>ab</i><sup>3</sup> into <i>A</i><sub>6</sub>. So we know that the normal closure of <i>H</i> has
index 2 in <i>G</i>. Let us observe this via <font face="Gill Sans,Helvetica,Arial">ACE</font>.
<p>
First we start an enumeration with <code>max</code> set to 80.
<p>
<pre>
gap> F := FreeGroup( "a", "b" );;
gap> a := F.1;; b := F.2;;
gap> fgens := GeneratorsOfGroup( F );;
gap> rels := [ a^2, b^6, (a*b^-1*a*b)^3, (a*b^-1*a*b^2)^4, (a*b)^5,
> (a*b^-2*a*b^2)^2 ];;
gap> sgens := [ a*b^3 ];;
gap> i := ACEStart( fgens, rels, sgens : max := 80 );;
gap> IsCompleteACECosetTable( i );
false
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
#I ACEConjugatesForSubgroupNormalClosure: All (traceable) conjugates in subgp
[ ]
</pre>
<p>
Though we know that <i>H</i> is not equal to its normal closure, we did not
get any new elements (we had warned above of such a possibility).
Apparently our incomplete table is too small. So let us increase <code>max</code>
to 100 and continue.
<p>
<pre>
gap> ACEContinue( i : max := 100 );;
gap> IsCompleteACECosetTable( i );
false
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
[ b^-1*a*b^4 ]
gap> IsCompleteACECosetTable( i );
true
gap> ACEStats( i ).index;
20
</pre>
<p>
This time we got a new element, and after adding it to the subgroup
generators we obtained a complete table. However the resulting
subgroup need not yet be the normal closure of <i>H</i> (and in fact we
know that it is not). So we continue with another call to the function
<code>ACEConjugatesForSubgroupNormalClosure</code>.
<p>
<pre>
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
[ b^-2*a*b^5, b*a*b^2 ]
gap> ACEStats( i ).index;
2
</pre>
<p>
Now we have the index that we expected. Another call to the function
<code>ACEConjugatesForSubgroupNormalClosure</code> should not yield any more
conjugates. We ensure that this is indeed the case and then display
the resulting list of subgroup generators.
<p>
<pre>
gap> ACEConjugatesForSubgroupNormalClosure( i : add );
#I ACEConjugatesForSubgroupNormalClosure: All (traceable) conjugates in subgp
[ ]
gap> ACESubgroupGenerators( i );
[ a*b^3, b*a*b^2, b^-1*a*b^4, b^-2*a*b^5 ]
</pre>
<p>
<p>
<h2><a name="SECT008">6.8 Primitive ACE Read/Write Functions</a></h2>
<p><p>
For those familiar with the workings of the <font face="Gill Sans,Helvetica,Arial">ACE</font> standalone we
provide primitive read/write tools to communicate directly with an
interactive <font face="Gill Sans,Helvetica,Arial">ACE</font> process, started via <code>ACEStart</code> (possibly with
argument 0, but this is not essential). For the most part, it is up to
the user to translate the output strings from <font face="Gill Sans,Helvetica,Arial">ACE</font> into a form
useful in <font face="Gill Sans,Helvetica,Arial">GAP</font>. However, after the group generators, relators, and
subgroup generators have been set in the <font face="Gill Sans,Helvetica,Arial">ACE</font> process, via
<code>ACEWrite</code>, invocations of any of <code>ACEGroupGenerators</code>
(see <a href="CHAP006.htm#SSEC005.1">ACEGroupGenerators</a>), <code>ACERelators</code> (see <a href="CHAP006.htm#SSEC005.2">ACERelators</a>),
<code>ACESubgroupGenerators</code> (see <a href="CHAP006.htm#SSEC005.3">ACESubgroupGenerators</a>), or
<code>ACEParameters</code> (see <a href="CHAP006.htm#SSEC005.10">ACEParameters</a>) will establish the corresponding | |