|
|
|
|
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 d | | |