Quelle chap5.html
Sprache: HTML
|
|
| products/sources/formale Sprachen/GAP/pkg/anupq/doc/chap5.html |
 |
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html xmlns= "http://www.w3.org/1999/xhtml" xml:lang= "en">
< head>
< title>GAP (ANUPQ) - Chapter 5: Interactive ANUPQ functions</ title>
< meta http-equiv= "content-type" content= "text/html; charset=UTF-8" />
< meta name= "generator" content= "GAPDoc2HTML" />
< link rel= "stylesheet" type= "text/css" href= "manual.css" />
< script src= "manual.js" type= "text/javascript"></ script>
< script type= "text/javascript">overwriteStyle();</ script>
</ head>
< body class= "chap5" onload= "jscontent()">
< 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>
<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap4.html">[Previous Chapter]</a> <a href="chap6.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap5_mj.html">[MathJax on]</a></p>
<p><a id="X842C13C27B941744" name="X842C13C27B941744"></a></p>
<div class="ChapSects"><a href="chap5.html#X842C13C27B941744">5 <span class="Heading">Interactive ANUPQ functions</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X7935CDAD7936CA0A">5.1 <span class="Heading">Starting and Stopping Interactive ANUPQ Processes</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X83B2EC237F37623C">5.1-1 PqStart</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X79DB761185BAB9C8">5.1-2 PqQuit</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7FF8F2657B1B008E">5.1-3 PqQuitAll</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X7EE8000A800CEE2D">5.2 <span class="Heading">Interactive ANUPQ Process Utility Functions</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X8558B20A80B999AE">5.2-1 PqProcessIndex</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7E4A56D67C865291">5.2-2 PqProcessIndices</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7C103DF78435AEC7">5.2-3 IsPqProcessAlive</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X823D2BBF7C4515D4">5.3 <span class="Heading">Interactive Versions of Non-interactive ANUPQ Functions</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X85408C4C790439E7">5.3-1 Pq</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X839E6F578227A8EA">5.3-2 PqEpimorphism</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7AA64A2F8509A39A">5.3-3 PqPCover</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X805F32618005C087">5.3-4 PqStandardPresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X791392977B2D692D">5.3-5 EpimorphismPqStandardPresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X795817217C53AB89">5.3-6 PqDescendants</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X80CCF6D379E5A3B4">5.3-7 PqSetPQuotientToGroup</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X857F050C832A1FE4">5.4 <span class="Heading">Low-level Interactive ANUPQ functions based on menu items of the
pq program</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X868B10557D470CF6">5.5 <span class="Heading">General commands</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7DE2F6C686C672DD">5.5-1 PqNrPcGenerators</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X87FF98867E8FFB3C">5.5-2 PqFactoredOrder</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7B4FC9E380001A71">5.5-3 PqOrder</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X87C7F7EB7C10DC4B">5.5-4 PqPClass</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7EA3B6917908C20A">5.5-5 PqWeight</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X79862B83817E20E1">5.5-6 PqCurrentGroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X805A50687D82B9EC">5.5-7 PqDisplayPcPresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X80410979854280E1">5.5-8 PqSetOutputLevel</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7B8C72B37AE667F7">5.5-9 PqEvaluateIdentities</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X7BDD5B278719C630">5.6 <span class="Heading">Commands from the Main <span class="SimpleMath">p</span>-Quotient menu</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7BF135DD84A781EB">5.6-1 PqPcPresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7D947CEA82C44898">5.6-2 PqSavePcPresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7FD001C0798EF219">5.6-3 PqRestorePcPresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X832F69597C095A27">5.6-4 PqNextClass</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7CF9DF7A84D387CB">5.6-5 PqComputePCover</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X7D27BE937B1DE16E">5.7 <span class="Heading">Commands from the Advanced <span class="SimpleMath">p</span>-Quotient menu</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X8633356078CA4115">5.7-1 PqCollect</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X86CCB77281FDC0FC">5.7-2 PqSolveEquation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X789B120B7E2F3017">5.7-3 PqCommutator</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7A61A15E78F52743">5.7-4 PqSetupTablesForNextClass</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X84F7DD8582B368D3">5.7-5 PqTails</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X8389F6437ED634B8">5.7-6 PqComputeTails</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X83CD6D888372DFB8">5.7-7 PqAddTails</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X82AA8FAE85826BB9">5.7-8 PqDoConsistencyChecks</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7A01EE0382689928">5.7-9 PqCollectDefiningRelations</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7C2B4C1E7BEB19D5">5.7-10 PqCollectWordInDefiningGenerators</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7DB05AA587D7A052">5.7-11 PqCommutatorDefiningGenerators</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X80E563A97EDE083E">5.7-12 PqDoExponentChecks</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7BBAB2787B305516">5.7-13 PqEliminateRedundantGenerators</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X783E53B5853F45E6">5.7-14 PqRevertToPreviousClass</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X8265A6DB81CD24DB">5.7-15 PqSetMaximalOccurrences</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X87A35ABB7E11595E">5.7-16 PqSetMetabelian</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7C7D17F878AA1BAA">5.7-17 PqDoConsistencyCheck</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X843953F48319FDE1">5.7-18 PqCompact</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X80344EEC78A09ACF">5.7-19 PqEchelonise</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X852947327FC39DDF">5.7-20 PqSupplyAutomorphisms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7B919B537C042DAD">5.7-21 PqExtendAutomorphisms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7CFD54657DE4BD39">5.7-22 PqApplyAutomorphisms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X81A3D5BF87A34934">5.7-23 PqDisplayStructure</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X853834B478C4EEE2">5.7-24 PqDisplayAutomorphisms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X80687A138626EB2D">5.7-25 PqWritePcPresentation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X7B94EDA385FDD904">5.8 <span class="Heading">Commands from the Standard Presentation menu</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X78D1963D85C71B7B">5.8-1 PqSPComputePcpAndPCover</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X876F30187E89E467">5.8-2 PqSPStandardPresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7E1B2B088322F48A">5.8-3 PqSPSavePresentation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X81D2F9FF7C241D1E">5.8-4 PqSPCompareTwoFilePresentations</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7D1277E584590ECE">5.8-5 PqSPIsomorphism</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X8490031B7AA7F237">5.9 <span class="Heading">Commands from the Main <span class="SimpleMath">p</span>-Group Generation menu</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X794A8D667A9D725A">5.9-1 PqPGSupplyAutomorphisms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X87F251077C65B6DD">5.9-2 PqPGExtendAutomorphisms</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X82FD51A27D269E43">5.9-3 PqPGConstructDescendants</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7E9D511385D48A98">5.9-4 PqPGSetDescendantToPcp</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X7E8FBC2D83C43481">5.10 <span class="Heading">Commands from the Advanced <span class="SimpleMath">p</span>-Group Generation menu</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7E539E4B78A6CE8D">5.10-1 PqAPGDegree</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7F1182A77AB7650C">5.10-2 PqAPGPermutations</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7DD9E7507AA888CC">5.10-3 PqAPGOrbits</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X795A756C78BE5923">5.10-4 PqAPGOrbitRepresentatives</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7E5D6D5782FE190E">5.10-5 PqAPGSingleStage</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap5.html#X84A92E8087762DEE">5.11 <span class="Heading">Primitive Interactive ANUPQ Process Read/Write Functions</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X8464AF7E83A523C1">5.11-1 PqRead</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7ADD82207D049A87">5.11-2 PqReadAll</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X7EBF3C3681671879">5.11-3 PqReadUntil</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap5.html#X83CBE77F78057E21">5.11-4 PqWrite</a></span>
</div></div>
</div>
<h3>5 <span class="Heading">Interactive ANUPQ functions</span></h3>
<p>Here we describe the interactive functions defined by the <strong class="pkg">ANUPQ</strong> package, i.e. the functions that manipulate and initiate interactive <strong class="pkg">ANUPQ</strong> processes. These are functions that extract information via a dialogue with a running <code class="code">pq</code> process (process used in the UNIX sense). Occasionally, a user needs the <q>next step</q>; the functions provided in this chapter make use of data from previous steps retained by the <code class="code">pq</code> program, thus allowing the user to interact with the <code class="code">pq</code> program like one can when one uses the <code class="code">pq</code> program as a stand-alone (see <code class="code">guide.dvi</code> in the <code class="code">standalone-doc</code> directory).</p>
<p>An interactive <strong class="pkg">ANUPQ</strong> process is initiated by <code class="code">PqStart</code> and terminated via <code class="code">PqQuit</code>; these functions are described in ection <a href="chap5.html#X7935CDAD7936CA0A"><span class="RefLink"><span class="Heading">Starting and Stopping Interactive ANUPQ Processes</span></span></a>.</p>
<p>Each interactive <strong class="pkg">ANUPQ</strong> function that manipulates an already started interactive <strong class="pkg">ANUPQ</strong> process, has a form where the first argument is the integer <var class="Arg">i</var> returned by the initiating <code class="code">PqStart</code> command, and a second form with one argument fewer (where the integer <var class="Arg">i</var> is discovered by a default mechanism, namely by determining the least integer <var class="Arg">i</var> for which there is a currently active interactive <strong class="pkg">ANUPQ</strong> process). We will thus commonly say that <q>for the <var class="Arg">i</var>th (or default) interactive <strong class="pkg">ANUPQ</strong> process</q> a certain function performs a given action. In each case, it is an error if <var class="Arg">i</var> is not the index of an active interactive process, or there are no current active interactive processes.</p>
<p><em>Notes</em>: The global method of passing options (via <code class="code">PushOptions</code>), should not be used with any of the interactive functions. In fact, the <code class="code">OptionsStack</code> should be empty at the time any of the interactive functions is called.</p>
<p>On <code class="keyw">quit</code>ting <strong class="pkg">GAP</strong>, <code class="code">PqQuitAll();</code> is executed, which terminates all active interactive <strong class="pkg">ANUPQ</strong> processes. If <strong class="pkg">GAP</strong> is killed without <code class="keyw">quit</code>ting, before all interactive <strong class="pkg">ANUPQ</strong> processes are terminated, <em>zombie</em> processes (still living <em>child</em> processes whose <em>parents</em> have died), may result. Since zombie processes do consume resources, in such an event, the responsible computer user should seek out and terminate those zombie processes (e.g. on Linux: <code class="code">ps xw | grep pq</code> gives you information on the <code class="code">pq</code> processes corresponding to any interactive <strong class="pkg">ANUPQ</strong> processes started in a <strong class="pkg">GAP</strong> session; you can then do <code class="code">kill <var class="Arg">N</var></code> for each number <var class="Arg">N</var> appearing in the first column of this output).</p>
<p><a id="X7935CDAD7936CA0A" name="X7935CDAD7936CA0A"></a></p>
<h4>5.1 <span class="Heading">Starting and Stopping Interactive ANUPQ Processes</span></h4>
<p><a id="X83B2EC237F37623C" name="X83B2EC237F37623C"></a></p>
<h5>5.1-1 PqStart</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqStart</code>( <var class="Arg">G</var>, <var class="Arg">workspace:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqStart</code>( <var class="Arg">G:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqStart</code>( <var class="Arg">workspace:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqStart</code>( <var class="Arg">:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>activate an iostream for an interactive <strong class="pkg">ANUPQ</strong> process (i.e. <code class="code">PqStart</code> starts up a <code class="code">pq</code> process and opens a <strong class="pkg">GAP</strong> iostream to <q>talk</q> to that process) and returns an integer <var class="Arg">i</var> that can be used to identify that process. The argument <var class="Arg">G</var> should be an <em>fp group</em> or <em>pc group</em> that the user intends to manipulate using interactive <strong class="pkg">ANUPQ</strong> functions. If the function is called without specifying <var class="Arg">G</var>, a group can be read in by using the function <code class="code">PqRestorePcPresentation</code> (see <code class="func">PqRestorePcPresentation</code> (<a href="chap5.html#X7FD001C0798EF219"><span class="RefLink">5.6-3</span></a>)). If <code class="code">PqStart</code> is given an integer argument <var class="Arg">workspace</var>, then the <code class="code">pq</code> program is started up with a workspace (an integer array) of size <var class="Arg">workspace</var> (i.e. <span class="SimpleMath">4 × <var class="Arg">workspace</var></span> bytes in a 32-bit environment); otherwise, the <code class="code">pq</code> program sets a default workspace of <span class="SimpleMath">10000000</span>.</p>
<p>The only <var class="Arg">options</var> currently recognised by <code class="code">PqStart</code> are <code class="code">Prime</code>, <code class="code">Exponent</code> and <code class="code">Relators</code> (see Chapter <a href="chap6.html#X7B0946E97E7EB359"><span class="RefLink"><span class="Heading">ANUPQ Options</span></span></a> for detailed descriptions of these options) and if provided they are essentially global for the interactive <strong class="pkg">ANUPQ</strong> process, except that any interactive function interacting with the process and passing new values for these options will over-ride the global values.</p>
<p><a id="X79DB761185BAB9C8" name="X79DB761185BAB9C8"></a></p>
<h5>5.1-2 PqQuit</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqQuit</code>( <var class="Arg">i</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqQuit</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p>closes the stream of the <var class="Arg">i</var>th or default interactive <strong class="pkg">ANUPQ</strong> process and unbinds its <code class="code">ANUPQData.io</code> record.</p>
<p><em>Note:</em> It can happen that the <code class="code">pq</code> process, and hence the <strong class="pkg">GAP</strong> iostream assigned to communicate with it, can die, e.g. by the user typing a <code class="code">Ctrl-C</code> while the <code class="code">pq</code> process is engaged in a long calculation. <code class="code">IsPqProcessAlive</code> (see <code class="func">IsPqProcessAlive</code> (<a href="chap5.html#X7C103DF78435AEC7"><span class="RefLink">5.2-3</span></a>)) is provided to check the status of the <strong class="pkg">GAP</strong> iostream (and hence the status of the <code class="code">pq</code> process it was communicating with).</p>
<p><a id="X7FF8F2657B1B008E" name="X7FF8F2657B1B008E"></a></p>
<h5>5.1-3 PqQuitAll</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqQuitAll</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p>is provided as a convenience, to terminate all active interactive <strong class="pkg">ANUPQ</strong> processes with a single command. It is equivalent to executing <code class="code">PqQuit(<var class="Arg">i</var>)</code> for all active interactive <strong class="pkg">ANUPQ</strong> processes <var class="Arg">i</var> (see <code class="func">PqQuit</code> (<a href="chap5.html#X79DB761185BAB9C8"><span class="RefLink">5.1-2</span></a>)).</p>
<p><a id="X7EE8000A800CEE2D" name="X7EE8000A800CEE2D"></a></p>
<h4>5.2 <span class="Heading">Interactive ANUPQ Process Utility Functions</span></h4>
<p><a id="X8558B20A80B999AE" name="X8558B20A80B999AE"></a></p>
<h5>5.2-1 PqProcessIndex</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqProcessIndex</code>( <var class="Arg">i</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqProcessIndex</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p>With argument <var class="Arg">i</var>, which must be a positive integer, <code class="code">PqProcessIndex</code> returns <var class="Arg">i</var> if it corresponds to an active interactive process, or raises an error. With no arguments it returns the default active interactive process or returns <code class="keyw">fail</code> and emits a warning message to <code class="code">Info</code> at <code class="code">InfoANUPQ</code> or <code class="code">InfoWarning</code> level 1.</p>
<p><em>Note:</em> Essentially, an interactive <strong class="pkg">ANUPQ</strong> process <var class="Arg">i</var> is <q>active</q> if <code class="code">ANUPQData.io[<var class="Arg">i</var>]</code> is bound (i.e. we still have some data telling us about it). Also see <code class="func">PqStart</code> (<a href="chap5.html#X83B2EC237F37623C"><span class="RefLink">5.1-1</span></a>).</p>
<p><a id="X7E4A56D67C865291" name="X7E4A56D67C865291"></a></p>
<h5>5.2-2 PqProcessIndices</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqProcessIndices</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p>returns the list of integer indices of all active interactive <strong class="pkg">ANUPQ</strong> processes (see <code class="func">PqProcessIndex</code> (<a href="chap5.html#X8558B20A80B999AE"><span class="RefLink">5.2-1</span></a>) for the meaning of <q>active</q>).</p>
<p><a id="X7C103DF78435AEC7" name="X7C103DF78435AEC7"></a></p>
<h5>5.2-3 IsPqProcessAlive</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsPqProcessAlive</code>( <var class="Arg">i</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsPqProcessAlive</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p>return <code class="keyw">true</code> if the <strong class="pkg">GAP</strong> iostream of the <var class="Arg">i</var>th (or default) interactive <strong class="pkg">ANUPQ</strong> process started by <code class="code">PqStart</code> is alive (i.e. can still be written to), or <code class="keyw">false</code>, otherwise. (See the notes for <code class="func">PqStart</code> (<a href="chap5.html#X83B2EC237F37623C"><span class="RefLink">5.1-1</span></a>) and <code class="func">PqQuit</code> (<a href="chap5.html#X79DB761185BAB9C8"><span class="RefLink">5.1-2</span></a>).)</p>
<p>If the user does not yet have a <code class="code">gap></code> prompt then usually the <code class="code">pq</code> program is still away doing something and an <strong class="pkg">ANUPQ</strong> interface function is still waiting for a reply. Typing a <code class="code">Ctrl-C</code> (i.e. holding down the <code class="code">Ctrl</code> key and typing <code class="code">c</code>) will stop the waiting and send <strong class="pkg">GAP</strong> into a <code class="code">break</code>-loop, from which one has no option but to <code class="code">quit;</code>. The typing of <code class="code">Ctrl-C</code>, in such a circumstance, usually causes the stream of the interactive <strong class="pkg">ANUPQ</strong> process to die; to check this we provide <code class="code">IsPqProcessAlive</code> (see <code class="func">IsPqProcessAlive</code>).</p>
<p>The <strong class="pkg">GAP</strong> iostream of an interactive <strong class="pkg">ANUPQ</strong> process will also die if the <code class="code">pq</code> program has a segmentation fault. We do hope that this never happens to you, but if it does and the failure is reproducible, then it's a bug and we'd like to know about it. Please read the <code class="code">README</code> that comes with the <strong class="pkg">ANUPQ</strong> package to find out what to include in a bug report and who to email it to.</p>
<p><a id="X823D2BBF7C4515D4" name="X823D2BBF7C4515D4"></a></p>
<h4>5.3 <span class="Heading">Interactive Versions of Non-interactive ANUPQ Functions</span></h4>
<p><a id="X85408C4C790439E7" name="X85408C4C790439E7"></a></p>
<h5>5.3-1 Pq</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Pq</code>( <var class="Arg">i:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Pq</code>( <var class="Arg">:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>return, for the fp or pc group (let us call it <var class="Arg">F</var>), of the <var class="Arg">i</var>th or default interactive <strong class="pkg">ANUPQ</strong> process, the <span class="SimpleMath">p</span>-quotient of <var class="Arg">F</var> specified by <var class="Arg">options</var>, as a pc group; <var class="Arg">F</var> must previously have been given (as first argument) to <code class="code">PqStart</code> to start the interactive <strong class="pkg">ANUPQ</strong> process (see <code class="func">PqStart</code> (<a href="chap5.html#X83B2EC237F37623C"><span class="RefLink">5.1-1</span></a>)) or restored from file using the function <code class="code">PqRestorePcPresentation</code> (see <code class="func">PqRestorePcPresentation</code> (<a href="chap5.html#X7FD001C0798EF219"><span class="RefLink">5.6-3</span></a>)). Following the colon <var class="Arg">options</var> is a selection of the options listed for the non-interactive <code class="code">Pq</code> function (see <code class="func">Pq</code> (<a href="chap4.html#X86DD32D5803CF2C8"><span class="RefLink">4.1-1</span></a>)), separated by commas like record components (see Section <a href="../../../doc/ref/chap4_mj.html#X867D54987EF86D1D"><span class="RefLink">Reference: Function Call With Options</span></a> in the <strong class="pkg">GAP</strong> Reference Manual), except that the options <code class="code">SetupFile</code> or <code class="code">PqWorkspace</code> are ignored by the interactive <code class="code">Pq</code>, and <code class="code">RedoPcp</code> is an option only recognised by the interactive <code class="code">Pq</code> i.e. the following options are recognised by the interactive <code class="code">Pq</code> function:</p>
<ul>
<li><p><code class="code">Prime := <var class="Arg">p</var></code></p>
</li>
<li><p><code class="code">ClassBound := <var class="Arg">n</var></code></p>
</li>
<li><p><code class="code">Exponent := <var class="Arg">n</var></code></p>
</li>
<li><p><code class="code">Relators := <var class="Arg">rels</var></code></p>
</li>
<li><p><code class="code">Metabelian</code></p>
</li>
<li><p><code class="code">Identities := <var class="Arg">funcs</var></code></p>
</li>
<li><p><code class="code">GroupName := <var class="Arg">name</var></code></p>
</li>
<li><p><code class="code">OutputLevel := <var class="Arg">n</var></code></p>
</li>
<li><p><code class="code">RedoPcp</code></p>
</li>
</ul>
<p>Detailed descriptions of the above options may be found in Chapter <a href="chap6.html#X7B0946E97E7EB359"><span class="RefLink"><span class="Heading">ANUPQ Options</span></span></a>.</p>
<p>As a minimum the <code class="code">Pq</code> function <em>must</em> have a value for the <code class="code">Prime</code> option, though <code class="code">Prime</code> need not be passed again in the case it has previously been provided, e.g. to <code class="code">PqStart</code> (see <code class="func">PqStart</code> (<a href="chap5.html#X83B2EC237F37623C"><span class="RefLink">5.1-1</span></a>)) when starting the interactive process.</p>
<p>The behaviour of the interactive <code class="code">Pq</code> function depends on the current state of the pc presentation stored by the <code class="code">pq</code> program:</p>
<ol>
<li><p>If no pc presentation has yet been computed (the case immediately after the <code class="code">PqStart</code> call initiating the process) then the quotient group of the input group of the process of largest lower exponent-<var class="Arg">p</var> class bounded by the value of the <code class="code">ClassBound</code> option (see <a href="chap6.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>) is returned.</p>
</li>
<li><p>If the current pc presentation of the process was determined by a previous call to <code class="code">Pq</code> or <code class="code">PqEpimorphism</code>, and the current call has a larger value <code class="code">ClassBound</code> then the class is extended as much as is possible and the quotient group of the input group of the process of the new lower exponent-<var class="Arg">p</var> class is returned.</p>
</li>
<li><p>If the current pc presentation of the process was determined by a previous call to <code class="code">PqPCover</code> then a consistent pc presentation of a quotient for the current class is determined before proceeding as in 2.</p>
</li>
<li><p>If the <code class="code">RedoPcp</code> option is supplied the current pc presentation is scrapped, all options must be re-supplied (in particular, <code class="code">Prime</code> <em>must</em> be supplied) and then the <code class="code">Pq</code> function proceeds as in 1.</p>
</li>
</ol>
<p>See 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> for the attributes and property <code class="code">NuclearRank</code>, <code class="code">MultiplicatorRank</code> and <code class="code">IsCapable</code> which may be applied to the group returned by <code class="code">Pq</code>.</p>
<p>The following is one of the examples for the non-interactive <code class="code">Pq</code> redone with the interactive version. Also, we set the option <code class="code">OutputLevel</code> to 1 (see <a href="chap6.html#X87EE6DD67C9996A3"><span class="RefLink">6.2</span></a>), in order to see the orders of the quotients of all the classes determined, and we set the <code class="code">InfoANUPQ</code> level to 2 (see <code class="func">InfoANUPQ</code> (<a href="chap3.html#X7CBC9B458497BFF1"><span class="RefLink">3.3-1</span></a>)), so that we catch the timing information.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">F := FreeGroup("a", "b");; a := F.1;; b := F.2;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := F / [a^4, b^4];</span>
<fp group on the generators [ a, b ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqStart(G);</span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 2); #To see timing information</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Pq(: Prime := 2, ClassBound := 3, OutputLevel := 1 );</span>
#I Lower exponent-2 central series for [grp]
#I Group: [grp] to lower exponent-2 central class 1 has order 2^2
#I Group: [grp] to lower exponent-2 central class 2 has order 2^5
#I Group: [grp] to lower exponent-2 central class 3 has order 2^8
#I Computation of presentation took 0.00 seconds
<pc group of size 256 with 8 generators>
</pre></div>
<p><a id="X839E6F578227A8EA" name="X839E6F578227A8EA"></a></p>
<h5>5.3-2 PqEpimorphism</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqEpimorphism</code>( <var class="Arg">i:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqEpimorphism</code>( <var class="Arg">:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>return, for the fp or pc group (let us call it <var class="Arg">F</var>), of the <var class="Arg">i</var>th or default interactive <strong class="pkg">ANUPQ</strong> process, an epimorphism from <var class="Arg">F</var> onto the <span class="SimpleMath">p</span>-quotient of <var class="Arg">F</var> specified by <var class="Arg">options</var>; <var class="Arg">F</var> must previously have been given (as first argument) to <code class="code">PqStart</code> to start the interactive <strong class="pkg">ANUPQ</strong> process (see <code class="func">PqStart</code> (<a href="chap5.html#X83B2EC237F37623C"><span class="RefLink">5.1-1</span></a>)). Since the underlying interactions with the <code class="code">pq</code> program effected by the interactive <code class="code">PqEpimorphism</code> are identical to those effected by the interactive <code class="code">Pq</code>, everything said regarding the requirements and behaviour of the interactive <code class="code">Pq</code> function (see <code class="func">Pq</code> (<a href="chap5.html#X85408C4C790439E7"><span class="RefLink">5.3-1</span></a>)) is also the case for the interactive <code class="code">PqEpimorphism</code>.</p>
<p><em>Note:</em> See 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> for the attributes and property <code class="code">NuclearRank</code>, <code class="code">MultiplicatorRank</code> and <code class="code">IsCapable</code> which may be applied to the image group of the epimorphism returned by <code class="code">PqEpimorphism</code>.</p>
<p><a id="X7AA64A2F8509A39A" name="X7AA64A2F8509A39A"></a></p>
<h5>5.3-3 PqPCover</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqPCover</code>( <var class="Arg">i:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqPCover</code>( <var class="Arg">:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>return, for the fp or pc group of the <var class="Arg">i</var>th or default interactive <strong class="pkg">ANUPQ</strong> process, the <span class="SimpleMath">p</span>-covering group of the <span class="SimpleMath">p</span>-quotient <code class="code">Pq(<var class="Arg">i</var> : <var class="Arg">options</var>)</code> or <code class="code">Pq(: <var class="Arg">options</var>)</code>, modulo the following:</p>
<ol>
<li><p>If no pc presentation has yet been computed (the case immediately after the <code class="code">PqStart</code> call initiating the process) and the group <var class="Arg">F</var> of the process is already a <span class="SimpleMath">p</span>-group, in the sense that <code class="code">HasIsPGroup(<var class="Arg">F</var>) and IsPGroup(<var class="Arg">F</var>)</code> is <code class="keyw">true</code>, then</p>
<dl>
<dt><strong class="Mark"><code class="code">Prime</code></strong></dt>
<dd><p>defaults to <code class="code">PrimePGroup(<var class="Arg">F</var>)</code>, if not supplied and <code class="code">HasPrimePGroup(<var class="Arg">F</var>) = true</code>; and</p>
</dd>
<dt><strong class="Mark"><code class="code">ClassBound</code></strong></dt>
<dd><p>defaults to <code class="code">PClassPGroup(<var class="Arg">F</var>)</code> if <code class="code">HasPClassPGroup(<var class="Arg">F</var>) = true</code> if not supplied, or to the usual default of 63, otherwise.</p>
</dd>
</dl>
</li>
<li><p>If a pc presentation has been computed and none of <var class="Arg">options</var> is <code class="code">RedoPcp</code> or if no pc presentation has yet been computed but 1. does not apply then <code class="code">PqPCover(<var class="Arg">i</var> : <var class="Arg">options</var>);</code> is equivalent to:</p>
<div class="example"><pre>
Pq(i : options);
PqPCover(i);
</pre></div>
</li>
<li><p>If the <code class="code">RedoPcp</code> option is supplied the current pc presentation is scrapped, and <code class="code">PqPCover</code> proceeds as in 1. or 2. but without the <code class="code">RedoPcp</code> option.</p>
</li>
</ol>
<p><a id="X805F32618005C087" name="X805F32618005C087"></a></p>
<h5>5.3-4 PqStandardPresentation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PqStandardPresentation</code>( [<var class="Arg">i</var>]<var class="Arg">:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ StandardPresentation</code>( [<var class="Arg">i</var>]<var class="Arg">:</var> <var class="Arg">options</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>return, for the <var class="Arg">i</var>th or default interactive <strong class="pkg">ANUPQ</strong> process, the <var class="Arg">p</var>-quotient of the group <var class="Arg">F</var> of the process, specified by <var class="Arg">options</var>, as an <em>fp group</em> which has a standard presentation. Here <var class="Arg">options</var> is a selection of the options from the following list (see Chapter <a href="chap6.html#X7B0946E97E7EB359"><span class="RefLink"><span class="Heading">ANUPQ Options</span></span></a> for detailed descriptions); this list is the same as for the non-interactive version of <code class="code">PqStandardPresentation</code> except for the omission of options <code class="code">SetupFile</code> and <code class="code">PqWorkspace</code> (see <code class="func">PqStandardPresentation</code> (<a href="chap4.html#X86C9575D7CB65FBB"><span class="RefLink">4.2-1</span></a>)).</p>
<ul>
<li><p><code class="code">Prime := <var class="Arg">p</var></code></p>
</li>
<li><p><code class="code">pQuotient := <var class="Arg">Q</var></code></p>
</li>
<li><p><code class="code">ClassBound := <var class="Arg">n</var></code></p>
</li>
<li><p><code class="code">Exponent := <var class="Arg">n</var></code></p>
</li>
<li><p><code class="code">Metabelian</code></p>
</li>
<li><p><code class="code">GroupName := <var class="Arg">name</var></code></p>
</li>
<li><p><code class="code">OutputLevel := <var class="Arg">n</var></code></p>
</li>
<li><p><code class="code">StandardPresentationFile := <var class="Arg">filename</var></code></p>
</li>
</ul>
<p>Unless <var class="Arg">F</var> is a pc <var class="Arg">p</var>-group, or the option <code class="code">Prime</code> has been passed to a previous interactive function for the process to compute a <var class="Arg">p</var>-quotient for <var class="Arg">F</var>, the user <em>must</em> supply either the option <code class="code">Prime</code> or the option <code class="code">pQuotient</code> (if both <code class="code">Prime</code> and <code class="code">pQuotient</code> are supplied, the prime <var class="Arg">p</var> is determined by applying <code class="code">PrimePGroup</code> (see <code class="func">PrimePGroup</code> (<a href="../../../doc/ref/chap39_mj.html#X87356BAA7E9E2142"><span class="RefLink">Reference: PrimePGroup</span></a>) in the Reference Manual) to the value of <code class="code">pQuotient</code>).</p>
<p>Taking one of the examples for the non-interactive version of <code class="code">StandardPresentation</code> (see <code class="func">StandardPresentation</code> (<a href="chap4.html#X86C9575D7CB65FBB"><span class="RefLink">4.2-1</span></a>)) that required two separate calls to the <code class="code">pq</code> program, we now show how it can be done by setting up a dialogue with just the one <code class="code">pq</code> process, using the interactive version of <code class="code">StandardPresentation</code>:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">F4 := FreeGroup( "a", "b", "c", "d" );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">a := F4.1;; b := F4.2;; c := F4.3;; d := F4.4;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">G4 := F4 / [ b^4, b^2 / Comm(Comm (b, a), a), d^16,</span>
<span class="GAPprompt">></span> <span class="GAPinput"> a^16 / (c * d), b^8 / (d * c^4) ];</span>
<fp group on the generators [ a, b, c, d ]>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoANUPQ, 1); #Only essential Info please</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PqStart(G4); #Start a new interactive process for a new group</span>
2
<span class="GAPprompt">gap></span> <span class="GAPinput">K := Pq( 2 : Prime := 2, ClassBound := 1 ); #`pq' process no. is 2
<pc group of size 4 with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">StandardPresentation( 2 : pQuotient := K, ClassBound := 14 );</span>
<fp group with 53 generators>
</pre></div>
<p><em>Notes</em></p>
<p>In contrast to the function <code class="code">Pq</code> (see <code class="func">Pq</code> (<a href="chap4.html#X86DD32D5803CF2C8"><span class="RefLink">4.1-1</span></a>)) which returns a pc group, <code class="code">PqStandardPresentation</code> or <code class="code">StandardPresentation</code> returns an fp group. This is because the output is mainly used for isomorphism testing for which an fp group is enough. However, the presentation is a polycyclic presentation and if you need to do any further computation with this group (e.g. to find the order) you can use the function <code class="code">PcGroupFpGroup</code> (see <code class="func">PcGroupFpGroup</code> (<a href= | |