Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Impressum chap3.html   Sprache: HTML

 

 products/Sources/formale Sprachen/GAP/pkg/gbnp/doc/chap3.html


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         http:/ww.3.rg/R/html1/TD/html1-trict.>

<html xmlns="http://www.w3.< class="ontSSbr/<pan ="ocss"&bsp&;/>a=".tml#80D4D22C7E643C7B"3.- IsGrobnerBasisa<span>
<head>
<title>GAP (GBNP) - Chapter 3: 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(span class="< /< class=nocss"&;nbsp<span<href=c.tmlX7D17F9027F08CF0B">.4 IsStrongGrobnerBasis<a>/pan>
</ead>
<body classspan class="ontSS"<r /<pan class=nocss"&bsp;nbsp;/pan>a href="chap3.tml#8752DA1A7CAF77D3"3.6 MakeGrobnerPair</a><span>


</><div

<div class="div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7F387F7780425B9A">3.5 <span class="Heading">Finite-dimensional quotient

<p id="mathjaxlink" class="pcenter"><a href="chap3_mj.html">[MathJax on]</a>span class=ContSS"<r/<span =nocss"&;nbsp;span>ahref=chap3.html#7EAA04247B2C6330"3.1BaseQA<a>span>
<>a id=X86FA580F8055B274 =X86FA580F8055B274"></a></p>
<div class="ChapSects"><a href="chap3.html#X86FA580F8055B274">3 <span class="Heading">Functions</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X81ABB91B79E00229">3.1 <span class="Heading">Converting polynomials
            into different formats</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7B0EBCBC7857F1AE">3.1-1 GP2NP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7CF0ED937DDA5A7E">3.1-2GP2NPLista>/pan>
<pan class="ontSS">br /><span class="nocss">  </span><a href="chap3.html#X86C3912F781ABEDC">3.1-3 NP2GP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X844A23EA7D97150C">3.1-4 NP2GPList</a></span>
</iv<div
<div class="ContSect"><span classspan =">br /span class=n"&bsp;;/>a href".tml#80C4D0E882B05FDF">3.- MulQA<a><span>
</spanspan class=ContSS">br /<pan class=nocss"&bsp;nbsp;/pan>a href="hap3.html#8563683E7FA604F8">.- StrongNormalFormNP<a<span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7B63BEA87A8D6162">3.2-1 PrintNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7F7510A878045D3A">3.2-2 GBNP.ConfigPrint</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X832103DC79A9E9D0">3.2-3 PrintNPList</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X83DE3F817EA74727">3.3 <span class="Heading">Calculating with polynomials in NP format</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7DB3792385AAA805">3.3-1 NumAlgGensNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X865548F07C74AB0A">3.3-2 NumAlgGensNPList</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X782647C57D148379">3.3-3 NumModGensNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X8119282084CA8076">3.3-4 NumModGensNPList</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X788E1ACA82A833A8">3.3-5 AddNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X84FC611A822D808F">3.3-6 BimulNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X855F3D4C783000E3">3.3-7 CleanNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7D05B60E83FDA567">3.3-8 GtNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X8075AE7E7A8088FF">3.3-9 LtNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7A42AE79811CC5D7">3.3-10 LMonNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X80CD462F794A8095">3.3-11 LTermNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X878A8C027DA25196">3.3-12 MkMonicNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X818147CD841BD490">3.3-13 FactorOutGcdNP</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7ABA720E87EFF040">3.3-14 MulNP</a></span>
</div></div>
<div class="</div></div
</
<div class="ContSSBlock">
<div classC"
<span class="ContSS"><span class="ContSS"><br class=nocss"> &bsp;/>a href="chap3htmlXCCA7"3.- DetermineGrowthQA</><span>
<pan=ContSS"<r /<pan class="java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 136
<span class="ContSS"><br /><span class</a</pan
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.java.lang.StringIndexOutOfBoundsException: Range [0, 85) out of bounds for length 12
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X8752DA1A7CAF77D3trace variant</pan>/>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X813454F6799B1D57">3/>/pan>
        algebras</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7EAA04247B2C6330">3.5-1span ="ontSS"br/<pan =""&;nbsp<span<a  href=chap3.tmlX8039BEE77C070FB1.- PrintTracePola<span
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X81A50EEE7B56C723">3.5-2 DimQA</a></span>
<span =C"<br ><span ="ocss>nbsp;/>a ="hap3.tmlX7DFA841A8425DD94"3.5-.53MatrixQA<a<span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X78E4BF2F7F0D5E74">3.5-4 MatricesQA</a></span>
<class"ontSS"br /spanclass"ocss"&bsp&;/<a href="hap3.html#X80C4D0E882B05FDF">3.5-5 MulQA</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X8563683E7FA604F8">3.5-6 StrongNormalFormNP</a</iv>/iv>
</iv<div
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href=<>
<< class=ContSS"><r /spanclass=nocss" nbsp;/panhref"hap3.tml#7A489A5D79DA9E5C">381< class"eading"Examples</pan>/>
<div class="ContSSBlock">
<span class="ContSS"><br /></>
<class"ontSS"</< ="&bsp&;/span>a ="hap3html3.- FinCheckQA<a><span>
<span class="ContSS"><br /><span class="ContSS"><br /><span>nbsp;nbsp;/>ahref"hap3.tml#X83C9E598798D5809">.-CheckHomogeneousNPs>/>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X863124677B933CEE">3.6-4 PreprocessAnalysisQA</a></span>
</>/>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span>span =ContSS>br/spanclass=n>&<span< href=chap3.tml#7C6882DB837A9F5A">.- DimsQATrunc/>/panjava.lang.StringIndexOutOfBoundsException: Index 133 out of bounds for length 133
            trace variant</span></a>
</span
<div class="ContSSBlock">
< ="ontSS"<r /<pan class>nbsp;&bsp;<span>a href=chap3.tmlX813454F6799B1D57">3.7-1 EvalTrace</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X83D1560C7F2A04BA">3.7-2 PrintTraceList</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X8039BEE77C070FB1">3.7-3 PrintTracePol</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7DD0B56D7BD6CD98">3.7-4 PrintNPListTrace</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X78AE6EED83B97595">3.7-5 SGrobnerTrace</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X8219059A86A54130">3.7-6 StrongNormalFormTraceDiff</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7E4E3AD07B2465F9">3.8 <span class="Heading">Functions of the truncated variant</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><r/< class"ocss">nbsp&<span<hrefc.#7A489A5D79DA9E5C">3.8-1 <span class="Heading">Examples</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7CD043E081BF2302">3.8-2 SGrobnerTrunc</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X83C9E598798D5809">3.8-3 CheckHomogeneousNPs</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7E33C064875D95CA">3.8-4 BaseQATrunc</a></span>
<span">3.8-5 DimsQATrunc</a><span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7FBA7F1D79DA883F">3.spanclass=ContSS"br >spanclass">nbsp&;/pan>< =c.tml"3.- MulQM<a>span>
</spanclass"ontSS"><br /<span class=nocss" nbsp;/span> href=chap3.html#87D51A8379C50A80"3.- StrongNormalFormNPM<a>/pan>
=ContSect">span class"ocline>span class"nocss"&bsp/>ahref"chap3.#">39 <panclass=H"Functionsofthemodulevariant/>/>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X860966487ED88A43">3.9-1 SGrobnerModule</a></span>
<span class="p>eturns:If < class="Arg">gp</var> is an element of a free algebra, then the polynomial in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="java.lang.StringIndexOutOfBoundsException: Index 174 out of bounds for length 0
<span class="ContSS"><br /><span class="nocss">  </span
<span class=C"<r >span class=nocss"&; </span><a href="chap3.html#X805FB42A7EEF510F">3.9-4 MulQM</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X87D51A8379C50A80">3.9-5 StrongNormalFormNPM</a></span>
</div></div>
</div>

<h3>3 <span class="Heading">Functions</span></h3>

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

<h4>3.1 <span class="Heading">Converting polynomials
            into different formats</span></h4>

<p><a id="X7B0EBCBC7857F1AE" name="X7B0EBCBC7857F1AE

<h5>3.1-1 GP2NP</h5>

<div class="func"><table classspan class=GAPprompt">ap&t;span>< =GAPinput"AFreeAssociativeAlgebraWithOneRationalsa,b);;/pan
pReturns  < class="="Arg"gp</var> is  afree ,then the  in  format(ee Section < href=chap2.tml#7DF3E5E7F33D3A2">spanclass"efLink"2.<span>/> corresponding to varclass=Arg"</ar>; if var =A"gp<var  an element  free module, then the vectorinNPM format (eeSectiona href=chap2.tml#7B27E2D1784538DE"<pan class=RefLink"2.<span> correspondingto<classA">gp</ar>./>

<p>This function will convert an element of a free algebra to a< class"APprompt"gapgt<span spanclass"APinput">e:();/>

<p><em>Example:</em> Let <code class="code">A</code> be the free associative algebra with one over the rationals/re<div


<div class="example"><pre>
<span java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
<class"APprompt">ap&>/>< =G"a:=.;/>
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
<span class="GAPprompt">gap></span> <span class="GAPinput">e:=One(Apre<div
<span class="GAPprompt">gap></span> <span class="GAPinput">z:=Zero(A);;</span>
>/>

<p="code><code>be the polynomial <panclass=SimpleMath"baabe/span><p>


<div class="example"><pre>
<class=GAPprompt">ap&t;/pan><span class=GAPinput"gp:b*-ab-;/pan>
(-1)*<java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
</pre></div>

<p>The polynomial in NP format, corresponding to <code class="code">gp</code> can now be obtained with GP2NP:</p>


<div class="example"><pre
<span <div class=>pre
[[[2,1 ]  ,2 ,[ ]],[1,-,- ]]
</pre></div>

<p>Let


<div class="example"><pre>
<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></span classGAPprompt>ap&t;/>java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 117

<p>Take the following list <code class="code">R</code> of two elements of <code class="code">D</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := [ [b-e, z], [e+a*(e+a+b), -e-a*(e+a+b)] ];;</span>
</pre></div>

<p>Convert the list <code class="code">R</code> to a list of vectors in NPM format.</p>


<java.lang.StringIndexOutOfBoundsException: Range [10, 4) out of bounds for length 26
<span class="GAPprompt">gap></span ="GAPprompt"&t;< spanclass"APinput>R,P2NP)<>
[ [ [ [ -1, 2 ], [ -1 ] ], [ 1, -1 ] ],
  [ [ [ -,2 ] [- ]][1 1  ,
1]  2 ]]  ,1 1 1,1 1 ,- ] ]
</pre></div>

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

<h5>3.1-2 GP2NPList</h5>

<java.lang.StringIndexOutOfBoundsException: Range [43, 4) out of bounds for length 218
<ar class="Arg">Lgp</var>.</p>

<p>This function has the same effect as <code class="code">List(Lgp,GBNP)</code>.</p>

<p><em>Example:</em> Let <code class="code">A</code> be the free associative algebra with one over the rationals on the generators <code class="code">a</code> and <code class="code">b</code>. Let <code class="code">e</code


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne(Rationals,"a","b");;</span>
<><span><pan class=GAPinput"a:A.;<span
<span java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">e:=One(A);;</
</re<div

<p>Let <code class="code">


