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