Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1%%2%W ace.tex ACE documentation introduction Alexander Hulpke3%W Joachim Neub"user4%W Greg Gamble5%%6%H $Id$7%%8%Y Copyright (C) 2000 Centre for Discrete Mathematics and Computing9%Y Department of Information Tech. & Electrical Eng.10%Y University of Queensland, Australia.11%%1213%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%14\Chapter{The ACE Package}1516\index{ACE}17The ``Advanced Coset Enumerator'' {\ACE}:1819\begintt20ACE coset enumerator (C) 1995-2001 by George Havas and Colin Ramsay21\endtt22\URL{http://staff.itee.uq.edu.au/havas}2324can be called from within {\GAP} through an interface, written by25Alexander Hulpke and Greg Gamble, which is described in this manual.2627The interface links to an external binary and therefore is only usable28under UNIX (see Section~"Installing the ACE Package" for how to29install {\ACE}). It will not work on Windows.30The current version requires at least {\GAP}~4.4. Users who31still have {\GAP}~4.3, must use {\ACE} 4.1. (The first versions32supported {\GAP}~4.2.) {\ACE} can be used through this interface in a33variety of ways:3435\beginlist%unordered3637\item{--} one may supplant the usual {\GAP} coset enumerator (see38Section~"Using ACE as a Default for Coset Enumerations"),3940\item{--} one may generate a coset table using {\ACE} without41redefining the usual {\GAP} coset enumerator (see Section~"Using ACE42Directly to Generate a Coset Table"),4344\item{--} one may simply test whether a coset enumeration will45terminate (see Section~"Using ACE Directly to Test whether a Coset46Enumeration Terminates"),4748\item{--} one may use {\GAP} to write a script for the {\ACE}49standalone (see Section~"Writing ACE Standalone Input Files to50Generate a Coset Table"), and5152\item{--} one may interact with the {\ACE} standalone from within53{\GAP} (see Section~"Using ACE Interactively"). Among other things,54the interactive {\ACE} interface functions (described in55Chapter~"Functions for Using ACE Interactively") enable the user to56search for subgroups of a group (see the note of Section~"Using ACE57Interactively").5859\endlist6061Each of these ways gives the user access to a welter of options, which62are discussed in full in Chapters~"Options for ACE" and~"Strategy63Options for ACE". Yet more options are provided in Appendix~"Other ACE64Options", but please take note of the Appendix's introductory65paragraph. Check out Appendix~"Examples" for numerous examples of the66{\ACE} commands.6768*Note*: Some care needs to be taken with options; be sure to read69Section~"General Warnings regarding the Use of Options" and the70introductory sections of Chapter~"Options for ACE" for some warnings71regarding them and a general discussion of their use, before using any72of the functions provided by this interface to the {\ACE} binary.7374%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%75\Section{Using ACE as a Default for Coset Enumerations}7677After loading {\ACE} (see Section~"Loading the ACE Package"), if you78want to use the {\ACE} coset enumerator as a default for all coset79enumerations done by {\GAP} (which may also get called indirectly),80you can achieve this by setting the global variable `TCENUM' to81`ACETCENUM'.8283\beginexample84gap> TCENUM:=ACETCENUM;;8586\endexample8788This sets the function `CosetTableFromGensAndRels' (see89Section~"ref:Coset Tables and Coset Enumeration" in the {\GAP}90Reference Manual) to be the function `ACECosetTableFromGensAndRels'91(described in Section~"Using ACE Directly to Generate a Coset Table"),92which then can be called with all the options defined for the {\ACE}93interface, not just the options `max' and `silent'. If `TCENUM' is set94to `ACETCENUM' without any further action, the `default' strategy95(option) of the {\ACE} enumerator will be used (see Chapter~"Strategy96Options for ACE").9798You can switch back to the coset enumerator built into the {\GAP}99library by assigning `TCENUM' to `GAPTCENUM'.100101\beginexample102gap> TCENUM:=GAPTCENUM;;103104\endexample105106%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%107\Section{Using ACE Directly to Generate a Coset Table}108109If, on the other hand you do not want to set up {\ACE} globally for110your coset enumerations, you may call the {\ACE} interface directly,111which will allow you to decide for yourself, for each such call, which112options you want to use for running {\ACE}. Please note the warnings113regarding options in Section~"General Warnings regarding the Use of114Options". The functions discussed in this and the following section115(`ACECosetTableFromGensAndRels' and `ACEStats') are non-interactive,116i.e.~by their use, a file with your input data in {\ACE} readable117format will be handed to {\ACE} and you will get the answer back in118{\GAP} format. At that moment however the {\ACE} job is terminated,119that is, you cannot send any further questions or requests about the120result of that job to {\ACE}. For an interactive use of {\ACE} from121{\GAP} see Section~"Using ACE Interactively" and Chapter~"Functions122for Using ACE Interactively".123124Using the {\ACE} interface directly to generate a coset table is done125by either of126127\atindex{ACECosetTable}{@\noexpand`ACECosetTable'!non-interactive}128\>ACECosetTableFromGensAndRels( <fgens>, <rels>, <sgens> [: <options>] ) F129\>ACECosetTable( <fgens>, <rels>, <sgens> [: <options>] ) F130131Here <fgens> is a list of free generators, <rels> a list of words in132these generators giving relators for a finitely presented group, and133<sgens> the list of subgroup generators, again expressed as words in134the free generators. All these are given in the standard {\GAP} format135(see Chapter~"ref:Finitely Presented Groups" of the {\GAP} Reference136Manual). Note that the 3-argument form of `ACECosetTable' described137here is merely a synonym for `ACECosetTableFromGensAndRels', and that138`ACECosetTable' may be called in a different way in an interactive139{\ACE} session (see Sections~"Using ACE Interactively"140and~"ACECosetTable!interactive").141142Behind the colon any selection of the options available for the143interface (see Chapters~"Options for ACE" and~"Strategy Options for144ACE") can be given, separated by commas like record components. These145can be used e.g.~to preset limits of space and time to be used, to146modify input and output and to modify the enumeration procedure. Note147that strategies are simply special options that set a number of the148options, detailed in Chapter~"Options for ACE", all at once.149150Please see Section~"General Warnings regarding the Use of Options" for151a discussion regarding global and local passing of options, and the152non-orthogonal nature of {\ACE}'s options.153154Each of `ACECosetTableFromGensAndRels' and `ACECosetTable' calls the155{\ACE} binary and, if successful, returns a standard coset table, as a156{\GAP} list of lists. At the time of writing, two coset table157standardisations schemes were possible: `lenlex' and `semilenlex' (see158Section~"Coset Table Standardisation Schemes"). The user may control159which standardisation scheme is used by selecting either the `lenlex'160(see~"option lenlex") or `semilenlex' (see~"option semilenlex")161option; otherwise (since {\GAP}~4.3) the table is standardised162according to {\GAP}'s the value of `CosetTableStandard' (which by163default is `lenlex'; for {\GAP}~4.2, the variable `CosetTableStandard'164didn't exist and the default standardisation scheme was `semilenlex').165We provide `IsACEStandardCosetTable' (see~"IsACEStandardCosetTable")166to determine whether a table (list of lists) is standard relative to167{\GAP}'s default standardisation scheme, or with the use of options168(e.g.~`lenlex' or `semilenlex') to another standardisation scheme.169170If the determination of a coset table is unsuccessful, then one of the171following occurs:172173\beginlist%unordered174175\item{--} with the `incomplete' option (see~"option incomplete") an176incomplete coset table is returned (as a list of lists), with zeros in177positions where valid coset numbers could not be determined; or178179\item{--} with the `silent' option (see~"option silent"), `fail' is180returned; or181182\item{--} a `break'-loop is entered. This last possibility is183discussed in detail via the example that follows.184185\endlist186187The example given below is the call for a presentation of the188Fibonacci group F(2,7) for which we shall discuss the impact of189various options in Section~"Fun with ACEExample". Observe that in the190example, no options are passed, which means that {\ACE} uses the191`default' strategy (see Chapter~"Strategy Options for ACE").192193\beginexample194gap> F:= FreeGroup( "a", "b", "c", "d", "e", "x", "y");;195gap> a:= F.1;; b:= F.2;; c:= F.3;; d:= F.4;; e:= F.5;; x:= F.6;; y:= F.7;;196gap> fgens:= [a, b, c, d, e, x, y];;197gap> rels:= [ a*b*c^-1, b*c*d^-1, c*d*e^-1, d*e*x^-1,198> e*x*y^-1, x*y*a^-1, y*a*b^-1];;199gap> ACECosetTable(fgens, rels, [c]);;200201\endexample202203\atindex{break-loop}{@\noexpand`break'-loop}204In computing the coset table, `ACECosetTableFromGensAndRels' must205first do a coset enumeration (which is where {\ACE} comes in!). If the206coset enumeration does not finish in the preset limits a `break'-loop207is entered, unless the `incomplete' (see~"option incomplete") or208`silent' (see~"option silent") options is set. In the event that a209`break'-loop is entered, don't despair or be frightened by the word210`Error'; by tweaking {\ACE}'s options via the `SetACEOptions' function211that becomes available in the `break'-loop and then typing `return;'212it may be possible to help {\ACE} complete the coset enumeration (and213hence successfully compute the coset table); if not, you will end up214in the `break'-loop again, and you can have another go (or `quit;' if215you've had enough). The `SetACEOptions' function is a no-argument216function; it's there *purely* to pass *options* (which, of course, are217listed behind a colon (`:') with record components syntax). Let's218continue the Fibonacci example above, redoing the last command but219with the option `max := 2' (see~"option max"), so that the coset220enumeration has only two coset numbers to play with and hence is bound221to fail to complete, putting us in a `break'-loop.222223\atindex{ACECosetTable}{@\noexpand`ACECosetTable'!\noexpand`break'-loop example}224\beginexample225gap> ACECosetTable(fgens, rels, [c] : max := 2);226Error, no coset table ...227the `ACE' coset enumeration failed with the result:228OVERFLOW (a=2 r=1 h=1 n=3; l=5 c=0.00; m=2 t=2)229called from230<function "ACECosetTable">( <arguments> ) called from read-eval-loop231Entering break read-eval-print loop ...232try relaxing any restrictive options233e.g. try the `hard' strategy or increasing `workspace'234type: '?strategy options' for info on strategies235type: '?options for ACE' for info on options236type: 'DisplayACEOptions();' to see current ACE options;237type: 'SetACEOptions(:<option1> := <value1>, ...);'238to set <option1> to <value1> etc.239(i.e. pass options after the ':' in the usual way)240... and then, type: 'return;' to continue.241Otherwise, type: 'quit;' to quit to outer loop.242brk> SetACEOptions(: max := 0);243brk> return;244[ [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ],245[ 1 ], [ 1 ], [ 1 ], [ 1 ] ]246247\endexample248249Observe how the lines after the ```Entering break read-eval-print250loop''' announcement tell you *exactly* what to do (for {\GAP} 4.2251these lines are instead `Info'-ed *before* the `break'-loop252announcement). At the `break'-loop prompt `brk>' we relaxed all253restrictions on `max' (by re-setting it to 0) and typed `return;' to254leave the `break'-loop. The coset enumeration was then successful,255allowing the computation of what turned out to be a trivial coset256table. Despite the fact that the eventual coset table only has one257line (i.e.~there is exactly one coset number) {\ACE} *did* need to258define more than 2 coset numbers. To find out just how many were259required before the final collapse, let's set the `InfoLevel' of260`InfoACE' (see~"SetInfoACELevel") to 2, so that the {\ACE} enumeration261result is printed.262263\beginexample264gap> SetInfoACELevel(2);265gap> ACECosetTable(fgens, rels, [c]);266#I INDEX = 1 (a=1 r=2 h=2 n=2; l=6 c=0.00; m=2049 t=3127)267[ [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ],268[ 1 ], [ 1 ], [ 1 ], [ 1 ] ]269270\endexample271272The enumeration result line is the `Info' line beginning ```\#I '''.273Appendix~"The Meanings of ACE's Output Messages" explains how to274interpret such output messages from {\ACE}. In particular, it explains275that `t=3127' tells us that a `t'otal number of 3127 coset numbers276needed to be defined before the final collapse to 1 coset number.277Using some of the many options that {\ACE} provides, one may achieve278this result more efficiently, e.g.~with the `purec' strategy279(see~"option purec"):280281\beginexample282gap> ACECosetTable(fgens, rels, [c] : purec);283#I INDEX = 1 (a=1 r=2 h=2 n=2; l=4 c=0.00; m=332 t=332)284[ [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ],285[ 1 ], [ 1 ], [ 1 ], [ 1 ] ]286287\endexample288289{\ACE} needs to define a `t'otal number of only (relatively-speaking)290332 coset numbers before the final collapse to 1 coset number.291292*Notes:*293To initiate the coset enumeration, the `start' option (see~"option294start") is quietly inserted after the user's supplied options, unless295the user herself supplies one of the enumeration-invoking options,296which are: `start', or one of its synonyms, `aep' (see~"option aep")297or `rep' (see~"option rep").298299When a user calls `ACECosetTable' with the `lenlex' option300(see~"option lenlex"), occasionally it is necessary to enforce301`asis'${}=1$ (see~"option asis"), which may be counter to the desires302of the user. The occasions where this action is necessary are303precisely those for which, for the arguments <gens> and <rels> of304`ACECosetTable', `IsACEGeneratorsInPreferredOrder' would return305`false'.306307The non-interactive `ACECosetTable' and `ACECosetTableFromGensAndRels'308now use an iostream to communicate with the {\ACE} binary in order to309avoid filling up a temporary directory with an incomplete coset table310in the case where an enumeration overflows. This is generally311advantageous. However, on some systems, it may *not* be advisable to312repeatedly call `ACECosetTable' or `ACECosetTableFromGensAndRels'313(e.g.~in a loop), since one may run out of the pseudo ttys used for314iostreams. If you encounter this problem, consider using an adaptation315of the usage of the interactive forms of `ACECosetTable' and316`ACEStats' (see~"ACECosetTable!interactive"317and~"ACEStats!interactive"), together with `ACEStart' initialisation318steps, that is sketched in the schema below. For the following code,319it is imagined the scenario is one of looping over several320possibilities of <fgens>, <rels> and <sgens>; the two special forms of321`ACEStart' used, allow one to continually re-use a single interactive322{\ACE} process (i.e.~only *one* iostream is used).323324\){\kernttindent}\# start the interactive ACE process with no group information325\){\kernttindent}procId := ACEStart(0);326\){\kernttindent}while <expr> do327\){\kernttindent\quad}fgens := ...; rels := ...; sgens := ...;328\){\kernttindent\quad}ACEStart(procId, fgens, rels, sgens : <options>);329\){\kernttindent\quad}if ACEStats(procId).index > 0 then330\){\kernttindent\quad\quad}table := ACECosetTable(procId);331\){\kernttindent\quad\quad}...332\){\kernttindent\quad}fi;333\){\kernttindent}od;334335For an already calculated coset table, we provide the following336function to determine whether or not it has been standardised.337338\>IsACEStandardCosetTable( <table> [: <option>] ) F339340returns `true' if <table> (a list of lists of integers) is standard341according to {\GAP}'s default or the <option> (either `lenlex' or342`semilenlex') standardisation scheme, or `false' otherwise. See343Section~"Coset Table Standardisation Schemes" for a detailed344discussion of the `lenlex' and `semilenlex' standardisation schemes.345346*Note:*347Essentially, `IsACEStandardCosetTable' extends the {\GAP} function348`IsStandardized'.349350\atindex{lenlex standardisation}{@\noexpand`lenlex' standardisation}351Users who wish their coset tables to use `ACECosetTable' with the352`lenlex' (see~"option lenlex") option, which causes353`lenlex' standardisation to occur at the {\ACE} (rather than {\GAP})354level, should be aquainted with the following function.355356\atindex{IsACEGeneratorsInPreferredOrder}%357{@\noexpand`IsACEGeneratorsInPreferredOrder'!non-interactive}358\>IsACEGeneratorsInPreferredOrder( <gens>, <rels> ) F359360returns `true' if <gens>, a list of free group generators, are in an361order which will not be changed by {\ACE}, for the group with362presentation $\langle <gens> \mid <rels>\rangle$, where <rels> is a363list of relators (i.e.~words in the generators <gens>).364`IsACEGeneratorsInPreferredOrder' may also be called in a different365way for interactive {\ACE} processes366(see~"IsACEGeneratorsInPreferredOrder!interactive").367368For a presentation with more than one generator, the first generator369of which is an involution and the second is not, {\ACE} prefers to370switch the first two generators. `IsACEGeneratorsInPreferredOrder'371returns `true' if the order of the generators <gens> would not be372changed within {\ACE} and `false', otherwise. (Technically, by373``involution'' above, we really mean ``a generator `x' for which there374is a relator in <rels> of form `x*x' or `x^2'''. Such a generator may,375of course, turn out to actually be the identity.)376377*Guru Notes:*378If `IsACEGeneratorsInPreferredOrder(<gens>, <rels>)' would return379`false', it is possible to enforce a user's order of the generators380within {\ACE}, by setting the option `asis' (see~"option asis") to 1381and, by passing the relator that determines that `<gens>[1]' (which we382will assume is `x') has order at most 2, as: `x*x' (rather than383`x^2'). Behind the scenes this is precisely what is done, if384necessary, when `ACECosetTable' is called with the `lenlex' option.385386The user may avoid all the technicalities by either not using the387`lenlex' option (and allowing {\GAP} to take care of the `lenlex'388standardisation), or by swapping the first two generators in those389cases where `IsACEGeneratorsInPreferredOrder(<gens>, <rels>)' would390return `false'.391392%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%393\Section{Using ACE Directly to Test whether a Coset Enumeration Terminates}394395If you only want to test, whether a coset enumeration terminates, and396don't want to transfer the whole coset table to {\GAP}, you can call397398\atindex{ACEStats}{@\noexpand`ACEStats'!non-interactive}399\>ACEStats( <fgens>, <rels>, <sgens> [: <options>] ) F400401which calls {\ACE} non-interactively to do the coset enumeration, the402result of which is parsed and returned as a {\GAP} record with fields403404\beginitems405406\quad`index' &the index of the subgroup $\langle <sgens> \rangle$ in407$\langle <fgens> \mid <rels> \rangle$, or $0$ if the enumeration does408not succeed;409410\quad`cputime' &the total CPU time used as an integer number of411`cputimeUnits' (the next field);412413\quad`cputimeUnits' &the units of the `cputime' field, e.g.~`"10^-2414seconds"';415416\indextt{activecosets}417\quad`activecosets' &the number of currently *active* (i.e.~*alive*)418coset numbers (see Section~"Coset Statistics Terminology");419420\indextt{maxcosets}421\quad`maxcosets' &the *maximum* number of alive coset numbers at any422one time in the enumeration (see Section~"Coset Statistics423Terminology"); and424425\indextt{totcosets}426\quad`totcosets' &the *total* number of coset numbers that were427defined in the enumeration (see Section~"Coset Statistics428Terminology").429430\enditems431432Options (see Chapters~"Options for ACE" and~"Strategy Options for433ACE") are used in exactly the same way as for434`ACECosetTableFromGensAndRels', discussed in the previous section; and435the same warnings alluded to previously, regarding options (see436Section~"General Warnings regarding the Use of Options"), apply.437438*Notes:*439To initiate the coset enumeration, the `start' option (see~"option440start") is quietly inserted after the user's supplied options, unless441the user herself supplies one of the enumeration-invoking options,442which are: `start', or one of its synonyms, `aep' (see~"option aep")443or `rep' (see~"option rep").444445The fields of the `ACEStats' record are determined by parsing a446``results message'' (see Appendix~"The Meanings of ACE's Output447Messages") from {\ACE}.448449`ACEStats' may also be called in a different way in an interactive450{\ACE} session (see~"ACEStats!interactive").451452%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%453\Section{Writing ACE Standalone Input Files to Generate a Coset Table}454455If you want to use {\ACE} as a standalone with its own syntax, you can456write an {\ACE} standalone input file by calling `ACECosetTable' with457three arguments (see "ACECosetTableFromGensAndRels") and the option458`aceinfile := <filename>' (see~"option aceinfile"). This will keep the459input file for the {\ACE} standalone produced by the {\GAP} interface460under the file name <filename> (and just return) so that you can461perform interactive work in the standalone.462463%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%464\Section{Using ACE Interactively}465466An interactive {\ACE} process is initiated with the command467468\>ACEStart( <fgens>, <rels>, <sgens> [:<options>] )!{introduction} F469470whose arguments and options are exactly as for471`ACECosetTableFromGensAndRels' and `ACEStats', as discussed in472Sections~"Using ACE Directly to Generate a Coset Table" and~"Using ACE473Directly to Test whether a Coset Enumeration Terminates". The usual474warnings regarding options apply (see Section~"General Warnings475regarding the Use of Options"). `ACEStart' has a number of other forms476(see~"ACEStart!details").477478The return value is an integer (numbering from 1) which represents the479running process. (It is possible to have more than one interactive480process running at once.) The integer returned may be used to index481which of these processes an interactive {\ACE} function should be482applied to.483484An interactive {\ACE} process is terminated with the command485486\>ACEQuit( <i> )!{introduction} F487488where <i> is the integer returned by `ACEStart' when the process was489begun. `ACEQuit' may also be called with no arguments490(see~"ACEQuit!details").491492We discuss each of these commands, as well as the range of functions493which enable one to access features of the {\ACE} standalone not494available non-interactively, in depth, in Chapter~"Functions for Using495ACE interactively".496497*Note:*498499\index{coincidence}500{\ACE} not only allows one to do a coset enumeration of a group by a501given (and then fixed) subgroup but it also allows one to search for502subgroups by starting from a given one (possibly the trivial subgroup)503and then augmenting it by adding new subgroup generators either504explicitly via `ACEAddSubgroupGenerators'505(see~"ACEAddSubgroupGenerators") or implicitly by introducing506*coincidences* (see `ACECosetCoincidence': "ACECosetCoincidence", or507`ACERandomCoincidences': "ACERandomCoincidences"); or one can find508smaller subgroups by deleting subgroup generators via509`ACEDeleteSubgroupGenerators' (see~"ACEDeleteSubgroupGenerators").510511%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%512\Section{Accessing ACE Examples with ACEExample and ACEReadResearchExample}513514There are a number of examples available in the `examples' directory,515which may be accessed via516517\>ACEExample() F518\>ACEExample( <examplename> [:<options>] ) F519\>ACEExample( <examplename>, <ACEfunc> [:<options>] ) F520521where <examplename> is a string, the name of an example (and522corresponding file in the `examples' directory); and <ACEfunc> is the523{\ACE} function with which the example is to be executed.524525If `ACEExample' is called with no arguments, or with the argument:526`"index"' (meant in the sense of ``list''), or with a non-existent527example name, a list of available examples is displayed. See528Section~"Fun with ACEExample" where the list is displayed.529530By default, examples are executed via `ACEStats'. However, if531`ACEExample' is called with a second argument (choose from the (other)532alternatives: `ACECosetTableFromGensAndRels' (or, equivalently533`ACECosetTable'), or `ACEStart'), the example is executed using that534function, instead. Note that, whereas the first argument appears in535double quotes (since it's a string), the second argument does not536(since it's a function); e.g.~to execute example `"A5"' with function537`ACECosetTable', one would type: `ACEExample("A5", ACECosetTable);'.538539`ACEExample' also accepts user options, which may be passed either540globally (i.e.~by using `PushOptions' to push them onto the541`OptionsStack') or locally behind a colon after the `ACEExample'542arguments, and they are passed to `ACEStats' or <ACEfunc> as if they543were *appended* to the existing options of <examplename>; in this way,544the user may *over-ride* any or all of the options of <examplename>.545This is done by passing an option `aceexampleoptions' (see~"option546aceexampleoptions"), which sets up a mechanism to reverse the usual547order in which options of recursively called functions are pushed onto548the `OptionsStack'. The option `aceexampleoptions' is *not* a user549option; it is intended only for *internal* use by `ACEExample', for550the above purpose. In the portion of the output due to the `echo'551option, if one has passed options to `ACEExample', one will see552`aceexampleoptions' listed first and the result of the interaction of553<examplename>'s options and the additional options.554555Consider the example `"A5"'. The effect of running556557\beginexample558gap> ACEExample("A5", ACEStart);559560\endexample561562is essentially equivalent to executing:563564\beginexample565gap> file := Filename(DirectoriesPackageLibrary("ace", "examples"), "A5");;566gap> ACEfunc := ACEStart;;567gap> ReadAsFunction(file)();568569\endexample570571except that some internal ``magic'' of `ACEExample' edits the example572file and displays equivalent commands a user ``would'' execute. If the573user has passed options to `ACEExample' these appear in a574```\# User Options''' block after the original options of the example575in the `Info' portion of the output. By comparing with the portion of576the output from the `echo' option (unless the user has over-ridden the577`echo' option), the user may directly observe any over-riding effects578of user-passed options.579580Please see Section~"Fun with ACEExample" for some sample interactions581with `ACEExample'.582583*Notes*584585Most examples use the `mess' ($= `messages'$) option. To see the586effect of this, it is recommended to do: `SetInfoACELevel(3);' before587calling `ACEExample', with an example.588589The coset table output from `ACEExample', when called with many of the590examples and with the {\ACE} function `ACECosetTableFromGensAndRels'591is often quite long. Recall that the output may be suppressed by592following the (`ACEExample') command with a double semicolon (`;;').593594Also, try `SetInfoACELevel(2);' before calling `ACEExample', with an595example.596597If you unexpectedly observe `aceexampleoptions' in your output, then598most probably you have unintentionally passed options by the global599method, by having a non-empty `OptionsStack'. One possible remedy is600to use `FlushOptionsStack();' (see~"FlushOptionsStack"), before trying601your `ACEExample' call again.602603As discussed in Section~"Interpretation of ACE Options", there is604generally no sensible meaning that can be attributed to setting a605strategy option (see Chapter~"Strategy Options for ACE") to `false';606if you wish to nullify the effect of a strategy option, pass another607strategy option, e.g.~pass the `default' (see~"option default")608strategy option.609610Also provided are:611612\> ACEReadResearchExample( <filename> ) F613\> ACEReadResearchExample() F614615which perform `Read' (see Section~"ref:Read" in the {\GAP} Reference616Manual) on <filename> or, with no argument, the file with filename617`"pgrelfind.g"' in the `res-examples' directory; e.g.~the effect of618running619620\beginexample621gap> ACEReadResearchExample("pgrelfind.g");622623\endexample624625is equivalent to executing:626627\beginexample628gap> Read( Filename(DirectoriesPackageLibrary("ace", "res-examples"),629> "pgrelfind.g") );630631\endexample632633The examples provided in the `res-examples' directory were used to634solve a genuine research problem, the results of which are reported in635\cite{CHHR01}. Please see Section~"Using ACEReadResearchExample" for636a detailed description and examples of its use.637638\> ACEPrintResearchExample( <example-filename> ) F639\> ACEPrintResearchExample( <example-filename>, <output-filename>) F640641print the ``essential'' contents of the file <example-filename> in the642`res-examples' directory to the terminal, or with two arguments to the643file <output-filename>; <example-filename> and <output-filename>644should be strings. `ACEPrintResearchExample' is provided to make it645easy for users to copy and edit the examples for their own purposes.646647%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%648\Section{General Warnings regarding the Use of Options}649650Firstly, let us mention (and we will remind you later) that an {\ACE}651strategy is merely a special option of {\ACE} that sets a number of652the options described in Chapter~"Options for ACE" all at once. The653strategy options are discussed in their own chapter (Chapter~"Strategy654Options for ACE").655656In Section~"Passing ACE Options", we describe the two means provided657by {\GAP} by which {\ACE} options may be passed. In Section~"Warnings658regarding Options", we discuss how options ``left over'' from previous659calculations can upset subsequent calculations; and hence, to ``clear660the decks'' in such circumstances, why we have provided661`FlushOptionsStack' (see~"FlushOptionsStack"). However, removing662`OptionsStack' options does not remove the options previously passed663to an *interactive* {\ACE} process; Section~"Warnings regarding664Options" discusses that too.665666Note, that the {\ACE} package treatment of options is an667``enhancement'' over the general way {\GAP} treats options. Firstly,668the {\ACE} binary allows abbreviations and mixed case of options and669so the {\ACE} package does also, as much as is possible670(see~"Abbreviations and mixed case for ACE Options"). Secondly, since671{\ACE}'s options are in general not orthogonal, the order in which672they are put to {\ACE} is, in general, honoured (see~"Honouring of the673order in which ACE Options are passed"). Thirdly, the {\ACE} binary's674concept of a boolean option is slightly different to that of {\GAP}'s;675Section~"Interpretation of ACE Options" discusses, in particular, how676an option detected by {\GAP} as `true' is passed to the {\ACE} binary.677678Finally, Section~"What happens if no ACE Strategy Option or if no ACE679Option is passed" discusses what happens if no option is selected.680681%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%682\Section{The ACEData Record}683684\>`ACEData' V685686is a {\GAP} record in which the essential data for an {\ACE} session687within {\GAP} is stored; its fields are:688689\beginitems690691\quad`binary' & the path of the {\ACE} binary;692693\quad`tmpdir' & the path of the temporary directory containing the694non-interactive {\ACE} input and output files (also see695"ACEDirectoryTemporary" below);696697\quad`ni' & the data record for a non-interactive {\ACE} process;698699\quad`io' & list of data records for `ACEStart' (see below700and~"ACEStart") processes;701702\quad`infile' & the full path of the {\ACE} input file;703704\quad`outfile'& the full path of the {\ACE} output file; and705706\quad`version'& the version of the current {\ACE} binary. More707detailed information regarding the compilation of the binary is given708by `ACEBinaryVersion' (see~"ACEBinaryVersion").709710\enditems711712Non-interactive processes used to use files rather than streams (hence713the fields `infile' and `outfile' above; these may disappear in a714later version of the {\ACE} package).715716Each time an interactive {\ACE} process is initiated via `ACEStart'717(see~"ACEStart"), an identifying number <ioIndex> is generated for the718interactive process and a record `ACEData.io[<ioIndex>]' with the719following fields is created. A non-interactive process has similar720fields but is stored in the record `ACEData.ni'.721722\beginitems723724\quad`procId' & the identifying number of the process (<ioIndex> for725interactive processes, and 0 for a non-interactive process);726727\quad`args' & a record with fields: `fgens', `rels', `sgens' whose728values are the corresponding arguments passed originally to729`ACEStart';730731\quad`options'& the current options record of the interactive process;732733\quad`acegens'& a list of strings representing the generators used by734{\ACE} (if the names of the generators passed via the first argument735<fgens> of `ACEStart' were all lowercase alphabetic characters, then736`acegens' is the `String' equivalent of <fgens>, i.e.~`acegens[1] =737String(<fgens>[1])' etc.);738739\quad`stream' & the IOStream opened for an interactive {\ACE} process740initiated via `ACEStart'; and741742\quad`enumResult' &743the enumeration result (string) without the trailing newline, output744from {\ACE};745746\quad`stats' & a record as output by the function `ACEStats'.747748\quad`enforceAsis' &749a boolean that is set to `true' whenever the `asis' option750(see~"option asis") must be set to `1'. It is usually `false'.751See~"IsACEGeneratorsInPreferredOrder" *Guru Notes* for the details.752753\enditems754755\>ACEDirectoryTemporary( <dir> ) F756757calls the UNIX command `mkdir' to create <dir>, which must be a758string, and if successful a directory object for <dir> is both759assigned to `ACEData.tmpdir' and returned. The fields `ACEData.infile'760and `ACEData.outfile' are also set to be files in `ACEData.tmpdir',761and on exit from {\GAP} <dir> is removed. Most users will never need762this command; by default, {\GAP} typically chooses a ``random''763subdirectory of `/tmp' for `ACEData.tmpdir' which may occasionally764have limits on what may be written there. `ACEDirectoryTemporary'765permits the user to choose a directory (object) where one is not so766limited.767768769%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%770\Section{Setting the Verbosity of ACE via Info and InfoACE}771772\>`InfoACE' V773774The output of the {\ACE} binary is, by default, not displayed. However775the user may choose to see some, or all, of this output. This is done776via the `Info' mechanism (see Chapter~"ref:Info Functions" in the777{\GAP} Reference Manual). For this purpose, there is the <InfoClass>778`InfoACE'. Each line of output from {\ACE} is directed to a call to779`Info' and will be displayed for the user to see if the `InfoLevel' of780`InfoACE' is high enough. By default, the `InfoLevel' of `InfoACE' is7811, and it is recommended that you leave it at this level, or higher.782Only messages which we think that the user will really want to see are783directed to `Info' at `InfoACE' level 1. To turn off *all* `InfoACE'784messaging, set the `InfoACE' level to 0 (see~"SetInfoACELevel"). For785convenience, we provide the function786787\>InfoACELevel() F788789which returns the current `InfoLevel' of `InfoACE', i.e.~it is simply790a shorthand for `InfoLevel(InfoACE)'.791792To set the `InfoLevel' of `InfoACE' we also provide793794\>SetInfoACELevel( <level> ) F795\>SetInfoACELevel() F796797which for a non-negative integer <level>, sets the `InfoLevel' of798`InfoACE' to <level> (i.e.~it is a shorthand for799`SetInfoLevel(InfoACE, <level>)'), or with no arguments sets the800`InfoACE' level to the default value 1. Currently, information from801{\ACE} is directed to `Info' at four `InfoACE' levels: 1, 2, 3 and 4.802The command803804\beginexample805gap> SetInfoACELevel(2);806807\endexample808809enables the display of the results line of an enumeration from {\ACE},810whereas811812\beginexample813gap> SetInfoACELevel(3);814815\endexample816817enables the display of all of the output from {\ACE} (including818{\ACE}'s banner, containing the host machine information); in819particular, the progress messages, emitted by {\ACE} when the820`messages' option (see~"option messages") is set to a non-zero value,821will be displayed via `Info'. Finally,822823\beginexample824gap> SetInfoACELevel(4);825826\endexample827828enables the display of all the input directed to {\ACE} (behind a829```ToACE> ''' prompt, so you can distinguish it from other output).830The `InfoACE' level of 4 is really for gurus who are familiar with the831{\ACE} standalone.832833%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%834\Section{Acknowledgements}835836Large parts of this manual, in particular the description of the837options for running {\ACE}, are directly copied from the respective838descriptions in the manual~\cite{Ram99ace} for the standalone version of839{\ACE} by Colin Ramsay. Most of the examples, in the `examples'840directory and accessed via the `ACEExample' function, are direct841translations of Colin Ramsay's `test\#\#\#.in' files in the `src'842directory.843844Many thanks to Joachim Neub{\accent127u}ser who not only provided one845of the early manual drafts and hence a template for the style of the846manual and conceptual hooks for the design of the Package code, but847also meticulously proof-read all drafts and made many insightful848comments.849850Many thanks also to Volkmar Felsch who, in testing the {\ACE} Package,851discovered a number of bugs, made a number of important suggestions on852code improvement, thoroughly checked all the examples, and provided853the example found at the end of Section~"Steering ACE Interactively"854which demonstrates rather nicely how one can use the function855`ACEConjugatesForSubgroupNormalClosure'.856857We also wish to acknowledge the contribution of Charles Sims. The858inclusion of the `incomplete' (see "option incomplete") and `lenlex'859(see~"option lenlex") options, were made in response to requests to860the {\GAP} developers to include such options for coset table861functions. Also, the definition of `lenlex' standardisation of coset862tables (see Section~"Coset Table Standardisation Schemes"), is due to863him.864865Finally, much of the work since 2005 in modifying the {\ACE} package866particularly for new versions of {\GAP} and in getting {\ACE} to its867new home on `GitHub' has been due to Max Horn.868869%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%870\Section{Changes from earlier versions}871872A reasonably comprehensive history of the evolution of pre-release873versions of the {\ACE} Package, is contained in the file `CHANGES' in874the `gap' directory.875876The `3.xxx' versions of the {\ACE} Package were compatible with {\GAP}8774.2, but were built for use with {\GAP} 4.3. However, the current878version of the {\ACE} Package requires at least {\GAP} 4.4. Users who879still have {\GAP} 4.3 will need to use {\ACE} 4.1. One important880change in {\GAP} from {\GAP} 4.2 to {\GAP} 4.3 that has relevance for881{\ACE} Package users is the change of the default standard for the882numbering of cosets in a coset table (see Section~"Coset Table883Standardisation Schemes").884885\>ACEPackageVersion() F886887gives the current version of the {\ACE} Package (i.e.~the {\GAP} code888component; the function `ACEBinaryVersion' (see~"ACEBinaryVersion")889gives details of the C code compilation).890891*History of release versions*892893\beginlist894895\item{`3.001'}896First release.897898\item{`3.002'}899`ACEIgnoreUnknownDefault' (see~"ACEIgnoreUnknownDefault") added.900901\item{}902Option `continue' changed to `continu' (see~"option continu") --903`continue' is a keyword in {\GAP} 4.3.904905\item{`3.003'}906Initial value of `ACEIgnoreUnknownDefault' is now `true' (previously907it was `false').908909\item{}910`ACECosetTableFromGensAndRels' and the non-interactive `ACECosetTable'911(except when producing an input script via option `ACEinfile'), and912the non-interactive `ACEStats' which previously used files all now913invoke iostreams.914915\item{}916Option `pkgbanner' used to control the printing of the banner on917loading (see~"Loading the ACE Package").918919\item{`4.0'}920Revised for {\GAP} 4.4, for which the option `pkgbanner' is no longer921available (most of its function is now provided by the third argument922of the `LoadPackage' function; see~"ref:LoadPackage").923924\item{}925The package version number now has a single decimal place, to avoid926being confused with the binary version number.927928\item{`4.1'}929Added $M_{12}$ presentation to `res-examples/pgrelfind.g'.930931\item{`5.0'}932Pre-{\GAP} 4.4 compatibility removed. Now at least {\GAP} 4.4 is933required. Option `pkgbanner' has been completely removed.934935\item{`5.1'}936The files `configure' and `Makefile.in' were made more robust to ensure937they will work well with both {\GAP} 4.4 and {\GAP} 4. At the advent of938{\GAP} 4.5, which was about the time {\ACE} 5.1 was released, option939order behind the colon was no longer respected, but went unnoticed.940941\item{`5.2'}942Added `SetInfoACELevel(3)' to `tst/aceds.tst', so that the ERROR message943is visible. This mistake in the test file probably goes back to version9444.0. Other changes are due to making the documentation compatible with945{\GAP} 4.7 manuals and {\ACE}'s new home on `GitHub' and using `git' for946version control. Fixing the lack of respect for the ordering of options947is deferred to the next version of {\ACE}.948949\endlist950951%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%952%%953%E954955956