<div class="example"><pre>
<span java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 122
[(1)&; ..&t;()^,(1*l;dentity.&;()b^,
  (-1)*<identity ...>+(-1)*a*b+(1)*b*a ]
/pre<div

<p>The span classGAPprompt> spanclass"APinput>:b;/>


<iv class=e"<>
<span class="GAPprompt">gap></span> <span class="GAPinput">GP2NPList(Lgp)<>/>
[ [[[1,1 ],[ ]] [1,- ] ] [[[2,2 ] [ ]] [1,- ]]
  [ [
</pre></div>

<p>Theclass=GAPprompt">ap&t;/>< =G">gp:[^e,^e*a-*-]<span>


<div (-1)*lt;dentity .&;(1)a*+1)* ]
<span class=GAPprompt">ap&t;/>< =GAPinput">List(Lgp,P2NP =GP2NPList(gp)<span>
true
</pre></div>

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

<h5>3.<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 84

<div class="[[[1 1] [ ]]  1 - ]] [[[ 2,2]  ]] [1,- ]]java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
<>:The GAP format of the polynomial < class"rg">p<var  NP ./>

<p>This function will convert a />/iv>

le<em  <ode class=""A/>be the free associative algebra with one over the rationals onthegeneratorscodeclass"ode>a<code>and code ="ode><code./>


<div class="example"><pre>
<span class="div =e"<
</pre></div>

<p>Let <code class="< class="GAPprompt">gap></span> <span class="GAPinput">List(Lgp,GP2NP) = GP2NPList(Lgp);</span>


<div class
<span class=GAPprompt>&t;<span><pan class=GAPinput">p:=   2,1 ] [1,2 , [  ,[Z(^,Z() ()]];</>
</pre></div>

<divclass"func"< class"unc"width"00%>tr>td class="dleft>codeclass"unc"&8227;NP2GP/(<varclass"rg"np<var> <ar ="rg"A/><td<class"dright>&;function&bsp;<td>/><table<div>


example"<re>
<span java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
(()0)b*+Z()**+Z(3)*lt;dentity ..gt;
</pre></div>

<>Note that  information the coefficient field of a polynomial <ode class=code"np<code>in NP format  be obtained from the second list of <code class="code">np</code>.</p>


<div class="example"><pre>
<span class=GAPprompt">gap&t;<span>< class=GAPinput"One(p[]1];/
Z(3)^0
</pre></div>

<>Now let <ode class"ode"M/>  the module <odeclass"ode"A2/>andlet <ode class=code">pm<code>be a polynomial over thatmodule   form./>


<div class=example>pre
<pan class=GAPprompt">ap&t;/>< =GAPinput"np:[[[2,1] [1, ,[ ]] [ Z()0,Z(3) ()]];/>
<span class="GAPprompt/>/>
</pre></div>

<p>The element of <var class="Arg">M</var> corresponding to <code


<div class="example"><span class"APprompt>&;/pan spanclass"APinputNP2GP(p,)/>
spanclass"APprompt>>/>java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 82
[ (Z<>/iv>
</pre></div>

<p>If <code class="code">M</code> is a module of


<div class="span class="GAPprompt">gap></span> <span class="GAPinput">One(np[2][1]);</span>
<span class="GAPprompt">gap&p>ow let <code class="ode"M<code>be the  < class"ode"A^<>  code class=code">pm</code be a polynomial   module in NPM form./>
<span div classexample>pre>
<span class=GAPprompt">gap>/pan> <span  class=GAPinput">:A^;</pan>
<class"APprompt"gap&t;/>< class=GAPinput"List(np, m -&; NP2GP(,);/panjava.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
[ [ <zero> of ..., (p> element  varclass=Arg"M<var> to < class"ode"<code is<p>
</pre></div>

<>aid="" name=>/>p

<h5>3.1-4 NP2GPList</h5>

<div class="func"><p> < class=code"><>isa moduleof dimension 2 over codeclass"code">  codeclass"ode></ode>a list of polynomials in NPM format,  thepolynomials can be converted to thecorresponding of< ="ode"><code> as follows:/>
<java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0

<p>This function will convert the list <var class="spanclass=GAPprompt"gap&t;/pan><pan class="GAPinput">Lnp:=[ [ [ [ -2, 1, 1 ], [ -2, 1 ] ], [ 1, -1 ] ],</span class="GAPprompt">></span> <span class="GAPinput">  [ [ [ -1, 2, 2], [-2, 1 ] ], [ 1, -1 ]*Z(3)^0 ] ];;</span

<p><em>Example:</em> Let <code class="code">A</code> be the free associative algebra with one over the rationals on the generators <code class="code">a</code> and <code class="code">b</code>.</ppre<div>


<div class="example"><pre>
<span 
< =f"<able =f"width=100%<>< class=tdleft"code classfunc"&#8227 <code(< class=Arg"Lnp<var> <ar class=Arg"A<var>)/d><td class=tdright"(&bsp;function <td>/<table>/iv>

<p> < class=code"Lnp<code>be java.lang.StringIndexOutOfBoundsException: Range [50, 41) out of bounds for length 203


<div class="example"><pre>
<span class="GAPprompt">gap>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< ] ], [ 1, -1   ;;/pan>
<span class="GAPprompt">gap></span> <span class="
[ ()a3(1)a,()b^+-)&t;dentity ..gt java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
</pre></div>

<p>It has the class"APprompt"gapg;/pan><pan =G"A:FreeAssociativeAlgebraWithOne(ationals,a""";/>


<div class="example"><pre>
< class=GAPprompt"gap&t;/pan><pan class=G">(np,p -gt;NP2GP(,);/pan>
[ (1)*a^3+(-1)*a, (1)*b^2+(-1)*<
</

<> let <ode class=code></ode>be a module of dimension 2 over <code class="code">A</code> and <code class="code">Lnp</code> a list of vectors in NPM format. Then polynomials <code class="code">java.lang.StringIndexOutOfBoundsException: Range [0, 205) out of bounds for length 104


<ivclass=example><re
<span class="GAPprompt">gap></span> <span class="GAPinput">M:=A^2;;<pre<div
<spanclass"APprompt"gap&t;<span><pan class=GAPinput">np:[[[[-, 1,1 ]  2 1 ] ]   1]]<span>
<span class="
<span class="GAPprompt">gap></span>div class=example"<re>
[..,(1*()a2]  1* -)&ti .&  ]
<pre<div

<p>The same result can be obtained by application of the standard List function:


<div java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
<span">&t;<span><pan =GAPinput>List(,m -g;NP2GP(m,M) =NP2GPList(np,);/pan>
true
</pre></div>

<p< =GAPprompt">ap&;/span spanclass"APinput>np:  [ [-2,1,1] [-,1 ]][1 1]]<span

<h4>3.2 <span class="Heading">Printing polynomials in NP format</span></h4spanclass"APprompt"gap&t <pan class""NP2GPListLnpM;/>

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

<h5>3.2-1 PrintNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; PrintNP</code>( <var class="Arg">np</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function

<p>This function prints a polynomial <var class="Arg">np</var> in NP format as span class="GAPprompt">gap></span> <span class="GAPinput">List(Lnp, m -> NP2GP(m,M);/>

<p><em>Example:</em> Considerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


< ="xample"<re>
<span java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></div>

<p>t can be printed inthe ofa polynomialin< class"ode"a<code and <code class"ode"b/>by  function< class"ode">rintNPcode:/>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p);</span>
 a^2b - 2ab^2 + 3
</pre></div>

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

<h5>3.2-2 GBNP.ConfigPrint</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; GBNP.ConfigPrint</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
pBy default  generators   algebra are  as< ="ode"a/code> .. code =code>l<code>and afterthetwelfthgenerator as< class=code"><code> By calling< class="code">ConfigPrint</code> it is possible to alter this printing convention. The argument(s) will be an algebra or arguments used for naming algebras in GAP upon creation. More specifically, we have the following choices.</p>


<dl>
<dt><strong class="Mark"><em>no arguments</em></strong></dt>
<dd><p>When the function is invoked without arguments the printing is reset to the default (see above).</p>

</dd>
<dt><strong class="Mark">algebra</strong></dt>
<dd><p>When p functionprints polynomialvar class=Arg"np<var>in NP format as configured  the code=func"GBNPConfigPrint <hrefchap3h#"><span class=RefLink"32-2<span>/>./>

</dd>
<dt><strong class="Mark">algebra,integer</strong></dt>
<dd><p>When the function is invoked with an java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0

</dd>
<dt><strong class="Mark">leftmodule</strong></java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 12
<dd><p>When the function is invoked with an leftmodule <span class="SimpleMath">A^n</span> of an associative algebra as argument, generators will be printed asp> can    theguise   polynomial in code=c"a<code>and code class="code">b</code> by the function <code class="code">PrintNP</code>:</p>

</dd>
<dt><strong class="Mark">string</strong></dt>
<dd><p>When the function

</dd>
<dt</strong><dt>
<dd><p>When <Bydefault  of thealgebra are printed as <ode class=code"a<code> ... <ode class="></ everythingthetwelfth generator as <ode class=code><code.By calling <ode class="ode"ConfigPrint<code>it is possibleto alter this printing .The(s)will be  algebra orarguments used for naming algebras in GAP upon creation. More, we have the  choices<p

</dd>
<dt><strong class="Mark">integer, string</strong></dt>
<dd><p>When the function is invoked with a non-negative integer and a string as its arguments, generators will be  as as< class="ode"&t;&t;&t;g;/ode> where <code class="code"><s></code> is the string given as argument and <code class="code"><n></code> the number of the generator. There is no checking whether the number given as argument is really the dimension. So it is java.lang.StringIndexOutOfBoundsException: Range [0, 415) out of bounds for length 0

</dd>
<dt><strong class="Mark">string, string, ..., string</strong></dt>
<java.lang.StringIndexOutOfBoundsException: Range [51, 3) out of bounds for length 196

</dd>
</dl>
<p><emjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


<div class="dd<p>When the function   with  leftmodule < class=SimpleMath"An<span> of associativealgebra argument,generators will   asthey be  the algebra,separated over java.lang.StringIndexOutOfBoundsException: Index 207 out of bounds for length 45
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap> with an integer  its argument,the <ar class="n<var>th generator  be printedas code class=c">x&;><code./>
<//dd>

<p>They can be printed by,string<><dt


<div class="example"><pre>
<span class="GAPprompt">gap&dt><strong class="Mark">string, string, ..., string</strong></dt>
 ^2b -1
<span class="java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
 ab^2 - 1
<pre<div

<p>We can let


<div class="example"><pre>
<java.lang.StringIndexOutOfBoundsException: Range [37, 5) out of bounds for length 95
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p1);</span>
 x^2y - 1
<panclass"APprompt"gap&t;<span><pan class=GAPinput"PrintNP(2);<span>
 xy^2 - 1
</pre></div>

<>e can also let the variables be printed as <ode class=code"x.<code> class=""x.</ode>instead of code class="ode><code  code class=code"b<code>by means of <code class="func">GBNP.ConfigPrint</code>.</p>


<ivclass=example">pre>
<span class="GAPprompt">gap><ab^  1
<span class=G"gap&t;/pan><pan class=G"PrintNPp1;>
 x.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<java.lang.StringIndexOutOfBoundsException: Range [69, 5) out of bounds for length 81
 x.1x.2^2 - 1
</pre></div>

<p>We can even assign strings to the variables to <span class="GAPprompt">gap></span> <span class="ConfigPrint(,y"</pan>


<div class="example"><pre>
<class"">ap&t;/pan><pan =GAPinput>.("alice,bob";/>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(xy^-1
 alice^2bob - 1
<java.lang.StringIndexOutOfBoundsException: Range [60, 5) out of bounds for length 81
 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
</pre></div>

<p>,  canintroduce the free algebra <ar class=Arg"A<var> with two generators,and print the polynomials as members of <ar class=Arg"A<var><p


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne2.2 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
<span class="GAPprompt .1x.^  1
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p1);</span>
 a^2b - 1
<span class=GAPprompt">gap&t;/> <pan class="APinput>PrintNP(2)<span>
 ab^ -1
</pre></divspan class=GAPprompt"gap&t;<span><pan class"APinput(1)<span>

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

<h5>3.2-3 PrintNPList</h5>

<div class="func"><table class
<p prints list < class"rg">Lnp<var>of polynomials in NP format, thefunction <ode=c"PrintNP</ode><p>

<p><em>Example:</em> We


<div class="example"><pre>
<span span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"span =G"gap&;</span>< class""PrintNP(2)<span>
<an"APprompt"gap&t;/pan><pan class="APinput"Lnp := [1,2;;/>
</pre></div>

<p>We can print the list with <code class="func">PrintNPList</code>.</p>


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

<p>Alternatively, using the function <code class="func">GBNP.ConfigPrint</code<pre><div


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne(Rationals,"a","b");;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint(A);</span>
< ="APprompt"gap>/pan><pan class=GAPinput>(Lnp)<span
 a^2b - 1
 2-1
</pre<Thisfunction prints a list <ar class="rg"Lnp</>ofpolynomials in,using function <ode class"ode"PrintNP<code><p>

<spanclass=GAPprompt"gap&<span> <span class=GAPinput">1 : [[,,][][1,1]];/pan>

<h4>< class=GAPprompt"gap&t;/><pan class=GAPinput"Lnp : [1,2]<span

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

<>e can print the list with <ode ="func>PrintNPList</>./p>

<java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
<p>ab2-1

<java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0

<p><em>Example:</em> Consider the following polynomial in NP java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0


<div class="example"><pre>
< class=GAPprompt>apg;/>< =GAPinput> : [[,,,,,1,[][,,],1,3,2];<span>
<span class="GAPprompt">gap&< class=GAPprompt">ap>/>< class=GAPinput"PrintNPList(np)<span>
 b^3a^3 - 3d + 2cbc
<span class="GAPprompt">gap></span> <pre<div
4
</><div>

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

<h5>3.3-2 NumAlgGensNPList</h5>

<"><table=func ="00%"<r< class="tdleft"><code class="func">&#8227; NumAlgGensNPList</code>( <var class="Arg">Lnp</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>:Theminimumnumber <ode class=code"><code>so  polynomial in <ar class"rg">np<var belongs to the free algebra on <code class="code">t</code> generators.</p>

<p>When called with a list When called with an NP polynomialvar class=Arg"np<var>this function returns the minimum number   needed for correspondingalgebratocontain  varclass"rg><var>If<ar class="rg"np/ apolynomial ,that,equivalenttospanclass"SimpleMath></pan> or span =java.lang.StringIndexOutOfBoundsException: Range [348, 346) out of bounds for length 407

<p><em>Example:</em> Consider 


<div class="example"><pre
<span class="GAPprompt">gap></span> <div java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 26
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,1,4,3],[]],[1,-1]];;</span>
<span class=GAPprompt"gap&t;/pan><pan class=GAPinputPrintNPList(p1,];/>
  b^a^3 -3d +2cbc
 b  1
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 12
4
</pre></div>

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

<h5>3.3-3 NumModGensNP</h5>

<div class="func"><table class="func" width="100%"><trp>hen  with   of NP polynomials <varclass"rg><var,this function returnsjava.lang.StringIndexOutOfBoundsException: Range [107, 106) out of bounds for length 446
<p>Returns: The minimum number <code class="code">mt</code> so that <var class="Arg">npm</var> belongs to the free module on <code class="code">mt</code> generators.</p>

<p>When called with a polynomial <>em>xample:/m>Consider the  twopolynomials  NPformat.</>

<p><em>Example:</em> Consider the class=example">pre>


<div class="example"><pre>
<">np := [[-,,,31,-][1][,2,]];</pan
< class"APprompt>&t</span>< ="APinput>PrintNP(p)<spanjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
[abca +1 ,-2 ]
<b^2adc - 1
2
<><div

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

<

<ivclass"unc"<table class=func" width=100%><tr>tdclass=tdleft"<ode class=func">#227;NumModGensNPList<code> <arclass=Arg">npm<var <td>td class"dright>&;function&;</d>/><table>/>
<p>Returns: The minimum number <code class=

<p>When called with a list of polynomials <var classdiv class=func"<able =func"width"%"tr<class"dleft"< =f"‣ NumModGensNP</ode>(var =A"npm</ar>)<td>td class=tdright"(;unction )</td></tr></table></div>

<p><em>Example:</em> Consider <p>When called witha polynomialvarclass"rg"><>in NPMformat this function returns the minimum number of modulegeneratorsneeded for the corresponding algebra to contain <var class="Arg">npm</var>. If <var class="Arg">npm</var> is an NP polynomial that does not contain module generators, then <code class=


<div class="example"><pre>
<panclass=GAPprompt"gap&t;/pan <span class"v1:= [[1,123,]-2][1],1,2,];<span>
<span [ abca +   2 ]
<<pan class=GAPprompt">ap&/>< class=GAPinput"NumModGensNP(np)<span
[ abca + 1 , - 2 ]
[ 0, badc , - 1 ]
<p>a id=X8119282084CA8076"name=X8119282084CA8076"<a>/>
3
</pre></div>

<p><a id="X788E1ACA82A833A8" name="X788E1ACA82A833A8"></< =f>tableclass"unc"width"00%>tr>< =t>< =func>#8227;NumModGensNPList</>(<ar class=Arg"Lnpm/>)/>td class=tdright(nbspfunction;<td<tr<table/>

<h5>.3- AddNP<h5>

<div class=func"<ablefunc" =100"<>td =tdleft"><code class="func">&#8227; AddNP</code>( <var class="Arg">u</var>, <var class="Arg">v</var>, <var class="Arg">c</var>, <var class="Arg">d</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <var class="Arg">c</var><span class="SimpleMath">*

<p>Computes <var class="Arg">c</var><span class="SimpleMath">*</span><var class="Arg">u</var><span spanclass"APprompt>></span> <span class="GAPinput">v1 := [[[-1,1,2,3,1],[-2],[-1]],[1,-2,1]];;</span>

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-3]];;</span>
<span class="GAPprompt"><span class="GAPprompt">gap/> spanclassGAPinput">"v2: [-,2143,3][11;<span
</pre></div>

<p>The second can be subtractedabca+1 ,-2]


<s"xample">pre>
<span class=GAPprompt">ap&t;/ spanclass"APinput(ddNP,2,,1);/pan>
  ab^ +a2b+1
</re>/>

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

<h5>.- BimulNP<h5>

div class=func>tableclass=func"width=100%>tr><d class"dleft>code class=func"&8227;BimulNP</code>( <arclass"rg><var,var ="Arg"np<var>, <ar ="">dr/ )td<
<p>Returns: the polynomial <var class="Arg">ga</var><span

<> called  a polynomial <varclass=Arg"np<var>and two monomials <ar class="ga/ar>, <var class="Arg">dr</var>, the function will return <var class="Arg">ga</var><span class="SimpleMath"><span>var class="np<var>span class=S"*/span<var class""dr<>RecallSectionahrefchap2.html#7FDF3E5E7F33D3A2"<pan class=RefLink"2.<span>/>that monomials are represented as lists.<p>

<p><em>Example:</em> Consider the following two java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0


<prediv>
<span class="GAPprompt">gap></java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
<pan class"APprompt"&t<span <pan class=GAPinput"p2 : [[,,][][,4];<span>
<pre>/iv>

<p>Multiplying <code class="code">p1</code> from p< ="84FC611A822D808F"="84FC611A822D808F"<>/>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(BimulNP([],p1,[2]));</span>
 a^2b^2 - 3b
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(BimulNP([1],p2,[]));</span>
 a^2b^2 - 4a
</pre></div>

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

<h5>3.3-7 CleanNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; CleanNP</code>( <var class="Arg">u</var> )</td><td class="tdright">( function )</td></tr></table></div>
<>: The cleanedup versionofvarclass"rg"u/>/>

<p>Given a polynomial in NP format, this function collects terms with same monomial, removes trivial monomials, and orders the monomials, with biggest one first.</p>

<p><em>Example:</em> Consider the following polynomial in NP format.</p>


<iv class"xample"<re>
<span
span class=GAPprompt"gap>/pan><pan class=GAPinput"PrintNP()</span
 a^2b - 3 - 2a^2b + 3
</pre></div>

<p>The monomials <code class="code">[1,1,div =example>pre


<iv class=example"<re>
<span class="GAPprompt">gap></span> <span class="span class="APpromptgapg;/span spanclass"APinput"p2: [122,],1,4];/>
 - a^2b
</><div>

<p>In order to define a polynomial over <span class="SimpleMath">GF(2)</span>, the coefficients need to java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


<a^2b2 - 3
<span ="APprompt"gap&t;<span><pan class"APinput"PrintNPBimulNP[]p2[);/java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
<="">ap>/span><span class=GAPinput">leanNP()</pan
[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></div>

<>a id=X7D05B60E83FDA567"name="7D05B60E83FDA567"<a>/>

<h5>3.3-8 GtNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; GtNP</code>( <var class="Arg">u</var>, <var class="Arg">v</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="code">true</code> if <span class="SimpleMath">u > v</span> and <code class="code">false</code> if <span class="SimpleMath">u ≤ v</span

<p>Greater than function for monomials <var class="Arg">u</var> and <var class="Arg">v</var> represented as in Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>. It tests whether <var class="Arg">u</var><span class="SimpleMath">></span><var class="Arg">v</var>. The ordering is done by degree and then lexicographically.</p>

<p><em>Example:</em> Consider the following two monomials.</p>


<div < class=GAPprompt"gap&;><pan ="APinput"p : [[,,][],1,1,2,],1-3,2,];<span>
<spanclass"APprompt">ap&t;/pan><pan class="GAPinput"u : [,,]<span
[a^b -3 -2a^b +3
<span class=GAPprompt">gap></> <pan ="APinput> =[,,]<span
[ 2
</p>he monomials <ode class=code">1,,]/code> and code class=code">]/ode>occur twice .For manyfunctionsthis representation of apolynomial    isnotallowed.It needs to becleaned,as by <ode class"unc"CleanNP</code></java.lang.StringIndexOutOfBoundsException: Index 254 out of bounds for length 254

<>e test whether <odeclass"ode"><code>is  than <ode class=code"v/>./>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GtNPp>  todefine  overspan =S"GF(2)/pan> the coefficients to be    field   listof coefficients   obtained in GAP from   ofintegersby multiplyingwiththe identityelementof  field.The resulting polynomial need not be clean, and so should be made clean again with <code class="code">CleanNP</code>.</p>
false
<pre<divjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

<p><a id="X8075AE7E7A8088FF" name="java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 31

<h5>3.3-9 LtNP</h5>

<div class=
<>eturns: <codeclass""true/>if<class"impleMath>u &t<span>and <code class="code">false</code> if <span class="SimpleMath">u ≥ v</span></p>

<Less than forNP monomials, tests whether <ar class=Arg"><var>span class=SimpleMath"&t;<span><varclass"rg"v<var> The ordering is done by degree and then lexicographically.<p>

<p><em>Example:</em> Consider the following two monomials.</p>


<div class=example>pre
<
[ 1, 1, 2 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">v := [2,2, =GAPprompt>&;/pan>spanclass"APinput"> =[,1,;/>
[2,2 1 ]
<[2,2  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

<p> test whether <ode class=code"u<code>is less than <code code class="code">v</code>.</p>


 class=example"<re>
<span class=" ="APprompt>ap&t;/pan>< "APinput"GtNPuv;/pan
true
</pre></div>

<p><a" name=X7A42AE79811CC5D7A42AE79811CC5D7"</>/>

<h5>3.3-10 LMonNP</h5>

<divclass=func"<able class="func ="00%>tr>td class=tdleft"<ode class=func>#8227;<code(var=Arg><var>)/d>td class"(nbspf&bsp)/>/r>/able>/iv>
<java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
<>:  leading ora list ofleadingmonomials./>

<p>These functions return the leading monomial of a polynomial (resp. the leading monomials of a list of polynomials) in NP format. The polynomials of <<pReturns:<ode class"><code>if <pan class="> l;v/>andclass="false<code>if span class="SimpleMath>  v</span>/>

<>emExample:/m>We puttwo polynomials  format into the list<odeclass=code"Lnp</ode><p>


<div class="example"><pre>
<span class="GAPprompt">gap></span< =GAPprompt>&t;/>< class"APinput> : [,,]/>
< ="APprompt">gap&t;/pan spanclass"APinput"p2: [[,2,],1,1];/
<span class=GAPprompt">ap&t;/span><pan class=GAPinput"v : [,,1];/pan>
</>/>

<p>The list of leading monomials is computed by <code class="code">LMonsNP</code>:</p>


<
<ap>/pan>< =GAPinput>()</span>
[ [ 1, 1, 2 ], [ 1, 2,span =GAPprompt>&t<span spanclass"APinput"LtNP(,;/>
</pre><<>/iv>

<p>For a nicer printing, the monomials can be converted into polynomials in NP format, and then submitted to PrintNPList:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(List(LMonsNP(Lnp), q -> [[q],[1]]));</span>
 a^2b
 ab^2
</pre></div>

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

<h5>3.3-11 LTermNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; LTermNP</code>( <var class="Arg">Lnp</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 0
<Returns:The leading   a list of leadingterms.<p>

<>These  returnthe  term of   (esp.theleadingtermsof a list java.lang.StringIndexOutOfBoundsException: Range [97, 96) out of bounds for length 290


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[1]],[6,-7]];;</span>
<span class="GAPprompt">gap></span> <span class
<span class""gap&t<span> <span class=GAPinput> : [1,2;<span>
<span class="GAPprompt">gap></span> <span class="GAPinput">LTermNP( p1 );</span>
[ [ [ 1, 1,[ [
<lass="GAPinput">LTnp = LTermsNP(Lnp)<span>
[ [ [ [ 1, 1, 2 ] ], [ 6 ] ], [ [ [ 1, 2, 2 ] ], [ 8 ] ] ]
<span class="GAPprompt">gap></span> <span class
6a^2b
8ab^2
<pre<divjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

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

h5>.- <h5

<div class="java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
<>eturns: <ar class=Arg"np<var  monic<p>

<p>This function returns the scalar multiple of a polynomial <

<p<emExample</> Consider following  inNPformat.<p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="p>For a nicer printing, the monomials can be converted in  ,and then  toPrintNPList:/>
<span class="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 2as =GAPprompt"gap&t;<span>span class=GAPinput"PrintNPList((()  -gt;[q,1])<spanjava.lang.StringIndexOutOfBoundsException: Index 120 out of bounds for length 120
</pre^2

<p>The coefficient of the leading term <a id="X80CD462F794A8095" name="X80CD462F794A8095


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(MkMonicNP(p));</span>
 a^2b - 1/2
</pre></div>

<p><a id="X818147CD841BD490" name="X818147CD841BD490">> class=func"<able class=func =100"<< =tdleft>code class=func">#8227; LTermNP<> var class=Arg">np<var>)/d>td =t"(nbsp;function;)/d>></tr>/able><divjava.lang.StringIndexOutOfBoundsException: Index 216 out of bounds for length 216

<h5>3.3-13 FactorOutGcdNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; FactorOutGcdNP</code>(<Returns  leading or a list   terms./java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
<>:<arclass=Arg">p<var>with (oefficients  out</p

<p

>  NP./>


<div class="example"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span classjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p);</span>
 30a^2b + 70ab + 105a
</pre></div>

<p>The <code class="code">Gcd</code> of the coefficients <span class="SimpleMath">[30,70,105]</span> is <span class="SimpleMath">5</span>. The function <code class="code">FactorOutGcdNP</code> divides the polynomial by <span class="SimpleMath">5</span>:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></<span class="GAPprompt">gap></spanspan class="GAPinput">PrintNP(MkMonicNP(p));</span>
 6a^2b + 14ab + 21a
<span class="GAPprompt">gap></span> <span class="GAPinput">m := MkMonicNP(p);</span>
[ [ [ 1, 1, 2 ], [ 1,a^2java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 11
<span class="GAPprompt">gap></span> <span class="GAPinput"><5>3.-13 FactorOutGcdNP</h5>
fail
</pre></div>

<p><a<iv class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#pan style='color: green'>8227;<>Returns:<var class=="rg">np</ar>Gcdjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 77

<h5>3.3-14 MulNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; MulNP</code>( <var class="Arg">np1</var>, <var class
<p>Returns: <var class="Arg">java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 0

<p>When invoked with two polynomialsspan class="APprompt">gap&t<span><span class="GAPinput">PrintNP(p);</span>

<30a^2b+ 70ab + 105a


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

<p>The function <code class="code">MulNP</code> multiplies the two polynomials.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(MulNP(p1,p2));</span>
 a^2bab^2 - ab^2 - a^2b + 1
</pre></div>

<p>The fact that this multiplication is not commutative is illustrated by the following java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(AddNP(MulNP(p1,p2),MulNP(p2,p1),1,-1));</span>
 - ab^2a^2b + a^2bab^2
</pre></div>

<p><a id="<div class="example"pre>

<h4>3.4 <span class="Heading">Gröbner functions, standard variant</span></h4>

<p><a id="X7CD9F9C97B2563E2" name="<span class="GAPprompt">gap></span>PrintNP(actorOutGcdNPp))<java.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 96

<h5>3.4-1 Grobner</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; Grobner</code>( <var class="Arg">Lnp</var>[, <var class="Arg">D</var>][, <var class="Arg">max</var>] )</td><td class="tdright">( function )</td></<span class="GAPprompt">gap></span> <span class="GAPinput">fm := FactorOutGcdNP(m);</span>
<p>Returns: ulNP/5>

< this function will use Buchberger's algorithm with normal form  find a GröbnerBasis (if , the general problem is unsolvable).</p>

<p>When called with the optional argument <var class="Arg">max</var>, which should be a positive integer, the calculation will be interrupted if it has not ended after <var class="Arg">max</var> iterations. The return value willp>>Returns:<var class=Arg"np1</ar><pan class="SimpleMath">*</span><var class="Arg">np2</var></p>

<p>By use of the optional argument <var class="Arg">D</var>, it is possible to resume a previously interrupted calculation.</p>

<


<div class="example"><pre>
<span class="GAPprompt">gap&
<java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 98
<spanclass=GAPprompt">gap></span> <span class="GAPinput">PrintNPList([p1,p2]);</span>
 a^2b - 1
 2 - 
</pre></div>

<p>Their Gröbner basis can be computed by the functionp>The function code =">ulNP<code>multiplies the two polynomials.</p>


<div class="examplediv class="">pre>
spanclass=GAPprompt">gap><span><pan =GAPinput">G :=Grobner(p1,p2]);<pan>
<span class="GAPprompt">gap> a^bab^ -ab2  2 +1
 b - a
 a^3 - 1
</>div>

<p>One iteration of the Gröbner computations is invoked by use of the parameter <code class="codejava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(R.G);</span>
 b - a
<span java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 89
 a^3 - 1
<h5>3.4-1 Grobner</h5>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">R.completed;</span>
false
</pre></div>

<p>The above list <code class="code">R.todo</code> can be used to resume the computation of the Gröbner basis computation with the Gröbner pair <code class="code">R.G</code>, <code class="code">R.todo</code>:</p>


<divp>Returns: fthe algorithm terminates, a öbner Basis or a record if var class="Arg">max</var> is specified (see description).</p>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(Grobner(R.G,R.todo));</span>
 b - a
 a^- 
</pre></div

<p>In order to perform the Gröbner basis computation with polynomials in a free algebra over the field <span class="SimpleMath">GF(2)</span>, the coefficients of the polynomials need to be defined over that field.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(Grobner([[p1[1],One(GF(2))*p1[<><em>Example:</em> Consider the following two polynomials in NP format.</p>
 b + a
 a^3 + Z(2)^0
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 12

<java.lang.StringIndexOutOfBoundsException: Range [72, 2) out of bounds for length 62

<5>.4- SGrobner</5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; SGrobner</code>( <var class="Arg">Lnp</ ^2-
<p>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>For a list <var class="Arg">Lnp</var> of polynomials in NP format this function will use Buchberger's algorithm with strong normal form (see <a href="chapBib.html#biBCohenGijsbersEtAl2007">[Coh07]</a>) to find a Gröbner Basis (if possible, the general problem is unsolvable).</p>

<p>When called with the optional argument <var class="Arg">max</var>, which should be a positive integer, the calculation will be interrupted if it has not ended after <var class="Arg">max</var> iterations. The return value will be a record containing lists <code class="code">G</code> and <code class="code">todo</code> of polynomials in NP format, a boolean <code class="<pan ="APprompt">ap>span><pan class=""(G);<>

<p>By use of the optional argument <var class="Arg">D</var>, it is possible to resume a

<<m>Example:/em thefollowing two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [ b - 
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 90
 a^2b - 1
 ab^2 - 1
</pre></div>

<p>Their Gröbner basis can be computed by the function <code class="code">Grobner</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := SGrobner([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(G);</span>
 b - a
 a^3 - 1
</pre></div>

<p>One iteration of the Gröbner computations is invoked by use of the parameter <code class="code">max</code>:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := SGrobner([p1,p2],1);;</java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 81
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(R.G);</span>
 b - a
<span class="java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 89
 a^3 - 1
<span class="GAPprompt">gap></span> <span class="GAPinput">R.iterations;</span>
1
<span class</pre>/div>
false
</pre></div>

<p>The above list <code class="code">R.todo</code> can be used to resume the computation of the Gröbner basis computation with the Gröbner pair <code class="code">R.G</code>, <code class="code">R.todo</code>:</p


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(SGrobner(R.G,R.todo));</span>
 b - a
 a^3 - 1
</pre></div>

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

<h5>3.4-3 IsGrobnerBasis</h5>

<"func"><table class="func"width=100%"<tr>< "java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 221
<p>Returns: <code class="code

<p>When invoked with a list <var class="Arg">G</var> of polynomials in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span java.lang.StringIndexOutOfBoundsException: Index 142 out of bounds for length 0

<java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 77

<p><em>Example:</em> Consider the following list of two polynomials in NP format.</p>


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

<p>The function <code class="code">IsGrobner</code> checks whether the list is a Gröbner basis.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerBasis(Lnp);</span>
false
</pre></div>

<p>So the answer should be <code class="code">true</code> for the result of a Gröbner computation:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerBasis(Grobner(Lnp));</span>
true
</pre></div>

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

<h5>3.4-4 IsStrongGrobnerBasis</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; IsStrongGrobnerBasis</code>( <var class="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <ode class=">/code> <ar class="Arg/ar> isa java.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 146

<p>When invoked with a list <var class="Arg">G</var> of polynomials in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>), this functionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 77

<<java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26


div class=example">pre>
sclass="java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 124
 b-1
 a^22  
 ab^2 - 1
</pre></div>p Grbner basiscanbebythefunction< class="code">Grobnercode.p>

<p>The function <code class="code">IsStrongGrobner</code> checks 


<div class="example"><pre>
);/span>
false
</pre></div>

<>Butthe answer should < class="code">true</code> for the result of a strong Gröbner computation:</p>


<class=example"<pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 8
rue
<<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 86

<p>An class=GAPprompt"gap&t;</span> <pan class=GAPinput">PrintNPList(R.odo);/span>


java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 26
<span<pan class="GAPprompt">gap></span> <span class="GAPinput">R.completed;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Add(B,AddNP(Lnp[1],B[1],1,-1));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(B
 b -a
 a^3 - 1
 a^2b - b + a - 1
<span class=GAPprompt"gap&t;<span><pan class=GAPinput"IsGrobnerBasis()<s
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsStrongGrobnerBasis(B);</span>
false
</pre></div>

<p><a id="X7E0105ED7FF4210F" name="X7E0105ED7FF4210F"></a></</re<div>

<h5>3.4-5 IsGrobnerPair</h5>

<class=func"<able class="func" width=100"<tr<tdclass=tdleft"><code class="func>#227;</ode> <ar =A>G<,<ar class=A">D</ar>)/<class="dright>&bsp;functionn)/td>tr>/<div>
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>When called with two lists of polynomials in NP format, this function returns true if they form a Gröbner pair. Testing whether <var class="Arg">D</var> is a basic set for <var class="java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

<p><em>Example:</em> Consider the following four polynomials in NP format.</p>


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

<>Thefunction <code class="code">IsGrobnerPair</code> is used to check whether some combinations of these polynomials in two lists provide Gröbner pairs.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerPair([p1,p2,q1],[q2]);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerPair([q1,q2],[p1,p2]);</span>
false
</pre></div>

<p>The function <code class="code">IsGrobnerPair


<div class="example"><pre>
<spanclass=GAPprompt"">ap></span><span class="GAPinput>IsGrobnerPair(p1,2,[] = IsGrobnerBasis(p1,p2]);</span>
true
</pre></div>

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

<h5</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; MakeGrobnerPair</code>( <var class="Arg">G</var>, <var class="
<p>Returns: A record containing a new Grobner pair</p>

<p>When called with as arguments a pair <span class="SimpleMath">G, D</span>, this java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 4

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


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

<p>The function <code class="code">MakeGrobnerPair</code> turns the list with these two polynomials into a Gröbner pair, once the empty java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></<span class="GAPprompt">gap></span class="GAPinput">Lnp := [[[[1,1,2],[]],[1,-1]], [[[1,2,2],[]],[1,-1]]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GP.G);</span>
 a^2b -1
 ab^2 - 1
<span class="java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
 b - a
</pre></div>

<p>These fields are ready for use


<div class="example"><pre>
<GP.G,GP.odo;<span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);</span>
 b - a
 a^3 - 1
</pre></java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 4

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

<h4>3.5 <span class="Heading">Finite-dimensional quotient
        algebras</span></h4>

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

<h5>3.5-1 BaseQA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; BaseQA</code>( <var class="Arg">Gspan class="GAPprompt">gap></span> <span class="GAPinput">Add(B,AddNP(Lnp[1],B[1],1,-1));;<span>
<p>Returns: A list of terms forming a basis of the quotient algebra of the (non-commutative) polynomial algebra in <var class="Arg">t</var> variables by the 2-sided ideal generated by <var class="Arg">G</var></p>

<p>When called with a Gröbner basis <var class="Arg">G</var>, the number <var class="Arg">t</var> of generators of the algebra, and a maximum number of terms to be found <var class="Arg">maxno</var>, BaseQA will return a (partial) base of the quotient algebra. If this function is invoked with <var class="Arg">maxno</var> equal to 0, then a full basis will be given. If the dimension of this quotient algebra is infinite and <var class="Arg">maxno</var> is set to 0, then the algorithm behind this function will not terminate.</p>

<p><em>Example:</em> Consider the following Gröbner basis.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span a^3 - 1
<span class=GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := Grobner([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(G);</span>
 b - a
 a^3 - 1
</pre></div>

<p>The function <code class="code">BaseQA</code> computes a basis for the quotient algebra of the free algebra over the rationals with generators <span class="SimpleMath">a</span> and <span class="SimpleMath">b</span> by the two-sided ideal generated by <code class="code">G</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></pan> span class="GAPinput">PrintNPList(G);</span>
 b - a
 a^3 - 1
<span class="GAPprompt">gap></span> <span class="GAPinput">BaseQA(G,2,0);</span>
[ [ [ [  ] ], [ 1 ] ], [ [ [ 1 ] ], [ 1 ] ], [ [ [ 1, 1 ] ], [ 1 ] ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(BaseQA(G,2,0));</span>
 1
 a
 a^2
</pre></div>

<iv "unc"<100"<r>java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 246


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class
 1
 a
 b
 a^2
 ab
 ba
 b^2
 a^3
 aba
 ba^2
 bab
 b^2a
 b^3
</pre></div>

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

<h5>3.5-2 DimQA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 26
<p>Returns: The span class="GAPprompt">gap>gap><span><span class="GAPinput">p2 := [[[1,2,2],[]],[1-1]];<span>

<p>When called with a Gröbner basis <var class="Arg">G</vart">q2 := [[[1,1,1],[]],[1,-1]];;</span>

<p>If <var class="Arg">t</var>=0, the function will compute the minimal value of <code class="code">t</code> such that the polynomials in <var class="

<p>To check whether the dimension of robnerPair</code> is used to check whether some combinations of these polynomials in two lists provide Gröbner pairs.</p>

<p><em>Example:</em> Consider the following 


div class"java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-2]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-2]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := Grobner([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(G);</span>
 b - a
 a^3 - 2
</pre></div>

<p>The function <code class="code">DimQA</code> computes the dimension of the quotient algebra of the free algebra over the java.lang.StringIndexOutOfBoundsException: Index 129 out of bounds for length 12


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

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

<h5>3.5-3 MatrixQA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; MatrixQA</code>( <var class="Arg">i</var>, <var class="Arg">B</var>, <var class="Arg">GB</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: The matrix representation for the <var class="Arg">i</var>-th generator of the algebra for right multiplication in the quotient algebra</p>

<p>Given a basis <var class="Arg">B</var> of the quotient algebra, a Gröbner basis (record) <var class="Arg">GB</var>, and a natural number <var class="Arg">i</var>, this function creates a matrix representation for the <var class="Arg">i</var>-th generator of the algebra for right multiplication.</p>

<java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0


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

<p>The matrix of right multiplication by the first indeterminate <span class="SimpleMath">a</span> on the quotient algebra with respect to the ideal generated by <code class="code">p1</code> and <code class="code">p2</code> is obtained by applying <code class="code">MatrixQA</code> to the Gröbner basis of these generators and a basis of the quotient algebra as found in <code class="func">BaseQA</code> (<a href="chap3.html#X7EAA04247B2C6330"><span class="RefLink">3.5-1</span><<>  recordcontaining anew Grobner pair</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := 
<span class="java.lang.StringIndexOutOfBoundsException: Range [72, 22) out of bounds for length 90
<span class="GAPprompt">gap></span> 
 1
 a
 b
 a^2
 ab
 a^3
 a^2b
 a^4
<span class="GAPprompt">gap></span> <span class="GAPinput">Display(MatrixQA(1, B,GB));</java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 12
[0, ,0 ]
  [  0,  0,  0,  1,  0,  0,  0,  0 ],
  [  0,  0,  0,  0,  1,  0,  0,  0 ],
  [  0,  0,  0,  0,  0s java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 104
   ,0, 0  , 0,  0,  1,  0 ],
  [  0,  0,  0,  0,  0,  0,  0,  1 ],
  [  1,  0,  0,  0,  0,  0,  0,  0 ],
  [  0,  0,  1,  0,  0,  0,  0,  0 ] ]
</pre></div>

<p>The function is also applicable to Gröbner basis records java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">v1 := [[[-1,1,2],[-1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 6
</pre></div>

<p


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBR := SGrobnerModule([v1,v2],[p1,p2]);;</span>
<span class="GAPprompt">gap>
</<p><aid==X7EAA04247B2C6330 name="X7EAA04247B2C6330"></a></p>

<p>The matrix of right multiplication by <span class="SimpleMath">a</span>, the first generator of the free algebra, is</p>


<div class=example"<pre>
<span class="GAPprompt">gap<p>Returns: Alist  termsforming a basis ofthe quotient algebra of the (non-commutative) polynomial algebra in <var class="Arg">t</var> variables by the 2-sided ideal generated by <var class="Arg">G</var></p>
[ [  0,  1 ],
  [  1,  0 ] ]
<java.lang.StringIndexOutOfBoundsException: Range [7, 5) out of bounds for length 12

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

<53..5-4 <h>

<java.lang.StringIndexOutOfBoundsException: Range [10, 4) out of bounds for length 270
<>Returns: The matrix representation for the <var class="Arg">t</var> generators of the algebra for right multiplication in the quotient algebra</p>

<java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 357

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 6
<span class="GAPprompt">pre></div>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,2,1],[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<pre><div>

<p>The java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := Grobner([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">B := BaseQA(GB,2,0);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">mats := java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 8
<span class="GAPprompt">gap></span> <span class="GAPinput">for mat in mats do Display(mat); <="gap&<><spanclass=java.lang.StringIndexOutOfBoundsException: Range [62, 60) out of bounds for length 83
[ [  0,  1,  0,  0,  0,  0,  0,  0 ],
  [  0,  0,  0,  1,  0,  0,  0,  0 ],
  [  0,  0,  0,  0,  1,  0,  0,  0 ],
  [  0,  0,  0,  0,  0,  1,  0,  0 ],
  [  0,  0,  0,  0,  0,  0,  1,  0 ],
  [  0,  0,  0,  0,  0,  0,   a
  [  1,  0,  0,  0,  0,  0,  0,  0 ],
  [  0,  0,  1,  0,  0,  0,  0,  0 ] ]

[ [  0,  0,  1,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  [ 0  0 0,  0   ,0   ]java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  [  0,  0,  0,  1,  0,  0,  0,  0 ],
  [  0,  0,  0,  0,  0,  0,  1,  0 ],
  [  0,  0,  0,  0,  0,  1,  0,  0 ],
  [  1,  0,  0,  0,  0,  0,  0,  0 ],
  [  0,  0,  0,  0,  0,  0,  0,  1 ],
  [  0,  1,  0,  0,  0,  0,  0,  0 ] ]

</pre></div>

<p>The result is also obtainable by use of the List function:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">MatricesQA(2,B,GB) = List([1,2], q -> MatrixQA(q,B,GB));</span>
true
</>/div>

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

<>3.5-5 MulQA</5>

<div class="func"><table class="<p>If <var class=Arg">t</var>=0, the function will compute the minimal value of <code class="code">t</code> such that the polynomials in <var class="Arg">G</var> belong to the free algebra on <code class="code">t</code> generators.</p>
<java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 178

<p>When called with two polynomials in NP form, <var class="Arg">p1</var> and <var class="Arg">p2</var>, and a Gröbner basis <var class="

<p><em>span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-2]];;</span>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := Grobner([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(G);</span>
 b - a
 a^3 - 1
</pre></div>

< a^-2


<div class="example"><pre>
<span class">gap><span> <span class="GAPinput">s1 := [[[1],[]],[1,-2]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">s2 := [[[2],[]],[1,-3]];;</span>
<span class="APprompt">gap></span> <span class="GAPinput">PrintNP(MulQA(s1,s2,G));</span>
 a^2 - 5a + 6
</pre></div>

<p>The result should be equal to the strong normal form of the product of <span class="SimpleMath">a-2</span> java.lang.StringIndexOutOfBoundsException: Range [0, 113) out of bounds for length 0


<div <iv class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#<span style='color: green'>8227; MatrixQA</code>( <var class="Arg">i</var>, <var class="Arg">B</var>, <var class="Arg">GB</var> )</td><td class="tdright">( function )</td></tr></table></div>
<span class="GAPprompt">gap></span> <span class="GAPinput">MulQA(s1,s2,G) = StrongNormalFormNP(MulNP(s1,s2),G);</span>
true
</pre></div>

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

<h5>3.5-6 StrongNormalFormNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; StrongNormalFormNP</code>( <var class="Arg">f</var>, <var class="Arg">G</var> )</td><td class="tdright">( java.lang.StringIndexOutOfBoundsException: Range [0, 220) out of bounds for length 151
<p>Returns: The strong normal form of a polynomial with respect to <var class="Arg">G</var></p>

<p>When invoked with a polynomial in NP format (see Section <a java.lang.StringIndexOutOfBoundsException: Range [0, 67) out of bounds for length 0

<p>Note that the StrongNormalForm with respect to a Gröbner basis is uniquely determined, but that for an arbitrary input <var class="Arg">G</var> the result may depend on the order in which the individual reduction steps are implemented.</p>

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap><<iv class=>pre
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 12

<pre></div>


java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 26
<span class="GAPprompt">gap></span> <span class="GAPinput">p := [[[1,1,1,2],[2,1],[]],[1,-1,3]];;</span>
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 12

<p>with respect[ 0  0, ,0  0,0  ,0]


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(StrongNormalFormNP(p,[p1,p2]));</span>
 - ba + a + 3
</pre></div>

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

<h4>3.6 <span class="Heading">Finiteness and Hilbert series</span></h4>

<p><a id="X83C57C3A7DCF0471" name="X83C57C3A7DCF0471">java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<h5>3.6-1 DetermineGrowthQA</h5>

d "> =func"width=100%><tr>class="tdleft"><code class">#;DetermineGrowthQA<(<ar class"Arg>Lm<,<var "rg"t/var, <arclass="Arg">/var></d>td class=tdright"(nbsp;function <td<tr>/able<div>
<p>Returns: If the quotient java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 13

<p>Given leading monomials <var class="Arg">Lmjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>If the precise degree is needed in the java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 25

<p>The function <code class="code">DetermineGrowthQA</code> allows preprocessing, which may speed up the computations. This can be done with the function <code class="func">PreprocessAnalysisQA</code> (<a href="chap3.html#X863124677B933CEE"><span class="RefLink">3.6-4</span></a>).</p>

<p><em>Example:</em> For the list of monomials consisting of a single variable in


<div class="example"><pre>
<span class=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
1
</pre></div>

<p>Here is an example of polynomial growth of degree 2:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L := [[1,2,1],[2,2,1]];</span>
[  1,2 1]  ,2,1  java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
<span class="GAPprompt">gap></span> <spanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
2
</pre></div>

<p>In order to show how to<div class="example"><pre>


<<pan class="GAPprompt">gap></span> <span class="GAPinput">GB := Grobner([p1,p2]);;</span>
<span span class="GAPprompt">gap></span> <span class="GAPinput">B := BaseQA(GB,2,0);;</span>
GF(2^8)
 class="GAPprompt">gap></span> <span class="GAPinput">z := GeneratorsOfField(F)[1];</span>
Z(2^8)
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,1,2],[]],[z,1]];;</span>
><java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 99
</pre></  0,  0  , ,  ,0, 0,   ,

<p>The polynomials <code class="code">p1</code> and <code class="code">p2</code> java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 38


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := Grobner([p1,p2]);;</span>
<span class[  0  0,0, 0,1, 0  0,0]
<class=GAPprompt"gap>/pan> <span class="GAPinput">for lm  in L  do PrintNP( [ [ lm ], [ 1 ] ] ); od;</span>
 a^3b
 b^2
 ba
 a^5
<span class="GAPprompt">gap></span> <span class="GAPinput">DetermineGrowthQA(L,2,true);</span>
0
</pre></div>

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

<h5>3.6-2 FinCheckQA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; FinCheckQA</code>( <var class="Arg">Lm</
<p>Returns: <code class="code">true</code>, if the quotient algebra

<p>Given a list <var class="Arg">Lm</spanclass="GAPprompt">gap>span><panclass="">atricesQA2,B,B  List(12,q > java.lang.StringIndexOutOfBoundsException: Range [112, 111) out of bounds for length 128

<

<p>The function <code class="code">FinCheckQA</code> allows for preprocessing with the function <code class="func">PreprocessAnalysisQA</code> (<a href="chap3.html#X863124677B933CEE"><span

<p><em>Example:</em> Consider the following list <code class="code">L</code> of two monomials.</p>


<<p>Returns: The strong normal form of the product <var class="Arg">p1</var><span class="SimpleMath">*</span><var class="Arg">p2</var> with respect to <var class="Arg">G</var></p>
<span class="GAPprompt">gap></span> <span class="GAPinput">L := [[1,2,1],[2
<pjava.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 12

<p>Finiteness of the dimension of the quotient algebra of the free algebra by the ideal generated by these two monomials can be decided by means of <code class="code">FinCheckQA</code>. Its arguments arejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


< class=e">p>
<span class="GAPprompt">gap></span> <pan/java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 98
false
</pre></div>

<p>This example turns out to be infinite dimensional. Here is a finite-dimensional example.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">FinCheckQA([[1],[2,2]],2);</span>
true
</pre></div>

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

<h5>3.6-3 HilbertSeriesQA</h5>

<div class="func"><span class="GAPpromptgap></span> <span class="GAPinput">s1 := [[[1],[]],[1,-2]];;</span>
<p>Returns: A list of coefficients of the Hilbert series up to degree <var class="Arg">d</var></p>

<p>Given a set of monomials <var class="span class="GAPprompt">gap></span> <span="GAPinput">rintNP(MulQA(1,2G)<span>

<p>Internally, it builds (part of) the graph of standard words. This function will remove zeroes from the end of the list of coefficients.</p>

<p><em>Example:</em><>The result should be equal to the strong normal form of the product of <span class="SimpleMath">a-2</span> and <span class="SimpleMath">b-3</span> with respect to <code class="code">G</code>:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L
</pre></div>

<p>Finiteness of the dimension of 


<div class="example"><pre>
<span class="GAPprompt">gap></span<>< id=X8563683E7FA604F8"name=X8563683E7FA604F8">/a>/>
[ 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 ]
</pre></div>

<p>This indicates that the growth may be polynomial. <code class="func">DetermineGrowthQA</code> (<a href="chap3.html#X83C57C3A7DCF0471"><span class="RefLink">3.6-s="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>

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

<h5>3.6-4 PreprocessAnalysisQA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; PreprocessAnalysisQA</code>( <var class="Arg">Lm</var>, <var class="Arg">t</var>, <var class="Arg">iterations</var> )</td><td class="tdright">( function )</td></tr></table>
rsively</p>

<p>This preprocessing of the list <var class="Arg">Lm</var> of monomials can be applied to the java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 77

<p><em>Example:</em> Consider the following two polynomials in NP format of which a Gröbner basis is computed.</p>


<div class="example"><pre>
F := GF(256);
z := GeneratorsOfField(F)1];
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,1,1,2],[]],[1,-1]]pan>
<span<divjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);divclass=">pre>
 a^4b - 1
 ba - ab
 b^2 - a
 a^5 - b
</pre></div>

<>pplication of <code class=code">PreprocessAnalysisQA</code> is carried out on the leading terms of <code class="code">GB</code>, with 2, 4, 8, recursions, respectively.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L<spanclass="gap>/span><java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 108
[ [ 1, 1, 1, 1, 2 ], [ 2, 1 ], [ 2, 2 ], [ 1, 1, 1, 1, 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">L1 := PreprocessAnalysisQA(L,2,2<><a id="X79FE4A3983E2329F" name="X79FE4A3983E2329F"></a></p>
[ [ 1, 1, 1 ], [ 2, 1 ], [ 1, 1, 2 ], [ 2, 2 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">L2 := PreprocessAnalysisQA(L1,2,4);</span>
[ [ 1 ], [ 2 ] ]
</pre></div>

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

<h4>3.7 <span class="Heading">Functions of the
            trace variant</pan><h4>

<p><

<h5>3.7-1

d""<class=" width"%>tr>java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 244
<p>Returns: The trace evaluated to a polynomial in NP format.</p>

, java.lang.StringIndexOutOfBoundsException: Range [141, 131) out of bounds for length 388

<p><em>Example:</em> First we compute the traced Gröbner basis of the list of the following two polynomials in NP format.</p>


<div class="example"><pre>
sclass">apg;/span><java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 98
<span class="GAPprompt">gap></span> <span class=
p">gap&t;</span> <span class="GAPinput">Lnp := [p1,p2];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBT := SGrobnerTrace(Lnp);;</span>
</pre></div>

<p>In order to check that the polynomials in <code class="code">GBT</code> belong to the ideal generated by <code class="code">p1</code> and <code class="code">p2</code>, we evaluate the trace. For each traced polynomial <code class="code">p</code> in <code class="code">GBT</code>, the polynomial <code class="code">p.pol</code> is equated to the evaluated expression <code class="code">p.trace</code>, in java.lang.StringIndexOutOfBoundsException: Index 411 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">ForAll(GBT,q -> EvalTrace(q,Lnp) = q.pol);</span>
true
</pre></div>

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

<h5>3.7-2 PrintTraceList</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; PrintTraceList</code>( <var class="Arg">G</var> )</td><td class= [ 1 2 1]  2,2,1]]
<p>hen invoked with a list <var class="Arg">G</ar> of traced polynomials, this function prints the traces of that list.</p>

<p><em>Example:</em> First we compute the traced Gröbner basis of the java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1


<div class="example"><pre>
<span class=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,<iv java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 26
<(28
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 89
 aG(1) - bG(1) - G(1)ba^2b + a^2G(2)ab

 G(1)ba^2 + bG(1)ba + G(2) - a^2G(2)a - ba^2G(2)
</></iv>

<><a id"" name="X8039BEE77C070FB1"</a></>

<h5>3.7-3 PrintTracePol</h5java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; PrintTracePol</code>( <var class="Arg">p</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function prints the trace of an NP polynomial <var class="Arg">p</var>.</p>

<p><em>Example:</em> First we compute the traced Gröbner basis of the list of two polynomials in NP format<div ="xample"<pre>


<div class="example"><pre>
<span lass=GAPprompt>gapgt;/span> <pan class=GAPinput" : (B);;<span>
<spanclass="java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 98
<span class="GAPprompt">gap></span> <span class="GAPinput">GBT := SGrobnerTrace([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">for np in GBT do PrintTracePol(np); Print("\n"); od;</span>
 aG(1) - bG(1) - G(1)ba^2b + a^2G(2)ab

 G(1)ba^2 + bG(1)ba + G(2) - a^2G(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 12

</pre></div>

<p><java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

<h5>3.7-4 PrintNPListTrace</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; PrintNPListTrace</code>( <var class="Arg">G</var> )</td><<p>Given a list <var class="Arg">Lm</var> of leading monomials such that none of these divides another, and the number <var class="Arg">t</var> of generators ofareembedded,this function checks whether the quotient algebra of the free algebra by the ideal generated by <var class="Arg">Lm</var> is finite dimensional.</p>
<p>When <p>When givena bner basis span class="SimpleMath">G</span>, the dimension of the quotient algebra of the free algebra by the ideal generated by <span class="SimpleMath">G</span> coincides with the the dimension of the quotient algebra of the free algebra by the ideal generated by the leading terms of elements of <span class="SimpleMath">G</span>. These can 

<p><em>Example:</em> First we compute the traced Gröbner basis of the list of two polynomials in NP format. Next we print the java.lang.StringIndexOutOfBoundsException: Index 134 out of bounds for length 0


<div class="example"><pre>
< =""gap&;<span span  class=G>p1:=[[,,][][,1];;/span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,1],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBT := SGrobnerTrace([p1,p2]);;</span>
<
 b - a
 a^3 - 1
</pre></java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

<p><a id="X78AE6EED83B97595" name="span class="GAPprompt">gap></span> <span class="GAPinput">FinCheckQA(L,2);</span>

<h5>3.7-5 SGrobnerTrace</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; java.lang.StringIndexOutOfBoundsException: Index 113 out of bounds for length 95
<p>Returns: Gröbner Basis, traceable</p>

<p>For a list of noncommutative polynomials <var class="Arg">Lnp</var> this function will use Buchberger's algorithm with strong normal form to find a Gröbner Basis <code class="code">G</code> (if possible; the general<iv class=example">pre>

<p>The results will be traceable. Functions that can print java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 4

<p><em>Example:</em> For the list of the following two polynomials in NP format, a traced Gröbner basis is computed.</p>


<div class="example"><h5>.-3HilbertSeriesQA<h5>
<span 
<span<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; HilbertSeriesQA</code>( <var class="Arg">Lm</var>, <var class="Arg">t</var>, <var class="Arg">d</var> )</td><td class="tdright">( function )</td></tr></table></div>
<span class="GAPprompt">gap></span><>iven a  of  monomials<varclass=Arg"Lm</var>,none of which divides another, and the number var class="Arg">n</var> of generators of the free algebra in which they occur, this function computes the Hilbert series up to a given degree <var class="Arg">d</var>.</p>
[ rec( pol := [ [ [ 2 ], [ 1 ] ], [ 1, -1 ] ],
      trace := [ [ [  ], 1, [ 2, 1, 1, 2 ], -1 ], [ [ 2 ], 1, [  ], -1 ],
          [ [ 1 ], 1, [  ], 1 ], [ [ 1, 1 ], 2, [ 1,e =code"L</code>of two monomials.</p>
  rec( pol := [ [ [ 1, 1<div class="xample"<pre>
      trace := [ [ [ 2 ], 1, [ 2, 1 ], 1 ], [ [  ], 1, [ 2, 1, 1 ], 1 ],
          [ [  ], 2, [  ], 1 ], [ [ 2, 1, 1 ], 2, [  ], -1 ],
           [1 1 ], ,[1 ] 1]]) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
</pre></div>

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

<h5> ,2, , , , 10, 12, 14, 16,18 20 

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; StrongNormalFormTraceDiff</java.lang.StringIndexOutOfBoundsException: Index 130 out of bounds for length 0
<java.lang.StringIndexOutOfBoundsException: Range [64, 2) out of bounds for length 184

<p>When invoked with a java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0

<p>Note that the difference of the polynomials

<p><em>Example:</em> First we compute the traced Gröbner basis of the list of the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> lass="Arg">Lm/var> of monomials can be applied to the set of leading terms of a Gröbner basis before calling the functions <code class="func">FinCheckQA</code> (<a href="chap3.html#X792E39A98717D779"><span class="RefLink">3.6-2</span></a>) or <code class="func">DetermineGrowthQA</code> (<a href="chap3.html#X83C57C3A7DCF0471"><java.lang.StringIndexOutOfBoundsException: Index 370 out of bounds for length 0
z := GeneratorsOfFieldF)[;
<span class="GAPprompt">gap></span> <span class="GAPinput">GBT := SGrobnerTrace([p1,p2]);;</span>
</pre></div>

<Of thepolynomial<java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 381


<div class="example"><pre>
<span class="GAPprompt<pan  class="APprompt">ap>/span> span class="GAPinput"GB = Grobner(p1,p2];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">sf := StrongNormalFormTraceDiff(f,GBT);;</span>
<(sf.pol);</span>
 a^6 - 1
<span class="GAPprompt">gap></span> <span class="java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 8
 G()a^+bG()ba  G(1)ba^ +bG()a^ + G() G(2)a^3 - a^2(
2)a - ba^2G(2) - a^2G(</re></div>
</pre></div>

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

<h4>3.8 <span class="Heading">Functions of the truncated variant</span></h4>

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

<h5>3.8-1 <span class="Heading">Examples</span></h5>

<p>More about these functions can be found in <a href="chapA.html#X79AC59C482A2E4C1"><span class="RefLink">A.4</span></a></,1],[ ,  ,  1,1,  ,[2,   

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

<h5>3></div>

<div class="func"><p><a id="X7BA5CAA07890F7AA=X7" name=>/></pjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
<p>Returns: A list of homogeneous NP polynomials if the first argument of the input is a list of homogeneousjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>This functions should be invoked with a list <var class="Arg">Lnp</var> of polynomials in NP format, a natural number <var class="Arg">deg</var>, and a weight vector <var class="Arg">wtv</var> of length the number of generators of div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EvalTrace</code>( <var class="Arg">p</var>, <var class="Arg">Lnp</var> )</td><td class="tdright">( function )</td></tr></table

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,2,2,1],[2,1,1,2]],[1,-1
s java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 98
<span class="span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,1],[]],[1,-1]];;</span>
 ab^2a - ba^2b
 b^ - a^
</pre></div>

<p>These are homogeneous with respect to weights <span class="SimpleMath">[3,2]<pIn order to check that the polynomials in <code class="code">GBT</code> belong to the ideal generated by <code class="code">p1</code> and <code class="code">p2</code>, we evaluate the trace. For each traced polynomial <code class="code">p</code> in <code class="code">GBT</code>, the polynomial <code class="code">p.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


<div class="example"><pre>
pan class=GAPprompt">gap&t;</span> <span class=GAPinput">rintNPListSGrobnerTrunc([p1,2]12,3,]);/span>
 ba^2 - a^2b
 b^3 - a^2

</pre></div>

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

<h5>3.8-3 CheckHomogeneousNPs</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; CheckHomogeneousNPs</code>( <var class="Arg">Lnp</<span class="GAPprompt">gap></span> <span class="GAPinput">GBT := SGrobnerTrace([p1,p2]);;</span>
<>Returns:A list of weighted degrees of the polynomials if these are homogeneous with respect to <var class="Arg">wtv</var>, and <code class="code">false</code> otherwise.</p>

p java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 904

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap><p<div
<span class="GAPprompt<><a java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 62
<
 b^2a - ba^2b
 b^3 - a^2
<></div>

<p>These are homogeneous with respect to weights <span class="SimpleMath">[3,2]</span>. The degrees are <span <p><Example<em  we  thetraced ö twoin java.lang.StringIndexOutOfBoundsException: Range [100, 99) out of bounds for length 224


<div class="example"><pre>
<pan class="GAPprompt">gap></span> <span class="GAPinput">CheckHomogeneousNPs([p1,p2],[3,2]);</span>
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 9
</pre></div>panclass="GAPprompt>gapgt;</span> <span class=GAPinput">or np in GBT doPrintTracePol(np) Print(\n");od;/span>

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

<h5>3.8-4 BaseQATrunc</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; 
<p>Returns: A list

<p>When invoked with a list of polynomials <var class="Arg">Lnp</var>, a natural number <var<>hen java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 170

<p><em>Example:</em> Consider the truncated Gröbner basis of the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[<panclass">ap>/ span java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 98
<span class="GAPprompt">gap></span> <panclass"java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 100
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobnerTrunc([p1,p2],12,wtv);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput/java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 12
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ba^2 - a^2b
 b^3 - a^2
 ab^2a - a^2b^2
</pre></div>

<p>A basis of standard monomials is found and printed as follows.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">BT := BaseQATrunc(GB,12,wtv);;</span>
<class==GAPprompt">gap><span> <pan class="APinput">for degpart in BT do</span>
<span class="GAPprompt">></span> <span class="GAPinput">  for mon in degpart do PrintNP([[mon],[1]]); od;</span>
<class=""&t;/span><span class="GAPinput">od;</span>
 1
 b
 a
 b^2
 ba
 ab
 a^2
 b^3
 java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 5
 bab
 ab^2
 aba
 a^2b
b^4
 a^3
 ^3a
 b^2ab
 
 ab^3
 baba
 ababp<aid="X8219059A86A54130" name="X8219059A86A54130"></a></p>
 a^2b^2
 b^5
 a^2ba
 b^4a
 a^3b
 b^ab
 b^2ab^2
 bab^3
 ab^4
 a^4
 b^2aba
 ab^3a
 babab
 abab^2
 a^2b^3
 b^6
</pre></div>

<p><a id="X7C6882DB837A9F5A" name="X7C6882DB837A9F5A

<h5>3.8-5 span class="GAPprompt="APprompt">gt;/span <pan class=GAPinput"GBTjava.lang.StringIndexOutOfBoundsException: Range [87, 86) out of bounds for length 100

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; DimsQATrunc</code>( <var class="Arg">Lnp</var>, <var class="Arg">deg</var>, <var class="Arg">wtv</var> 
<p>Returns: A list of monomials if the first argument of the java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 26

<p>When invoked with a list of polynomials <var class="Arg">Lnp</var>, a natural number <var class="Arg">deg</var>,<span class=""gap&t;/pan> <span class="GAPinput">sf := StrongNormalFormTraceDiff(f,GBT);;</span>

<p><em>Example:</em> Consider the truncated Gröbner basis of the following two polynomials in NP format.</p>


<div class=example"<>
<span class="GAPprompt">gap></span> <span class G(1)ba^2 + bG() +G()ba^5+bG()ba^ +G() + G(2)a^-a^Gjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,2],[1,1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">wtv := [3,2];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobnerTrunc([p1,p2],12,wtv);;</span>
</pre></div>

<p>Information on the dimensions of the homogeneous parts of the quotient algebra is found as follows,</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">(GB,12,);</span>
[ 1, 0, 1, 1, 1, 2, 2, 3, 3, 5, 4, 7, 7 ]
</pre></div>

<"X7FBA7F1D79DA883F name=XFBA7F1D79DA883F"</a>/>

<h5>3.8-6 FreqsQATrunc</h5>

uncwidth"%>>td="tdleft">codeclass=">&#8227 FreqsQATrunc<code(<ar class=Arg"Lnp<var> var class="Arg">deg</var>, <var class="Arg">wtv</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A list of multiplicities of frequencies of monomials if the first argument of the input is a list of homogeneous polynomials in NP format, and <code class="code">false</code> otherwise.</p>

<p>The frequency of a monomial is the list of numbers of occurrences of a variable in the monomial for each variable; the multiplicity of a frequency is the number of monomials in the standard basis for a quotient algebra with this frequency. When invoked with a list <var class="Arg">Lnp</var> of polynomials in NP format 

<><m>Example:</em> Consider the truncated Gröbner basis of the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,2,2,1],[2,1,1,2]],[1,-1]];;</span>
<span java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 101
<span class="GAPprompt">gap></span> <span class="GAPinput">wtv := [3,2];;</span>
<span "APprompt"gap&t;java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 106
<">PrintNPList(GB);</span>
 ba^2 - a^2b
 b^3 - a^2
 ab^2a - a^2b^2
</pre></div>

<p>The multiplicities of the frequencies of of monomials in a standard basis of the quotient algebra with respect to the ideal generated by <code class="code">GB</code> is found as follows, for weights up to and including 8.</p>


<div class="java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
<span class="GAPprompt">gap&<span class="GAPprompt">gap>><span class=GAPinput">p1 := [[[1,2,2,1],[2,1,1,2]],[1,-1]];;</span>
[ [ [ [  ], 1 ] ], [ [ [ 0, 1 ], 1 ] ], [ [ [ 1, 0 ], 1 ] ],
  [ [ [ 0, 2 ], 1 ] ], [ [ [ 1, 1 ], 2 ] ],
  [ [ [ 2, 0 ], 1 ], [ [ 0, 3 ], 1 ] ], [ [ [ 1, 2 ], 3 ] ],
  [ [ [ 2, 1 ], 2 ], [ [ 0, 4 ], 1 ] ] ]
d>

<p>The interpretation of this data is given by the java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">for f in F do</span>
<span class="GAPprompt">></span> <span class="GAPinput">  if f[1][1] <> [] then</span>
<span class="GAPprompt">></span> <span class="GAPinput">    Print("At level ", wtv * (f[1][1]), " the multiplicities are\n");</span>
<span class="GAPprompt">></span> <span class="GAPinput">    for x in f do</span>
<span class="GAPprompt">></span> <span class="GAPinput">      Print("  for ",x[1],": ",x[2],"\njava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
<span class="GAPprompt">></span> <span class="GAPinput">    od;</span>
<span class="GAPprompt">></span> <p><a id="X83C9E598798D5809" name="X83C9E598798D5809>/p
<span class="GAPprompt">></span> <span class="GAPinput">    Print("At level ", 0 , " the multiplicity of [<5383CheckHomogeneousNPs<h5>
<span class="GAPprompt">></span> <span class="GAPinput">  fi;</span>
span class="APprompt>gt;<span><panclass=GAPinput"> Print("\n";<span>
<span class="GAPprompt">></span> <span class="GAPinput">od;</span>
At level 0 the multiplicity of [] is 1

At level 2 the multiplicities are
  for [ 0, 1 ]: 1

At level 3 the multiplicities are
  for [ 1, 0 ]: 1

At level 4 the multiplicities are
  for[0 2 ]: 1

At level 5 the multiplicities are
  for [ 1, 1 ]: 2

At level 6 the multiplicities are
  for [ 2, 0 ]: 1
  or [ 0, 3 ]: 1

At level 7 the span class="GAPprompt">gap>> <spanclass="GAPinput"p2 := [[[2,22],[1,,1]],[1,-1]]];;</spanpan>
  for [ 1, 2 ]: 3

At level 8 the multiplicities are
  for [ 2, 1 ]: 2
  for [ 0, 4 ]: 1

java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 12

<p list monomials  thefirst of input  a of

<h4>3.9 <span class="Heading">Functions of the module variant</span></h4>

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

<java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; SGrobnerModule</code>( <var class="Arg">Lnpm</var>, <var class="Arg">Lnp</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A record <code class="code">GBR</code> containing a Gröbner basis (if found...the general problem is unsolvable) for 

<p>For a list <var class="Arg">Lnpm</var> of vectors in NPM format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>), and a list <var class="Arg">Lnp</var> of polynomials <spanclass="GAPprompt">></span> <span class="GAPinput">od;</span>

<p><em a


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-2]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-b^
</pre></div>

<p>Consider java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 4


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput2^
<span class="GAPprompt">gap></span> <span class="GAPinput">v2 := [[[-2,2,2],[-2]a^2ba
</pre></div>

<p>The Gröbner basis record for this data is found by <code class="func">SGrobnerModule</code>:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBR := SGrobnerModule([v1,v2],[p1,p2]);;</span>
</pre></div>

<p>The record <code class="code">GBR</code> has two fields, <code class="code">p</code> for prefix relations (vectors in the module) and <code class="code">ts</code> for two-sided relations (polynomials<pre></div>


<class="xample"<pre>
<span java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
[ 0, 1 ]
[ 1 , 0]
<span class="GAPprompt<p>eturns:A listof monomialsif first  of the input isa java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 146
   /a
 a^3 - 4/3
</pre></div>

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

<h5>3.9-2 BaseQM</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; BaseQM</code>( <var class="Arg">GBR</var>, <var java.lang.StringIndexOutOfBoundsException: Index 152 out of bounds for length 107
>Returns: A basis of the module obtained from the free module of rank <var class="Arg">mt</var> over the free algebra on <var class="Arg">t</var> generators by factoring out the submodule generated by the elements of <var class="Arg">GBR</var></p>

href.html#X80DAE0A97CFC95DD"><span class="RefLink">2.8</span></a>), the number of variables <var class="Arg">t</var>, the number of module generators <var class="Arg">mt</var>, and a maximum number of <pre><>

<p>If <var class="Arg">t</var><span class="SimpleMath">=0</span

<>If <var class="Arg">mt</var><span class="SimpleMath">=0</span>, then <code class="code">mt</code> will be set to the minimal value such that all vectors of <var class="Arg">GBR.p</var> belong to <span class="SimpleMath">A^mt</span>.</p>

<p>If the module is cyclic (that is, has a single generator), it is possible to use the Gröjava.lang.StringIndexOutOfBoundsException: Range [0, 95) out of bounds for length 12

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><p>Returns: A list of mult of frequencies ofif java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 201
mpt">ap></span> <span class="GAPinput">p1 := [[[1,1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,2,1],[]],[1,-1]];;</span>
</pre></div>

<p>Consider also the following two vectors in NPM format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">v1 := [[[-1,1,2],[-1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">v2 := [[[-2,2,2],[-2]],[1,-2]];;</span>
</pre></div>

<p>The Gröbner basis record for this data is found by <code class="func">SGrobnerModule</code> (<a href="chap3.html#X860966487ED88A43"><span class="RefLink">3.9-1</span></a>):</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBR := SGrobnerModule([v1,v2],[p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GBR.ts);</span>
 ba - ab
 b^2 - a^2
 a^3b - 1
 a^5 - b
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GBR.p);</span>
[ 0, 1 ]
[ b - a , 0]
[ a^2 - 1 , 0]
[ ab - 1 , 0]
</pre></div>

<p>The function <code class="code">BaseQM</code> computes a basis.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B := BaseQM(GBR,2,2,0);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(B);</span>
[ 1 , 0]
[ a , 0]
</pre></div>

<p>The function <code class="code">BaseQM</code> with arguments so as to let the number of dimensions of the module and the number of variables be chosen minimal.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B := BaseQM(GBR,0,0,0);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(B);</span>
[ 1 , 0]
[ a , 0]
</pre></div>

<p>The


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B := BaseQM(GBR,2,2,3);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(B);</span>
[1 , 0]
[ a , 0]
</pre></div>

<E6A2C8709C9F3" name=X813E6A2C8709C9F3"</a></p>

<h5>3.9-3 DimQM</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; DimQM</code>( <var class="Arg">GBR</var>, <var class="Arg">t</var>, <var class="Arg">mt</var> )</java.lang.StringIndexOutOfBoundsException: Range [198, 200) out of bounds for length 12
<p>Returns: The dimension of the quotient module</p>

<calledjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 1014

<p>If <var class="Arg">t</var><span class="SimpleMath">=0</span>, then <code class="code">t</code> will be set to the minimal value such that all polynomials of <var class="Arg">GBR.ts</var> and all polynomials occurring in <var class="Arg">GBR.p</var> belong to <span class="SimpleMath">A^mt</span>.<[ [    ,1  ,   [0,1 ,1]]  [  ,0 ,1 ]]

pvclass="rg"></var>span "SimpleMath"=<span> then <code class=code">mt</code> will be set to the minimal value such that all vectors of <var class="Arg">GBR.p</var> belong to <span class="SimpleMath">A^mt</span>. <em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Range [69, 64) out of bounds for length 100
</pre></div>

<p>Consider also the following two vectors in NPM<span class="GAPprompt">></span> <span class="GAPinput">  if f[1][1] <> [] then</span>


<java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
sclass">g<s sjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 101
<span <span class"APprompt">>span><spanclass"java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 137
</pre></div>

<p>The Gröbner basis record <pan class="GAPpromptgt;/pan> span class="GAPinput">  Print("\n");</span>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBR := SGrobnerModule([v1,v2],[p1,p2]);;</span>
</pre></div>

<p>The function <code class="code">DimQM</code> computes the dimension over the rationals of the quotient of the free module over the free algebra on two generators by the submodule generated by the vectors <code class="code">v1</code>, <code class="code">v2</code>, <span class="SimpleMath">[p,q]</span>, where <span class="SimpleMath">p</span> and <span class="SimpleMath">q</span> run over all elements of the two-sided ideal in the free algebra generated by <code class="code">p1</code> and <code class="code">p2</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,2);</span>
<spanclass="APprompt">gap></pan> span "APinput">DimQM(GBR,2,2);</span>
0
</pre></div>

<p>The answer should be equal to the size of <code class="code">BaseQM(GBR,t,mt,0)</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DimQM(GBR,2,2) = Length(BaseQM(GBR,2,2,0));</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoGBNP,0);</span>
</pre></div>

<p><a id=" level 2 the multiplicitiesare

<h5>3.9-4 MulQM</h5>

<java.lang.StringIndexOutOfBoundsException: Range [10, 4) out of bounds for length 268
<p>Returns: The strong normal form of the product <var class="Arg">p1</var><span class="SimpleMath">*</span><var class="Arg">p2</var> with respect to <var class="Arg">GBR</var></p>

<p>When called with three arguments, the first of which, <var class="Arg">p1</var>, is a module element in NPM format, the second of which, <var class="Arg">p2<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 33
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList([p1,p2]);</span>
 a^2b - 1
 ablevel 8 the multiplicities are
</pre></div>

<p>Consider also the following two vectors in NPM format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">v1 := [[[-1,1,2],[-1]]</re>>/div>
<span class="GAPprompt">gap></span> <span class="GAPinput">v2 := [[[-2,2,2],[<><a id="name=X8706DD3287E82019">/a>/>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList([v1,v2]);</span>
[ ab - 1 , 0]
[ 0, b^2 - 2 ]
</pre></div>

<p>The Gröbner basis record for this data is found by <code class="func">SGrobnerModule</code> (<a href="chap3.html


<div class="example"><pre>
<pan class="GAPprompt">gap></span> <span class="GAPinput">GBR := SGrobnerModule([v1,v2],[p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(<>Returns: A record <code class="code">GBR</code> containing a Gröbner basis (if found...the general problem is unsolvable) for modules; <code class="code">GBR.p</code> will contain the prefix rules and <code class="code">GBR.ts</code> will contain the two-sided rules, and <code class="code">GBR.pg</codejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 b - a
 a^3 - 1
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GBR.p);</span>
[ 0, 1 ]
[ a - 1 , 0]
</pre></div>

<p>The function <code class="code">MulQM</code> computes the product of the vector <code class="code">w</code> with the polynomial <code class="code">q</code>.</p>


java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 26
<<divclass=example"<pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(w);</span>
[ b ,-4a ]
<span class="GAPprompt">gap></span> <span class="GAPinput">q := [[[2,2,1],[1]],[2,</pre><div>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(q);</span>
 2b^2a + 3a
<span class="GAPprompt">gap></span> <span class="GAPinput">wq := MulQM(w,q,GBR);;</span>
<pan class">java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 81
[ 5 , 0]
<</re>/div>

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

<h5>3.9-5 StrongNormalFormNPM</h5>

<div class="func"><table class="func" width="100%"><java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 0
<p>format with respect to <var class="Arg">GBR</var></p>

<p>When invoked with a polynomial in NP 

<p>This function assumes that <var class="Arg">GBR.p</var> and <var class="Arg"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p><em>Example:</em> Consider the following two polynomials in NP format.</p>


<div class="example"><pre>
<java.lang.StringIndexOutOfBoundsException: Range [30, 5) out of bounds for length 98
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
n class=GAPprompt">ap&t;</span><spanclass="GAPinput">PrintNPList([p1,p2]);</span>
 a^2b - 1
 ab^2 - 1
</pre></div>

<p>Consider also the following two vectors in NPM format.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">v1 := [[[-1,1,2],[-1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">v2 := [[[-2,2,2],[-2]],[1,-2]];;</span>
<span class="GAPprompt">gap></span> <span class="<p><a id="X7E3160E67C504F37" name="X7E3160E67C504F37"></a><
[ ab - 1 , 0]
[ 0, b^2 - 2 ]
</pre></divjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0

<p>The Gröbner basis record for this data is found by <code class="func">SGrobnerModule<<>Returns: A basis of the module obtained from the free module of rank <var class="Arg">mt</var> over the free algebra on <var class="Arg">t</var> generators by factoring out the submodule generated by the elements of <var class="Arg">GBR</var></p>


lass="example"<pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBR := SGrobnerModule([v1,v2],[p1,p2]);;</span>
<span>
 b - a
 a^3 - 1
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GBR.p);</span>
 ,1 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
[ a - 1 , 0]
</pre></div>

<p>The vector <code class="code">w</code> is brought into strong normal form with respect to <code class="code">GBR</code>:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">w := [[[-1,2],[-2,1]],[1,-4]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(w);</span>
[ b , - 4a ]
<span class="GAPprompt">gap></span> <span class="GAPinput">v := StrongNormalFormNPM(w,GBR);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(v);</span>
[ 1 , 0]
</pre></div>


<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap2.html">[Previous Chapter]</a>    <a href="chap4.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chapA.html">A</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

Messung
CHZG
8610010095

¤ 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.0.104Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

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 und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104857
#Domains=439445