Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/gbnp/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 29.7.2024 mit Größe 217 kB image not shown  

Quelle  chapA.html   Sprache: HTML

 
 products/Sources/formale Sprachen/GAP/pkg/gbnp/doc/chapA.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 (GBNP) - Appendix A: Examples</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="chapA"  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="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="chap5.html">[Previous Chapter]</a>    <a href="chapBib.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chapA_mj.html">[MathJax on]</a></p>
<p><a id="X7A489A5D79DA9E5C" name="X7A489A5D79DA9E5C"></a></p>
<div class="ChapSects"><a href="chapA.html#X7A489A5D79DA9E5C">A <span class="Heading">Examples</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7DFB63A97E67C0A1">A.1 <span class="Heading">Introduction</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X784586E47E2739E3">A.2 <span class="Heading">A simple commutative Gröbner basis computation</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7E1B57AA85C2BA70">A.3 <span class="Heading">A truncated Gröbner basis for Leonard pairs</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X79AC59C482A2E4C1">A.4 <span class="Heading">The truncated variant on two weighted homogeneous polynomials</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7C7742957CEC6E7B">A.5 <span class="Heading">The order of the Weyl group of type E<span class="SimpleMath">_6</span></span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7E39C9738509A036">A.6 <span class="Heading">The gcd of some univariate polynomials</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7F5A6ABA85CDB6E2">A.7 <span class="Heading">From the Tapas book</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7C2CD4FA838EEE64">A.8 <span class="Heading">The Birman-Murakami-Wenzl algebra of type A<span class="SimpleMath">_3</span></span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7B5CA7F379B78CE0">A.9 <span class="Heading">The Birman-Murakami-Wenzl algebra of type A<span class="SimpleMath">_2</span></span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X83C81C987A4DE15F">A.10 <span class="Heading">A commutative example by Mora</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7CAB94A37D580C4A">A.11 <span class="Heading">Tracing an example by Mora</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X8599AE8F7E9E0368">A.12 <span class="Heading"> Finiteness of the Weyl group of type E<span class="SimpleMath">_6</span></span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7B1822C67CF83041">A.13 <span class="Heading">Preprocessing for Weyl group computations</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7BE4A97886B0930E">A.14 <span class="Heading">A quotient algebra with exponential growth</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X78679D7D80CD8822">A.15 <span class="Heading">A commutative quotient algebra of polynomial growth</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7CE3005580EF632D">A.16 <span class="Heading">An algebra over a finite field</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7E4CEC577A18C8ED">A.17 <span class="Heading">The dihedral group of order 8</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X83328C357FB33D17">A.18 <span class="Heading">The dihedral group of order 8 on another module</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X85DBF3967C4DF5FE">A.19 <span class="Heading">The dihedral group on a non-cyclic module</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X78FCAC347D9D607E">A.20 <span class="Heading">The icosahedral group</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X780C4B777FEA9080">A.21 <span class="Heading">The symmetric inverse monoid for a set of size four</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X84C07DC479FBBCD5">A.22 <span class="Heading">A module of the Hecke algebra of type
A<span class="SimpleMath">_3</span> over GF(3)</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X78C01D1987FEF3FE">A.23 <span class="Heading">Generalized Temperley-Lieb algebras</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X85A9CEF087F3936B">A.24 <span class="Heading">The universal enveloping
algebra of a Lie algebra</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X8498D69D8160E5FF">A.25 <span class="Heading">Serre's exercise

</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X8116448A84D69022">A.26 <span class="Heading">Baur and Draisma's transformations
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapA.html#X7912E411867E5F8B">A.27 <span class="Heading">The cola gene puzzle</span></a>
</span>
</div>
</div>

<h3>A <span class="Heading">Examples</span></h3>

<p><a id="X7DFB63A97E67C0A1" name="X7DFB63A97E67C0A1"></a></p>

<h4>A.1 <span class="Heading">Introduction</span></h4>

