Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/semigroups/tst/standard/semigroups/   (GAP Algebra Version 4.15.1©)  Datei vom 29.7.2025 mit Größe 4 kB image not shown  

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://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<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();</script>
</head>
<body class="chap3"  onload="jscontent()">


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

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

<p id="mathjaxlink" class="pcenter"><a href="chap3_mj.html">[MathJax on]</a></p>
<p><a id="X86FA580F8055B274" name="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-2 GP2NPList</a></span>
<span class="ContSS"><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>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X78F44B01851B1020">3.2 <span class="Heading">Printing polynomials in NP format</span></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="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X81381B2D83D2B9A9">3.4 <span class="Heading">Gröbner functions, standard variant</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7CD9F9C97B2563E2">3.4-1 Grobner</a></span>
<span class="ContSS"http:/ww.3.rg/R/html1/TD/html1-trict.dtd">
<pan"ontSS">< /<pan class"ocss"&;nbsp<span< href"hap3.#80D4D22C7E643C7B"3.- </>/java.lang.StringIndexOutOfBoundsException: Index 136 out of bounds for length 136
< class=ContSS>br>spanclass=" nbsp;/span>a "hap3h#X7D17F9027F08CF0B">.-4 IsStrongGrobnerBasis<a>/pan>
</ead>
<span "ontSS"<r /<pan class=nocss"&bsp;nbsp;/pan>a href="chap3.tml#8752DA1A7CAF77D3"3.- MakeGrobnerPair><>
<div/>
<java.lang.StringIndexOutOfBoundsException: Range [20, 4) out of bounds for length 169
        algebras</span></a>
</span>
<java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
<span class=ContSS"<r >span class=nocss"nbsp&;</span>a =chap3.html#7EAA04247B2C6330"3.- <a>/>
<span class="ContSS"><br /><span class="nocss">  << id="name=". </a>/pan>
<span class="ContSS"><br<pan class="ontSS">java.lang.StringIndexOutOfBoundsException: Range [127, 128) out of bounds for length 127
<span class="/iv><div>
<span class=ContSS>br/< class"ocss"&bsp;nbsp<span<a href=chap3h#80C4D0E882B05FDF55MulQA<a><span>
< class=ContSS">br /<pan class=nocss"&bsp;;/pan>a href="hap3.html#8563683E7FA604F8">.- StrongNormalFormNP<a>/>
/>
<divspan>>
</span>
<div="ontSSBlock>
< /><span class=;n<span>ahref"chap3.#835737DCF0471"3.-DetermineGrowthQAa<span
<< class=ContSS"<r /<pan class="ocss">  </span><a href="chap3.html#X80D4D22C7E643C7B">3.4-3 IsGrobnerBasis</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7CFD47367CF309EB">3.6-3 HilbertSeriesQA</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X863124677B933CEE">3.6-4 PreprocessAnalysisQA>/>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7BA5CAA07890F7AA">3.7 <span class="Heading">Functions of the
            /pan<ajava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
</span>
<div class="ContSSBlock">
<.7-1 EvalTrace<a</pan
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 27
< class"ontSS"< /<pan class"ocss"&bsp&;/>ahref".#">373</>/>
<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 SGrobnerTraceclass"ontSS"<br/class"ocss"&; <span<href"hap3.#7DFA841A8425DD94"3- MatrixQA<>/>
<span class="ContSS"><br /><span class="nocss">  </span><a href="span =""< /< =""&bsp;nbsp;/pan>hrefcjava.lang.StringIndexOutOfBoundsException: Range [106, 80) out of bounds for length 127
/</iv>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3./iv>/>
<span
<div class="ContSSBlock">
<panclass=ContSS"><r /< =nocss" nbsp;/pan><a ="hap3.tml#7A489A5D79DA9E5C.- span class=Heading"Examples</pan>/>
<span
<span =C"br >spanclass=nocss"&;nbsp<span<href"hap3.#X792E39A98717D779">3.- FinCheckQA<a><span>
< class="nocss"&;<span<a ="hap3.tml#X83C9E598798D5809">.- </a<spanjava.lang.StringIndexOutOfBoundsException: Index 141 out of bounds for length 141
<span class="ContSS"><br /><span class="nocss">  div<div
<span class""< /< "ocss" nbsp;/>a href=chap3.tml#7C6882DB837A9F5A">.- DimsQATrunc<a>/pan>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7FBA7F1D79DA883F">3.8-6 FreqsQATrunc</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html</span>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br />spanclass"ontSS"<r /<pan class="nocss">nbsp;&bsp;<span>a href=chap3.#X813454F6799B1D57< >span=n"&;nbsp;/>a ="hap3htmlX7java.lang.StringIndexOutOfBoundsException: Range [107, 103) out of bounds for length 152
<java.lang.StringIndexOutOfBoundsException: Range [22, 5) out of bounds for length 133
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html# class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7C6882DB837A9F5A/
<span =ContSS"< /< =nocss"&;nbsp</pan>< href"hap3.#X805FB42A7EEF510F>3.- MulQM<a>/java.lang.StringIndexOutOfBoundsException: Range [127, 126) out of bounds for length 127
< ="ontSS" class=nocss" nbsp;/span>a href=chap3.html#87D51A8379C50A80"3.- StrongNormalFormNPM<a>/pan>
</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"></a></p>

<h5>3.1-1 GP2NP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; GP2NP</code>( <var class="Arg">gp</var> )<<div class=ContSect"> =t">span ="n;<span> href="chap3htmlX8706DD3287E82019. < "eading>    <span<a
<>eturns Ifvarjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 469

<p>This function will convert an element of a free algebra to a polynomial in NP format and an element of a free right module to a vector in NPM format.</p>

<p><em>Example:</em> Let <code class=spanclass"ontSS"</< ">nbsp


