Debian Codegraph @

doc/chap3.html

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
7 <head>
8 <title>GAP (ANUPQ) - Chapter 3: Infrastructure</title>
9 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
10 <meta name="generator" content="GAPDoc2HTML" />
11 <link rel="stylesheet" type="text/css" href="manual.css" />
12 <script src="manual.js" type="text/javascript"></script>
13 <script type="text/javascript">overwriteStyle();</script>
14 </head>
15 <body class="chap3" onload="jscontent()">
16
17
18 <div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chapA.html">A</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
19
20 <div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp; <a href="chap0.html#contents">[Contents]</a>&nbsp; &nbsp;<a href="chap2.html">[Previous Chapter]</a>&nbsp; &nbsp;<a href="chap4.html">[Next Chapter]</a>&nbsp; </div>
21
22 <p id="mathjaxlink" class="pcenter"><a href="chap3_mj.html">[MathJax on]</a></p>
23 <p><a id="X7917EFDF7AC06F04" name="X7917EFDF7AC06F04"></a></p>
24 <div class="ChapSects"><a href="chap3.html#X7917EFDF7AC06F04">3 <span class="Heading">Infrastructure</span></a>
25 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap3.html#X833D58248067E13B">3.1 <span class="Heading">Loading the ANUPQ Package</span></a>
26 </span>
27 </div>
28 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap3.html#X83DE155A79C38DBE">3.2 <span class="Heading">The ANUPQData Record</span></a>
29 </span>
30 <div class="ContSSBlock">
31 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7B90E89782BDA6D7">3.2-1 ANUPQData</a></span>
32 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7FBB2F457E4BD6AB">3.2-2 ANUPQDirectoryTemporary</a></span>
33 </div></div>
34 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap3.html#X83E5C7CF7D8739DF">3.3 <span class="Heading">Setting the Verbosity of ANUPQ via Info and InfoANUPQ</span></a>
35 </span>
36 <div class="ContSSBlock">
37 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7CBC9B458497BFF1">3.3-1 InfoANUPQ</a></span>
38 </div></div>
39 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap3.html#X810FFB1C8035C8BE">3.4 <span class="Heading">Utility Functions</span></a>
40 </span>
41 <div class="ContSSBlock">
42 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X8771393B7F53F534">3.4-1 PqLeftNormComm</a></span>
43 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7A567432879510A6">3.4-2 PqGAPRelators</a></span>
44 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7F3C5D1C7EC36EAE">3.4-3 PqParseWord</a></span>
45 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7BB0EB607F337265">3.4-4 PqExample</a></span>
46 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X823C93FC7B87F5BC">3.4-5 AllPqExamples</a></span>
47 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7E3E4B047DC2E323">3.4-6 GrepPqExamples</a></span>
48 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X8104B2BA872EFCCB">3.4-7 ToPQLog</a></span>
49 </div></div>
50 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap3.html#X818175EF85CAA807">3.5 <span class="Heading">Attributes and a Property for fp and pc p-groups</span></a>
51 </span>
52 <div class="ContSSBlock">
53 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X87DC922A78EB0DD6">3.5-1 NuclearRank</a></span>
54 </div></div>
55 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap3.html#X7BA20FA07B166B37">3.6 <span class="Heading">Hints and Warnings regarding the use of Options</span></a>
56 </span>
57 <div class="ContSSBlock">
58 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X81F4AAE084C34B4B">3.6-1 ANUPQWarnOfOtherOptions</a></span>
59 </div></div>
60 </div>
61
62 <h3>3 <span class="Heading">Infrastructure</span></h3>
63
64 <p>Most of the details in this chapter are of a technical nature; the user need only skim over this chapter on a first reading. Mostly, it is enough to know that</p>
65
66
67 <ul>
68 <li><p>you must do a <code class="code">LoadPackage("anupq");</code> before you can expect to use a command defined by the <strong class="pkg">ANUPQ</strong> package (details are in Section <a href="chap3.html#X833D58248067E13B"><span class="RefLink"><span class="Heading">Loading the ANUPQ Package</span></span></a>);</p>
69
70 </li>
71 <li><p>partial results of <strong class="pkg">ANUPQ</strong> commands and some other data are stored in the <code class="code">ANUPQData</code> global variable (details are in Section <a href="chap3.html#X83DE155A79C38DBE"><span class="RefLink"><span class="Heading">The ANUPQData Record</span></span></a>);</p>
72
73 </li>
74 <li><p>doing <code class="code">SetInfoLevel(InfoANUPQ, <var class="Arg">n</var>);</code> for <var class="Arg">n</var> greater than the default value 1 will give progressively more information of what is going on <q>behind the scenes</q> (details are in Section <a href="chap3.html#X83E5C7CF7D8739DF"><span class="RefLink"><span class="Heading">Setting the Verbosity of ANUPQ via Info and InfoANUPQ</span></span></a>);</p>
75
76 </li>
77 <li><p>in Section <a href="chap3.html#X810FFB1C8035C8BE"><span class="RefLink"><span class="Heading">Utility Functions</span></span></a> we describe some utility functions and functions that run examples from the collection of examples of this package;</p>
78
79 </li>
80 <li><p>in Section <a href="chap3.html#X818175EF85CAA807"><span class="RefLink"><span class="Heading">Attributes and a Property for fp and pc p-groups</span></span></a> we describe the attributes and property <code class="code">NuclearRank</code>, <code class="code">MultiplicatorRank</code> and <code class="code">IsCapable</code>; and</p>
81
82 </li>
83 <li><p>in Section <a href="chap3.html#X7BA20FA07B166B37"><span class="RefLink"><span class="Heading">Hints and Warnings regarding the use of Options</span></span></a> we describe some troubleshooting strategies. Also this section explains the utility of setting <code class="code">ANUPQWarnOfOtherOptions := true;</code> (particularly for novice users) for detecting misspelt options and diagnosing other option usage problems.</p>
84
85 </li>
86 </ul>
87 <p><a id="X833D58248067E13B" name="X833D58248067E13B"></a></p>
88
89 <h4>3.1 <span class="Heading">Loading the ANUPQ Package</span></h4>
90
91 <p>To use the <strong class="pkg">ANUPQ</strong> package, as with any <strong class="pkg">GAP</strong> package, it must be requested explicitly. This is done by calling</p>
92
93
94 <div class="example"><pre>
95 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">LoadPackage( "anupq" );</span>
96 ---------------------------------------------------------------------------
97 Loading ANUPQ 3.3.3 (ANU p-Quotient)
98 by Greg Gamble (GAP code, [email protected]),
99 Werner Nickel (GAP code), and
100 Eamonn O'Brien (C code, https://www.math.auckland.ac.nz/~obrien).
101 maintained by:
102 Max Horn (https://www.quendi.de/math).
103 uses ANU pq binary (C code program) version: 1.9
104 Homepage: https://gap-packages.github.io/anupq/
105 Report issues at https://github.com/gap-packages/anupq/issues
106 ---------------------------------------------------------------------------
107 true
108 </pre></div>
109
110 <p>Note that since the <strong class="pkg">ANUPQ</strong> package uses the <code class="code">AutomorphimGroupPGroup</code> function of the <strong class="pkg">AutPGrp</strong> package and, in any case, often needs other <strong class="pkg">AutPGrp</strong> functions when computing descendants, the user must ensure that the <strong class="pkg">AutPGrp</strong> package is also installed, at least version 1.5. If the <strong class="pkg">AutPGrp</strong> package is not installed, the <strong class="pkg">ANUPQ</strong> package will <code class="keyw">fail</code> to load.</p>
111
112 <p>Also, if <strong class="pkg">GAP</strong> cannot find a working <code class="code">pq</code> binary, the call to <code class="code">LoadPackage</code> will return <code class="keyw">fail</code>.</p>
113
114 <p>If you want to load the <strong class="pkg">ANUPQ</strong> package by default, you can put the <code class="code">LoadPackage</code> command into your <code class="code">gap.ini</code> file (see Section <a href="../../../doc/ref/chap3.html#X7FD66F977A3B02DF"><span class="RefLink">Reference: The gap.ini and gaprc files</span></a> in the <strong class="pkg">GAP</strong> Reference Manual). By the way, the novice user of the <strong class="pkg">ANUPQ</strong> package should probably also append the line</p>
115
116
117 <div class="example"><pre>
118 ANUPQWarnOfOtherOptions := true;
119 </pre></div>
120
121 <p>to their <code class="code">gap.ini</code> file, somewhere after the <code class="code">LoadPackage( "anupq" );</code> command (see <code class="func">ANUPQWarnOfOtherOptions</code> (<a href="chap3.html#X81F4AAE084C34B4B"><span class="RefLink">3.6-1</span></a>)).</p>
122
123 <p><a id="X83DE155A79C38DBE" name="X83DE155A79C38DBE"></a></p>
124
125 <h4>3.2 <span class="Heading">The ANUPQData Record</span></h4>
126
127 <p>This section contains fairly technical details which may be skipped on an initial reading.</p>
128
129 <p><a id="X7B90E89782BDA6D7" name="X7B90E89782BDA6D7"></a></p>
130
131 <h5>3.2-1 ANUPQData</h5>
132
133 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ANUPQData</code></td><td class="tdright">(&nbsp;global variable&nbsp;)</td></tr></table></div>
134 <p>is a <strong class="pkg">GAP</strong> record in which the essential data for an <strong class="pkg">ANUPQ</strong> session within <strong class="pkg">GAP</strong> is stored; its fields are:</p>
135
136
137 <dl>
138 <dt><strong class="Mark"><code class="code">binary</code></strong></dt>
139 <dd><p>the path of the <code class="code">pq</code> binary;</p>
140
141 </dd>
142 <dt><strong class="Mark"><code class="code">tmpdir</code></strong></dt>
143 <dd><p>the path of the temporary directory used by the <code class="code">pq</code> binary and <strong class="pkg">GAP</strong> (i.e. the directory in which all the <code class="code">pq</code>'s temporary files are created) (also see <code class="func">ANUPQDirectoryTemporary</code> (<a href="chap3.html#X7FBB2F457E4BD6AB"><span class="RefLink">3.2-2</span></a>) below);</p>
144
145 </dd>
146 <dt><strong class="Mark"><code class="code">outfile</code></strong></dt>
147 <dd><p>the full path of the default <code class="code">pq</code> output file;</p>
148
149 </dd>
150 <dt><strong class="Mark"><code class="code">SPimages</code></strong></dt>
151 <dd><p>the full path of the file <code class="code">GAP_library</code> to which the <code class="code">pq</code> program writes its Standard Presentation images;</p>
152
153 </dd>
154 <dt><strong class="Mark"><code class="code">version</code></strong></dt>
155 <dd><p>the version of the current <code class="code">pq</code> binary;</p>
156
157 </dd>
158 <dt><strong class="Mark"><code class="code">ni</code></strong></dt>
159 <dd><p>a data record used by non-interactive functions (see below and Chapter <a href="chap4.html#X7C51F26D839279FF"><span class="RefLink"><span class="Heading">Non-interactive ANUPQ functions</span></span></a>);</p>
160
161 </dd>
162 <dt><strong class="Mark"><code class="code">io</code></strong></dt>
163 <dd><p>list of data records for <code class="code">PqStart</code> (see below and <code class="func">PqStart</code> (<a href="chap5.html#X83B2EC237F37623C"><span class="RefLink">5.1-1</span></a>)) processes;</p>
164
165 </dd>
166 <dt><strong class="Mark"><code class="code">topqlogfile</code></strong></dt>
167 <dd><p>name of file logged to by <code class="code">ToPQLog</code> (see <code class="func">ToPQLog</code> (<a href="chap3.html#X8104B2BA872EFCCB"><span class="RefLink">3.4-7</span></a>)); and</p>
168
169 </dd>
170 <dt><strong class="Mark"><code class="code">logstream</code></strong></dt>
171 <dd><p>stream of file logged to by <code class="code">ToPQLog</code> (see <code class="func">ToPQLog</code> (<a href="chap3.html#X8104B2BA872EFCCB"><span class="RefLink">3.4-7</span></a>)).</p>
172
173 </dd>
174 </dl>
175 <p>Each time an interactive <strong class="pkg">ANUPQ</strong> process is initiated via <code class="code">PqStart</code> (see <code class="func">PqStart</code> (<a href="chap5.html#X83B2EC237F37623C"><span class="RefLink">5.1-1</span></a>)), an identifying number <var class="Arg">ioIndex</var> is generated for the interactive process and a record <code class="code">ANUPQData.io[<var class="Arg">ioIndex</var>]</code> with some or all of the fields listed below is created. Whenever a non-interactive function is called (see Chapter <a href="chap4.html#X7C51F26D839279FF"><span class="RefLink"><span class="Heading">Non-interactive ANUPQ functions</span></span></a>), the record <code class="code">ANUPQData.ni</code> is updated with fields that, if bound, have exactly the same purpose as for a <code class="code">ANUPQData.io[<var class="Arg">ioIndex</var>]</code> record.</p>
176
177
178 <dl>
179 <dt><strong class="Mark"><code class="code">stream</code></strong></dt>
180 <dd><p>the IOStream opened for interactive <strong class="pkg">ANUPQ</strong> process <var class="Arg">ioIndex</var> or non-interactive <strong class="pkg">ANUPQ</strong> function;</p>
181
182 </dd>
183 <dt><strong class="Mark"><code class="code">group</code></strong></dt>
184 <dd><p>the group given as first argument to <code class="code">PqStart</code>, <code class="code">Pq</code>, <code class="code">PqEpimorphism</code>, <code class="code">PqDescendants</code> or <code class="code">PqStandardPresentation</code> (or any synonymous methods);</p>
185
186 </dd>
187 <dt><strong class="Mark"><code class="code">haspcp</code></strong></dt>
188 <dd><p>is bound and set to <code class="keyw">true</code> when a pc presentation is first set inside the <code class="code">pq</code> program (e.g. by <code class="code">PqPcPresentation</code> or <code class="code">PqRestorePcPresentation</code> or a higher order function like <code class="code">Pq</code>, <code class="code">PqEpimorphism</code>, <code class="code">PqPCover</code>, <code class="code">PqDescendants</code> or <code class="code">PqStandardPresentation</code> that does a <code class="code">PqPcPresentation</code> operation, but <em>not</em> <code class="code">PqStart</code> which only starts up an interactive <strong class="pkg">ANUPQ</strong> process);</p>
189
190 </dd>
191 <dt><strong class="Mark"><code class="code">gens</code></strong></dt>
192 <dd><p>a list of the generators of the group <code class="code">group</code> as strings (the same as those passed to the <code class="code">pq</code> program);</p>
193
194 </dd>
195 <dt><strong class="Mark"><code class="code">rels</code></strong></dt>
196 <dd><p>a list of the relators of the group <code class="code">group</code> as strings (the same as those passed to the <code class="code">pq</code> program);</p>
197
198 </dd>
199 <dt><strong class="Mark"><code class="code">name</code></strong></dt>
200 <dd><p>the name of the group whose pc presentation is defined by a call to the <code class="code">pq</code> program (according to the <code class="code">pq</code> program -- unless you have used the <code class="code">GroupName</code> option (see e.g. <code class="func">Pq</code> (<a href="chap4.html#X86DD32D5803CF2C8"><span class="RefLink">4.1-1</span></a>)) or applied the function <code class="code">SetName</code> (see <code class="func">SetName</code> (<a href="../../../doc/ref/chap12.html#X7F14EF9D81432113"><span class="RefLink">Reference: Name</span></a>)) to the group, the <q>generic</q> name <code class="code">"[grp]"</code> is set as a default);</p>
201
202 </dd>
203 <dt><strong class="Mark"><code class="code">gpnum</code></strong></dt>
204 <dd><p>if not a null string, the <q>number</q> (i.e. the unique label assigned by the <code class="code">pq</code> program) of the last descendant processed;</p>
205
206 </dd>
207 <dt><strong class="Mark"><code class="code">class</code></strong></dt>
208 <dd><p>the largest lower exponent-<span class="SimpleMath">p</span> central class of a quotient group of the group (usually <code class="code">group</code>) found by a call to the <code class="code">pq</code> program;</p>
209
210 </dd>
211 <dt><strong class="Mark"><code class="code">forder</code></strong></dt>
212 <dd><p>the factored order of the quotient group of largest lower exponent-<span class="SimpleMath">p</span> central class found for the group (usually <code class="code">group</code>) by a call to the <code class="code">pq</code> program (this factored order is given as a list <code class="code">[p,n]</code>, indicating an order of <span class="SimpleMath">p^n</span>);</p>
213
214 </dd>
215 <dt><strong class="Mark"><code class="code">pcoverclass</code></strong></dt>
216 <dd><p>the lower exponent-<span class="SimpleMath">p</span> central class of the <span class="SimpleMath">p</span>-covering group of a <span class="SimpleMath">p</span>-quotient of the group (usually <code class="code">group</code>) found by a call to the <code class="code">pq</code> program;</p>
217
218 </dd>
219 <dt><strong class="Mark"><code class="code">workspace</code></strong></dt>
220 <dd><p>the workspace set for the <code class="code">pq</code> process (either given as a second argument to <code class="code">PqStart</code>, or set by default to 10000000);</p>
221
222 </dd>
223 <dt><strong class="Mark"><code class="code">menu</code></strong></dt>
224 <dd><p>the current menu of the <code class="code">pq</code> process (the <code class="code">pq</code> program is managed by various menus, the details of which the user shouldn't normally need to know about -- the <code class="code">menu</code> field remembers which menu the <code class="code">pq</code> process is currently <q>in</q>);</p>
225
226 </dd>
227 <dt><strong class="Mark"><code class="code">outfname</code></strong></dt>
228 <dd><p>is the file to which <code class="code">pq</code> output is directed, which is always <code class="code">ANUPQData.outfile</code>, except when option <code class="code">SetupFile</code> is used with a non-interactive function, in which case <code class="code">outfname</code> is set to <code class="code">"PQ_OUTPUT"</code>;</p>
229
230 </dd>
231 <dt><strong class="Mark"><code class="code">pQuotient</code></strong></dt>
232 <dd><p>is set to the value returned by <code class="code">Pq</code> (see <code class="func">Pq</code> (<a href="chap4.html#X86DD32D5803CF2C8"><span class="RefLink">4.1-1</span></a>)) (the field <code class="code">pQepi</code> is also set at the same time);</p>
233
234 </dd>
235 <dt><strong class="Mark"><code class="code">pQepi</code></strong></dt>
236 <dd><p>is set to the value returned by <code class="code">PqEpimorphism</code> (see <code class="func">PqEpimorphism</code> (<a href="chap4.html#X7ADE5DDB87B99CC0"><span class="RefLink">4.1-2</span></a>)) (the field <code class="code">pQuotient</code> is also set at the same time);</p>
237
238 </dd>
239 <dt><strong class="Mark"><code class="code">pCover</code></strong></dt>
240 <dd><p>is set to the value returned by <code class="code">PqPCover</code> (see <code class="func">PqPCover</code> (<a href="chap4.html#X81C3CE1E850DA252"><span class="RefLink">4.1-3</span></a>));</p>
241
242 </dd>
243 <dt><strong class="Mark"><code class="code">SP</code></strong></dt>
244 <dd><p>is set to the value returned by <code class="code">PqStandardPresentation</code> or <code class="code">StandardPresentation</code> (see <code class="func">PqStandardPresentation</code> (<a href="chap5.html#X805F32618005C087"><span class="RefLink">5.3-4</span></a>)) when called interactively, for process <var class="Arg">i</var> (the field <code class="code">SPepi</code> is also set at the same time);</p>
245
246 </dd>
247 <dt><strong class="Mark"><code class="code">SPepi</code></strong></dt>
248 <dd><p>is set to the value returned by <code class="code">EpimorphismPqStandardPresentation</code> or <code class="code">EpimorphismStandardPresentation</code> (see <code class="func">EpimorphismPqStandardPresentation</code> (<a href="chap5.html#X791392977B2D692D"><span class="RefLink">5.3-5</span></a>)) when called interactively, for process <var class="Arg">i</var> (the field <code class="code">SP</code> is also set at the same time);</p>
249
250 </dd>
251 <dt><strong class="Mark"><code class="code">descendants</code></strong></dt>
252 <dd><p>is set to the value returned by <code class="code">PqDescendants</code> (see <code class="func">PqDescendants</code> (<a href="chap4.html#X80985CC479CD9FA3"><span class="RefLink">4.4-1</span></a>));</p>
253
254 </dd>
255 <dt><strong class="Mark"><code class="code">treepos</code></strong></dt>
256 <dd><p>if set by a call to <code class="code">PqDescendantsTreeCoclassOne</code> (see <code class="func">PqDescendantsTreeCoclassOne</code> (<a href="chapA.html#X805E6B418193CF2D"><span class="RefLink">A.4-1</span></a>)), it contains a record with fields <code class="code">class</code>, <code class="code">node</code> and <code class="code">ndes</code> being the information that determines the last descendant with a non-zero number of descendants processed;</p>
257
258 </dd>
259 <dt><strong class="Mark"><code class="code">xgapsheet</code></strong></dt>
260 <dd><p>if set by a call to <code class="code">PqDescendantsTreeCoclassOne</code> (see <code class="func">PqDescendantsTreeCoclassOne</code> (<a href="chapA.html#X805E6B418193CF2D"><span class="RefLink">A.4-1</span></a>)) during an <strong class="pkg">XGAP</strong> session, it contains the <strong class="pkg">XGAP</strong> <code class="code">Sheet</code> on which the descendants tree is displayed; and</p>
261
262 </dd>
263 <dt><strong class="Mark"><code class="code">nextX</code></strong></dt>
264 <dd><p>if set by a call to <code class="code">PqDescendantsTreeCoclassOne</code> (see <code class="func">PqDescendantsTreeCoclassOne</code> (<a href="chapA.html#X805E6B418193CF2D"><span class="RefLink">A.4-1</span></a>)) during an <strong class="pkg">XGAP</strong> session, it contains a list of integers, the <var class="Arg">i</var>th entry of which is the <var class="Arg">x</var>-coordinate of the next node (representing a descendant) for the <var class="Arg">i</var>th class.</p>
265
266 </dd>
267 </dl>
268 <p><a id="X7FBB2F457E4BD6AB" name="X7FBB2F457E4BD6AB"></a></p>
269
270 <h5>3.2-2 ANUPQDirectoryTemporary</h5>
271
272 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ANUPQDirectoryTemporary</code>( <var class="Arg">dir</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
273 <p>calls the UNIX command <code class="code">mkdir</code> to create <var class="Arg">dir</var>, which must be a string, and if successful a directory object for <var class="Arg">dir</var> is both assigned to <code class="code">ANUPQData.tmpdir</code> and returned. The field <code class="code">ANUPQData.outfile</code> is also set to be a file in <code class="code">ANUPQData.tmpdir</code>, and on exit from <strong class="pkg">GAP</strong> <var class="Arg">dir</var> is removed. Most users will never need this command; by default, <strong class="pkg">GAP</strong> typically chooses a <q>random</q> subdirectory of <code class="code">/tmp</code> for <code class="code">ANUPQData.tmpdir</code> which may occasionally have limits on what may be written there. <code class="code">ANUPQDirectoryTemporary</code> permits the user to choose a directory (object) where one is not so limited.</p>
274
275 <p><a id="X83E5C7CF7D8739DF" name="X83E5C7CF7D8739DF"></a></p>
276
277 <h4>3.3 <span class="Heading">Setting the Verbosity of ANUPQ via Info and InfoANUPQ</span></h4>
278
279 <p><a id="X7CBC9B458497BFF1" name="X7CBC9B458497BFF1"></a></p>
280
281 <h5>3.3-1 InfoANUPQ</h5>
282
283 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; InfoANUPQ</code></td><td class="tdright">(&nbsp;info class&nbsp;)</td></tr></table></div>
284 <p>The input to and the output from the <code class="code">pq</code> program is, by default, not displayed. However the user may choose to see some, or all, of this input/output. This is done via the <code class="code">Info</code> mechanism (see Section <a href="../../../doc/ref/chap7.html#X7A9C902479CB6F7C"><span class="RefLink">Reference: Info Functions</span></a> in the <strong class="pkg">GAP</strong> Reference Manual). For this purpose, there is the <var class="Arg">InfoClass</var> <code class="code">InfoANUPQ</code>. If the <code class="code">InfoLevel</code> of <code class="code">InfoANUPQ</code> is high enough each line of <code class="code">pq</code> input/output is directed to a call to <code class="code">Info</code> and will be displayed for the user to see. By default, the <code class="code">InfoLevel</code> of <code class="code">InfoANUPQ</code> is 1, and it is recommended that you leave it at this level, or higher. Messages that the user should presumably want to see and output from the <code class="code">pq</code> program influenced by the value of the option <code class="code">OutputLevel</code> (see the options listed in Section <code class="func">Pq</code> (<a href="chap4.html#X86DD32D5803CF2C8"><span class="RefLink">4.1-1</span></a>)), other than timing and memory usage are directed to <code class="code">Info</code> at <code class="code">InfoANUPQ</code> level 1.</p>
285
286 <p>To turn off <em>all</em> <code class="code">InfoANUPQ</code> messaging, set the <code class="code">InfoANUPQ</code> level to 0.</p>
287
288 <p>There are five other user-intended <code class="code">InfoANUPQ</code> levels: 2, 3, 4, 5 and 6.</p>
289
290
291 <div class="example"><pre>
292 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 2);</span>
293 </pre></div>
294
295 <p>enables the display of most timing and memory usage data from the <code class="code">pq</code> program, and also the number of identity instances when the <code class="code">Identities</code> option is used. (Some timing and memory usage data, particularly when profuse in quantity, is <code class="code">Info</code>-ed at <code class="code">InfoANUPQ</code> level 3 instead.) Note that the the <strong class="pkg">GAP</strong> functions <code class="code">time</code> and <code class="code">Runtime</code> (see <code class="func">Runtime</code> (<a href="../../../doc/ref/chap7.html#X7E32B27F81870D24"><span class="RefLink">Reference: Runtime</span></a>) in the <strong class="pkg">GAP</strong> Reference Manual) count the time spent by <strong class="pkg">GAP</strong> and <em>not</em> the time spent by the (external) <code class="code">pq</code> program.</p>
296
297
298 <div class="example"><pre>
299 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 3);</span>
300 </pre></div>
301
302 <p>enables the display of output of the nature of the first two <code class="code">InfoANUPQ</code> that was not directly invoked by the user (e.g. some commands require <strong class="pkg">GAP</strong> to discover something about the current state known to the <code class="code">pq</code> program). The identity instances processed under the <code class="code">Identities</code> option are also displayed at this level. In some cases, the <code class="code">pq</code> program produces a lot of output despite the fact that the <code class="code">OutputLevel</code> (see <a href="chap6.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>) is unset or is set to 0; such output is also <code class="code">Info</code>-ed at <code class="code">InfoANUPQ</code> level 3.</p>
303
304
305 <div class="example"><pre>
306 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 4);</span>
307 </pre></div>
308
309 <p>enables the display of all the commands directed to the <code class="code">pq</code> program, behind a <q><code class="code">ToPQ&gt; </code></q> prompt (so that you can distinguish it from the output from the <code class="code">pq</code> program). See Section <a href="chap3.html#X7BA20FA07B166B37"><span class="RefLink"><span class="Heading">Hints and Warnings regarding the use of Options</span></span></a> for an example of how this can be a useful troubleshooting tool.</p>
310
311
312 <div class="example"><pre>
313 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 5);</span>
314 </pre></div>
315
316 <p>enables the display of the <code class="code">pq</code> program's prompts for input. Finally,</p>
317
318
319 <div class="example"><pre>
320 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 6);</span>
321 </pre></div>
322
323 <p>enables the display of all other output from the <code class="code">pq</code> program, namely the banner and menus. However, the timing data printed when the <code class="code">pq</code> program exits can never be observed.</p>
324
325 <p><a id="X810FFB1C8035C8BE" name="X810FFB1C8035C8BE"></a></p>
326
327 <h4>3.4 <span class="Heading">Utility Functions</span></h4>
328
329 <p><a id="X8771393B7F53F534" name="X8771393B7F53F534"></a></p>
330
331 <h5>3.4-1 PqLeftNormComm</h5>
332
333 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PqLeftNormComm</code>( <var class="Arg">elts</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
334 <p>returns for a list of elements of some group (e.g. <var class="Arg">elts</var> may be a list of words in the generators of a free or fp group) the left normed commutator of <var class="Arg">elts</var>, e.g. if <var class="Arg">w1</var>, <var class="Arg">w2</var>, <var class="Arg">w3</var> are such elements then <code class="code">PqLeftNormComm( [<var class="Arg">w1</var>, <var class="Arg">w2</var>, <var class="Arg">w3</var>] );</code> is equivalent to <code class="code">Comm( Comm( <var class="Arg">w1</var>, <var class="Arg">w2</var> ), <var class="Arg">w3</var> );</code>.</p>
335
336 <p><em>Note:</em> <var class="Arg">elts</var> must contain at least two elements.</p>
337
338 <p><a id="X7A567432879510A6" name="X7A567432879510A6"></a></p>
339
340 <h5>3.4-2 PqGAPRelators</h5>
341
342 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PqGAPRelators</code>( <var class="Arg">group</var>, <var class="Arg">rels</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
343 <p>returns a list of words that <strong class="pkg">GAP</strong> understands, given a list <var class="Arg">rels</var> of strings in the string representations of the generators of the fp group <var class="Arg">group</var> prepared as a list of relators for the <code class="code">pq</code> program.</p>
344
345 <p><em>Note:</em> The <code class="code">pq</code> program does not use <code class="code">/</code> to indicate multiplication by an inverse and uses square brackets to represent (left normed) commutators. Also, even though the <code class="code">pq</code> program accepts relations, all elements of <var class="Arg">rels</var> <em>must</em> be in relator form, i.e. a relation of form <code class="code"><var class="Arg">w1</var> = <var class="Arg">w2</var></code> must be written as <code class="code"><var class="Arg">w1</var>*(<var class="Arg">w2</var>)^-1</code>.</p>
346
347 <p>Here is an example:</p>
348
349
350 <div class="example"><pre>
351 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">F := FreeGroup("a", "b");</span>
352 &lt;free group on the generators [ a, b ]&gt;
353 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">PqGAPRelators(F, [ "a*b^2", "[a,b]^2*a", "[a,b,a,b]^a" ]);</span>
354 [ a*b^2, (a^-1*b^-1*a*b)^2*a,
355 a^-2*b^-1*a^-1*b*(a*b^-1)^2*a^-1*b*a^-1*b^-1*(a*b)^2*a ]
356 </pre></div>
357
358 <p><a id="X7F3C5D1C7EC36EAE" name="X7F3C5D1C7EC36EAE"></a></p>
359
360 <h5>3.4-3 PqParseWord</h5>
361
362 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PqParseWord</code>( <var class="Arg">word</var>, <var class="Arg">n</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
363 <p>parses a <var class="Arg">word</var>, a string representing a word in the pc generators <code class="code">x1,...,x<var class="Arg">n</var></code>, through <strong class="pkg">GAP</strong>. This function is provided as a rough-and-ready check of <var class="Arg">word</var> for syntax errors. A syntax error will cause the entering of a <code class="code">break</code>-loop, in which the error message may or may not be meaningful (depending on whether the syntax error gets caught at the <strong class="pkg">GAP</strong> or kernel level).</p>
364
365 <p><em>Note:</em> The reason the generators <em>must</em> be <code class="code">x1,...,x<var class="Arg">n</var></code> is that these are the pc generator names used by the <code class="code">pq</code> program (as distinct from the generator names for the group provided by the user to a function like <code class="code">Pq</code> that invokes the <code class="code">pq</code> program).</p>
366
367 <p><a id="X7BB0EB607F337265" name="X7BB0EB607F337265"></a></p>
368
369 <h5>3.4-4 PqExample</h5>
370
371 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PqExample</code>( )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
372 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PqExample</code>( <var class="Arg">example</var>[, <var class="Arg">PqStart</var>][, <var class="Arg">Display</var>] )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
373 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PqExample</code>( <var class="Arg">example</var>[, <var class="Arg">PqStart</var>][, <var class="Arg">filename</var>] )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
374 <p>With no arguments, or with single argument <code class="code">"index"</code>, or a string <var class="Arg">example</var> that is not the name of a file in the <code class="code">examples</code> directory, an index of available examples is displayed.</p>
375
376 <p>With just the one argument <var class="Arg">example</var> that is the name of a file in the <code class="code">examples</code> directory, the example contained in that file is executed in its simplest form. Some examples accept options which you may use to modify some of the options used in the commands of the example. To find out which options an example accepts, use one of the mechanisms for displaying the example described below.</p>
377
378 <p>Some examples have both non-interactive and interactive forms; those that are non-interactive only have a name ending in <code class="code">-ni</code>; those that are interactive only have a name ending in <code class="code">-i</code>; examples with names ending in <code class="code">.g</code> also have only one form; all other examples have both non-interactive and interactive forms and for these giving <code class="code">PqStart</code> as second argument invokes <code class="code">PqStart</code> initially and makes the appropriate adjustments so that the example is executed or displayed using interactive functions.</p>
379
380 <p>If <code class="code">PqExample</code> is called with last (second or third) argument <code class="code">Display</code> then the example is displayed without being executed. If the last argument is a non-empty string <var class="Arg">filename</var> then the example is also displayed without being executed but is also written to a file with that name. Passing an empty string as last argument has the same effect as passing <code class="code">Display</code>.</p>
381
382 <p><em>Note:</em> The variables used in <code class="code">PqExample</code> are local to the running of <code class="code">PqExample</code>, so there's no danger of having some of your variables over-written. However, they are not completely lost either. They are saved to a record <code class="code">ANUPQData.examples.vars</code>, i.e. if <code class="code">F</code> is a variable used in the example then you will be able to access it after <code class="code">PqExample</code> has finished as <code class="code">ANUPQData.examples.vars.F</code>.</p>
383
384 <p><a id="X823C93FC7B87F5BC" name="X823C93FC7B87F5BC"></a></p>
385
386 <h5>3.4-5 AllPqExamples</h5>
387
388 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; AllPqExamples</code>( )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
389 <p>returns a list of all currently available examples in default UNIX-listing (i.e. alphabetic) order.</p>
390
391 <p><a id="X7E3E4B047DC2E323" name="X7E3E4B047DC2E323"></a></p>
392
393 <h5>3.4-6 GrepPqExamples</h5>
394
395 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; GrepPqExamples</code>( <var class="Arg">string</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
396 <p>runs the UNIX command <code class="code">grep <var class="Arg">string</var></code> over the <strong class="pkg">ANUPQ</strong> examples and returns the list of examples for which there is a match. The actual matches are <code class="code">Info</code>-ed at <code class="code">InfoANUPQ</code> level 2.</p>
397
398 <p><a id="X8104B2BA872EFCCB" name="X8104B2BA872EFCCB"></a></p>
399
400 <h5>3.4-7 ToPQLog</h5>
401
402 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ToPQLog</code>( [<var class="Arg">filename</var>] )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
403 <p>With string argument <var class="Arg">filename</var>, <code class="code">ToPQLog</code> opens the file with name <var class="Arg">filename</var> for logging; all commands written to the <code class="code">pq</code> binary (that are <code class="code">Info</code>-ed behind a <q><code class="code">ToPQ&gt; </code></q> prompt at <code class="code">InfoANUPQ</code> level 4) are then also written to that file (but without prompts). With no argument, <code class="code">ToPQLog</code> stops logging to whatever file was being logged to. If a file was already being logged to, that file is closed and the file with name <var class="Arg">filename</var> is opened for logging.</p>
404
405 <p><a id="X818175EF85CAA807" name="X818175EF85CAA807"></a></p>
406
407 <h4>3.5 <span class="Heading">Attributes and a Property for fp and pc p-groups</span></h4>
408
409 <p><a id="X87DC922A78EB0DD6" name="X87DC922A78EB0DD6"></a></p>
410
411 <h5>3.5-1 NuclearRank</h5>
412
413 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; NuclearRank</code>( <var class="Arg">G</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
414 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; MultiplicatorRank</code>( <var class="Arg">G</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
415 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsCapable</code>( <var class="Arg">G</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
416 <p>return the nuclear rank of <var class="Arg">G</var>, <span class="SimpleMath">p</span>-multiplicator rank of <var class="Arg">G</var>, and whether <var class="Arg">G</var> is capable (i.e. <code class="keyw">true</code> if it is, or <code class="keyw">false</code> if it is not), respectively.</p>
417
418 <p>These attributes and property are set automatically if <var class="Arg">G</var> is one of the following:</p>
419
420
421 <ul>
422 <li><p>an fp group returned by <code class="code">PqStandardPresentation</code> or <code class="code">StandardPresentation</code> (see <code class="func">PqStandardPresentation</code> (<a href="chap4.html#X86C9575D7CB65FBB"><span class="RefLink">4.2-1</span></a>));</p>
423
424 </li>
425 <li><p>the image (fp group) of the epimorphism returned by an <code class="code">EpimorphismPqStandardPresentation</code> or <code class="code">EpimorphismStandardPresentation</code> call (see <code class="func">EpimorphismPqStandardPresentation</code> (<a href="chap4.html#X828C06D083C0D089"><span class="RefLink">4.2-2</span></a>)); or</p>
426
427 </li>
428 <li><p>one of the pc groups of the list of descendants returned by <code class="code">PqDescendants</code> (see <code class="func">PqDescendants</code> (<a href="chap4.html#X80985CC479CD9FA3"><span class="RefLink">4.4-1</span></a>)).</p>
429
430 </li>
431 </ul>
432 <p>If <var class="Arg">G</var> is an fp group or a pc <span class="SimpleMath">p</span>-group and not one of the above and the attribute or property has not otherwise been set for <var class="Arg">G</var>, then <code class="code">PqStandardPresentation</code> is called to set all three of <code class="code">NuclearRank</code>, <code class="code">MultiplicatorRank</code> and <code class="code">IsCapable</code>, before returning the value of the attribute or property actually called. Such a group <var class="Arg">G</var> must know in advance that it is a <span class="SimpleMath">p</span>-group; this is the case for the groups returned by the functions <code class="code">Pq</code> and <code class="code">PqPCover</code>, and the image group of the epimorphism returned by <code class="code">PqEpimorphism</code>. Otherwise, if you know the group to be a <span class="SimpleMath">p</span>-group, then this can be set by typing</p>
433
434
435 <div class="example"><pre>
436 SetIsPGroup( G, true );
437 </pre></div>
438
439 <p>or by invoking <code class="code">IsPGroup( <var class="Arg">G</var> )</code>. Note that for an fp group <var class="Arg">G</var>, the latter may result in a coset enumeration which might not terminate in a reasonable time.</p>
440
441 <p><em>Note:</em> For <var class="Arg">G</var> such that <code class="code">HasNuclearRank(<var class="Arg">G</var>) = true</code>, <code class="code">IsCapable(<var class="Arg">G</var>)</code> is equivalent to (the truth or falsity of) <code class="code">NuclearRank( <var class="Arg">G</var> ) = 0</code>.</p>
442
443 <p><a id="X7BA20FA07B166B37" name="X7BA20FA07B166B37"></a></p>
444
445 <h4>3.6 <span class="Heading">Hints and Warnings regarding the use of Options</span></h4>
446
447 <p>On a first reading we recommend you skip this section and come back to it if and when you run into trouble.</p>
448
449 <p><em>Note:</em> By <q>options</q> we refer to <strong class="pkg">GAP</strong> options. The <code class="code">pq</code> program also uses the term <q>option</q>; to distinguish the two usages of <q>option</q>, in this manual we use the term <em>menu item</em> to refer to what the <code class="code">pq</code> program refers to as an <q>option</q>.</p>
450
451 <p>Options are passed to the <strong class="pkg">ANUPQ</strong> interface functions in either of the two usual mechanisms provided by <strong class="pkg">GAP</strong>, namely:</p>
452
453
454 <ul>
455 <li><p>options may be set globally using the function <code class="code">PushOptions</code> (see Chapter <a href="../../../doc/ref/chap8.html#X7FD84061873F72A2"><span class="RefLink">Reference: Options Stack</span></a> in the <strong class="pkg">GAP</strong> Reference Manual); or</p>
456
457 </li>
458 <li><p>options may be appended to the argument list of any function call, separated by a colon from the argument list (see Chapter <a href="../../../doc/ref/chap4.html#X78C70489791FDF43"><span class="RefLink">Reference: Function Calls</span></a> in the <strong class="pkg">GAP</strong> Reference Manual), in which case they are then passed on recursively to any subsequent inner function call, which may in turn have options of their own.</p>
459
460 </li>
461 </ul>
462 <p>Particularly, when one is using the interactive functions of Chapter <a href="chap5.html#X842C13C27B941744"><span class="RefLink"><span class="Heading">Interactive ANUPQ functions</span></span></a>, one should, in general, avoid using the global method of passing options. In fact, it is recommended that prior to calling <code class="code">PqStart</code> the <code class="code">OptionsStack</code> be empty. The essential problem with setting options globally using the function <code class="code">PushOptions</code> is that options pushed onto <code class="code">OptionsStack</code>, in this way, (generally) remain there until an explicit <code class="code">PopOptions()</code> call is made.</p>
463
464 <p>In contrast, options passed in the usual way behind a colon following a function's arguments (see <a href="../../../doc/ref/chap4.html#X867D54987EF86D1D"><span class="RefLink">Reference: Function Call With Options</span></a> in the <strong class="pkg">GAP</strong> Reference Manual) are local, and disappear from <code class="code">OptionsStack</code> after the function has executed successfully. If the function does <em>not</em> execute successfully, i.e. it runs into error and the user <code class="keyw">quit</code>s the resulting <code class="code">break</code> loop (see Section <a href="../../../doc/ref/chap6.html#X8593B49F8705B486"><span class="RefLink">Reference: Break Loops</span></a> in the Reference Manual) rather than attempting to repair the problem and typing <code class="code">return;</code> then, unless the error at the kernel level, the <code class="code">OptionsStack</code> is reset. If an error is detected inside the kernel (hopefully, this should occur only rarely, if at all) then the options of that function will <em>not</em> be cleared from <code class="code">OptionsStack</code>; in such cases:</p>
465
466
467 <div class="example"><pre>
468 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">ResetOptionsStack();</span>
469 #I Options stack is already empty
470 </pre></div>
471
472 <p>is usually necessary (see Chapter <code class="func">ResetOptionsStack</code> (<a href="../../../doc/ref/chap8.html#X83D1190984DA3B85"><span class="RefLink">Reference: ResetOptionsStack</span></a>) in the <strong class="pkg">GAP</strong> Reference Manual), which recursively calls <code class="code">PopOptions()</code> until <code class="code">OptionsStack</code> is empty, or as in the above case warns you that the <code class="code">OptionsStack</code> is already empty.</p>
473
474 <p>Note that a function, that is passed options after the colon, will also see any global options or any options passed down recursively from functions calling that function, unless those options are over-ridden by options passed via the function. Also, note that duplication of option names for different programs may lead to misinterpretations, and mis-spelled options will not be <q>seen</q>.</p>
475
476 <p>The non-interactive functions of Chapter <a href="chap4.html#X7C51F26D839279FF"><span class="RefLink"><span class="Heading">Non-interactive ANUPQ functions</span></span></a> that have <code class="code">Pq</code> somewhere in their name provide an alternative method of passing options as additional arguments. This has the advantages that options can be abbreviated and mis-spelled options will be trapped.</p>
477
478 <p><a id="X81F4AAE084C34B4B" name="X81F4AAE084C34B4B"></a></p>
479
480 <h5>3.6-1 ANUPQWarnOfOtherOptions</h5>
481
482 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ANUPQWarnOfOtherOptions</code></td><td class="tdright">(&nbsp;global variable&nbsp;)</td></tr></table></div>
483 <p>is a global variable that is by default <code class="keyw">false</code>. If it is set to <code class="keyw">true</code> then any function provided by the <strong class="pkg">ANUPQ</strong> function that recognises at least one option, will warn you of <q>other</q> options, i.e. options that the function does not recognise. These warnings are emitted at <code class="code">InfoWarning</code> or <code class="code">InfoANUPQ</code> level 1. This is useful for detecting mis-spelled options. Here is an example using the function <code class="code">Pq</code> (first described in Chapter <a href="chap4.html#X7C51F26D839279FF"><span class="RefLink"><span class="Heading">Non-interactive ANUPQ functions</span></span></a>):</p>
484
485
486 <div class="example"><pre>
487 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 1); # Set InfoANUPQ to default level</span>
488 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">ANUPQWarnOfOtherOptions := true;;</span>
489 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput"># The following makes entry into break loops very ``quiet'' ...</span>
490 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">OnBreak := function() Where(0); end;;</span>
491 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">F := FreeGroup( "a", "b" );</span>
492 &lt;free group on the generators [ a, b ]&gt;
493 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Pq( F : Prime := 2, Classbound := 1 );</span>
494 #I ANUPQ Warning: Options: [ "Classbound" ] ignored
495 #I (invalid for generic function: `Pq').
496 user interrupt at
497 moreOfline := ReadLine( iostream );
498 Entering break read-eval-print loop ...
499 you can 'quit;' to quit to outer loop, or
500 you can 'return;' to continue
501 </pre></div>
502
503 <p>Here we mistyped <code class="code">ClassBound</code> as <code class="code">Classbound</code>, and after seeing the <code class="code">Info</code>-ed warning that <code class="code">Classbound</code> was ignored, we typed a <var class="Arg">control</var>-C (that's the <q><code class="code">user interrupt at</code></q> message) which took us into a break loop. Since the <code class="code">Pq</code> command was not able to finish, the options <code class="code">Prime</code> and <code class="code">Classbound</code>, in particular, will still be on the <code class="code">OptionsStack</code>:</p>
504
505
506 <div class="example"><pre>
507 <span class="GAPbrkprompt">brk&gt;</span> <span class="GAPinput">OptionsStack;</span>
508 [ rec( Prime := 2, Classbound := 1 ),
509 rec( Prime := 2, Classbound := 1, PqEpiOrPCover := "pQuotient" ) ]
510 </pre></div>
511
512 <p>The option <code class="code">PqEpiOrPCover</code> is a behind-the-scenes option that need not concern the user. On <code class="keyw">quit</code>ting the <code class="code">break</code>-loop the <code class="code">OptionsStack</code> is reset and a warning telling you this is emitted:</p>
513
514
515 <div class="example"><pre>
516 <span class="GAPbrkprompt">brk&gt;</span> <span class="GAPinput">quit; # to get back to the `gap&gt;' prompt</span>
517 #I Options stack has been reset
518 </pre></div>
519
520 <p>Above, we altered <code class="code">OnBreak</code> (see <code class="func">OnBreak</code> (<a href="../../../doc/ref/chap6.html#X82EBF01181C3C859"><span class="RefLink">Reference: OnBreak</span></a>) in the Reference manual) to reduce the back-tracing on entry into a break loop. We now restore <code class="code">OnBreak</code> to its usual value.</p>
521
522
523 <div class="example"><pre>
524 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">OnBreak := Where;;</span>
525 </pre></div>
526
527 <p><em>Notes</em></p>
528
529 <p>In cases where functions recursively call others with options (e.g. when using <code class="code">PqExample</code> with options), setting <code class="code">ANUPQWarnOfOtherOptions := true</code> may give rise to spurious <q>other</q> option detections.</p>
530
531 <p>It is recommended that the novice user set <code class="code">ANUPQWarnOfOtherOptions</code> to <code class="keyw">true</code> in their <code class="code">gap.ini</code> file (see Section <a href="chap3.html#X833D58248067E13B"><span class="RefLink"><span class="Heading">Loading the ANUPQ Package</span></span></a>).</p>
532
533 <p><em>Other Troubleshooting Strategies</em></p>
534
535 <p>There are some other strategies which may have helped us to see our error above. The function <code class="code">Pq</code> recognises the option <code class="code">OutputLevel</code> (see <a href="chap6.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>); if this option is set to at least 1, the <code class="code">pq</code> program provides information on each class quotient as it is generated:</p>
536
537
538 <div class="example"><pre>
539 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">ANUPQWarnOfOtherOptions := false;; # Set back to normal</span>
540 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">F := FreeGroup( "a", "b" );;</span>
541 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Pq( F : Prime := 2, Classbound := 1, OutputLevel := 1 ); </span>
542 #I Lower exponent-2 central series for [grp]
543 #I Group: [grp] to lower exponent-2 central class 1 has order 2^2
544 #I Group: [grp] to lower exponent-2 central class 2 has order 2^5
545 #I Group: [grp] to lower exponent-2 central class 3 has order 2^10
546 #I Group: [grp] to lower exponent-2 central class 4 has order 2^18
547 #I Group: [grp] to lower exponent-2 central class 5 has order 2^32
548 #I Group: [grp] to lower exponent-2 central class 6 has order 2^55
549 #I Group: [grp] to lower exponent-2 central class 7 has order 2^96
550 #I Group: [grp] to lower exponent-2 central class 8 has order 2^167
551 #I Group: [grp] to lower exponent-2 central class 9 has order 2^294
552 #I Group: [grp] to lower exponent-2 central class 10 has order 2^520
553 #I Group: [grp] to lower exponent-2 central class 11 has order 2^932
554 #I Group: [grp] to lower exponent-2 central class 12 has order 2^1679
555 [... output truncated ...]
556 </pre></div>
557
558 <p>After seeing the information for the class 2 quotient we may have got the idea that the <code class="code">Classbound</code> option was not recognised and may have realised that this was due to a mis-spelling. The above will ordinarily cause the available space to be exhausted, necessitating user-intervention by typing <var class="Arg">control</var>-C and <code class="code">quit;</code> (to escape the break loop); otherwise <code class="code">Pq</code> terminates when the class reaches 63 (the default value of <code class="code">ClassBound</code>).</p>
559
560 <p>If you have some familiarity with <q>keyword</q> command input to the <code class="code">pq</code> binary, then setting the level of <code class="code">InfoANUPQ</code> to 4 would also have indicated a problem:</p>
561
562
563 <div class="example"><pre>
564 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">ResetOptionsStack(); # Necessary, if a break-loop was entered above</span>
565 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 4);</span>
566 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Pq( F : Prime := 2, Classbound := 1 );</span>
567 #I ToPQ&gt; 7 #to (Main) p-Quotient Menu
568 #I ToPQ&gt; 1 #define group
569 #I ToPQ&gt; name [grp]
570 #I ToPQ&gt; prime 2
571 #I ToPQ&gt; class 63
572 #I ToPQ&gt; exponent 0
573 #I ToPQ&gt; output 0
574 #I ToPQ&gt; generators { a,b }
575 #I ToPQ&gt; relators { };
576 [... output truncated ...]
577 </pre></div>
578
579 <p>Here the line <q><code class="code">#I ToPQ&gt; class 63</code></q> indicates that a directive to set the classbound to 63 was sent to the <code class="code">pq</code> program.</p>
580
581
582 <div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp; <a href="chap0.html#contents">[Contents]</a>&nbsp; &nbsp;<a href="chap2.html">[Previous Chapter]</a>&nbsp; &nbsp;<a href="chap4.html">[Next Chapter]</a>&nbsp; </div>
583
584
585 <div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chapA.html">A</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
586
587 <hr />
588 <p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
589 </body>
590 </html>