<p>In this chapter all available commented examples can be found. Those without comments are in the directory <code class="file">gbnp/examples</code>. Timing results are obtained on an Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz processor running Linux (3.19.0-42-generic #48~14.04.1-Ubuntu SMP Fri Dec 18 10:24:49 UTC 2015) and using GAP 4.6.5.</p>


<ul>
<li><p><a href="chapA.html#X784586E47E2739E3"><span class="RefLink">A.2</span></a> <a href="chapA.html#X784586E47E2739E3"><span class="RefLink"><span class="Heading">A simple commutative Gröbner basis computation</span></span></a></p>

</li>
<li><p><a href="chapA.html#X7E1B57AA85C2BA70"><span class="RefLink">A.3</span></a> <a href="chapA.html#X7E1B57AA85C2BA70"><span class="RefLink"><span class="Heading">A truncated Gröbner basis for Leonard pairs</span></span></a></p>

</li>
<li><p><a href="chapA.html#X79AC59C482A2E4C1"><span class="RefLink">A.4</span></a> <a href="chapA.html#X79AC59C482A2E4C1"><span class="RefLink"><span class="Heading">The truncated variant on two weighted homogeneous polynomials</span></span></a></p>

</li>
<li><p><a href="chapA.html#X7C7742957CEC6E7B"><span class="RefLink">A.5</span></a> <a href="chapA.html#X7C7742957CEC6E7B"><span class="RefLink"><span class="Heading">The order of the Weyl group of type E<span class="SimpleMath">_6</span></span></span></a></p>

</li>
<li><p><a href="chapA.html#X7E39C9738509A036"><span class="RefLink">A.6</span></a> <a href="chapA.html#X7E39C9738509A036"><span class="RefLink"><span class="Heading">The gcd of some univariate polynomials</span></span></a></p>

</li>
<li><p><a href="chapA.html#X7F5A6ABA85CDB6E2"><span class="RefLink">A.7</span></a> <a href="chapA.html#X7F5A6ABA85CDB6E2"><span class="RefLink"><span class="Heading">From the Tapas book</span></span></a></p>

</li>
<li><p><a href="chapA.html#X7C2CD4FA838EEE64"><span class="RefLink">A.8</span></a> <a href="chapA.html#X7C2CD4FA838EEE64"><span class="RefLink"><span class="Heading">The Birman-Murakami-Wenzl algebra of type A<span class="SimpleMath">_3</span></span></span></a></p>

</li>
<li><p><a href="chapA.html#X7B5CA7F379B78CE0"><span class="RefLink">A.9</span></a> <a href="chapA.html#X7B5CA7F379B78CE0"><span class="RefLink"><span class="Heading">The Birman-Murakami-Wenzl algebra of type A<span class="SimpleMath">_2</span></span></span></a></p>

</li>
<li><p><a href="chapA.html#X83C81C987A4DE15F"><span class="RefLink">A.10</span></a> <a href="chapA.html#X83C81C987A4DE15F"><span class="RefLink"><span class="Heading">A commutative example by Mora</span></span></a></p>

</li>
<li><p><a href="chapA.html#X7CAB94A37D580C4A"><span class="RefLink">A.11</span></a> <a href="chapA.html#X7CAB94A37D580C4A"><span class="RefLink"><span class="Heading">Tracing an example by Mora</span></span></a></p>

</li>
<li><p><a href="chapA.html#X8599AE8F7E9E0368"><span class="RefLink">A.12</span></a> <a href="chapA.html#X8599AE8F7E9E0368"><span class="RefLink"><span class="Heading"> Finiteness of the Weyl group of type E<span class="SimpleMath">_6</span></span></span></a></p>

<p>This extends Example <a href="chapA.html#X7C7742957CEC6E7B"><span class="RefLink">A.5</span></a>.</p>

</li>
<li><p><a href="chapA.html#X7B1822C67CF83041"><span class="RefLink">A.13</span></a> <a href="chapA.html#X7B1822C67CF83041"><span class="RefLink"><span class="Heading">Preprocessing for Weyl group computations</span></span></a></p>

<p>This extends two earlier examples <a href="chapA.html#X7C7742957CEC6E7B"><span class="RefLink">A.5</span></a> and <a href="chapA.html#X8599AE8F7E9E0368"><span class="RefLink">A.12</span></a>.</p>

</li>
<li><p><a href="chapA.html#X7BE4A97886B0930E"><span class="RefLink">A.14</span></a> <a href="chapA.html#X7BE4A97886B0930E"><span class="RefLink"><span class="Heading">A quotient algebra with exponential growth</span></span></a></p>

</li>
<li><p><a href="chapA.html#X78679D7D80CD8822"><span class="RefLink">A.15</span></a> <a href="chapA.html#X78679D7D80CD8822"><span class="RefLink"><span class="Heading">A commutative quotient algebra of polynomial growth</span></span></a></p>

<p>This extends Example <a href="chapA.html#X7F5A6ABA85CDB6E2"><span class="RefLink">A.7</span></a>.</p>

</li>
<li><p><a href="chapA.html#X7CE3005580EF632D"><span class="RefLink">A.16</span></a> <a href="chapA.html#X7CE3005580EF632D"><span class="RefLink"><span class="Heading">An algebra over a finite field</span></span></a></p>

</li>
<li><p><a href="chapA.html#X7E4CEC577A18C8ED"><span class="RefLink">A.17</span></a> <a href="chapA.html#X7E4CEC577A18C8ED"><span class="RefLink"><span class="Heading">The dihedral group of order 8</span></span></a></p>

</li>
<li><p><a href="chapA.html#X83328C357FB33D17"><span class="RefLink">A.18</span></a> <a href="chapA.html#X83328C357FB33D17"><span class="RefLink"><span class="Heading">The dihedral group of order 8 on another module</span></span></a></p>

<p>This extends Example <a href="chapA.html#X7E4CEC577A18C8ED"><span class="RefLink">A.17</span></a>.</p>

</li>
<li><p><a href="chapA.html#X85DBF3967C4DF5FE"><span class="RefLink">A.19</span></a> <a href="chapA.html#X85DBF3967C4DF5FE"><span class="RefLink"><span class="Heading">The dihedral group on a non-cyclic module</span></span></a></p>

<p>This example also extends Example <a href="chapA.html#X7E4CEC577A18C8ED"><span class="RefLink">A.17</span></a>.</p>

</li>
<li><p><a href="chapA.html#X78FCAC347D9D607E"><span class="RefLink">A.20</span></a> <a href="chapA.html#X78FCAC347D9D607E"><span class="RefLink"><span class="Heading">The icosahedral group</span></span></a></p>

</li>
<li><p><a href="chapA.html#X780C4B777FEA9080"><span class="RefLink">A.21</span></a> <a href="chapA.html#X780C4B777FEA9080"><span class="RefLink"><span class="Heading">The symmetric inverse monoid for a set of size four</span></span></a></p>

</li>
<li><p><a href="chapA.html#X84C07DC479FBBCD5"><span class="RefLink">A.22</span></a> <a href="chapA.html#X84C07DC479FBBCD5"><span class="RefLink"><span class="Heading">A module of the Hecke algebra of type A<span class="SimpleMath">_3</span> over GF(3)</span></span></a></p>

</li>
<li><p><a href="chapA.html#X78C01D1987FEF3FE"><span class="RefLink">A.23</span></a> <a href="chapA.html#X78C01D1987FEF3FE"><span class="RefLink"><span class="Heading">Generalized Temperley-Lieb algebras</span></span></a></p>

</li>
<li><p><a href="chapA.html#X85A9CEF087F3936B"><span class="RefLink">A.24</span></a> <a href="chapA.html#X85A9CEF087F3936B"><span class="RefLink"><span class="Heading">The universal enveloping algebra of a Lie algebra</span></span></a></p>

</li>
<li><p><a href="chapA.html#X8498D69D8160E5FF"><span class="RefLink">A.25</span></a> <a href="chapA.html#X8498D69D8160E5FF"><span class="RefLink"><span class="Heading">Serre's exercise



</li>
<li><p><a href="chapA.html#X8116448A84D69022"><span class="RefLink">A.26</span></a> <a href="chapA.html#X8116448A84D69022"><span class="RefLink"><span class="Heading">Baur and Draisma's transformations



</li>
<li><p><a href="chapA.html#X7912E411867E5F8B"><span class="RefLink">A.27</span></a> <a href="chapA.html#X7912E411867E5F8B"><span class="RefLink"><span class="Heading">The cola gene puzzle</span></span></a></p>

</li>
</ul>
<p><a id="X784586E47E2739E3" name="X784586E47E2739E3"></a></p>

<h4>A.2 <span class="Heading">A simple commutative Gröbner basis computation</span></h4>

<p>In this commutative example the relations are <span class="SimpleMath">x^2y-1</span> and <span class="SimpleMath">xy^2-1</span>; we add <span class="SimpleMath">xy-yx</span> to enforce that <span class="SimpleMath">x</span> and <span class="SimpleMath">y</span> commute. The answer should be <span class="SimpleMath">{x^3-1, x-y, xy-yx}</span>, as the reduction ordering is total degree first and then lexicographic with <span class="SimpleMath">x</span> smaller than <span class="SimpleMath">y</span>.</p>

<p>First load the package and set the standard infolevel <code class="func">InfoGBNP</code> (<a href="chap4.html#X82D40B0E84383BBC"><span class="RefLink">4.2-1</span></a>) to 2 and the time infolevel <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) to 1 (for more information about the info level, see Chapter <a href="chap4.html#X79C5DF3782576D98"><span class="RefLink">4</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LoadPackage("gbnp", false);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,2);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNPTime,1);</span>
</pre></div>