<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
< class=GAPprompt">ap&t;/><panclass""A:=(,"""";;/>
<span class="GAPprompt">gap><>:IfvarclassArg>/ an element of algebra thenpolynomialNP s< =.XFDF3E5E7F33D3A2< ="efLink"2.<span>/> corresponding< class""gp/ar; if<class"rg"gp<>isan ofafree module, then the vector  NPM format (  <a href=chap2.tml#7B27E2D1784538DE"<pan class=>22/span></a) corresponding to var ="rggp/ar./>
<span class="GAPprompt">gap></span> <span class="GAPinput">b:=A.b;;</span>
<span =">&;/span><span ="APinput>e:OneA;<span
<span class="GAPprompt">gap></spanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</re>/>

<p>Now let <code class="code">gp</code> be the java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span =GAPprompt>ap<span spanclass"APinput>:=.;<span
(-1)*<identity ...>+(-1)*a*b+(1)*b*a
</>/>

<p>The polynomialjava.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 81


<div <div
<span class=">Now let <code class"gp/  thepolynomial < =SimpleMath>--<span><p>
[ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></span =GAPprompt">ap&t;/pan><span class=GAPinput"gp:ba*b-;/pan>

<p>The polynomial in NP format, corresponding to <code class="code">gp</code> can now


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

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


<div class="example"><pre>
<="GAPprompt">ap&t;/pan <span class="GAPinput">R := [ [b-e, z], [e+a*(e+a+b), -e-a*(e+a+b)] ];;</java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 0
</pre></div>

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


<div class="example"><pre>
<class"GAPprompt"gapgt;<span>< class=G"List(,P2NP)<span>
-,] [- ]]  ,-1]]
  [ [ [ -1, 1, 2 ], [ -1 ,[- ]][1 ,-,-1 ,-,1 1]]
          [ -2, 1 ], [ -1 ]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

<p><a id="X7CF0ED937DDA5A7E" name="div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GP2NPList</code>( <var class="<p>Returns: The list of polynomials in NP or NPM format corresponding to elements of a free algebra or module occurring in the list <vjava.lang.StringIndexOutOfBoundsException: Index 163 out of bounds for length 163

<h5>3.1-2 GP2NPList</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; GP2NPList</code>( <var class="Arg">Lgp</var> )</td><td class="tdright">( function )
<p>Returns: The list of span class="GAPprompt">gap/><pan class=GAPinput"a:.;/>

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

<p><em>Example:</em> Let </>/>


<div class="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne(Rationals,"a" -1)&t;dentity.&t;()a2 -)&t; ..gt+1*^,
<span class="GAPprompt">gap></span> <span class="<pre><div>
<="APprompt"gap></span>< =G"b:A.;</panjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<span <iv class"xample>prejava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
<pre<div

<p>Let [[[1,,[ ]] [1,- ] ] [[[2,2 ] [ ]] [1,- ]]


<div class="example"><pre>
<span class=GAPprompt">ap&t;/pan><panclass"APinput>gp:[^-,^-,ba-*-]/span>
[ (-1)*<
  &;dentity ..gt;(1)a*+1)ba ]
</pre></div>

<p>The polynomial in NP format corresponding to <code class="code">gp</code> can be obtained withclass=GAPprompt">ap&<span spanclass"APinputList(Lgp,) =GP2NPList(gp)<spanjava.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102


<div class
<pan class="GAPprompt">gap></span> <span class="GAPinput">GP2NPList(Lgp);</span>
    ,1 ,[ ]][1,- ]] [[[ ,[  ,[1,- ],
  [ [ [ 2, 1 ], [ 1, 2 ], [  ] ],<Returns  GAP format of the polynomial var="rg">p<>inNPformat<p
<pre>/iv>

<p>The same :/>Let<ode code><code>be the free associative algebra with one over the rationals    < =""a/  <class""b/>./java.lang.StringIndexOutOfBoundsException: Index 195 out of bounds for length 195


<class"xample>pre>
<panjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 102
true
</pre></div>

<p><a id="

<h5 class""gap&t;<span><pan class=GAPinput>:=[[2,1 ] [,2] []]  (30 3,Z3  ;<span

< ="func"<able=f"="00%>>tdclass"dleft"< =f"&8227;NP2GP</ode> var class="rg><var> <classA"A</ar>)/>td =t"(nbspfunctionn)/<tr/>/java.lang.StringIndexOutOfBoundsException: Index 239 out of bounds for length 239
<p>Returns: example"<re>

<p>This function will convert a polynomial in NP format to a GAP polynomial in the(())b*+Z()**+Z(3)*lt;dentity ..gt;

<pNotesome of the coefficient field of a polynomial <ode class=code"np<code>in NP formatcan be java.lang.StringIndexOutOfBoundsException: Range [129, 128) out of bounds for length 186


<div java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
<span classspan class=GAPprompt"&t;<span>span class=GAPinput"One(p[]1];span>
</pre></div>

<p>Let <code<Now let <ode =code></odebethe module < =c>^<code  let <ode class=code">pm<code>be a polynomial over that  inNPM </>


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

<p>The polynomial can be java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0


<div java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
< class=G"gap>/pan>< =G">NP2GP(p,)<span
(Z(3)^ =""gapgt;span <span class="GAPinput">NP2GP(npm,M);</span>
<pre</iv>

<p>Note that some information java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


<div class="example"><pre>
<java.lang.StringIndexOutOfBoundsException: Range [22, 5) out of bounds for length 83
Z(3)^0
</pre></div>

<>ow<code class="ode"M<code>be themodule<ode="ode"A^<code andlet< class=code">pm> be a polynomial overthat module in NPM form./>


<=""<pre>
<span class=GAPprompt">gap>/pan>  class=GAPinput">:A^;</pan>
<span ="APprompt"gap&t;/pan span class=GAPinput"List(np, gt; NP2GP(,);/pan>
</pre></div>

<Theelement of< class=Arg"M<var>corresponding <ode ="ode"npm/> is/>


<div
<<< X844A23EA7D97150C=X844A23EA7D97150C">/>/>
[ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre>

<Ifcode class=code"><code   module  dimension 2 over < =></code> and< =c"Lnp/ode>a list of polynomials in NPM formatthen polynomials can be converted to the  polynomials codeclass"ode"><codeasfollows<p


<div class="example"><pre>
<span java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
< =GAPprompt>&t;/pan><java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 119
<>
<span class="GAPprompt">gap></span> <span class="GAPinput">List(Lnp, m -> NP2GP(m,M));</span>
[ [ <zero> of ..., (Z(3))*a+(Z(3)^0)*a^2 ], [ (Z(3)^0)*b^2, (Z(3))*ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</>/divjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

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

<h5>3.1-4 NP2GPList</java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

divclass"unc"<class"unc"width=100%>tr<dclass=tdleft"< class="func>;NP2GPList/>(varclass=Arg"Lnp<var> <ar class=Arg"A<var>)/dtd class=tdright"(&bsp;function <td>tr>/>/iv>
<p>ReturnsLetcode class=code"Lnp<code>be a list of polynomials in NP format. Then <code class="code">Lnp</code> can be converted to a list of polynomials of <code class="code">A</code> with NP2GPList:</p>

<p>This function will convert the list <var class="Arg">Lnp</var> of span class="GAPprompt">></span> <span class="GAPinput">  [ [ [ 2, 2 ], []]];/pan>

<p><em>Example:</[ ()^+(1*,()b^+-)&t;dentity .&;]


<div class="example"><pre>
<span class=GAPprompt>&t;/pan><pan class"APinput>=FreeAssociativeAlgebraWithOne(ationals,a""";<span
</pre></div>