<p>Then input the relations in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>). They will be put in the list <code class="code">Lnp</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Lnp := [ [[[1,2],[2,1]],[1,-1]]   ];</span>
[ [ [ [ 1, 2 ], [ 2, 1 ] ], [ 1, -1 ] ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">x2y := [[[1,1,2],[]],[1,-1]];</span>
[ [ [ 1, 1, 2 ], [  ] ], [ 1, -1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">    AddSet(Lnp,x2y);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">xy2 := [[[1,2,2],[]],[1,-1]];</span>
[ [ [ 1, 2, 2 ], [  ] ], [ 1, -1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">    AddSet(Lnp,xy2);</span>
</pre></div>

<p>The relations can be exhibited with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(Lnp);</span>
 a^2b - 1
 ab - ba
 ab^2 - 1
</pre></div>

<p>Let the variables be printed as <span class="SimpleMath">x</span> and <span class="SimpleMath">y</span> instead of <span class="SimpleMath">a</span> and <span class="SimpleMath">b</span> by means of <code class="func">GBNP.ConfigPrint</code> (<a href="chap3.html#X7F7510A878045D3A"><span class="RefLink">3.2-2</span></a>)</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint("x","y");</span>
</pre></div>

<p>The Gröbner basis can now be calculated with <code class="func">SGrobner</code> (<a href="chap3.html#X7FEDA29E78B0CEED"><span class="RefLink">3.4-2</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobner(Lnp);</span>
#I  number of entered polynomials is 3
#I  number of polynomials after reduction is 3
#I  End of phase I
#I  End of phase II
#I  length of G =1
#I  length of todo is 1
#I  length of G =2
#I  length of todo is 0
#I  List of todo lengths is [ 1, 1, 0 ]
#I  End of phase III
#I  G: Cleaning finished, 0 polynomials reduced
#I  End of phase IV
#I  The computation took 4 msecs.
[ [ [ [ 2 ], [ 1 ] ], [ 1, -1 ] ], [ [ [ 1, 1, 1 ], [  ] ], [ 1, -1 ] ] ]
</pre></div>

<p>When printed, it looks like:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);</span>
 y - x
 x^3 - 1
</pre></div>

<p>The dimension of the quotient algebra can be calculated with <code class="func">DimQA</code> (<a href="chap3.html#X81A50EEE7B56C723"><span class="RefLink">3.5-2</span></a>). The arguments are the Gröbner basis <code class="code">GB</code> and the number of variables is <code class="code">2</code>:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DimQA(GB,2);</span>
3
</pre></div>

<p>A basis of this quotient algebra can be calculated with <code class="func">BaseQA</code> (<a href="chap3.html#X7EAA04247B2C6330"><span class="RefLink">3.5-1</span></a>). The arguments are a Gröbner basis <code class="code">GB</code>, the number of variables <var class="Arg">t</var> (<span class="SimpleMath">=2</span>) and a variable <var class="Arg">maxno</var> for returning partial quotient algebras (0 means full basis). The calculated basis will be printed as well.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B:=BaseQA(GB,2,0);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(B);</span>
 1
 x
 x^2
</pre></div>

<p>The strong normal form of the element <span class="SimpleMath">xyxyxyx</span> can be found by use of <code class="func">StrongNormalFormNP</code> (<a href="chap3.html#X8563683E7FA604F8"><span class="RefLink">3.5-6</span></a>). The arguments are this element and the Gröbner basis <code class="code">GB</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=[[[1,2,1,2,1,2,1]],[1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(f);</span>
 xyxyxyx
<span class="GAPprompt">gap></span> <span class="GAPinput">p:=StrongNormalFormNP(f,GB);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p);</span>
 x
</pre></div>

<p><a id="X7E1B57AA85C2BA70" name="X7E1B57AA85C2BA70"></a></p>

<h4>A.3 <span class="Heading">A truncated Gröbner basis for Leonard pairs</span></h4>

<p>To provide Terwilliger with experimental dimension information in low degrees for his theory of Leonard pairs a truncated Gröbner basis computation was carried out as follows.</p>

<p>First load the package and set the standard infolevel <code class="func">InfoGBNP</code> (<a href="chap4.html#X82D40B0E84383BBC"><span class="RefLink">4.2-1</span></a>) to 1 and the time infolevel <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) to 2 (for more information about the info level, see Chapter <a href="chap4.html#X79C5DF3782576D98"><span class="RefLink">4</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LoadPackage("gbnp", false);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNPTime,2);</span>
</pre></div>

<p>We truncate the example by putting all monomials of degree <span class="SimpleMath">n</span> in the ideal by means of the function <code class="code">MkTrLst</code> to be introduced below; a better way to compute the result is by means of the truncated GB algorithms (See <a href="chapA.html#X85A9CEF087F3936B"><span class="RefLink">A.24</span></a>).</p>

<p>We want to truncate at degree 7 so we have fixed <span class="SimpleMath">n = 8</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">n := 8;;</span>
</pre></div>

<p>Now enter the relations in NP form (see <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>). The function <code class="code">MkTrLst</code> will be introduced, which will return all monomials of degree <code class="code">n</code>. The list of ideal generators of interest is called <code class="code">I</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">sqbr := function(n,q) ; return (q^3-q^-3)/(q-q^(-1)); end;;</span>

<span class="GAPprompt">gap></span> <span class="GAPinput">c := sqbr(3,5);</span>
651/25

<span class="GAPprompt">gap></span> <span class="GAPinput">s1 :=[[[1,1,1,2],[1,1,2,1],[1,2,1,1],[2,1,1,1]],[1,-c,c,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">s2 :=[[[2,2,2,1],[2,2,1,2],[2,1,2,2],[1,2,2,2]],[1,-c,c,-1]];;</span>

<span class="GAPprompt">gap></span> <span class="GAPinput">MkTrLst := function(l) local ans, h1, h2, a, i;</span>
<span class="GAPprompt">></span> <span class="GAPinput">   ans := [[1],[2]];</span>
<span class="GAPprompt">></span> <span class="GAPinput">   for i in [2..l] do</span>
<span class="GAPprompt">></span> <span class="GAPinput">      h1 := [];</span>
<span class="GAPprompt">></span> <span class="GAPinput">      h2 := [];</span>
<span class="GAPprompt">></span> <span class="GAPinput">      for a in ans do</span>
<span class="GAPprompt">></span> <span class="GAPinput">        Add(h1,Concatenation([1],a));</span>
<span class="GAPprompt">></span> <span class="GAPinput">        Add(h2,Concatenation([2],a));</span>
<span class="GAPprompt">></span> <span class="GAPinput">      od;</span>
<span class="GAPprompt">></span> <span class="GAPinput">      ans := Concatenation(h1,h2);</span>
<span class="GAPprompt">></span> <span class="GAPinput">   od;</span>
<span class="GAPprompt">></span> <span class="GAPinput">   return List(ans, a -> [[a],[1]]);</span>
<span class="GAPprompt">></span> <span class="GAPinput">end;;</span>

<span class="GAPprompt">gap></span> <span class="GAPinput">I := Concatenation([s1,s2],MkTrLst(n));;</span>
</pre></div>

<p>To give an impression, we print the first 20 entries of this list:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(I{[1..20]});</span>
 a^3b - 651/25a^2ba + 651/25aba^2 - ba^3
 b^3a - 651/25b^2ab + 651/25bab^2 - ab^3
 a^8
 a^7b
 a^6ba
 a^6b^2
 a^5ba^2
 a^5bab
 a^5b^2a
 a^5b^3
 a^4ba^3
 a^4ba^2b
 a^4baba
 a^4bab^2
 a^4b^2a^2
 a^4b^2ab
 a^4b^3a
 a^4b^4
 a^3ba^4
 a^3ba^3b
</pre></div>

<p>We calculate the Gröbner basis with <code class="func">SGrobner</code> (<a href="chap3.html#X7FEDA29E78B0CEED"><span class="RefLink">3.4-2</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobner(I);;</span>
#I  number of entered polynomials is 258
#I  number of polynomials after reduction is 114
#I  End of phase I
#I  End of phase II
#I  End of phase III
#I  Time needed to clean G :0
#I  End of phase IV
#I  The computation took 176 msecs.
</pre></div>

<p>Now print the first part of the Gröbner basis with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>) (only the first 20 polynomials are printed here, the full Gröbner basis can be printed with <code class="code">PrintNPList(GB)</code>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB{[1..20]});</span>
 ba^3 - 651/25aba^2 + 651/25a^2ba - a^3b
 b^3a - 651/25b^2ab + 651/25bab^2 - ab^3
 b^2a^2ba - bab^2a^2 - baba^2b + ba^2bab + ab^2aba - abab^2a - aba^2b^2 + a^2b\
^2ab
 b^2ab^2a^2 - 651/25b^2ababa + b^2aba^2b + 626/25bab^2aba - bab^2a^2b + babab^\
2a - ba^2b^2ab + ba^2bab^2 - 651/25ab^2ab^2a + ab^2abab + 423176/625abab^2ab -\
 423801/625ababab^2 + 626/25aba^2b^3 - 406901/625a^2b^2ab^2 + 423176/625a^2bab\
^3 - 651/25a^3b^4
 a^8
 a^7b
 a^6ba
 a^6b^2
 a^5ba^2
 a^5bab
 a^5b^2a
 a^5b^3
 a^4ba^2b
 a^4baba
 a^4bab^2
 a^4b^2a^2
 a^4b^2ab
 a^4b^4
 a^3ba^2ba
 a^3ba^2b^2
</pre></div>

<p>The truncated quotient algebra is obtained by factoring out the ideal generated by the Gröbner basis <code class="code">GB</code> and so its dimension can be calculated with <code class="func">DimQA</code> (<a href="chap3.html#X81A50EEE7B56C723"><span class="RefLink">3.5-2</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DimQA(GB,2);</span>
#I  The computation took 0 msecs.
157
</pre></div>

<p>Here is what Paul Terwilliger wrote in reaction to the computation carried out by this example:</p>

<p>I just wanted to thank you again for the dimension data that you gave me after the Durham meeting. It ended up having a large impact. See the attached paper; joint with Tatsuro Ito.</p>

<p>I spent several weeks in Japan this past January, working with Tatsuro and trying to find a good basis for the algebra on two symbols subject to the <span class="SimpleMath">q</span>-Serre relations. After much frustration, we thought of feeding your data into Sloane's online handbook of integer sequences. We did it out of curiosity more than anything; we did not expect the handbook data to be particularly useful. But it was.



<p>The handbook told us that the graded dimension generating functionusing your data for the coefficients, matched the <span class="SimpleMath">q</span>-series for the inverse of the Jacobi theta function <span class="SimpleMath">ϑ_4</span>; armed with this overwhelming hint we were able to prove that the graded dimension generating function was indeed given by the inverse of <span class="SimpleMath">ϑ_4</span>. With that info we were able to get a nice result about td pairs.</p>

<p>Paul</p>

<p><a id="X79AC59C482A2E4C1" name="X79AC59C482A2E4C1"></a></p>

<h4>A.4 <span class="Heading">The truncated variant on two weighted homogeneous polynomials</span></h4>

<p>Here we exhibit a truncated non-commutative homogeneous weighted Gröbner basis computation. This example uses the functions from Section <a href="chap3.html#X7E4E3AD07B2465F9"><span class="RefLink">3.8</span></a>, the truncation variants (see also Section <a href="chap2.html#X78CF5C44879D34B6"><span class="RefLink">2.6</span></a>).</p>

<p>The input is a set of polynomials in <span class="SimpleMath">x</span> and <span class="SimpleMath">y</span>, which are homogeneous when the weight of <span class="SimpleMath">x</span> is 2 and of <span class="SimpleMath">y</span> is 3. The input is <span class="SimpleMath">{x^3y^2-x^6+y^4,y^2x^3+xyxyx+x^2yxy}</span>. We truncate the computation at degree 16. The truncated Gröbner basiis <span class="SimpleMath">{y^2x^3+xyxyx+x^2yxy,x^6-x^3y^2-y^4,x^3y^2x-x^4y^2-xy^4}</span> and the dimension of the quotient algebra is 134.</p>

<p>First load the package and set the standard infolevel <code class="func">InfoGBNP</code> (<a href="chap4.html#X82D40B0E84383BBC"><span class="RefLink">4.2-1</span></a>) to 1 and the time infolevel <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) to 1 (for more information about the info level, see Chapter <a href="chap4.html#X79C5DF3782576D98"><span class="RefLink">4</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LoadPackage("gbnp", false);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNPTime,1);</span>
</pre></div>

<p>The variables will be printed as <span class="SimpleMath">x</span> and <span class="SimpleMath">y</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint("x","y");</span>
</pre></div>

<p>The level to truncate at is assigned to <span class="SimpleMath">n</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">n := 16;;</span>
</pre></div>

<p>Now enter the relations in NP form (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>) and the weights.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s1 :=[[[1,1,1,2,2],[1,1,1,1,1,1],[2,2,2,2]],[1,-1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">s2 :=[[[2,2,1,1,1],[1,2,1,2,1],[1,1,2,1,2]],[1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">K := [s1,s2];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">weights:=[2,3];;</span>
</pre></div>

<p>The input can be printed with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>)</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(K);</span>
 x^3y^2 - x^6 + y^4
 y^2x^3 + xyxyx + x^2yxy
</pre></div>

<p>Verify whether the list <code class="code">K</code> consists only of polynomials that are homogeneous with respect to <code class="code">weights</code> by means of <code class="func">CheckHomogeneousNPs</code> (<a href="chap3.html#X83C9E598798D5809"><span class="RefLink">3.8-3</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">CheckHomogeneousNPs(K,weights);</span>
#I  Input is homogeneous
[ 12, 12 ]
</pre></div>

<p>Now calculate the truncated Gröbner basis with <code class="func">SGrobnerTrunc</code> (<a href="chap3.html#X7CD043E081BF2302"><span class="RefLink">3.8-2</span></a>). The output will only contain homogeneous polynomials of degree at most <code class="code">n</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := SGrobnerTrunc(K,n,weights);;</span>
#I  number of entered polynomials is 2
#I  number of polynomials after reduction is 2
#I  End of phase I
#I  Input is homogeneous
#I  Reached level 16
#I  end of the algorithm
#I  The computation took 4 msecs.
</pre></div>

<p>The Gröbner basis of the truncated quotient algebra can be printed with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(G);</span>
 y^2x^3 + xyxyx + x^2yxy
 x^6 - x^3y^2 - y^4
 x^3y^2x - x^4y^2 + y^4x - xy^4
</pre></div>

<p>The standard basis of the quotient of the free noncommutative algebra on <span class="SimpleMath">n</span> variables, where <span class="SimpleMath">n</span> is the length of the vector <code class="code">weights</code>, by the homogeneous ideal generated by <code class="code">K</code> up to degree <span class="SimpleMath">n</span> is obtained by means of the function <code class="func">BaseQATrunc</code> (<a href="chap3.html#X7E33C064875D95CA"><span class="RefLink">3.8-4</span></a>) applied to <code class="code">K</code>, <code class="code">n</code>, and <code class="code">weights</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B := BaseQATrunc(K,n,weights);;</span>
#I  number of entered polynomials is 2
#I  number of polynomials after reduction is 2
#I  End of phase I
#I  Input is homogeneous
#I  Reached level 16
#I  end of the algorithm
#I  The computation took 0 msecs.
<span class="GAPprompt">gap></span> <span class="GAPinput">i := Length(B);</span>
17
<span class="GAPprompt">gap></span> <span class="GAPinput">Print("at level ",i-1," the standard monomials are:\n");
at level 16 the standard monomials are:
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(List(B[i], qq -> [[qq],[1]]));</span>
 yxyx^4
 yx^2yx^3
 xyxyx^3
 yx^3yx^2
 xyx^2yx^2
 x^2yxyx^2
 y^4x^2
 yx^4yx
 xyx^3yx
 x^2yx^2yx
 x^3yxyx
 y^3xyx
 y^2xy^2x
 yxy^3x
 xy^4x
 yx^5y
 xyx^4y
 x^2yx^3y
 x^3yx^2y
 y^3x^2y
 x^4yxy
 y^2xyxy
 yxy^2xy
 xy^3xy
 x^5y^2
 y^2x^2y^2
 yxyxy^2
 xy^2xy^2
 yx^2y^3
 xyxy^3
 x^2y^4
</pre></div>

<p>The same result can be obtained by using the truncated Gröbner basis found for <code class="code">G</code> instead of <code class="code">K</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B2 := BaseQATrunc(G,n,weights);;</span>
#I  number of entered polynomials is 3
#I  number of polynomials after reduction is 3
#I  End of phase I
#I  Input is homogeneous
#I  Reached level 16
#I  end of the algorithm
#I  The computation took 0 msecs.
<span class="GAPprompt">gap></span> <span class="GAPinput">B = B2;</span>
true
</pre></div>

<p>Also, the same result can be obtained by using the leading terms of the truncated Gröbner basis found for <code class="code">G</code> instead of <code class="code">K</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B3 := BaseQATrunc(List( LMonsNP(G), qq -> [[qq],[1]]),n,weights);;</span>
#I  number of entered polynomials is 3
#I  number of polynomials after reduction is 3
#I  End of phase I
#I  Input is homogeneous
#I  Reached level 16
#I  end of the algorithm
#I  The computation took 0 msecs.
<span class="GAPprompt">gap></span> <span class="GAPinput">B = B3;</span>
true
</pre></div>

<p>A list of dimensions of the homogeneous parts of the quotient algebra up to degree <span class="SimpleMath">n</span> is obtained by means of <code class="func">DimsQATrunc</code> (<a href="chap3.html#X7C6882DB837A9F5A"><span class="RefLink">3.8-5</span></a>) with arguments <code class="code">G</code>, <code class="code">n</code>, and <code class="code">weights</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DimsQATrunc(G,n,weights);</span>
#I  number of entered polynomials is 3
#I  number of polynomials after reduction is 3
#I  End of phase I
#I  Input is homogeneous
#I  Reached level 16
#I  end of the algorithm
#I  The computation took 4 msecs.
[ 1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 10, 16, 17, 24, 31 ]
</pre></div>

<p>Even more detailed information is given by the list of frequencies up to degree <code class="code">n</code>. This is obtained by means of <code class="func">FreqsQATrunc</code> (<a href="chap3.html#X7FBA7F1D79DA883F"><span class="RefLink">3.8-6</span></a>) with arguments <code class="code">G</code>, <code class="code">n</code>, and <code class="code">weights</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">FreqsQATrunc(G,n,weights);</span>
#I  number of entered polynomials is 3
#I  number of polynomials after reduction is 3
#I  End of phase I
#I  Input is homogeneous
#I  Reached level 16
#I  end of the algorithm
#I  The computation took 0 msecs.
[ [ [ [  ], 1 ] ], [ [ [ 1, 0 ], 1 ] ], [ [ [ 0, 1 ], 1 ] ],
  [ [ [ 2, 0 ], 1 ] ], [ [ [ 1, 1 ], 2 ] ],
  [ [ [ 3, 0 ], 1 ], [ [ 0, 2 ], 1 ] ], [ [ [ 2, 1 ], 3 ] ],
  [ [ [ 4, 0 ], 1 ], [ [ 1, 2 ], 3 ] ], [ [ [ 3, 1 ], 4 ], [ [ 0, 3 ], 1 ] ],
  [ [ [ 5, 0 ], 1 ], [ [ 2, 2 ], 6 ] ], [ [ [ 4, 1 ], 5 ], [ [ 1, 3 ], 4 ] ],
  [ [ [ 3, 2 ], 9 ], [ [ 0, 4 ], 1 ] ], [ [ [ 5, 1 ], 6 ], [ [ 2, 3 ], 10 ] ],
  [ [ [ 4, 2 ], 12 ], [ [ 1, 4 ], 5 ] ],
  [ [ [ 6, 1 ], 5 ], [ [ 3, 3 ], 18 ], [ [ 0, 5 ], 1 ] ],
  [ [ [ 5, 2 ], 16 ], [ [ 2, 4 ], 15 ] ] ]
</pre></div>

<p><a id="X7C7742957CEC6E7B" name="X7C7742957CEC6E7B"></a></p>

<h4>A.5 <span class="Heading">The order of the Weyl group of type E<span class="SimpleMath">_6</span></span></h4>

<p>In order to show how the order of a finite group of manageable size with a manageable presentation can be computed, we determine the order of the Weyl group of type E<span class="SimpleMath">_6</span>. This number is well known to be 51840.</p>

<p>First load the package and set the standard infolevel <code class="func">InfoGBNP</code> (<a href="chap4.html#X82D40B0E84383BBC"><span class="RefLink">4.2-1</span></a>) to 1 and the time infolevel <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) to 2 (for more information about the info level, see Chapter <a href="chap4.html#X79C5DF3782576D98"><span class="RefLink">4</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LoadPackage("gbnp", false);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNPTime,2);</span>
</pre></div>

<p>Then input the relations in NP format (see <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>). They come from the presentation of the Weyl group as a Coxeter group. This means that there are six variables, one for each generator. We let the corresponding variables be printed as <span class="SimpleMath">r_1</span>, ..., <span class="SimpleMath">r_6</span> by means of <code class="func">GBNP.ConfigPrint</code> (<a href="chap3.html#X7F7510A878045D3A"><span class="RefLink">3.2-2</span></a>)</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint(6,"r");</span>
</pre></div>

<p>The relations are binomial and represent the group relations, which express that the generators are involutions (that ishave order 2) and that the orders of the products of any two generators is specified by the Coxeter diagram (see any book on Coxeter groups for details). The relations will be assigned to <code class="code">KI</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">k1 := [[[1,3,1],[3,1,3]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k2 := [[[4,3,4],[3,4,3]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k3 := [[[4,2,4],[2,4,2]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k4 := [[[4,5,4],[5,4,5]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k5 := [[[6,5,6],[5,6,5]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k6 := [[[1,2],[2,1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k7 := [[[1,4],[4,1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k8 := [[[1,5],[5,1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k9 := [[[1,6],[6,1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k10 := [[[2,3],[3,2]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k11 := [[[2,5],[5,2]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k12 := [[[2,6],[6,2]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k13 := [[[3,5],[5,3]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k14 := [[[3,6],[6,3]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k15 := [[[4,6],[6,4]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k16 := [[[1,1],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k17 := [[[2,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k18 := [[[3,3],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k19 := [[[4,4],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k20 := [[[5,5],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">k21 := [[[6,6],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">KI := [k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,</span>
<span class="GAPprompt">></span> <span class="GAPinput">       k11,k12,k13,k14,k15,k16,k17,k18,k19,k20,k21</span>
<span class="GAPprompt">></span> <span class="GAPinput">      ];;</span>
</pre></div>

<p>The relations can be shown with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(KI);</span>
 r.1r.3r.1 - r.3r.1r.3
 r.4r.3r.4 - r.3r.4r.3
 r.4r.2r.4 - r.2r.4r.2
 r.4r.5r.4 - r.5r.4r.5
 r.6r.5r.6 - r.5r.6r.5
 r.1r.2 - r.2r.1
 r.1r.4 - r.4r.1
 r.1r.5 - r.5r.1
 r.1r.6 - r.6r.1
 r.2r.3 - r.3r.2
 r.2r.5 - r.5r.2
 r.2r.6 - r.6r.2
 r.3r.5 - r.5r.3
 r.3r.6 - r.6r.3
 r.4r.6 - r.6r.4
 r.1^2 - 1
 r.2^2 - 1
 r.3^2 - 1
 r.4^2 - 1
 r.5^2 - 1
 r.6^2 - 1
</pre></div>

<p>The Gröbner basis can now be calculated with <code class="func">SGrobner</code> (<a href="chap3.html#X7FEDA29E78B0CEED"><span class="RefLink">3.4-2</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobner(KI);;</span>
#I  number of entered polynomials is 21
#I  number of polynomials after reduction is 21
#I  End of phase I
#I  End of phase II
#I  End of phase III
#I  Time needed to clean G :0
#I  End of phase IV
#I  The computation took 132 msecs.
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);</span>
 r.1^2 - 1
 r.2r.1 - r.1r.2
 r.2^2 - 1
 r.3r.2 - r.2r.3
 r.3^2 - 1
 r.4r.1 - r.1r.4
 r.4^2 - 1
 r.5r.1 - r.1r.5
 r.5r.2 - r.2r.5
 r.5r.3 - r.3r.5
 r.5^2 - 1
 r.6r.1 - r.1r.6
 r.6r.2 - r.2r.6
 r.6r.3 - r.3r.6
 r.6r.4 - r.4r.6
 r.6^2 - 1
 r.3r.1r.2 - r.2r.3r.1
 r.3r.1r.3 - r.1r.3r.1
 r.4r.2r.4 - r.2r.4r.2
 r.4r.3r.4 - r.3r.4r.3
 r.5r.4r.5 - r.4r.5r.4
 r.6r.5r.6 - r.5r.6r.5
 r.4r.3r.1r.4 - r.3r.4r.3r.1
 r.5r.4r.2r.5 - r.4r.5r.4r.2
 r.5r.4r.3r.5 - r.4r.5r.4r.3
 r.6r.5r.4r.6 - r.5r.6r.5r.4
 r.4r.2r.3r.4r.2 - r.3r.4r.2r.3r.4
 r.4r.2r.3r.4r.3 - r.2r.4r.2r.3r.4
 r.5r.4r.2r.3r.5 - r.4r.5r.4r.2r.3
 r.5r.4r.3r.1r.5 - r.4r.5r.4r.3r.1
 r.6r.5r.4r.2r.6 - r.5r.6r.5r.4r.2
 r.6r.5r.4r.3r.6 - r.5r.6r.5r.4r.3
 r.4r.2r.3r.1r.4r.2 - r.3r.4r.2r.3r.1r.4
 r.5r.4r.2r.3r.1r.5 - r.4r.5r.4r.2r.3r.1
 r.6r.5r.4r.2r.3r.6 - r.5r.6r.5r.4r.2r.3
 r.6r.5r.4r.3r.1r.6 - r.5r.6r.5r.4r.3r.1
 r.4r.2r.3r.1r.4r.3r.1 - r.2r.4r.2r.3r.1r.4r.3
 r.5r.4r.2r.3r.4r.5r.4 - r.4r.5r.4r.2r.3r.4r.5
 r.6r.5r.4r.2r.3r.1r.6 - r.5r.6r.5r.4r.2r.3r.1
 r.6r.5r.4r.2r.3r.4r.6 - r.5r.6r.5r.4r.2r.3r.4
 r.5r.4r.2r.3r.1r.4r.5r.4 - r.4r.5r.4r.2r.3r.1r.4r.5
 r.6r.5r.4r.2r.3r.1r.4r.6 - r.5r.6r.5r.4r.2r.3r.1r.4
 r.6r.5r.4r.2r.3r.1r.4r.3r.6 - r.5r.6r.5r.4r.2r.3r.1r.4r.3
 r.6r.5r.4r.2r.3r.4r.5r.6r.5 - r.5r.6r.5r.4r.2r.3r.4r.5r.6
 r.5r.4r.2r.3r.1r.4r.3r.5r.4r.3 - r.4r.5r.4r.2r.3r.1r.4r.3r.5r.4
 r.6r.5r.4r.2r.3r.1r.4r.5r.6r.5 - r.5r.6r.5r.4r.2r.3r.1r.4r.5r.6
 r.5r.4r.2r.3r.1r.4r.3r.5r.4r.2r.3 - r.4r.5r.4r.2r.3r.1r.4r.3r.5r.4r.2
 r.6r.5r.4r.2r.3r.1r.4r.3r.5r.6r.5 - r.5r.6r.5r.4r.2r.3r.1r.4r.3r.5r.6
 r.6r.5r.4r.2r.3r.1r.4r.3r.5r.4r.6r.5r.4 - r.5r.6r.5r.4r.2r.3r.1r.4r.3r.5r.4r.\
6r.5
 r.6r.5r.4r.2r.3r.1r.4r.3r.5r.4r.2r.6r.5r.4r.2 - r.5r.6r.5r.4r.2r.3r.1r.4r.3r.\
5r.4r.2r.6r.5r.4
</pre></div>

<p>The base of the quotient algebra can be calculated with <code class="func">BaseQA</code> (<a href="chap3.html#X7EAA04247B2C6330"><span class="RefLink">3.5-1</span></a>), which has as arguments a Gröbner basis <code class="code">GB</code>, a number of symbols <code class="code">6</code> and a maximum terms to be found (here 0 is entered, for a full base) . Since it is very long we will not print it here.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B:=BaseQA(GB,6,0);;</span>
</pre></div>

<p>The dimension of the quotient algebra can be calculated with <code class="func">DimQA</code> (<a href="chap3.html#X81A50EEE7B56C723"><span class="RefLink">3.5-2</span></a>), the arguments are the Gröbner basis <code class="code">GB</code> and the number of symbols <code class="code">6</code>. Since <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) is set to 2, we get timing information from <code class="func">DimQA</code> (<a href="chap3.html#X81A50EEE7B56C723"><span class="RefLink">3.5-2</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DimQA(GB,6);</span>
#I  The computation took 172 msecs.
51840
</pre></div>

<p>Note that the calculation of the dimension takes almost as long as calculating the base. Since we have already calculated a base <code class="code">B</code> it is much more efficient to calculate the dimension with <code class="code">Length</code>:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Length(B);</span>
51840
</pre></div>

<p><a id="X7E39C9738509A036" name="X7E39C9738509A036"></a></p>

<h4>A.6 <span class="Heading">The gcd of some univariate polynomials</span></h4>

<p>A list of univariate polynomials is generated. The result of the Gröbner basis computation on this list should be a single monic polynomial, their gcd.</p>

<p>First load the package and set the standard infolevel <code class="func">InfoGBNP</code> (<a href="chap4.html#X82D40B0E84383BBC"><span class="RefLink">4.2-1</span></a>) to 2 and the time infolevel <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) to 1 (for more information about the info level, see Chapter <a href="chap4.html#X79C5DF3782576D98"><span class="RefLink">4</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LoadPackage("gbnp", false);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,2);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNPTime,1);</span>
</pre></div>

<p>Let the single variable be printed as x by means of <code class="func">GBNP.ConfigPrint</code> (<a href="chap3.html#X7F7510A878045D3A"><span class="RefLink">3.2-2</span></a>)</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint("x");</span>
</pre></div>

<p>Now input the relations in NP format (see <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>). They will be assigned to <code class="code">KI</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p0 := [[[1,1,1],[1,1],[1],[]],[1,2,2,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,1,1],[1,1],[]],[1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">KI := [p0,p1];;</span>

<span class="GAPprompt">gap></span> <span class="GAPinput">for i in [2..12] do</span>
<span class="GAPprompt">></span> <span class="GAPinput">    h := AddNP(AddNP(KI[i],KI[i-1],1,3),</span>
<span class="GAPprompt">></span> <span class="GAPinput">      AddNP(BimulNP([1],KI[i],[]),KI[i-1],2,1),3,-5);</span>
<span class="GAPprompt">></span> <span class="GAPinput">    Add(KI,h);</span>
<span class="GAPprompt">></span> <span class="GAPinput">od;</span>
</pre></div>

<p>The relations can be shown with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(KI);</span>
 x^3 + 2x^2 + 2x + 1
 x^4 + x^2 + 1
 - 10x^5 + 3x^4 - 6x^3 + 11x^2 - 2x + 7
 100x^6 - 60x^5 + 73x^4 - 128x^3 + 57x^2 - 76x + 25
 - 1000x^7 + 900x^6 - 950x^5 + 1511x^4 - 978x^3 + 975x^2 - 486x + 103
 10000x^8 - 12000x^7 + 12600x^6 - 18200x^5 + 14605x^4 - 13196x^3 + 8013x^2 - 2\
792x + 409
 - 100000x^9 + 150000x^8 - 166000x^7 + 223400x^6 - 204450x^5 + 181819x^4 - 123\
630x^3 + 55859x^2 - 14410x + 1639
 1000000x^10 - 1800000x^9 + 2150000x^8 - 2780000x^7 + 2765100x^6 - 2504340x^5 \
+ 1840177x^4 - 982264x^3 + 343729x^2 - 70788x + 6553
 - 10000000x^11 + 21000000x^10 - 27300000x^9 + 34850000x^8 - 36655000x^7 + 342\
32300x^6 - 26732590x^5 + 16070447x^4 - 6878602x^3 + 1962503x^2 - 335534x + 262\
15
 100000000x^12 - 240000000x^11 + 340000000x^10 - 437600000x^9 + 479700000x^8 -\
 463408000x^7 + 381083200x^6 - 250919600x^5 + 124358069x^4 - 44189892x^3 + 106\
17765x^2 - 1551904x + 104857
 - 1000000000x^13 + 2700000000x^12 - 4160000000x^11 + 5480000000x^10 - 6219000\
000x^9 + 6212580000x^8 - 5347676000x^7 + 3789374800x^6 - 2103269850x^5 + 87925\
4915x^4 - 266261734x^3 + 55222347x^2 - 7046418x + 419431
 10000000000x^14 - 30000000000x^13 + 50100000000x^12 - 68240000000x^11 + 79990\
000000x^10 - 82533200000x^9 + 74033300000x^8 - 55790408000x^7 + 33925155700x^6\
 - 16106037100x^5 + 5797814361x^4 - 1527768240x^3 + 278602281x^2 - 31541180x +\
 1677721
 - 100000000000x^15 + 330000000000x^14 - 595000000000x^13 + 843500000000x^12 -\
 1021260000000x^11 + 1087222000000x^10 - 1012808600000x^9 + 804854300000x^8 - \
528013485000x^7 + 277993337300x^6 - 114709334310x^5 + 36188145143x^4 - 8434374\
466x^3 + 1372108031x^2 - 139586422x + 6710887
<span class="GAPprompt">gap></span> <span class="GAPinput">Length(KI);</span>
13
</pre></div>

<p>The Gröbner basis can now be calculated with <code class="func">SGrobner</code> (<a href="chap3.html#X7FEDA29E78B0CEED"><span class="RefLink">3.4-2</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobner(KI);;</span>
#I  number of entered polynomials is 13
#I  number of polynomials after reduction is 1
#I  End of phase I
#I  End of phase II
#I  List of todo lengths is [ 0 ]
#I  End of phase III
#I  G: Cleaning finished, 0 polynomials reduced
#I  End of phase IV
#I  The computation took 0 msecs.
</pre></div>

<p>Printed it looks like:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);</span>
 x^2 + x + 1
</pre></div>

<p><a id="X7F5A6ABA85CDB6E2" name="X7F5A6ABA85CDB6E2"></a></p>

<h4>A.7 <span class="Heading">From the Tapas book</span></h4>

<p>This example is a standard commutative Gröbner basis computation from the book Some Tapas of Computer Algebra <a href="chapBib.html#biBCohenCuypersSterk1999">[CCS99]</a>, page 339. There are six variables, named <span class="SimpleMath">a</span>, ... , <span class="SimpleMath">f</span> by default. We work over the rationals and study the ideal generated by the twelve polynomials occurring on the middle of page 339 of the Tapas book in a project by De Boer and Pellikaan on the ternary cyclic code of length 11. Below these are named <code class="code">p1</code>, ..., <code class="code">p12</code>. The result should be the union of <span class="SimpleMath">{a,b}</span> and the set of 6 homogeneous binomials (that is, polynomials with two terms) of degree 2 forcing commuting between <span class="SimpleMath">c</span>, <span class="SimpleMath">d</span>, <span class="SimpleMath">e</span>, and <span class="SimpleMath">f</span>.</p>

<p>First load the package and set the standard infolevel <code class="func">InfoGBNP</code> (<a href="chap4.html#X82D40B0E84383BBC"><span class="RefLink">4.2-1</span></a>) to 2 and the time infolevel <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) to 1 (for more information about the info level, see Chapter <a href="chap4.html#X79C5DF3782576D98"><span class="RefLink">4</span></a>).</p>


<div (*  Title:      HOL/TLA/Memory/MemClerk.thy    Author:     Stephan Merz, University of     
<span class="GAPprompt">gap></span> <span class="GAPinput">LoadPackage("gbnp", false);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,2);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNPTime,1);</span>
</pre></div>

<p>Now define some functions which will help in the construction of relations. The function <code class="code">powermon(g, exp)</code> will return the monomial <span class="SimpleMath">g^exp</span>. The function <code class="code">comm(a, b)</code> will return a relation forcing commutativity between its two arguments <code class="code">a</code> and <code class="code">b</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">powermon := function(base, exp)</span>
<span class="GAPprompt">></span> <span class="GAPinput"> local ans,i;</span>
<span class="GAPprompt">></span> <span class="GAPinput"> ans := [];</span>
<span class="GAPprompt">></span> <span class="GAPinput"> for i in [1..exp] do ans :=  Concatenation(ans,[base]); od;</span>
<span class="GAPprompt">></span> <span class="GAPinput"> return ans;</span>
<span class="GAPprompt">></span> <span class="GAPinput">end;;</span>

<span class="GAPprompt">gap></span> <span class="GAPinput">comm := function(a,b)</span>
<span class="GAPprompt">></span> <span class="GAPinput">  return [[[a,b],[b,a]],[1,-1]];</span>
<span class="GAPprompt">></span> <span class="GAPinput">end;;</span>
</pre></div>

<p>Now the relations are entered.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[5,1]],[1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[powermon(1,3),[6,1]],[1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p3 := [[powermon(1,9),Concatenation([3],powermon(1,3))],[1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p4 := [[powermon(1,81),Concatenation([3],powermon(1,9)),</span>
<span class="GAPprompt">></span> <span class="GAPinput">  Concatenation([4],powermon(1,3))],[1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p5 := [[Concatenation([3],powermon(1,81)),Concatenation([4],powermon(1,9)),</span>
<span class="GAPprompt">></span> <span class="GAPinput">  Concatenation([5],powermon(1,3))],[1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p6 := [[powermon(1,27),Concatenation([4],powermon(1,81)),Concatenation([5],</span>
<span class="GAPprompt">></span> <span class="GAPinput">  powermon(1,9)),Concatenation([6],powermon(1,3))],[1,1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p7 := [[powermon(2,1),Concatenation([3],powermon(1,27)),Concatenation([5],</span>
<span class="GAPprompt">></span> <span class="GAPinput">  powermon(1,81)),Concatenation([6],powermon(1,9))],[1,1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p8 := [[Concatenation([3],powermon(2,1)),Concatenation([4],powermon(1,27)),</span>
<span class="GAPprompt">></span> <span class="GAPinput">  Concatenation([6],powermon(1,81))],[1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p9 := [[Concatenation([],powermon(1,1)),Concatenation([4],powermon(2,1)),</span>
<span class="GAPprompt">></span> <span class="GAPinput">  Concatenation([5],powermon(1,27))],[1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p10 := [[Concatenation([3],powermon(1,1)),Concatenation([5],powermon(2,1)),</span>
<span class="GAPprompt">></span> <span class="GAPinput">  Concatenation([6],powermon(1,27))],[1,1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p11 := [[Concatenation([4],powermon(1,1)),Concatenation([6],powermon(2,1))],</span>
<span class="GAPprompt">></span> <span class="GAPinput">  [1,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p12 := [[Concatenation([],powermon(2,3)),Concatenation([],powermon(2,1))],</span>
<span class="GAPprompt">></span> <span class="GAPinput">  [1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">KI := [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">for i in [1..5] do</span>
<span class="GAPprompt">></span> <span class="GAPinput">    for j in [i+1..6] do</span>
<span class="GAPprompt">></span> <span class="GAPinput">        Add(KI,comm(i,j));</span>
<span class="GAPprompt">></span> <span class="GAPinput">    od;</span>
<span class="GAPprompt">></span> <span class="GAPinput">od;</span>
</pre></div>

<p>The relations can be shown with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(KI);</span>
 ea
 a^3 + fa
 a^9 + ca^3
 a^81 + ca^9 + da^3
 ca^81 + da^9 + ea^3
 a^27 + da^81 + ea^9 + fa^3
 b + ca^27 + ea^81 + fa^9
 cb + da^27 + fa^81
 a + db + ea^27
 ca + eb + fa^27
 da + fb
 b^3 - b
 ab - ba
 ac - ca
 ad - da
 ae - ea
 af - fa
 bc - cb
 bd - db
 be - eb
 bf - fb
 cd - dc
 ce - ec
 cf - fc
 de - ed
 df - fd
 ef - fe
<span class="GAPprompt">gap></span> <span class="GAPinput">Length(KI);</span>
27
</pre></div>

<p>It is sometimes easier to enter the relations as elements of a free algebra and then use the function <code class="func">GP2NP</code> (<a href="chap3.html#X7B0EBCBC7857F1AE"><span class="RefLink">3.1-1</span></a>) or the function <code class="func">GP2NPList</code> (<a href="chap3.html#X7CF0ED937DDA5A7E"><span class="RefLink">3.1-2</span></a>) to convert them. This will be demonstrated below. More about converting can be read in Section <a href="chap3.html#X81ABB91B79E00229"><span class="RefLink">3.1</span></a>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">F:=Rationals;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne(F,"a","b","c","d","e","f");;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">a:=A.a;; b:=A.b;; c:=A.c;; d:=A.d;; e:=A.e;; f:=A.f;;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">KI_gp:=[e*a,                         #p1</span>
<span class="GAPprompt">></span> <span class="GAPinput">        a^3 + f*a,                      #p2</span>
<span class="GAPprompt">></span> <span class="GAPinput">        a^9 + c*a^3,                    #p3</span>
<span class="GAPprompt">></span> <span class="GAPinput">        a^81 + c*a^9 + d*a^3,           #p4</span>
<span class="GAPprompt">></span> <span class="GAPinput">        c*a^81 + d*a^9 + e*a^3,         #p5</span>
<span class="GAPprompt">></span> <span class="GAPinput">        a^27 + d*a^81 + e*a^9 + f*a^3,  #p6</span>
<span class="GAPprompt">></span> <span class="GAPinput">        b + c*a^27 + e*a^81 + f*a^9,    #p7</span>
<span class="GAPprompt">></span> <span class="GAPinput">        c*b + d*a^27 + f*a^81,          #p8</span>
<span class="GAPprompt">></span> <span class="GAPinput">        a + d*b + e*a^27,               #p9</span>
<span class="GAPprompt">></span> <span class="GAPinput">        c*a + e*b + f*a^27,             #p10</span>
<span class="GAPprompt">></span> <span class="GAPinput">        d*a + f*b,                      #p11</span>
<span class="GAPprompt">></span> <span class="GAPinput">        b^3 - b];;                      #p12</span>
</pre></div>

<p>These relations can be converted to NP form (see <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>) with <code class="func">GP2NPList</code> (<a href="chap3.html#X7CF0ED937DDA5A7E"><span class="RefLink">3.1-2</span></a>). For use in a Gröbner basis computation we have to order the NP polynomials in <code class="code">KI</code>. This can be done with <code class="func">CleanNP</code> (<a href="chap3.html#X855F3D4C783000E3"><span class="RefLink">3.3-7</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">KI_np:=GP2NPList(KI_gp);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Apply(KI,x->CleanNP(x));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">KI_np=KI{[1..12]};</span>
true
</pre></div>

<p>The Gröbner basis can now be calculated with <code class="func">SGrobner</code> (<a href="chap3.html#X7FEDA29E78B0CEED"><span class="RefLink">3.4-2</span></a>) and printed with <code class="func">PrintNPList</code> (<a href="chap3.html#X832103DC79A9E9D0"><span class="RefLink">3.2-3</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobner(KI);;</span>
#I  number of entered polynomials is 27
#I  number of polynomials after reduction is 8
#I  End of phase I
#I  End of phase II
#I  List of todo lengths is [ 0 ]
#I  End of phase III
#I  G: Cleaning finished, 0 polynomials reduced
#I  End of phase IV
#I  The computation took 748 msecs.
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);</span>
 a
 b
 dc - cd
 ec - ce
 ed - de
 fc - cf
 fd - df
 fe - ef
</pre></div>

<p><a id="X7C2CD4FA838EEE64" name="X7C2CD4FA838EEE64"></a></p>

<h4>A.8 <span class="Heading">The Birman-Murakami-Wenzl algebra of type A<span class="SimpleMath">_3</span></span></h4>

<p>We study the Birman-Murakami-Wenzl algebra of type A<span class="SimpleMath">_3</span> as an algebra given by generators and relations. A reference for the relations used is <a href="chapBib.html#biBMR2124811">[CGW05]</a>.</p>

<p>First load the package and set the standard infolevel <code class="func">InfoGBNP</code> (<a href="chap4.html#X82D40B0E84383BBC"><span class="RefLink">4.2-1</span></a>) to 1 and the time infolevel <code class="func">InfoGBNPTime</code> (<a href="chap4.html#X7FAE244E80397B9A"><span class="RefLink">4.3-1</span></a>) to 1 (for more information about the info level, see Chapter <a href="chap4.html#X79C5DF3782576D98"><span class="RefLink">4</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">LoadPackage("gbnp", false);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNPTime,1);</span>
</pre></div>

<p>The variables are <span class="SimpleMath">g_1</span>, <span class="SimpleMath">g_2</span>, <span class="SimpleMath">g_3</span>, <span class="SimpleMath">e_1</span>, <span class="SimpleMath">e_2</span>, <span class="SimpleMath">e_3</span>, in this order. In order to have the results printed out with these symbols, we invoke <code class="func">GBNP.ConfigPrint</code> (<a href="chap3.html#X7F7510A878045D3A"><span class="RefLink">3.2-2</span></a>)</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint("g1","g2","g3","e1","e2","e3");</span>
</pre></div>

<p>Now enter the relations. This will be done in NP form (see <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>). The inderminates <span class="SimpleMath">m</span> and <span class="SimpleMath">l</span> in the coefficient ring of the Birman-Murakami-Wenzl algebra are specialized to 7 and 11 in order to make the computations more efficient.</p>


<div class="example"><pre>
--> --------------------

--> maximum size reached

--> --------------------

100%


¤ Dauer der Verarbeitung: 0.28 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.