<p>Let <code class="code">Lnp</codespan class=GAPprompt"gap&t;/pan><pan"APinputList(np,p -gt;NP2GP(,);/pan>


<div /pre></div
<span class="GAPprompt">gap><Nowlet <ode class""M/ode>java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 309
<span class="GAPprompt">></span> <span class="GAPinput">  [ [ [ 2, 2 ], [ ] ], [ 1, -1 ] ] ];;</span>
<span class
[ (1)*a^3+(-1)*a, (1)*b^2+(-1)*< class="<>
</>/>

<p>It has the same effect ="APprompt"gap&t;<span><pan class=GAPinput">np:[[[[-, 1,1,[-,1 ] ] [ 1,1,-  ]<span>


<div class=example"<re>
<span class="[ [ <zero> of. -1)a+1)a^ ,[()a,(1*l;dentity..gt;]]
[ />/>
<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>Now let <code class=java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0


<div class=" class="GAPpromptgap&t;<span><pan class""ListLnp, &t;NP2GP(m,M) =NP2GPList(np,);/pan>
<span class="GAPprompt">java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 12
<panclass=GAPprompt">ap>/span>< =GAPinput">np:[[ 2,1,1 ,[-,1 ]]  ,-  ,/>
<span class="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span =GAPprompt>gap&t;</span> <pan class=GAPinput>(,)<span>
[ [ <zero> of ..., (-1)*a+(1)*a^2 ], [ (1)*
</pre></div>

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


<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<)) = NP2GPList(Lnp,M <spanjava.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 119
true
</pre></div>

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

<h4><divclass"xample"<re>

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

<h5>3.2-1 PrintNP</h5>

<div class="func"><table class="func" width="100%"><tr><td classp>t can be printed   guise a   code="ode"a<>and <code =c"b<code>bythefunction code class=c>rintNP</>:/>
<p>This function prints a polynomial <var class="Arg">np</var> in NP format, using the letters <code class="code">a</code>, <code class="code">b</code>, <code class="code">c</code>, <span class="SimpleMath">...</span> for <span class="SimpleMath">x_1</span>, <span class="SimpleMath">x_2</span>, <span class="SimpleMath">x_3<>By defaultthegeneratorsoftheareprinted code class"ode"<,.,<class"ode"l/> everything   generator  code=code">/.By  codejava.lang.StringIndexOutOfBoundsException: Range [219, 218) out of bounds for length 443

<>Thisfunction  a <var class=Arg"np<var>in NP format as configured by function < class""GBNP.</code>(a =".tmlX7F7510A878045D3Aspan=RefLink>.2<span>/>./>

<p><em>Example:</em> java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 5


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

<Itcan beprintedin guise ofapolynomial in < class"ode"a/>and<java.lang.StringIndexOutOfBoundsException: Range [97, 96) out of bounds for length 167


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 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 ><strong class="Mark">integer<dt>
<>  thegenerators algebra are printed as <ode class=code"a<code> ... <ode classcode"lcode> and everything after  twelfth generator as <ode class="x/>.By calling <ode class="ode"ConfigPrint<code>it  to alter this printingconvention  arguments)will be analgebra arguments used for naming algebras in GAP upon creation.  specifically we have the following./>


<dl>
<dt><strong class="Mark"><em>no arguments</em></strong></dt>
<dd><p>When the function is invoked without argumentsprinted  codeclass="ode"&t;&t;&t;&t;/ode> java.lang.StringIndexOutOfBoundsException: Range [179, 177) out of bounds for length 611

</dd>
<dt><strong class="Mark">algebra</strong></dt>
<dd><p>When the function is invoked with an algebra as argument, generators will be printed as they would be in the algebra.</p>

</dd>
<dt><strong class="java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
<dd><p>When the function is invoked with an dd><p>When the function is invoked with a sequence of strings, then generators will be printed with the corresponding string or <code class="code">x

</dd>
<dt><strong class="Mark">java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
<>When functionisinvokedwithanleftmodulespanclass=SimpleMath>^n<spanan   asargument,generators will beprinted they would be inthe algebra,separated over the <var class="Arg">n</var> dimensions.</p>

</dd>
<dt><strong class="Mark">string</strong></dt>
<dd><p>When the function is invoked with a string as its argument, it is assumed that there is only 1 generator and that this should be named as indicated by the string.</p>

</dd>
<dt><strong class="Mark">integer</strong></dt>
vokedwith an integer asits argument,the <ar class=Arg>/>thgeneratorwill be < class"odex.lt;&;/>./>

<java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
integer,string<strong/>
<dd><p>When the java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0

</dd>
<java.lang.StringIndexOutOfBoundsException: Range [31, 3) out of bounds for length 66
<dd><p>When the function a2b -1

</dd>
</dl>
<p><em>Example:</em> Consider the following two <>/>


<div
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint("x","y");</span>
</pre></div>

<p>They can be printed by < ="APprompt"gap&t;<span><pan class=GAPinput"PrintNP(2<span>


<div class="example"><pre>
<>e can also let the variables be printed as <ode class=code"x.<code>and <code classcode"x2/>insteadof<class"ode"a/>and< class=code"b<code>by java.lang.StringIndexOutOfBoundsException: Range [191, 190) out of bounds for length 241
 a^2b -
<span class="GAPprompt">gap< class=example">pre>
 ab^ -1
</prespan class"APprompt"g;/>< class"APinput>(p1)</span

<p>We can let the variables be printed as <code class="code">x</span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p2);</span>


<div class="example"><pre>
<GAPinput">GBNP.(x""";/pan
<span class="GAPprompt
 x^2y - 1
<span class="GAPprompt">gap></span> <span =GAPprompt>ap&t;/pan><panclass""GBNPConfigPrint"""ob)<span>
 ^  1
</pre></div>

<p>We can also let the variables be printed as <code span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p2);</span>


<div class="example"><pre>
<span class="GAPprompt">pAlternativelywe introduce the free algebra <ar class=Arg"A<var two generators,and print the polynomials as members of <ar class=Arg"A<var><>
<span class="GAPprompt">
 x.1^x -1
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p2);</span>
 x.1x2^-1
</pre></div>

<p>We can even assign strings to the variables to be printed like <code class="code">alice</code> and <code class="code">bob</code> instead of <code class="code">a</code> and <code class="code">b</code> by means of <code class="func">GBNP.ConfigPrint</code>.</p>


<div class=GAPprompt&<span <class""PrintNP(2)/>
<span class^ -1
<span class=GAPprompt"gap&t;<span><pan =GAPinput">PrintNP(1)<span>
 alice^
<p>a id=X832103DC79A9E9D0"name=X832103DC79A9E9D0>/>/>
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
</pre></div>

<p>>This function a list var="rg">Lnp<var>of polynomials in using function < class"ode"PrintNP/>/java.lang.StringIndexOutOfBoundsException: Index 144 out of bounds for length 144


<div class="example"
<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>
<java.lang.StringIndexOutOfBoundsException: Range [11, 5) out of bounds for length 81
 a^2b - 1
<class"APprompt"gapgt>span=GAPinput>(2)<spanjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
 sp class=GAPprompt>gap&t;/pan><pan class="APinput"Lnp := [1,2];/pan
</>

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

<h5>3.spanclass"APprompt"gap>/pan><pan class""PrintNPListLnp)<>

<div class="ab^  1
<> function prints a list <ar "rg"Lnp</ar  polynomials in NP  NP format  thefunction <ode ="ode"PrintNP<code><p

<p><em>Example:</em> We put two polynomials in NP format into the list <code class="code">Lnp</code>.</p>


<div class="example"><pre>
<span =GAPprompt"gap&t;/span> <span class=GAPinput">1 : [[,,][]1,1]];/pan>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
<pan class=GAPprompt"gap&t;/pan><pan class=GAPinput"Lnp : [1,2];/>
</pre></java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0

<>e can print the list with <ode class=PrintNPListcode<p


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

<p>Alternatively, using the function <code class="func">GBNP.ConfigPrint</code> (<a href="


<div class="example"><pre>
<span class="GAPprompt">gap&java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
<spanclass"">&t<span spanclass""np: [[,,,11][][,,],1,3];<span>
<panclass=GAPprompt">ap>/pan span class=GAPinput"PrintNPList(np)<
 a^2b - 1
 ab^2 - 1
</>/>

<pre<div>

<h4>3.3 <span class="Heading">Calculating with polynomials

<p><a id="div class="func class=func"width"00%"<>tdjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 225

<h5>3.3-1 NumAlgGensNP</h5>

<div class:  number <ode class=code"><code> thateach polynomial in <ar ="rg">np/>java.lang.StringIndexOutOfBoundsException: Range [121, 120) out of bounds for length 187
<p>Returns:

<p> <var class=Arg"np<var>  function returns the minimum number ofgeneratorsneeded the     the< =Arg"np<var>  <ar class="><var>is   without generators  is,equivalent  < class="0/pan or<class"SimpleMath">1</span>, then <code class="code">0</code> is returned.</p>

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


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

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

<h5>3.3-2 java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0

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

<p>hen calledwith alistof NP polynomials =A"Lnp<var>  function returns the minimum number of generators needed for the corresponding algebra to contain the NP polynomials in <var class="Arg">Lnp</var>. If <var class="Arg">Lnp</var> only contains polynomials without generators, that is equivalent to <span class="SimpleMath">0</span> and <span class="SimpleMath">1</span>, then <code java.lang.StringIndexOutOfBoundsException: Index 413 out of bounds for length 169

<>em>xample:/m>Consider the following polynomials in formatp


<divclass=example">pre
<span class="GAPprompt">gap&java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="span class="GAPprompt">gap></span> <span class="GAPinput[-,,,3,][2,-],1-2,]];>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(span=""gapg;/>spanclass"APinput"PrintNP(p)<span>
 a^2[abca +1 ,-2 ]
 java.lang.StringIndexOutOfBoundsException: Range [7, 2) out of bounds for length 11
<</pre/>
4
</p><a="X8119282084CA8076" name=java.lang.StringIndexOutOfBoundsException: Range [58, 52) out of bounds for length 62

<p><a id="X782647C57D148379" name="X782647C57D148379< ="unc>table class=func" width=100%< =tdleft"<ode class=func">#227;NumModGensNPList<code> < =Arg>npm/>)/>td class=t"(nbspfunctionnbsp)/d<tr/>div

<h5>3

<div class=func"<able class"unc =100"<><d ="dleft>codeclass"unc";NumModGensNP/ode(<class"rg"npm</ar>)<td>td class=tdright"(nbspfjava.lang.StringIndexOutOfBoundsException: Range [191, 190) out of bounds for length 221
<p

<pWhen called with  < =Argnpm/var in NPM , this function returns the minimum number of module  java.lang.StringIndexOutOfBoundsException: Range [144, 143) out of bounds for length 353

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


<div class="example"><pre>
<spanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt"< =GAPprompt"&t;/><span class=="GAPinput>  [[1,1,,,][2][1],1,2,];<span>
[1,- 2 ]
<pan class=GAPprompt">ap><span span class=GAPinput"NumModGensNP;/>
2
</pre></div>

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

<h5>3.3-4 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 12

<ivclass"unc"< class=f"width="00%<trtdclass"dleft"codeclass"func"&8227;NumModGensNPListcode(< =Arg><var <td>td class=">&; <td>/tr>/><div>
<p>Returnsh5>.3- AddNP<h5>

<pdiv class=func"<able class=" width"%">tr< class=tdleft

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


<div java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< =""gap
<><span< ="APinput>v2 : [[22,,,],-],[1,-1]];/>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList([v1,v2]);</span>
[  +1 ,-2 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
[ 0, <div clas="xample">pre>
<spanclass=GAPprompt">ap&t;span>< =G">PrintNPA(p1p2,,1);/pan>
 ab^  ^2  1
</pre><//re>div

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

<h5>3.>36BimulNP<>

<div "unc"< class=func"width=100%>tr><d =t">code class=func"&8227;BimulNP( < =A"ga/>,< class"Arg"np<var>, <ar class"rg<var>)/><d class="tdright">( function )</td></tr></table></div>
<p>Returns: <var class="Arg">c</var><span class="SimpleMath">*</span><var class="Arg">u</var><span class="SimpleMath">+</span><var class="Arg">d</var><span class="SimpleMath">*</span><var class="Arg">v</var></p>

<p>Computes <var class="Arg">c</varpWhencalled witha polynomial < class=Arg"np<var>and two monomials <ar class=Arg"</ar*/span>var class=Arg><var< class"impleMath>*>< =Arg><var>  from  <a ="chap2#7FDF3E5E7F33D3A2"<pan class=RefLink"2.<span>/>that are represented as lists.<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,-3]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-4]];;</span>
</></div>

<p>The second can be subtracted from the first by the function <code class="code">AddNP</code>.</p>


<div class="example"><pre>
<span class="<pan class=G"gapg;/> <pan class=GAPinput"p2 : [[,,]],1-4];<
 -<pre>/iv>
</pre

<>aid"84FC611A822D808F"name"84FC611A822D808F"<a<p

<h5>3.3-6 BimulNP</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; BimulNP</code>( <var class="Arg">ga</var>, <var class="Arg">np</var>, <var class="Arg">dr</var> )<Returns The  up   < =A"<var>/java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
<p>Returns: the polynomial <var class="Arg">ga<iv =e"<re

< class=GAPprompt"gap>/pan>< class=GAPinput"PrintNP()>

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


<div class"xample"<>
<span class="GAPprompt">gap>< class=example"<re>
<class"">&t;/span>< =GAPinput> : [[,,][],1,4];<span>
</pre></div>

<p>Multiplyingpre<divjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(BimulNP([],p1,[2]));</span>
 a^2b^3b
class"APprompt"gap&t;<span><pan class=G"PrintNP((1,,]);span>
 a^2b^2 - 4a
</pre></span classGAPprompt>ap>/span><span class=GAPinput">leanNP()</>

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

<h5>3.3-7 CleanNPp< id=X7D05B60E83FDA567"name="7D05B60E83FDA567"<a<p>

<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="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>Returns: The cleaned up version of <var class="Arg">u</var></p>

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


<div class="example"><pre>
<panclass=GAPprompt"gap&t;/span><pan class"APinput" : [[,,][,][][,3,2,];<span>
<span class="span =GAPprompt">ap&t;/pan><pan class="GAPinput"u : [,,]<>
 a^b -3 -2a^b +3
<span class=GAPprompt;span <panclass"APinput"v: 221;/>

<p>he monomials <ode class=code">1,,]< class=code">]/ode>occur twice each For many  this representation of a inNPformat  allowed.It needs to  cleaned,as by <ode ="unc"CleanNP:/>


<div class="example"><pre>
<span class<>e test whether < =""><code>isgreaterthan <ode class=code"<code./>
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></div>

<p>norder  apolynomial < class"impleMath>(2)/pan>  need to be definedoverthis .Sucha list  coefficients canbe obtainedGAP from alist    multiplying   identity  ofthe field.The java.lang.StringIndexOutOfBoundsException: Range [276, 275) out of bounds for length 383


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

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

<h5>3.<>eturns =code"true</ode>if span class=S"u&t; v/  java.lang.StringIndexOutOfBoundsException: Range [97, 96) out of bounds for length 167

<div<>Lessfunction   NP monomials, tests whether <ar class=Arg"><var>span class=SimpleMath"&t;<span ="rg"v<var.The ordering is done by degree and then lexicographically.<p>
<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

<p

<div class""<>


<div class="example"><pre>
<panclass"">apgt;/pan>< =G"u : [,1,]<span>
[ 1, 1, 2 ]
<span class="GAPprompt">gap></span> [ ,1]
[2,2,1]
</pre></div>

<p>We test whether <<pWe test whether <ode class=code"u<code>is less than <java.lang.StringIndexOutOfBoundsException: Range [71, 65) out of bounds for length 92


<div class="example"div class=example"<re>
<panclass"APprompt">ap&t;/pan><pan class=G"GtNP(,)</pan>
false
</pre></div>

<p><a id=" id="X7A42AE79811CC5D7"7>/<p

<h5>3.3-9 LtNP class=func"<able "width"00%>tr>td class=tdleft"<ode class="&8227;LMonNP/>(< class="Lnp/>)/d>td class="tdright>&;unctionn;<td>/>/able>/iv>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; LtNP</code>( pReturnsThe monomial a list   monomials.p
<p>:<ode class=code"true/>if <pan classSimpleMath"> &t <span  <code class=code"false<code>if < classSimpleMath"u≥span>/>

<p>Less than function for NP monomials<<>Example:/m>We  two  inNP format into the  < class=code"Lnp</ode>/>

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


<div class="example"><pre>
<panclass""gap&t;/pan spanclass=G"u : [,,]<span>
[ 1, 1, 2spanclass"APprompt";/>< =G"p2 : [[,,][],1,1];<span>
<span class=GAPprompt">ap&t;/span><pan class=GAPinput"v : [,,1];/pan>
[<pre<div
</java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0

<p>We test whether <code


<div class="example"><<span class="GAPprompt">g;/pan>spanclass"APinput"LMonsNPLnp;/span>
<span class""gapg;/>< ="APinput"LtNP(,)<span>
true
<pre>/iv>

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

<h5>3.3-10 LMonNP</h5>

<div class="func"><table class="func" width="100%"><tr><td p> The leadingtermora list of  terms.<p
<div <functions theleadingterm ofapolynomial(esp.  terms  a listof polynomials) in NP format. The polynomials of <var class="Arg">Lnp</var> are required to be clean; see Section <a href="chap3.html#X855F3D4C783000E3"><span class="RefLink">3.3-7</span></a>.</p>
<p>Returns: The leading monomial or a list of leading monomials.</p>

<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 <var class="Arg">Lnp</var> are required to be clean; see Section <a href="chap3.html#X855F3D4C783000E3"><<span =GAPprompt>&;/ ""Lnp: [1p];/>

<p><em>Example:</em> We put two polynomials span class="GAPprompt">gap></span> <span c: LTermsNP  ;/>


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

<p>The list of leading monomials is computed by <code classp>eturns: <ar class=Arg"np<>made monic/java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52


<div class>>:/m  the following polynomial  format.<p>
<
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></div>

< into polynomialsinNPformat and submitted PrintNPList<p


<div class="example"><pre>
<panclass=GAPprompt"gap&t/>< class=GAPinput"PrintNPList(istLMonsNPLnp,q&;[q][]);/span>
 a^2b
 ab
</pre

<p>"></a></p>

<h5>3.3-11 LTermNP</h5>

<ivclass=func"<able class=func"width"%>tr>td class=tdleft">code=func"><code(<var class=Arg">np<var>)/d>td class"dright"(nbspfunction )/d>/able/>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; LTermsNP</code>( <var class="Arg">Lnp</var> )</td><td class=
<>:The termor a list ofleadingterms./>

<p>These functions return the leading term of a polynomial (resp. the leading terms of a list of polynomials) in NP format. The polynomials of <var class="Arg"<Returns:< class=Arg">p<var> Gcdc)factoredout>


<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="GAPinput">p2 := [[[1,2,2],[2]],[8,-9]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Lnp := [p1,p2];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">LTermNP( p1 );</span>
[ [ [ 1, 1, 2 ] ], [ 6 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">LTnp := LTermsNP( Lnp );</span>
[ [ [ [ 1, 1, 2 ] ], [ 6 ] ], [ [ [ 1, 2, 2 ] ], [ 8 ] ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList( LTnp );</span>
6a^2b
8ab^2
</pre></div>

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

<h5>3.3-12 MkMonicNP</h5>

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

<p>This function returns the scalar multiple of a polynomial <var class="Arg">np</var> in NP format that is monic, i.e., has leading coefficient equal to 1.</p>

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


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p := [[[1,1,2],[]],[2,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP<p>em>Example:</em> Consider the following polynomialinNP format./>
 2a^2b - 1
</pre></div

<p>The coefficient of the leading term is <span class="SimpleMath">2</span>. The function <code class="code">MkMonicNP</code> finds this coefficient and divides every term by it:</p>


<div class="example"><pre>
< <java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 91
 a2b - 1/2
</pre></div>

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

<>313java.lang.StringIndexOutOfBoundsException: Range [30, 25) out of bounds for length 30

<java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 222
<Returns:varA"np/ar> with Gcd(coefficients) factored out</p>

<p>This function returns the scalar multiple of a polynomial <var class="Arg">np</var> in NP format with integer coefficients such that its coefficients have Gcd equal java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

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


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p := [[[1,
<class"gapg;/ spanjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 80
 30a2b 
</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="java.lang.StringIndexOutOfBoundsException: Index 236 out of bounds for length 0


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

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

</5

<div class="func"><table class="func" width="100%"><tr><td p>For a list <var class="Arg">Lnp</var> of polynomials in NP formatnormalto findaGrö Basis(ifpossiblegeneraljava.lang.StringIndexOutOfBoundsException: Range [190, 189) out of bounds for length 209
<Returns varclass=></ar<pan java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 101

<p>When invoked with two polynomials <var class="Arg">np1</var> and <var class="Arg">np2</var> in NP format, this function will return the product <var class="Arg">np1</var><span class="SimpleMath">*</span><var class="Arg">np2</var>.</p>

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


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

<The function< class=code">ulNP<code>multiplies the twojava.lang.StringIndexOutOfBoundsException: Range [81, 78) out of bounds for length 83


<class"example">
<span class="GAPprompt">gap></span> <span class=APprompt"gt<span><class=GAPinput"> : Grobner[p1];</pan>
 a2^ -^2-a^b +1
</pre></div>

<p>The fact that this multiplication is not commutative is illustrated by the following comparison, using <code class=</re><div>


<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="X81381B2D83D2B9A9" name="X81381B2D83D2B9A9"></a></p>

<h4>3.4 <span class="Heading">Gröbner functions class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(R.todo);</span>

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

<

<div class
<I terminatesGröbner aif<java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 134

<p>Fora^ -

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

<p>By use of the optional java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

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


<div class="example"><pre>
<span class="GAPprompt">gap><<pre></div>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1
<>.4-SGrobner/5>
 a^2b - 1
 ab^ -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 := Grobner([p1,p2]);;</span>
<class=GAPprompt">ap></span><pan classGAPinput"PrintNPListG);<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><><m>Example<em>Consider the java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 77
<span class="GAPprompt">gap></span> <span java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 98
 -a
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPListspan class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList([p1,p2]);</span>
 a^3 - 1
<span class="GAPprompt">gap></span> <span class="GAPinput">R.iterations;</spanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
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 GAPprompt">gap></span> <span class="GAPinput">PrintNPList(R.todo);</span>


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

<p>In order to perform the Gröbner basis computation with polynomials in a free algebra over the field <java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 0


<div pre></div>
<span class="GAPpromptjava.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 62
 <iv class=func"func"width=100"tr><d class="dleft"><code class="func">&#8227; IsGrobnerBasis</code>( <var class="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>
 a^3 + Z(2)^0
</pre></div>

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

<h5>3.4-2 SGrobner</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; SGrobner<<>Polynomials representing zero are allowed in <var class="Arg">G</var>.</p>
<p>Returns: If the algorithm terminates, a Gröbner Basis or a record ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>For a list <var class="Arg">Lnp</var> of polynomials in NP format <p>Returns: <code class="code">true</code> if <var class="Arg">G</var> isc ="ode"true</code> if <="Arg">G</ar> is astrong Gröbner basis and <code class="code">false</code> otherwise</p>

<p>When called with the optional java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0

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

<p><em><p>Polynomialsrepresenting zero are allowed in <var class="Arg">G</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],
<span class=<iv ="<re
<span class="GAPprompt">gap<pan class="GAPprompt">gap></span> <span class="GAPinput">Lnp := [[[[1,1,2],[]],[1,-1]], [[[1,2,2],[]],[1,-1]]];;</span>
 a^2 - 1
 2  -1
</pre></div>

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


java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 26
<span class="GAPprompt">gap></span> <span class="GAPinput">G := SGrobner([p1,p2]);;;java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
<span class="GAPprompt">gap><> the answer shouldbe code codejava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 110
 b - <divdiv class=example"<pre>
 a^3 - 1
</pre></div>

<p>One iteration of the Grö


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := SGrobner([p1,p2],1);;</span>
<pan class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(R.G);</span>
 b - a
nclass">gap&span <panclass=GAPinput">PrintNPList(Rt;/
 a^3 - 1
<span class="GAPprompt">gap></
1
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 81
false
</pre></div>

<p>The above list <code class="code  


<div class="example"><span class=GAPprompt>gap&t<span><panclass=GAPinput"IsGrobnerBasis(;/pan>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPListspanjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 93
 b - a
 a^3 - 1
</re>/div>

<p><java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 28

<h5>3.4-3 IsGrobnerBasisdiv class=func"<able classwidth=100%"<tr>td class=tdleftcode class="func"&#227;IsGrobnerPair/ode> <ar class="rg"G<var> <"rg">D</ar <td>td ="dright"(n;function&bsp;<td>/r<table>/div>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; IsGrobnerBasis</code>( <var class="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="code">true</code> if <var class="Arg">G</var> is a Gröbner basis and <code class="code">false</code> otherwise</p>

<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 function will check whether the list is a Gröbner basis. The java.lang.StringIndexOutOfBoundsException: Index 243 out of bounds for length 0

<p>Polynomials <span class="GAPprompt><span>  java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 98

<p><em>Example:</em> Considerjava.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 95


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Lnp :=<>java.lang.StringIndexOutOfBoundsException: Range [22, 15) out of bounds for length 159
<span class="GAPprompt">gap></span> <span java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 0
 a^2b - 1
 ab^2 - 1
</pre></div>

<p>The function <code class="code">IsGrobnerjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 12


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerBasis(Lnp)span class">apgt;</span span class="[p][])=[p1p2]);</span
false
</pre></div>

<p>So the answer >3.4-6 MakeGrobnerPair


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="
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: <code class="code">true</code> if <var class="Arg">G</var> is a strong Gröbner basis and <code class="code">false</code> otherwise</p>

<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 function will check whether the polynomials in this list form a strong Gröbner basis (see <a href="chapBib.html#biBCohenGijsbersEtAl2007">[Coh07]</a>).</p>

<p>Polynomials representing zero are allowed in <var classu java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 98

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


<div class="example"><pre>
< <span java.lang.StringIndexOutOfBoundsException: Range [60, 50) out of bounds for length 124
<span class="a2b-1
 a^2b - 1
 ab^2 - 1
</pre></div>

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


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

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


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput"><span class="GAPprompt">gap></span> <span class="GAPinput">GB := Grobner,GP.odo);/java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
true
</pre></div>

<p>A Gröbner basis that is not a strong Gröbner basis:</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">B := 
<span;<span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(B);</span>
 b - a
 3-1
 a^2b - b + a<="java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 98
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerBasis(B);</span>
true
<span class="GAPprompt">spanclass="GAPprompt>>java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 84
false
</pre></div>

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

<h5>3.4-5 IsGrobnerPair</h5java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2

<class=f>table class="func" width="100%">tr><td class="tdleft"><code class="func">&#='color: green'>8227; IsGrobnerPair</code>( <var class="Arg">G</var>, <var class="Arg">D</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A boolean, whichjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>When called with two lists of polynomials in java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 2

<p><em>Example:</em> Consider the following four 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 2,2],[]][,1]/
<
tjava.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 98
java.lang.StringIndexOutOfBoundsException: Index 150 out of bounds for length 12

<java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 159


java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 26
<span<div class=example"><pre>
true
<span java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
false
</pre></div>

<p>The function <code class="code">IsGrobnerPair</code> applied with an empty list as second argument is a check 


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

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

<h5>3.4-6 MakeGrobnerPair>iv class"java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26

<div class="func">< java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 489
<>Returns A record containinga newGrobnerp

<p>When called with as arguments a pair <span class="SimpleMath">G, D</span>, this function cleans <var class="Arg">G</var> and <var class="Arg">D</var> and adds some obstructions to <var class="Arg">D</var>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p><em>Example:</em> Consider the following two polynomials in NP <span class="GAPprompt">gap></span> <span class="GAPinput">B := BaseQA(GB,2,0);;</span>


<div class="example"><pre>
<span class="GAPprompt">gap></spanjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 3
<java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
</pre></div>

<p>The function <code [ [  0,  1,  0,  0,  0, ,0  0]


<div class="example"><pre>
<pan class="GAPprompt">gap></span> <span class="GAPinput">GP := MakeGrobnerPair([p1,p2],[]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList[  0  0 ,0, 
 a^2b - 1
 ab^2 - 1
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GP.todo);</span>
 b - a
</pre></div>

<p>These


<div class="example"><pre>
<span class="GAPprompt">gap></span>
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 26
 b - a
 a^3 - 1
</pre></div>

<

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

<="java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 62

<h5>3.5-1 BaseQA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><<div class">pre>
<p>Returns: A listof terms basisof java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 212

<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<pre></div>

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


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 :<5>3.54MatricesQA</5
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; MatricesQA</code>( <var class="Arg">t</varpjava.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 149
<span class="<>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">t</var>, this function creates a list of <var classjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class
 b - a
 a^3 - 1
<java.lang.StringIndexOutOfBoundsException: Range [7, 5) out of bounds for length 12

<p>The function <code class="code">BaseQA</code> computes a basis for the quotient algebra of the free algebra over the rationals with <pre><div>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span classjava.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 26
 b - a
 a^3 - 1
<span class=GAPprompt"gap&t;/span> <span ="GAPinput">BaseQA(G,2,0);</span>
[ [ [ [  ] ], [ 1 ] ]java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Range [5, 3) out of bounds for length 37
 1
 java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
 a^2
</pre></div>

<p>It is necessary for a correct result that the first argument be 


<div class="example[  0,0, ,  0,   1,0  ,0],
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(BaseQA([p1,p2],2,10));</span>
 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="</re>></div
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>When called with a Gröbner basis <var <53.5-5 MulQA</5>

 v ="tjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 236

<p>To check whether the dimension of<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>

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


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

<p>The ="GAPprompt<>s java.lang.StringIndexOutOfBoundsException: Range [60, 50) out of bounds for length 94


<div class="example"java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 93
<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>

<java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 268
<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>

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


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


<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">PrintNPList(B);</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));</span>
[ [  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,  1,  0,  0 ],
  [ ,  0,0  ,0, ,1   ,
  [  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 for java.lang.StringIndexOutOfBoundsException: Range [0, 71) 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> <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>) and a quotient module basis by <code class="func">BaseQM</code> (<a href="chap3.html#X7E3160E67C504F37"><span class="RefLink">3.9-2</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">B := BaseQM(GBR,2,2,0);;</span>
</pre></div>

<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></span> <span class="GAPinput">Display(MatrixQA(1,B,GBR));<<iv class="unc">table class=" width=100%><tr>td class=" class=func"&8227 DetermineGrowthQA<code> var class=Arg"Lm<var>,<class="rg"t<var> <ar ="Arg">xact<var>)/d>tdclass">&;function <td>/tr>/able>/div>
[ [  0,  1 ],
  [  1,  0 ] ]
</pre></div>

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

<h5>3.5-4 MatricesQA</h5>

<div class="func"><table classjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>Returns: The matrix representation for the <var class="Arg">t</var> generators of the algebra for right multiplication in the quotient algebra</p>

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

<p><em>Example:</em> Consider the following two polynomials in NP format.</pjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1


<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">p2 := [[[ [1, ,1 ,[2 2,1]]
</pre></div>

<p>The function <code class="code2


java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 26
s java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 93
<java.lang.StringIndexOutOfBoundsException: Range [11, 5) out of bounds for length 90
<span class="GAPprompt">gap></span> <span class="GAPinput">mats := MatricesQA(2,B,GB);;</span>
<span java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 98
[ [  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 ], span class="GAPinput">p2 := [[[2,2,2,1],[]],[1,z]];;</span>
  [,  0,0,0   01]
  [  1,  0,  0,  0,  0,  0,  0,  0 ],
  [  0,  0,  1,  0,  0,  0,  0,  0 ] ]

[ [  0,  0,  1,  0,  0,  0,  0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    ,0  , ,  , ,0,   ,
  [  0,  0,  0,  1,  0,  0<pan =>&<sjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 119
  [  0,  0,  0,  0,  0,  0,  1,  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 4
  [  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 "GAPprompt>gap>/span s ="GAPinput"M(2B,)=List([,] q-gt; MatrixQA(q,B,GB));</span>
true
</pre></div>

<p><a 

<h5>3.5-5 MulQA</h5>

<div class="func"><table class="func"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 178

<p>When called with two polynomials in NP form, </re></div>

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


<div class="example
<span div class="xample">re>
s 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]);;<java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 12
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(G);</span>
 b - a
 a^3 - 1
</pre></div>

<p>Print the product in the quotient algebra


<div class="example"><pre>
<">java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 94
<span class="GAPprompt">gap></span> <span class="GAPinput">s2 := [[[2],[]],[1,
< class">((1s,);/spanjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
 a^2 - 5a + 6
</pre></div>

<> beequalto the java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 198


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span
java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 4
</pre></div>

<< " ""<a>/>

<h5>3.5-6 StrongNormalFormNP</h5>

java.lang.StringIndexOutOfBoundsException: Range [165, 164) out of bounds for length 251
<p>Returns: The strong normal form of a polynomial with java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 0

<p>When invoked with a polynomial in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</java.lang.StringIndexOutOfBoundsException: Index 129 out of bounds for length 0

<p>Note that the StrongNormalForm with respect to a Gröbner basis is uniquely determined, but/>

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


<div class="example"><java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
<span F[;
sjava.lang.StringIndexOutOfBoundsException: Range [98, 97) out of bounds for length 98
>/div>

<p>The strong normal form of the polynomial</p>


d "example"<re>
<span class="GAPprompt">gap></span> <span class="GAPinput">p := [[[1,1,1,2],[2,1],[]],[1,-1,3]ba- ab
</pre></div>

<p>with respect to the list <code class=pAof"java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 177


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

<>aidjava.lang.StringIndexOutOfBoundsException: Range [33, 27) out of bounds for length 62

             </>/java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37

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

<h5>3.6-1 DetermineGrowthQA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; DetermineGrowthQA</code>( <var class="Arg">Lm</var>, <var class="Arg">t</var>,<div class="unc">table class=func" width=100"<tr>td class="tdleft"><code class="func">&#8227; EvalTrace</code>( <var class="Arg">p</var>, <var class="Arg">Lnp</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: If the quotient algebra is finite dimensional, then the integer <code class="code">0</code> is returned. ,thisprogram evaluates the trace by substituting the polynomials of <var class="Arg">Lnp</var> back in the expression <code class="code">p.trace</code> and computing the resulting polynomial. The result should have the same value as <code class="code">p.pol</code>.</p>

<p>Given leading monomials <var class="Arg">Lm</var>

<p>If the precise degree is needed in the polynomial case, the argument <var class="Arg">exact</var> should be set to <code class="code">true</code<spanpan ="APprompt"gap&t;</span> span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>

<p>The function rompt"gapg</java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 85

<p><em>Example:<


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

<p>Here java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 4


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L := [[1,2,1],
  ,,1 ][2, ,   
<span class="GAPprompt">gap></span> <span class<>invokedwithaArg>G</>ofjava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 125
2
</pre></div>

<p>In order to show how to apply the function to arbitrary polynomials, consider the following two polynomials in NP format.</p>


<ivclass="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">F := GF(256);</span>
GF^8)
<span class="GAPprompt"><pan class="GAPprompt">gap></span> <span class="GAPinput">PrintTraceList(GBT);</span>
Z(2^8)
<pre<>
<span class="GAPprompt">gap></span> <span <><a id="X8039BEE77C070FB1="X8039BEE77C070FB1">/a></>
</pre></div>

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


<divclass=e>pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0
c"GAPprompt"gap&t;<span> spanclass="APinput"L:= LMonsNP(B);/span
<span class="GAPprompt">gap></span> <span class="GAPinput">for lm  in L  do PrintNP( [ [ lm ], [ 1 ] ] <span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,1],[]],[1,-1]];;</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>(
<p>Returns: <code class="code">true</code>, if the quotient algebra is finite dimensional and<code class="code"> false</code> otherwise</p>

<a free algebra in which they are  java.lang.StringIndexOutOfBoundsException: Range [209, 208) out of bounds for length 352

pgiven Grö basis<java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 552

<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 class="RefLink">3.6-4</span></a>). This may speed up the computation.</p>

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


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L := [[1,2,1]<panclass="APprompt"gap>/span><spanclass="APinput"p1 : [112,],1-];</span
</pre></div>

<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 are <code class


<div class="example"><pre>
<java.lang.StringIndexOutOfBoundsException: Range [50, 5) out of bounds for length 85
false
</pre></div>

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


<ivclass="example><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">FinCheckQA
true
</pre></div>

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

<5>6 HilbertSeriesQA/h5

<java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 275
<p>Returns: A list of coefficients of the Hilbert series up to degree <var class="Arg">d</var></p>

<>a set monomials var class=rg">>, of whichdividesanother   number<java.lang.StringIndexOutOfBoundsException: Range [106, 105) out of bounds for length 273

<p>Internally, it   java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 46

<class"code> java.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 98


<divclass"xample"pre
<span class="GAPprompt">gap></span> <span class="GAPinput">L := [[1,2,1],[2,2,1]];;</span>
</pre></div>

<p>Finiteness of the [[ ,1 ], 2  1 ,-   )]


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 62
[ 1 2, 4,6,8,12 14,16, ,20 ]
</pre></div>

<p>This indicates that the growth may be polynomial. <code <p>Returns: The traced polynomial for the difference of <var class="Arg">f</var> with the strong normal form of <var class="Arg">np</var> with respect to <var class="Arg">GBT</varjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<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"
<p>Returns: The left-reduced list of `obstructions', obtained by applying left-reduction recursively</p>

c="Arg>Lm<var java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 808

<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);
:=(F[]java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,1,1,2],[]],[1,-1]];</<
<span class="GAPprompt">gap></span> <span <pp>Of the polynomial span class="SimpleMath">a^6</span> we compute its difference with the normal form. The result is printed by used of <code class="func">PrintNP</code> (<a href="chap3.html#X7B63BEA87A8D6162"><span class="RefLink">3.2-1</span></a>) and <code class="func">PrintTraceList</code> (<a href="chap3.html#X83D1560C7F2A04BA"><span class="RefLink">3.7-2</span></a>).</p>
s=G"g><span> <class="> : Grobner(p2);</spanjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
<span class="GAPprompt">gap></span> <span class="GAPinput">span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP>
 a^4b - 1
 ba - ab
 b^2 - a
 a^5 -G()a^  (ba+G(1)ba5+bG()a^  G()+Ga^G
/java.lang.StringIndexOutOfBoundsException: Range [7, 5) out of bounds for length 12

<p>Application of <code class="code">PreprocessAnalysisQA</code> is carried out on the leading terms of <java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
[ [ 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);</span>
[ [ 1, 1, 1 ], [ 2,1],[1,, 1,2],[2,2]]
<span class="GAPprompt">gap></span> <span class="GAPinput">L2 := java.lang.StringIndexOutOfBoundsException: Range [0, 88) out of bounds for length 0
[ [ 1 ], [ 2 ] ]
</re></div>

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

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

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

<h5>3.7-1 EvalTrace</h5>

<></div>
<p>Returns: The trace evaluated to a polynomial in NP format.</p>

<p>For a traced polynomial <var class="Arg">p</var> and a list <java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 0

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


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

<java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 561


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

<panclass=">gapg">(SGrobnerTrunc[p1,2]12[,])<java.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114

<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="tdright">( function )</td></tr></table></div>
<p>When invoked with a list <var class="Arg">G</var> 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 list of two polynomials in NP format and next we print it by use of <code class="code">PrintTraceList</<p><em>Example:</em> First we compute the traced Gröbner basis of the list of two polynomials in NP format and next we print it by use of <code class="code">PrintTraceList</code


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 0
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 100
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintTraceList(GBT);</span>
 aG(1) - bG(1) -<: list ofjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 177

 G(1)ba^2 + bG(1)ba + G(2) - a^2G(olynomials <var class="Arg">Lnp</var> and a weight vector <var class="Arg">wtv</var> (whose entries should be positive integers), this function returns the list of weighted degrees of the polynomials in <var class="Arg">Lnp</var> if these are all homogeneous and nonzero, and <code class="code">false</code> otherwise. Here, a polynomial is (weighted) homogeneous with respect to a weight vector <span class="SimpleMath">w</span> if there is constant <span class="SimpleMath">d</span> such that, for each monomial <span class="SimpleMath">[t_1,...,t_r]</span> of the polynomial the sum of all <span class="SimpleMath">w[t_i]</span> for <span class="SimpleMath">i</span> in <span class="SimpleMath">[
/re>/div>

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

<h5>3.7-3 PrintTracePol</h5>

<div class="func 2a -java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 14
<p>/pre</java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

<>em>Example:/em>First wecompute the tracedGrbner basis of the list of two polynomials inNP format. Next we print the trace polynomial of the members of the list by use of <code class="code">PrintTracePol</code>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput<java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 104
<span class="GAPprompt">gap
<span class="GAPprompt">gap></span> <span class="GAPinput">GBT := SGrobnerTrace([p1,p2]);;</span>
span class="GAPprompt">gap><span class"">or  inGBT do np;Print"n;<span>
 aG(1) - bG(1) - G(1)bajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 G(1h5384java.lang.StringIndexOutOfBoundsException: Range [26, 21) out of bounds for length 26

</pre></div>

<p><a id="X7DD0B56D7BD6CD98"

<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><td class="tdright">( function )</td></tr></table></div>
<Winvoked with a set of traced non-commutative polynomials <var class="Arg">G</var>, this function prints the list of the traced polynomials, without the trace.</p>

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


<div class="example"><pre>
<pan class=GAPprompt"gap>/span><spanclass="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,1],[]],[1,-1]];;</span>
<pan class="GAPprompt">gap></span> <span class="GAPinput">GBT := SGrobnerTrace([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPListTrace(GBT);</span>
 b - a
 a^3 - 1
</re></div>

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

<h5>3.7-5 SGrobnerTrace</h5>

<div class="java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
<p>Returns: Gröbner Basis, traceablejava.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 69

<<pan "APprompt<span><panclass="APinput">java.lang.StringIndexOutOfBoundsException: Range [79, 73) out of bounds for length 89

<p>The results will be traceable. Functions that can print the Gröbner basis are <code class="func">PrintTraceList</code> (<a span ="GAPprompt"&t;/span java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 69

<p><em>java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 3
<span class="java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 4
<span class="GAPpromptb^2a
[ rec( pol := [ [ [ 2 ], [ 1 ] ], [ 1, -1 ] ],
      trace := [ [ [  ], 1, [ 2, 1, 1, 2 ], -1 ], [ [ 2 ], 1, [  ], -1 ],
          [ [ 1 ], 1, [  ], 1 ], [ [ 1, 1 ], 2, [ 1, 2 ], 1 ] aba
  rec( pol := [ [ [ 1, 1, 1 ], [  ] ], [ 1, -1 ] ],
      trace := [ [ [ 2 ], 1, [ 2, 1 ], 1 ], [ [  ], 1, [ 2 4
          [ [  ], 2, [  ], 1 b3a
          [ [ 1, 1 ], 2, [ 1 ], -1 ] 
</pre></div>

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

<h5>3.7-6 StrongNormalFormTraceDiff</h5>

<div class="func"><table class="func" width="100%"><b^ab
<p>Returns: The traced polynomial for the difference of <var class="Arg">f</var> with the strong normal form of <var class="Arg">np^3

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

<p>Note that the difference of java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 4

<p><em>Example:</em> First


<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 := [[[2,2,1],[]],[1,-1]];;</span>
<span class"APpromptgap&<span><"> := SGrobnerTrace([p1,p2]);;</span>
</pre></div>

<p>Of the polynomial <span class="SimpleMath">a^6</span> we compute its difference with the normal form. The result is printed by used of <code classjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := [[[1,1,1,1,1,1]],[1]];;</span>
<span"GAPprompt"gt<sjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 109
<span
 a^6 - 1
<<divdiv class=example>pre>
 1)ba2 + bG1ba  1ba^5  bG()ba4+G(2+(22)a^  a2(
2)a - ba^2G(2) - a^2G(2)a^4 - ba^2G(2)a^3
</pre></div>

<DimsQATrunc(GB,12,wtv)

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

<p><a <p><a id"" "7>/a>/>

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

<p>More about these functions <div class="func"><table class="f" width=100">tr< classtdleft"> =func">&#8227; FreqsQATrunc/> var class""Lnp<var,<java.lang.StringIndexOutOfBoundsException: Range [165, 160) out of bounds for length 277

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

<h5<>e>java.lang.StringIndexOutOfBoundsException: Range [17, 14) out of bounds for length 108

<div class="func"><table class="func" width="100%"< class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,2],[1,1]],[1,-1]];;</span>
<p>Returns: A list of homogeneous NP polynomials if the first argument of the input is a list of homogeneous NP polynomials, and the boolean <code class="code">false</code> otherwise.</p>

<p>This functions<class=GAPprompt"gap&t;</span> <span class="span class="GAPprompt">gap></span> <span class="GAPinput

<p


<div class="example"><pre>
<;</span span "java.lang.StringIndexOutOfBoundsException: Range [62, 60) out of bounds for length 107
<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">java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 60
 ab^2a - ba^2b
 b^3 - aivjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
</pre></div>

<p>These are homogeneous with respect to weights <span class="SimpleMath">[3,2]</span>. The degrees are <span class="SimpleMath">10</span> and <span class="SimpleMath">6</span>, respectively. java.lang.StringIndexOutOfBoundsException: Index 194 out of bounds for length 0


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(SGrobnerTrunc([p1,p2],12,[3,2]));</span>
 ba^2 - a^2b
 b^3 - a^2
 ab^2a - a^2b^2
</pre></div>

<"></a><p>

h>.- /java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34

<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</var>, <var class="Arg">wtv<<="APprompt">gt<><pan class"GAPinput"> \n";<spanjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
<p>Returns: A list of weighted degrees of the polynomials if these are java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

<p>When invoked with a list of NP polynomials <var class="Arg">Lnp</var> and a weight vector <java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 33

<p><em>Example:</em> Consider the following two polynomials in NP formatfor  ,2 ]: 1


<div class="java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class=f 0 ]
<;</span> span class"GAPinput"2  :=11],1-1];s>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 0
 ab^2a - ba^2b
 b^3 - a^2
</pre></div>

<p>These are homogeneous with respect to weights <span class="SimpleMath">[3,2]</span>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">CheckHomogeneousNPs([p1,p2],[3,2]);</span>
[ 10, 6 ]
</pre></div>

<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; BaseQATrunc</code>( <var class="Arg">Lnp</var>, <var class="Arg">deg</var>, <var class="Arg">wtv</var> )</td><td class="tdright">( function )</td></tr></table></div>
<>Returns:A  ofof monomialsif firstargument ofthe inputis alist of homogeneous NP polynomials or <code class="code">false</code>.</p>

<p>When invoked with a list of polynomials <var class="Arg">Lnp</var>, a natural number <var class="Arg">deg</var>, and a weight vector <var class="Arg">wtv</var> of length the number of variables and with positive integers for entries, such that the polynomials of <var class="Arg">Lnp</var> are homogeneous with respect to <var class="Arg">wtv</var>, it returns a list whose <span class="SimpleMath">i</span>-th entry is a basis of monomials of the homogeneous part of degree <span class="SimpleMath">i-1</span> the quotient algebra of the free noncommutative algebra by the weighted homogeneous ideal generated by <var class="Arg">Lnp</var> truncated above <var class="Arg">deg</var>. If the list of polynomials <var class="Arg">Lnp</var> is not homogeneous, it returns <code class="code">false</code>.</p>

<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">p1 := [[[1,2,2,1],[2,1,1,2]],[1,-1]];;</span>
<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>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint("a","b");</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);</span>
 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,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<span class="GAPprompt">&java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 69
 1
 b
 
 b^2
 ba
 ab
 a^2
 ^3
 b^2a
 bab
 ab^2
 aba
 a^2b
 b^4
 a^3
 b^3a
 b^2ab
 bab^2
 ab^3
 baba
 abab
 a^2b2
 b^5
 ^2ba
 b^4a
 a^3b
 b^3ab
 b^2ab^2
 bab^3
 ab^4
 a^4
 b^2aba
 ab^3a
 babab
 abab^2
 a^2b^3
 b^6
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 12

<p><iv class="xample>pre>

<h5>3.8-5 DimsQATrunc</h5>

<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> )</td><td class="tdright">(&java.lang.StringIndexOutOfBoundsException: Index 235 out of bounds for length 8
<p>eturns Alist of monomials ifthe firstargumentoftheinput is alist of homogeneous NP polynomials or <code class="code">false</code>.</p>

<p>When invoked with a list of polynomials <var  b-3/2java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9

<p><em>Example:</em> Consider the truncated Gröbner basis of the following two polynomials<< java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 62


<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 class="GAPprompt">gap></span> <span class="<pReturns thejava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 249
<span class="GAPprompt">gap></span> <span class="GAPinput">wtv := [3,2];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">GB := SGrobnerTrunc([p1,="chap2#java.lang.StringIndexOutOfBoundsException: Range [121, 120) out of bounds for length 1617
<re/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><pjava.lang.StringIndexOutOfBoundsException: Range [7, 5) out of bounds for length 239
[ 1, 0, 1, 1, java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
</pre></div>

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

<h5>3.8-6 FreqsQATrunc</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; FreqsQATrunc</code>( <var class="Arg">Lnp</var>, <var class="Arg">deg
<iplicities 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 <span class="GAPpro>java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 100

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


<div 
<span class="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<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][ 1,0]
<span java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 8
<span class813 name">/>/java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 62
 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="example"><pre>
<span class="GAPprompt">gap></span> <span<>When called with a Gröbner basis record <var class="Arg">GBR</var> (see Section <a href="chap2.html#X80DAE0A97CFC95DD"><span class="RefLink">2.8</span></a>), a number of variables <var class="Arg">t</var> at least equal to the number of generators involved in the polynomials of <var class="Arg">GBR.p</var> and <var class="Arg">GBR.ts</var>, and a number of generators <var class="Arg">mt</var> of a free module containing the prefix relations in <var class
 [[[] 1 ]], [[ [0,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 ] ]<p>If  <ar ="rg"mt</var<class=SimpleMath"0/,then codeclass"java.lang.StringIndexOutOfBoundsException: Range [90, 89) out of bounds for length 310
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

<p>The interpretation of this data is given by the following lines p2 := [[[2,2,2,1],[]],[1,-1]];;</span>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">for f in F do</span>
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 95
<span class="GAPprompt">></span> <span class="GAPinput">    Print("At level ", wtv * (f[1][1]), "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span <div class=example"><pre>
<span class="GAPprompt">></span> <span class="GAPinput">      Print("  for ",x[1],": ",x[2],"\n");</span>
<span class="GAPprompt">><pan ="GAPprompt"gap&t;/pan><pan class="GAPinput">v1 := [[[-1,1,2],[-2]],[1,-1]];;</span>
<span class="GAPprompt">></span> <span class="GAPinput">  else</span>
=G">>/pan><span class=GAPinput">    Print("At level ", 0 , " the multiplicity of [] is ",f[1][2],"\n");</span>
<span class="GAPprompt">></span> <span class="GAPinput">  fi;</span>
<class"">&t;span><java.lang.StringIndexOutOfBoundsException: Range [109, 41) out of bounds for length 109
<span class="GAPprompt">></span> <span <span class="APprompt">gap><span><span class="APinput">DimQM(GBR,2,2);</span>
At level 0 the java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0

At are
  for [ 0, 1 ]: 1

At div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#<span style='color: green'>8227; MulQM</code>( <var class="Arg">p1</var>, <var class="Arg">p2</var>, <var class="Arg">GBR</var> )</td><td class="tdright">( function )</td></tr></table></div>
  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
  for [ 0, 3 ]: 1

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

java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 33
  for [ 2, 1 ]: 2
  for [ 0, 4 ]: 1

<<div>

<<a id=X8706DD3287E82019 =X8706DD3287E82019">/a>/

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

<p><a id="java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 12

<h5>3.9-1 SGrobnerModule</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; SGrobnerModule<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 109
pjava.lang.StringIndexOutOfBoundsException: Range [14, 10) out of bounds for length 393

<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 in NP format, this function will use Buchberger's algorithm with strong normal form applied to the union of <var class="Arg">java.lang.StringIndexOutOfBoundsException: Index 338 out of bounds for length 6

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


< class=example"<pre>
<span class="GAPprompt">gap></span> <span b,  4a]
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-3]];;</span>
<pre>/

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


<div class="example"><pre>
<span class="GAPprompt">gap<class="APprompt">gap></span> <span class="GAPinput">PrintNP(wq);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">v2 := [[[-2,2,2],[-2]],[1,-2]];;</span>
/>d>

<p>The Gröbner basis record for this data is found by <code class=<><a java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 62


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class=">Returns: The strong normal form of a polynomial in NP
</pre></div>

<p


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
[ 0, 1 ]
[ 1 , 0]
<span class="GAPprompt">gap&span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
 b - 3/2a
 a^3class">ap&</span span java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 90
</pre></div>

<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
<java.lang.StringIndexOutOfBoundsException: Range [13, 10) out of bounds for length 249

<p>When called with a Gröbner basis

<p>If ass=">pre

<p>If <var class="Arg">mt</var><span class="SimpleMath">=0</span>, then <code class

<p>If the module is cyclic (that is, has a single generator), it is possible to use the Gröbner basis of the ideal in the[0 1]

<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 := [[
<span class="GAPprompt">gap></span> <span class="GAPinput
</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 function <code class="code">BaseQM</code> can also be used to ompute the first three elements of a basis.</p>


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

<p><a id="X813E6A2C8709C9F3" 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> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: The dimension of the quotient module</p>

<p>When called with a Gröbner basis record <var class="Arg">GBR</var> (see Section <a href="chap2.html#X80DAE0A97CFC95DD"><span class="RefLink">2.8</span></a>), a number of variables <var class="Arg">t</var> at least equal to the number of generators involved in the polynomials of <var class="Arg">GBR.p</var> and <var class="Arg">GBR.ts</var>, and a number of generators <var class="Arg">mt</var> of a free module containing the prefix relations in <var class="Arg">GBR.p</var>, the function <code class="code">DimQM</code> will return the dimension over the coefficient field of the quotient module of the free right module <span class="SimpleMath">A^mt</span> of rank <var class="Arg">mt</var> over the free algebra <span class="SimpleMath">A</span> on <code class="code">t</code> generators by the right sub <span class="SimpleMath">A</span>-module generated by the elements of <var class="Arg">GBR</var>, if this dimension is finite. Otherwise, the computation invoked by the function will not terminate.</p>

<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>.</p>

<p>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>. <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">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],[-2]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">v2 := [[[-2,2,2],[-1]],[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>
</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>
<span class="GAPprompt">gap></span> <span class="GAPinput">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="X805FB42A7EEF510F" name="X805FB42A7EEF510F"></a></p>

<h5>3.9-4 MulQM</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; MulQM</code>( <var class="Arg">p1</var>, <var class="Arg">p2</var>, <var class="Arg">GBR</var> )</td><td class="tdright">( function )</td></tr></table></div>
<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</var>, is a polynomial in NP format representing an element of the quotient algebra, and the third of which is a Gröbner basis record <var class="Arg">GBR</var>, this function will return the product <code class="code">p1*p2</code> in the module.</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></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="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="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#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>
 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>


<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">q := [[[2,2,1],[1]],[2,3]];;</span>
<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>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(wq);</span>
[ 5 , 0]
</pre></div>

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

<h5>3.9-5 StrongNormalFormNPM</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; StrongNormalFormNPM</code>( <var class="Arg">f</var>, <var class="Arg">GBR</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: The strong normal form of a polynomial in NP format with respect to <var class="Arg">GBR</var></p>

<p>When invoked with a polynomial in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>) and a Gröbner basis record <var class="Arg">GBR</var> (see Section <a href="chap2.html#X80DAE0A97CFC95DD"><span class="RefLink">2.8</span></a>), this function will return the strong normal form (the polynomial reduced by the prefix and two-sided relations of the Gröbner basis combination).</p>

<p>This function assumes that <var class="Arg">GBR.p</var> and <var class="Arg">GBR.ts</var> are ordered (with the ordering <code class="func">LtNP</code> (<a href="chap3.html#X8075AE7E7A8088FF"><span class="RefLink">3.3-9</span></a>)), that the polynomials in <var class="Arg">GBR.ts</var> are monic and clean (see <code class="func">MkMonicNP</code> (<a href="chap3.html#X878A8C027DA25196"><span class="RefLink">3.3-12</span></a>) and <code class="func">CleanNP</code> (<a href="chap3.html#X855F3D4C783000E3"><span class="RefLink">3.3-7</span></a>)), and that the polynomial <var class="Arg">f</var> is clean. Note that a Gröbner basis record as returned by a function like <code class="func">SGrobnerModule</code> (<a href="chap3.html#X860966487ED88A43"><span class="RefLink">3.9-1</span></a>) is in the required form.</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></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="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="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#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>
 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 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

¤ Dauer der Verarbeitung: 0.120 Sekunden  ¤

*© Formatika GbR, Deutschland






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.