|
|
|
|
Impressum chap3.html
Sprache: HTML
|
|
| products/Sources/formale Sprachen/GAP/pkg/gbnp/doc/chap3.html |
 |
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
http:/ww. 3.rg/R/html1/ TD/html1-trict.>
< html xmlns= "http://www.w3.< class="ontSS br/<pan = "ocss"&bsp&;/> a= ".tml#80D4D22C7E643C7B"3.- IsGrobnerBasisa<span>
<head>
<title>GAP (GBNP) - Chapter 3: Functions</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle(span class="< /< class=nocss"&;nbsp<span<href=c.tmlX7D17F9027F08CF0B">.4 IsStrongGrobnerBasis<a>/pan>
</ead>
<body classspan class="ontSS"<r /<pan class=nocss"&bsp;nbsp;/pan>a href="chap3.tml#8752DA1A7CAF77D3"3.6 MakeGrobnerPair</a><span>
</><div
<div class="div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7F387F7780425B9A">3.5 <span class="Heading">Finite-dimensional quotient
<p id="mathjaxlink" class="pcenter"><a href="chap3_mj.html">[MathJax on]</a>span class=ContSS"<r/<span =nocss"&;nbsp;span>ahref=chap3.html#7EAA04247B2C6330"3.1BaseQA<a>span>
<>a id=X86FA580F8055B274 =X86FA580F8055B274"></a></p>
<div class="ChapSects"><a href="chap3.html#X86FA580F8055B274">3 <span class="Heading">Functions</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X81ABB91B79E00229">3.1 <span class="Heading">Converting polynomials
into different formats</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B0EBCBC7857F1AE">3.1-1 GP2NP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7CF0ED937DDA5A7E">3.1-2GP2NPLista>/pan>
<pan class="ontSS">br /><span class="nocss"> </span><a href="chap3.html#X86C3912F781ABEDC">3.1-3 NP2GP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X844A23EA7D97150C">3.1-4 NP2GPList</a></span>
</iv<div
<div class="ContSect"><span classspan =">br /span class=n"&bsp;;/>a href".tml#80C4D0E882B05FDF">3.- MulQA<a><span>
</spanspan class=ContSS">br /<pan class=nocss"&bsp;nbsp;/pan>a href="hap3.html#8563683E7FA604F8">.- StrongNormalFormNP<a<span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B63BEA87A8D6162">3.2-1 PrintNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7F7510A878045D3A">3.2-2 GBNP.ConfigPrint</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X832103DC79A9E9D0">3.2-3 PrintNPList</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X83DE3F817EA74727">3.3 <span class="Heading">Calculating with polynomials in NP format</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7DB3792385AAA805">3.3-1 NumAlgGensNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X865548F07C74AB0A">3.3-2 NumAlgGensNPList</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X782647C57D148379">3.3-3 NumModGensNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8119282084CA8076">3.3-4 NumModGensNPList</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X788E1ACA82A833A8">3.3-5 AddNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X84FC611A822D808F">3.3-6 BimulNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X855F3D4C783000E3">3.3-7 CleanNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7D05B60E83FDA567">3.3-8 GtNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8075AE7E7A8088FF">3.3-9 LtNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7A42AE79811CC5D7">3.3-10 LMonNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X80CD462F794A8095">3.3-11 LTermNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X878A8C027DA25196">3.3-12 MkMonicNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X818147CD841BD490">3.3-13 FactorOutGcdNP</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7ABA720E87EFF040">3.3-14 MulNP</a></span>
</div></div>
<div class="</div></div
</
<div class="ContSSBlock">
<div classC"
<span class="ContSS"><span class="ContSS"><br class=nocss"> &bsp;/>a href="chap3htmlXCCA7"3.- DetermineGrowthQA</><span>
<pan=ContSS"<r /<pan class="java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 136
<span class="ContSS"><br /><span class</a</pan
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.java.lang.StringIndexOutOfBoundsException: Range [0, 85) out of bounds for length 12
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8752DA1A7CAF77D3trace variant</pan>/>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X813454F6799B1D57">3/>/pan>
algebras</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7EAA04247B2C6330">3.5-1span ="ontSS"br/<pan =""&;nbsp<span<a href=chap3.tmlX8039BEE77C070FB1.- PrintTracePola<span
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X81A50EEE7B56C723">3.5-2 DimQA</a></span>
<span =C"<br ><span ="ocss>nbsp;/>a ="hap3.tmlX7DFA841A8425DD94"3.5-.53MatrixQA<a<span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X78E4BF2F7F0D5E74">3.5-4 MatricesQA</a></span>
<class"ontSS"br /spanclass"ocss"&bsp&;/<a href="hap3.html#X80C4D0E882B05FDF">3.5-5 MulQA</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8563683E7FA604F8">3.5-6 StrongNormalFormNP</a</iv>/iv>
</iv<div
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href=<>
<< class=ContSS"><r /spanclass=nocss" nbsp;/panhref"hap3.tml#7A489A5D79DA9E5C">381< class"eading"Examples</pan>/>
<div class="ContSSBlock">
<span class="ContSS"><br /></>
<class"ontSS"</< ="&bsp&;/span>a ="hap3html3.- FinCheckQA<a><span>
<span class="ContSS"><br /><span class="ContSS"><br /><span>nbsp;nbsp;/>ahref"hap3.tml#X83C9E598798D5809">.-CheckHomogeneousNPs>/>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X863124677B933CEE">3.6-4 PreprocessAnalysisQA</a></span>
</>/>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span>span =ContSS>br/spanclass=n>&<span< href=chap3.tml#7C6882DB837A9F5A">.- DimsQATrunc/>/panjava.lang.StringIndexOutOfBoundsException: Index 133 out of bounds for length 133
trace variant</span></a>
</span
<div class="ContSSBlock">
< ="ontSS"<r /<pan class>nbsp;&bsp;<span>a href=chap3.tmlX813454F6799B1D57">3.7-1 EvalTrace</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X83D1560C7F2A04BA">3.7-2 PrintTraceList</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8039BEE77C070FB1">3.7-3 PrintTracePol</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7DD0B56D7BD6CD98">3.7-4 PrintNPListTrace</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X78AE6EED83B97595">3.7-5 SGrobnerTrace</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8219059A86A54130">3.7-6 StrongNormalFormTraceDiff</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7E4E3AD07B2465F9">3.8 <span class="Heading">Functions of the truncated variant</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><r/< class"ocss">nbsp&<span<hrefc.#7A489A5D79DA9E5C">3.8-1 <span class="Heading">Examples</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7CD043E081BF2302">3.8-2 SGrobnerTrunc</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X83C9E598798D5809">3.8-3 CheckHomogeneousNPs</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7E33C064875D95CA">3.8-4 BaseQATrunc</a></span>
<span">3.8-5 DimsQATrunc</a><span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7FBA7F1D79DA883F">3.spanclass=ContSS"br >spanclass">nbsp&;/pan>< =c.tml"3.- MulQM<a>span>
</spanclass"ontSS"><br /<span class=nocss" nbsp;/span> href=chap3.html#87D51A8379C50A80"3.- StrongNormalFormNPM<a>/pan>
=ContSect">span class"ocline>span class"nocss"&bsp/>ahref"chap3.#">39 <panclass=H"Functionsofthemodulevariant/>/>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X860966487ED88A43">3.9-1 SGrobnerModule</a></span>
<span class="p>eturns:If < class="Arg">gp</var> is an element of a free algebra, then the polynomial in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="java.lang.StringIndexOutOfBoundsException: Index 174 out of bounds for length 0
<span class="ContSS"><br /><span class="nocss"> </span
<span class=C"<r >span class=nocss"&; </span><a href="chap3.html#X805FB42A7EEF510F">3.9-4 MulQM</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X87D51A8379C50A80">3.9-5 StrongNormalFormNPM</a></span>
</div></div>
</div>
<h3>3 <span class="Heading">Functions</span></h3>
<p><a id="X81ABB91B79E00229" name="X81ABB91B79E00229"></a></p>
<h4>3.1 <span class="Heading">Converting polynomials
into different formats</span></h4>
<p><a id="X7B0EBCBC7857F1AE" name="X7B0EBCBC7857F1AE
<h5>3.1-1 GP2NP</h5>
<div class="func"><table classspan class=GAPprompt">ap&t;span>< =GAPinput"AFreeAssociativeAlgebraWithOneRationalsa,b);;/pan
pReturns < class="="Arg"gp</var> is afree ,then the in format(ee Section < href=chap2.tml#7DF3E5E7F33D3A2">spanclass"efLink"2.<span>/> corresponding to varclass=Arg"</ar>; if var =A"gp<var an element free module, then the vectorinNPM format (eeSectiona href=chap2.tml#7B27E2D1784538DE"<pan class=RefLink"2.<span> correspondingto<classA">gp</ar>./>
<p>This function will convert an element of a free algebra to a< class"APprompt"gapgt<span spanclass"APinput">e:();/>
<p><em>Example:</em> Let <code class="code">A</code> be the free associative algebra with one over the rationals/re<div
<div class="example"><pre>
<span java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
<class"APprompt">ap&>/>< =G"a:=.;/>
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
<span class="GAPprompt">gap></span> <span class="GAPinput">e:=One(Apre<div
<span class="GAPprompt">gap></span> <span class="GAPinput">z:=Zero(A);;</span>
>/>
<p="code><code>be the polynomial <panclass=SimpleMath"baabe/span><p>
<div class="example"><pre>
<class=GAPprompt">ap&t;/pan><span class=GAPinput"gp:b*-ab-;/pan>
(-1)*<java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
</pre></div>
<p>The polynomial in NP format, corresponding to <code class="code">gp</code> can now be obtained with GP2NP:</p>
<div class="example"><pre
<span <div class=>pre
[[[2,1 ] ,2 ,[ ]],[1,-,- ]]
</pre></div>
<p>Let
<div class="example"><pre>
<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></span classGAPprompt>ap&t;/>java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 117
<p>Take the following list <code class="code">R</code> of two elements of <code class="code">D</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := [ [b-e, z], [e+a*(e+a+b), -e-a*(e+a+b)] ];;</span>
</pre></div>
<p>Convert the list <code class="code">R</code> to a list of vectors in NPM format.</p>
<java.lang.StringIndexOutOfBoundsException: Range [10, 4) out of bounds for length 26
<span class="GAPprompt">gap></span ="GAPprompt"&t;< spanclass"APinput>R,P2NP)<>
[ [ [ [ -1, 2 ], [ -1 ] ], [ 1, -1 ] ],
[ [ [ -,2 ] [- ]][1 1 ,
1] 2 ]] ,1 1 1,1 1 ,- ] ]
</pre></div>
<p><a id="X7CF0ED937DDA5A7E" name="X7CF0ED937DDA5A7E"></a></p>
<h5>3.1-2 GP2NPList</h5>
<java.lang.StringIndexOutOfBoundsException: Range [43, 4) out of bounds for length 218
<ar class="Arg">Lgp</var>.</p>
<p>This function has the same effect as <code class="code">List(Lgp,GBNP)</code>.</p>
<p><em>Example:</em> Let <code class="code">A</code> be the free associative algebra with one over the rationals on the generators <code class="code">a</code> and <code class="code">b</code>. Let <code class="code">e</code
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne(Rationals,"a","b");;</span>
<><span><pan class=GAPinput"a:A.;<span
<span java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">e:=One(A);;</
</re<div
<p>Let <code class="code">
<div class="example"><pre>
<span java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 122
[(1)&; ..&t;()^,(1*l;dentity.&;()b^,
(-1)*<identity ...>+(-1)*a*b+(1)*b*a ]
/pre<div
<p>The span classGAPprompt> spanclass"APinput>:b;/>
<iv class=e"<>
<span class="GAPprompt">gap></span> <span class="GAPinput">GP2NPList(Lgp)<>/>
[ [[[1,1 ],[ ]] [1,- ] ] [[[2,2 ] [ ]] [1,- ]]
[ [
</pre></div>
<p>Theclass=GAPprompt">ap&t;/>< =G">gp:[^e,^e*a-*-]<span>
<div (-1)*lt;dentity .&;(1)a*+1)* ]
<span class=GAPprompt">ap&t;/>< =GAPinput">List(Lgp,P2NP =GP2NPList(gp)<span>
true
</pre></div>
<p><a id="X86C3912F781ABEDC" name="X86C3912F781ABEDC"></a></
<h5>3.<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 84
<div class="[[[1 1] [ ]] 1 - ]] [[[ 2,2] ]] [1,- ]]java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
<>:The GAP format of the polynomial < class"rg">p<var NP ./>
<p>This function will convert a />/iv>
le<em <ode class=""A/>be the free associative algebra with one over the rationals onthegeneratorscodeclass"ode>a<code>and code ="ode><code./>
<div class="example"><pre>
<span class="div =e"<
</pre></div>
<p>Let <code class="< class="GAPprompt">gap></span> <span class="GAPinput">List(Lgp,GP2NP) = GP2NPList(Lgp);</span>
<div class
<span class=GAPprompt>&t;<span><pan class=GAPinput">p:= 2,1 ] [1,2 , [ ,[Z(^,Z() ()]];</>
</pre></div>
<divclass"func"< class"unc"width"00%>tr>td class="dleft>codeclass"unc"&8227;NP2GP/(<varclass"rg"np<var> <ar ="rg"A/><td<class"dright>&;function&bsp;<td>/><table<div>
example"<re>
<span java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
(()0)b*+Z()**+Z(3)*lt;dentity ..gt;
</pre></div>
<>Note that information the coefficient field of a polynomial <ode class=code"np<code>in NP format be obtained from the second list of <code class="code">np</code>.</p>
<div class="example"><pre>
<span class=GAPprompt">gap&t;<span>< class=GAPinput"One(p[]1];/
Z(3)^0
</pre></div>
<>Now let <ode class"ode"M/> the module <odeclass"ode"A2/>andlet <ode class=code">pm<code>be a polynomial over thatmodule form./>
<div class=example>pre
<pan class=GAPprompt">ap&t;/>< =GAPinput"np:[[[2,1] [1, ,[ ]] [ Z()0,Z(3) ()]];/>
<span class="GAPprompt/>/>
</pre></div>
<p>The element of <var class="Arg">M</var> corresponding to <code
<div class="example"><span class"APprompt>&;/pan spanclass"APinputNP2GP(p,)/>
spanclass"APprompt>>/>java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 82
[ (Z<>/iv>
</pre></div>
<p>If <code class="code">M</code> is a module of
<div class="span class="GAPprompt">gap></span> <span class="GAPinput">One(np[2][1]);</span>
<span class="GAPprompt">gap&p>ow let <code class="ode"M<code>be the < class"ode"A^<> code class=code">pm</code be a polynomial module in NPM form./>
<span div classexample>pre>
<span class=GAPprompt">gap>/pan> <span class=GAPinput">:A^;</pan>
<class"APprompt"gap&t;/>< class=GAPinput"List(np, m -&; NP2GP(,);/panjava.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
[ [ <zero> of ..., (p> element varclass=Arg"M<var> to < class"ode"<code is<p>
</pre></div>
<>aid="" name=>/>p
<h5>3.1-4 NP2GPList</h5>
<div class="func"><p> < class=code"><>isa moduleof dimension 2 over codeclass"code"> codeclass"ode></ode>a list of polynomials in NPM format, thepolynomials can be converted to thecorresponding of< ="ode"><code> as follows:/>
<java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0
<p>This function will convert the list <var class="spanclass=GAPprompt"gap&t;/pan><pan class="GAPinput">Lnp:=[ [ [ [ -2, 1, 1 ], [ -2, 1 ] ], [ 1, -1 ] ],</span class="GAPprompt">></span> <span class="GAPinput"> [ [ [ -1, 2, 2], [-2, 1 ] ], [ 1, -1 ]*Z(3)^0 ] ];;</span
<p><em>Example:</em> Let <code class="code">A</code> be the free associative algebra with one over the rationals on the generators <code class="code">a</code> and <code class="code">b</code>.</ppre<div>
<div class="example"><pre>
<span
< =f"<able =f"width=100%<>< class=tdleft"code classfunc"8227 <code(< class=Arg"Lnp<var> <ar class=Arg"A<var>)/d><td class=tdright"(&bsp;function <td>/<table>/iv>
<p> < class=code"Lnp<code>be java.lang.StringIndexOutOfBoundsException: Range [50, 41) out of bounds for length 203
<div class="example"><pre>
<span class="GAPprompt">gap>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< ] ], [ 1, -1 ;;/pan>
<span class="GAPprompt">gap></span> <span class="
[ ()a3(1)a,()b^+-)&t;dentity ..gt java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
</pre></div>
<p>It has the class"APprompt"gapg;/pan><pan =G"A:FreeAssociativeAlgebraWithOne(ationals,a""";/>
<div class="example"><pre>
< class=GAPprompt"gap&t;/pan><pan class=G">(np,p -gt;NP2GP(,);/pan>
[ (1)*a^3+(-1)*a, (1)*b^2+(-1)*<
</
<> let <ode class=code></ode>be a module of dimension 2 over <code class="code">A</code> and <code class="code">Lnp</code> a list of vectors in NPM format. Then polynomials <code class="code">java.lang.StringIndexOutOfBoundsException: Range [0, 205) out of bounds for length 104
<ivclass=example><re
<span class="GAPprompt">gap></span> <span class="GAPinput">M:=A^2;;<pre<div
<spanclass"APprompt"gap&t;<span><pan class=GAPinput">np:[[[[-, 1,1 ] 2 1 ] ] 1]]<span>
<span class="
<span class="GAPprompt">gap></span>div class=example"<re>
[..,(1*()a2] 1* -)&ti .& ]
<pre<div
<p>The same result can be obtained by application of the standard List function:
<div java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
<span">&t;<span><pan =GAPinput>List(,m -g;NP2GP(m,M) =NP2GPList(np,);/pan>
true
</pre></div>
<p< =GAPprompt">ap&;/span spanclass"APinput>np: [ [-2,1,1] [-,1 ]][1 1]]<span
<h4>3.2 <span class="Heading">Printing polynomials in NP format</span></h4spanclass"APprompt"gap&t <pan class""NP2GPListLnpM;/>
<p><a id="X7B63BEA87A8D6162" name="X7B63BEA87A8D6162"></a></p>
<h5>3.2-1 PrintNP</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; PrintNP</code>( <var class="Arg">np</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function
<p>This function prints a polynomial <var class="Arg">np</var> in NP format as span class="GAPprompt">gap></span> <span class="GAPinput">List(Lnp, m -> NP2GP(m,M);/>
<p><em>Example:</em> Considerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< ="xample"<re>
<span java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></div>
<p>t can be printed inthe ofa polynomialin< class"ode"a<code and <code class"ode"b/>by function< class"ode">rintNPcode:/>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p);</span>
a^2b - 2ab^2 + 3
</pre></div>
<p><a id="X7F7510A878045D3A" name="X7F7510A878045D3A"></a></p>
<h5>3.2-2 GBNP.ConfigPrint</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; GBNP.ConfigPrint</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
pBy default generators algebra are as< ="ode"a/code> .. code =code>l<code>and afterthetwelfthgenerator as< class=code"><code> By calling< class="code">ConfigPrint</code> it is possible to alter this printing convention. The argument(s) will be an algebra or arguments used for naming algebras in GAP upon creation. More specifically, we have the following choices.</p>
<dl>
<dt><strong class="Mark"><em>no arguments</em></strong></dt>
<dd><p>When the function is invoked without arguments the printing is reset to the default (see above).</p>
</dd>
<dt><strong class="Mark">algebra</strong></dt>
<dd><p>When p functionprints polynomialvar class=Arg"np<var>in NP format as configured the code=func"GBNPConfigPrint <hrefchap3h#"><span class=RefLink"32-2<span>/>./>
</dd>
<dt><strong class="Mark">algebra,integer</strong></dt>
<dd><p>When the function is invoked with an java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
</dd>
<dt><strong class="Mark">leftmodule</strong></java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 12
<dd><p>When the function is invoked with an leftmodule <span class="SimpleMath">A^n</span> of an associative algebra as argument, generators will be printed asp> can theguise polynomial in code=c"a<code>and code class="code">b</code> by the function <code class="code">PrintNP</code>:</p>
</dd>
<dt><strong class="Mark">string</strong></dt>
<dd><p>When the function
</dd>
<dt</strong><dt>
<dd><p>When <Bydefault of thealgebra are printed as <ode class=code"a<code> ... <ode class="></ everythingthetwelfth generator as <ode class=code><code.By calling <ode class="ode"ConfigPrint<code>it is possibleto alter this printing .The(s)will be algebra orarguments used for naming algebras in GAP upon creation. More, we have the choices<p
</dd>
<dt><strong class="Mark">integer, string</strong></dt>
<dd><p>When the function is invoked with a non-negative integer and a string as its arguments, generators will be as as< class="ode"&t;&t;&t;g;/ode> where <code class="code"><s></code> is the string given as argument and <code class="code"><n></code> the number of the generator. There is no checking whether the number given as argument is really the dimension. So it is java.lang.StringIndexOutOfBoundsException: Range [0, 415) out of bounds for length 0
</dd>
<dt><strong class="Mark">string, string, ..., string</strong></dt>
<java.lang.StringIndexOutOfBoundsException: Range [51, 3) out of bounds for length 196
</dd>
</dl>
<p><emjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<div class="dd<p>When the function with leftmodule < class=SimpleMath"An<span> of associativealgebra argument,generators will asthey be the algebra,separated over java.lang.StringIndexOutOfBoundsException: Index 207 out of bounds for length 45
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap> with an integer its argument,the <ar class="n<var>th generator be printedas code class=c">x&;><code./>
<//dd>
<p>They can be printed by,string<><dt
<div class="example"><pre>
<span class="GAPprompt">gap&dt><strong class="Mark">string, string, ..., string</strong></dt>
^2b -1
<span class="java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
ab^2 - 1
<pre<div
<p>We can let
<div class="example"><pre>
<java.lang.StringIndexOutOfBoundsException: Range [37, 5) out of bounds for length 95
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p1);</span>
x^2y - 1
<panclass"APprompt"gap&t;<span><pan class=GAPinput"PrintNP(2);<span>
xy^2 - 1
</pre></div>
<>e can also let the variables be printed as <ode class=code"x.<code> class=""x.</ode>instead of code class="ode><code code class=code"b<code>by means of <code class="func">GBNP.ConfigPrint</code>.</p>
<ivclass=example">pre>
<span class="GAPprompt">gap><ab^ 1
<span class=G"gap&t;/pan><pan class=G"PrintNPp1;>
x.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<java.lang.StringIndexOutOfBoundsException: Range [69, 5) out of bounds for length 81
x.1x.2^2 - 1
</pre></div>
<p>We can even assign strings to the variables to <span class="GAPprompt">gap></span> <span class="ConfigPrint(,y"</pan>
<div class="example"><pre>
<class"">ap&t;/pan><pan =GAPinput>.("alice,bob";/>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(xy^-1
alice^2bob - 1
<java.lang.StringIndexOutOfBoundsException: Range [60, 5) out of bounds for length 81
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
</pre></div>
<p>, canintroduce the free algebra <ar class=Arg"A<var> with two generators,and print the polynomials as members of <ar class=Arg"A<var><p
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne2.2 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
<span class="GAPprompt .1x.^ 1
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p1);</span>
a^2b - 1
<span class=GAPprompt">gap&t;/> <pan class="APinput>PrintNP(2)<span>
ab^ -1
</pre></divspan class=GAPprompt"gap&t;<span><pan class"APinput(1)<span>
<p>a id=X832103DC79A9E9D0"name=">/<p
<h5>3.2-3 PrintNPList</h5>
<div class="func"><table class
<p prints list < class"rg">Lnp<var>of polynomials in NP format, thefunction <ode=c"PrintNP</ode><p>
<p><em>Example:</em> We
<div class="example"><pre>
<span span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p1);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput"span =G"gap&;</span>< class""PrintNP(2)<span>
<an"APprompt"gap&t;/pan><pan class="APinput"Lnp := [1,2;;/>
</pre></div>
<p>We can print the list with <code class="func">PrintNPList</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(Lnp);</span>
a^2b - 1
ab^2 - 1
</pre></div>
<p>Alternatively, using the function <code class="func">GBNP.ConfigPrint</code<pre><div
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=FreeAssociativeAlgebraWithOne(Rationals,"a","b");;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">GBNP.ConfigPrint(A);</span>
< ="APprompt"gap>/pan><pan class=GAPinput>(Lnp)<span
a^2b - 1
2-1
</pre<Thisfunction prints a list <ar class="rg"Lnp</>ofpolynomials in,using function <ode class"ode"PrintNP<code><p>
<spanclass=GAPprompt"gap&<span> <span class=GAPinput">1 : [[,,][][1,1]];/pan>
<h4>< class=GAPprompt"gap&t;/><pan class=GAPinput"Lnp : [1,2]<span
<p><a id="X7DB3792385AAA805" name="X7DB3792385AAA805"></a></p>
<>e can print the list with <ode ="func>PrintNPList</>./p>
<java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
<p>ab2-1
<java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0
<p><em>Example:</em> Consider the following polynomial in NP java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0
<div class="example"><pre>
< class=GAPprompt>apg;/>< =GAPinput> : [[,,,,,1,[][,,],1,3,2];<span>
<span class="GAPprompt">gap&< class=GAPprompt">ap>/>< class=GAPinput"PrintNPList(np)<span>
b^3a^3 - 3d + 2cbc
<span class="GAPprompt">gap></span> <pre<div
4
</><div>
<p><a id="X865548F07C74AB0A" name="X865548F07C74AB0A"></a></p>
<h5>3.3-2 NumAlgGensNPList</h5>
<"><table=func ="00%"<r< class="tdleft"><code class="func">8227; NumAlgGensNPList</code>( <var class="Arg">Lnp</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>:Theminimumnumber <ode class=code"><code>so polynomial in <ar class"rg">np<var belongs to the free algebra on <code class="code">t</code> generators.</p>
<p>When called with a list When called with an NP polynomialvar class=Arg"np<var>this function returns the minimum number needed for correspondingalgebratocontain varclass"rg><var>If<ar class="rg"np/ apolynomial ,that,equivalenttospanclass"SimpleMath></pan> or span =java.lang.StringIndexOutOfBoundsException: Range [348, 346) out of bounds for length 407
<p><em>Example:</em> Consider
<div class="example"><pre
<span class="GAPprompt">gap></span> <div java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 26
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[2,2,1,4,3],[]],[1,-1]];;</span>
<span class=GAPprompt"gap&t;/pan><pan class=GAPinputPrintNPList(p1,];/>
b^a^3 -3d +2cbc
b 1
<span class="GAPprompt">gap></span> <java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 12
4
</pre></div>
<p><a id="X782647C57D148379" name="X782647C57D148379"></a></p>
<h5>3.3-3 NumModGensNP</h5>
<div class="func"><table class="func" width="100%"><trp>hen with of NP polynomials <varclass"rg><var,this function returnsjava.lang.StringIndexOutOfBoundsException: Range [107, 106) out of bounds for length 446
<p>Returns: The minimum number <code class="code">mt</code> so that <var class="Arg">npm</var> belongs to the free module on <code class="code">mt</code> generators.</p>
<p>When called with a polynomial <>em>xample:/m>Consider the twopolynomials NPformat.</>
<p><em>Example:</em> Consider the class=example">pre>
<div class="example"><pre>
<">np := [[-,,,31,-][1][,2,]];</pan
< class"APprompt>&t</span>< ="APinput>PrintNP(p)<spanjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
[abca +1 ,-2 ]
<b^2adc - 1
2
<><div
< id"X8119282084CA8076" name=X8119282084CA8076"></a></p>
<
<ivclass"unc"<table class=func" width=100%><tr>tdclass=tdleft"<ode class=func">#227;NumModGensNPList<code> <arclass=Arg">npm<var <td>td class"dright>&;function&;</d>/><table>/>
<p>Returns: The minimum number <code class=
<p>When called with a list of polynomials <var classdiv class=func"<able =func"width"%"tr<class"dleft"< =f"‣ NumModGensNP</ode>(var =A"npm</ar>)<td>td class=tdright"(;unction )</td></tr></table></div>
<p><em>Example:</em> Consider <p>When called witha polynomialvarclass"rg"><>in NPMformat this function returns the minimum number of modulegeneratorsneeded for the corresponding algebra to contain <var class="Arg">npm</var>. If <var class="Arg">npm</var> is an NP polynomial that does not contain module generators, then <code class=
<div class="example"><pre>
<panclass=GAPprompt"gap&t;/pan <span class"v1:= [[1,123,]-2][1],1,2,];<span>
<span [ abca + 2 ]
<<pan class=GAPprompt">ap&/>< class=GAPinput"NumModGensNP(np)<span
[ abca + 1 , - 2 ]
[ 0, badc , - 1 ]
<p>a id=X8119282084CA8076"name=X8119282084CA8076"<a>/>
3
</pre></div>
<p><a id="X788E1ACA82A833A8" name="X788E1ACA82A833A8"></< =f>tableclass"unc"width"00%>tr>< =t>< =func>#8227;NumModGensNPList</>(<ar class=Arg"Lnpm/>)/>td class=tdright(nbspfunction;<td<tr<table/>
<h5>.3- AddNP<h5>
<div class=func"<ablefunc" =100"<>td =tdleft"><code class="func">8227; AddNP</code>( <var class="Arg">u</var>, <var class="Arg">v</var>, <var class="Arg">c</var>, <var class="Arg">d</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <var class="Arg">c</var><span class="SimpleMath">*
<p>Computes <var class="Arg">c</var><span class="SimpleMath">*</span><var class="Arg">u</var><span spanclass"APprompt>></span> <span class="GAPinput">v1 := [[[-1,1,2,3,1],[-2],[-1]],[1,-2,1]];;</span>
<p><em>Example:</em> Consider the following two polynomials in NP format.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-3]];;</span>
<span class="GAPprompt"><span class="GAPprompt">gap/> spanclassGAPinput">"v2: [-,2143,3][11;<span
</pre></div>
<p>The second can be subtractedabca+1 ,-2]
<s"xample">pre>
<span class=GAPprompt">ap&t;/ spanclass"APinput(ddNP,2,,1);/pan>
ab^ +a2b+1
</re>/>
<p><p<a id"X788E1ACA82A833A8"name=X788E1ACA82A833A8"<a>/>
<h5>.- BimulNP<h5>
div class=func>tableclass=func"width=100%>tr><d class"dleft>code class=func"&8227;BimulNP</code>( <arclass"rg><var,var ="Arg"np<var>, <ar ="">dr/ )td<
<p>Returns: the polynomial <var class="Arg">ga</var><span
<> called a polynomial <varclass=Arg"np<var>and two monomials <ar class="ga/ar>, <var class="Arg">dr</var>, the function will return <var class="Arg">ga</var><span class="SimpleMath"><span>var class="np<var>span class=S"*/span<var class""dr<>RecallSectionahrefchap2.html#7FDF3E5E7F33D3A2"<pan class=RefLink"2.<span>/>that monomials are represented as lists.<p>
<p><em>Example:</em> Consider the following two java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
<prediv>
<span class="GAPprompt">gap></java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
<pan class"APprompt"&t<span <pan class=GAPinput"p2 : [[,,][][,4];<span>
<pre>/iv>
<p>Multiplying <code class="code">p1</code> from p< ="84FC611A822D808F"="84FC611A822D808F"<>/>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(BimulNP([],p1,[2]));</span>
a^2b^2 - 3b
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(BimulNP([1],p2,[]));</span>
a^2b^2 - 4a
</pre></div>
<p><a id="X855F3D4C783000E3" name="X855F3D4C783000E3"></a></p>
<h5>3.3-7 CleanNP</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; CleanNP</code>( <var class="Arg">u</var> )</td><td class="tdright">( function )</td></tr></table></div>
<>: The cleanedup versionofvarclass"rg"u/>/>
<p>Given a polynomial in NP format, this function collects terms with same monomial, removes trivial monomials, and orders the monomials, with biggest one first.</p>
<p><em>Example:</em> Consider the following polynomial in NP format.</p>
<iv class"xample"<re>
<span
span class=GAPprompt"gap>/pan><pan class=GAPinput"PrintNP()</span
a^2b - 3 - 2a^2b + 3
</pre></div>
<p>The monomials <code class="code">[1,1,div =example>pre
<iv class=example"<re>
<span class="GAPprompt">gap></span> <span class="span class="APpromptgapg;/span spanclass"APinput"p2: [122,],1,4];/>
- a^2b
</><div>
<p>In order to define a polynomial over <span class="SimpleMath">GF(2)</span>, the coefficients need to java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<a^2b2 - 3
<span ="APprompt"gap&t;<span><pan class"APinput"PrintNPBimulNP[]p2[);/java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
<="">ap>/span><span class=GAPinput">leanNP()</pan
[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
</pre></div>
<>a id=X7D05B60E83FDA567"name="7D05B60E83FDA567"<a>/>
<h5>3.3-8 GtNP</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; GtNP</code>( <var class="Arg">u</var>, <var class="Arg">v</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="code">true</code> if <span class="SimpleMath">u > v</span> and <code class="code">false</code> if <span class="SimpleMath">u ≤ v</span
<p>Greater than function for monomials <var class="Arg">u</var> and <var class="Arg">v</var> represented as in Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>. It tests whether <var class="Arg">u</var><span class="SimpleMath">></span><var class="Arg">v</var>. The ordering is done by degree and then lexicographically.</p>
<p><em>Example:</em> Consider the following two monomials.</p>
<div < class=GAPprompt"gap&;><pan ="APinput"p : [[,,][],1,1,2,],1-3,2,];<span>
<spanclass"APprompt">ap&t;/pan><pan class="GAPinput"u : [,,]<span
[a^b -3 -2a^b +3
<span class=GAPprompt">gap></> <pan ="APinput> =[,,]<span
[ 2
</p>he monomials <ode class=code">1,,]/code> and code class=code">]/ode>occur twice .For manyfunctionsthis representation of apolynomial isnotallowed.It needs to becleaned,as by <ode class"unc"CleanNP</code></java.lang.StringIndexOutOfBoundsException: Index 254 out of bounds for length 254
<>e test whether <odeclass"ode"><code>is than <ode class=code"v/>./>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GtNPp> todefine overspan =S"GF(2)/pan> the coefficients to be field listof coefficients obtained in GAP from ofintegersby multiplyingwiththe identityelementof field.The resulting polynomial need not be clean, and so should be made clean again with <code class="code">CleanNP</code>.</p>
false
<pre<divjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
<p><a id="X8075AE7E7A8088FF" name="java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 31
<h5>3.3-9 LtNP</h5>
<div class=
<>eturns: <codeclass""true/>if<class"impleMath>u &t<span>and <code class="code">false</code> if <span class="SimpleMath">u ≥ v</span></p>
<Less than forNP monomials, tests whether <ar class=Arg"><var>span class=SimpleMath"&t;<span><varclass"rg"v<var> The ordering is done by degree and then lexicographically.<p>
<p><em>Example:</em> Consider the following two monomials.</p>
<div class=example>pre
<
[ 1, 1, 2 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">v := [2,2, =GAPprompt>&;/pan>spanclass"APinput"> =[,1,;/>
[2,2 1 ]
<[2,2 java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
<p> test whether <ode class=code"u<code>is less than <code code class="code">v</code>.</p>
class=example"<re>
<span class=" ="APprompt>ap&t;/pan>< "APinput"GtNPuv;/pan
true
</pre></div>
<p><a" name=X7A42AE79811CC5D7A42AE79811CC5D7"</>/>
<h5>3.3-10 LMonNP</h5>
<divclass=func"<able class="func ="00%>tr>td class=tdleft"<ode class=func>#8227;<code(var=Arg><var>)/d>td class"(nbspf&bsp)/>/r>/able>/iv>
<java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
<>: leading ora list ofleadingmonomials./>
<p>These functions return the leading monomial of a polynomial (resp. the leading monomials of a list of polynomials) in NP format. The polynomials of <<pReturns:<ode class"><code>if <pan class="> l;v/>andclass="false<code>if span class="SimpleMath> v</span>/>
<>emExample:/m>We puttwo polynomials format into the list<odeclass=code"Lnp</ode><p>
<div class="example"><pre>
<span class="GAPprompt">gap></span< =GAPprompt>&t;/>< class"APinput> : [,,]/>
< ="APprompt">gap&t;/pan spanclass"APinput"p2: [[,2,],1,1];/
<span class=GAPprompt">ap&t;/span><pan class=GAPinput"v : [,,1];/pan>
</>/>
<p>The list of leading monomials is computed by <code class="code">LMonsNP</code>:</p>
<
<ap>/pan>< =GAPinput>()</span>
[ [ 1, 1, 2 ], [ 1, 2,span =GAPprompt>&t<span spanclass"APinput"LtNP(,;/>
</pre><<>/iv>
<p>For a nicer printing, the monomials can be converted into polynomials in NP format, and then submitted to PrintNPList:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(List(LMonsNP(Lnp), q -> [[q],[1]]));</span>
a^2b
ab^2
</pre></div>
<p><a id="X80CD462F794A8095" name="X80CD462F794A8095"></a></p>
<h5>3.3-11 LTermNP</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; LTermNP</code>( <var class="Arg">Lnp</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 0
<Returns:The leading a list of leadingterms.<p>
<>These returnthe term of (esp.theleadingtermsof a list java.lang.StringIndexOutOfBoundsException: Range [97, 96) out of bounds for length 290
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[1]],[6,-7]];;</span>
<span class="GAPprompt">gap></span> <span class
<span class""gap&t<span> <span class=GAPinput> : [1,2;<span>
<span class="GAPprompt">gap></span> <span class="GAPinput">LTermNP( p1 );</span>
[ [ [ 1, 1,[ [
<lass="GAPinput">LTnp = LTermsNP(Lnp)<span>
[ [ [ [ 1, 1, 2 ] ], [ 6 ] ], [ [ [ 1, 2, 2 ] ], [ 8 ] ] ]
<span class="GAPprompt">gap></span> <span class
6a^2b
8ab^2
<pre<divjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
<p><a id="X878A8C027DA25196" name="X878A8C027DA25196"></a></p>
h5>.- <h5
<div class="java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
<>eturns: <ar class=Arg"np<var monic<p>
<p>This function returns the scalar multiple of a polynomial <
<p<emExample</> Consider following inNPformat.<p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="p>For a nicer printing, the monomials can be converted in ,and then toPrintNPList:/>
<span class="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
2as =GAPprompt"gap&t;<span>span class=GAPinput"PrintNPList((() -gt;[q,1])<spanjava.lang.StringIndexOutOfBoundsException: Index 120 out of bounds for length 120
</pre^2
<p>The coefficient of the leading term <a id="X80CD462F794A8095" name="X80CD462F794A8095
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(MkMonicNP(p));</span>
a^2b - 1/2
</pre></div>
<p><a id="X818147CD841BD490" name="X818147CD841BD490">> class=func"<able class=func =100"<< =tdleft>code class=func">#8227; LTermNP<> var class=Arg">np<var>)/d>td =t"(nbsp;function;)/d>></tr>/able><divjava.lang.StringIndexOutOfBoundsException: Index 216 out of bounds for length 216
<h5>3.3-13 FactorOutGcdNP</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; FactorOutGcdNP</code>(<Returns leading or a list terms./java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
<>:<arclass=Arg">p<var>with (oefficients out</p
<p
> NP./>
<div class="example"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span classjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(p);</span>
30a^2b + 70ab + 105a
</pre></div>
<p>The <code class="code">Gcd</code> of the coefficients <span class="SimpleMath">[30,70,105]</span> is <span class="SimpleMath">5</span>. The function <code class="code">FactorOutGcdNP</code> divides the polynomial by <span class="SimpleMath">5</span>:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></<span class="GAPprompt">gap></spanspan class="GAPinput">PrintNP(MkMonicNP(p));</span>
6a^2b + 14ab + 21a
<span class="GAPprompt">gap></span> <span class="GAPinput">m := MkMonicNP(p);</span>
[ [ [ 1, 1, 2 ], [ 1,a^2java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 11
<span class="GAPprompt">gap></span> <span class="GAPinput"><5>3.-13 FactorOutGcdNP</h5>
fail
</pre></div>
<p><a<iv class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">pan style='color: green'>8227;<>Returns:<var class=="rg">np</ar>Gcdjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 77
<h5>3.3-14 MulNP</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; MulNP</code>( <var class="Arg">np1</var>, <var class
<p>Returns: <var class="Arg">java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 0
<p>When invoked with two polynomialsspan class="APprompt">gap&t<span><span class="GAPinput">PrintNP(p);</span>
<30a^2b+ 70ab + 105a
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
</pre></div>
<p>The function <code class="code">MulNP</code> multiplies the two polynomials.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(MulNP(p1,p2));</span>
a^2bab^2 - ab^2 - a^2b + 1
</pre></div>
<p>The fact that this multiplication is not commutative is illustrated by the following java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNP(AddNP(MulNP(p1,p2),MulNP(p2,p1),1,-1));</span>
- ab^2a^2b + a^2bab^2
</pre></div>
<p><a id="<div class="example"pre>
<h4>3.4 <span class="Heading">Gröbner functions, standard variant</span></h4>
<p><a id="X7CD9F9C97B2563E2" name="<span class="GAPprompt">gap></span>PrintNP(actorOutGcdNPp))<java.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 96
<h5>3.4-1 Grobner</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; Grobner</code>( <var class="Arg">Lnp</var>[, <var class="Arg">D</var>][, <var class="Arg">max</var>] )</td><td class="tdright">( function )</td></<span class="GAPprompt">gap></span> <span class="GAPinput">fm := FactorOutGcdNP(m);</span>
<p>Returns: ulNP/5>
< this function will use Buchberger's algorithm with normal form find a GröbnerBasis (if , the general problem is unsolvable).</p>
<p>When called with the optional argument <var class="Arg">max</var>, which should be a positive integer, the calculation will be interrupted if it has not ended after <var class="Arg">max</var> iterations. The return value willp>>Returns:<var class=Arg"np1</ar><pan class="SimpleMath">*</span><var class="Arg">np2</var></p>
<p>By use of the optional argument <var class="Arg">D</var>, it is possible to resume a previously interrupted calculation.</p>
<
<div class="example"><pre>
<span class="GAPprompt">gap&
<java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 98
<spanclass=GAPprompt">gap></span> <span class="GAPinput">PrintNPList([p1,p2]);</span>
a^2b - 1
2 -
</pre></div>
<p>Their Gröbner basis can be computed by the functionp>The function code =">ulNP<code>multiplies the two polynomials.</p>
<div class="examplediv class="">pre>
spanclass=GAPprompt">gap><span><pan =GAPinput">G :=Grobner(p1,p2]);<pan>
<span class="GAPprompt">gap> a^bab^ -ab2 2 +1
b - a
a^3 - 1
</>div>
<p>One iteration of the Gröbner computations is invoked by use of the parameter <code class="codejava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 0
<div class="example"><pre>
<span class="GAPprompt">gap></span> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(R.G);</span>
b - a
<span java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 89
a^3 - 1
<h5>3.4-1 Grobner</h5>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">R.completed;</span>
false
</pre></div>
<p>The above list <code class="code">R.todo</code> can be used to resume the computation of the Gröbner basis computation with the Gröbner pair <code class="code">R.G</code>, <code class="code">R.todo</code>:</p>
<divp>Returns: fthe algorithm terminates, a öbner Basis or a record if var class="Arg">max</var> is specified (see description).</p>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(Grobner(R.G,R.todo));</span>
b - a
a^-
</pre></div
<p>In order to perform the Gröbner basis computation with polynomials in a free algebra over the field <span class="SimpleMath">GF(2)</span>, the coefficients of the polynomials need to be defined over that field.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(Grobner([[p1[1],One(GF(2))*p1[<><em>Example:</em> Consider the following two polynomials in NP format.</p>
b + a
a^3 + Z(2)^0
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 12
<java.lang.StringIndexOutOfBoundsException: Range [72, 2) out of bounds for length 62
<5>.4- SGrobner</5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; SGrobner</code>( <var class="Arg">Lnp</ ^2-
<p>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>For a list <var class="Arg">Lnp</var> of polynomials in NP format this function will use Buchberger's algorithm with strong normal form (see <a href="chapBib.html#biBCohenGijsbersEtAl2007">[Coh07]</a>) to find a Gröbner Basis (if possible, the general problem is unsolvable).</p>
<p>When called with the optional argument <var class="Arg">max</var>, which should be a positive integer, the calculation will be interrupted if it has not ended after <var class="Arg">max</var> iterations. The return value will be a record containing lists <code class="code">G</code> and <code class="code">todo</code> of polynomials in NP format, a boolean <code class="<pan ="APprompt">ap>span><pan class=""(G);<>
<p>By use of the optional argument <var class="Arg">D</var>, it is possible to resume a
<<m>Example:/em thefollowing two polynomials in NP format.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [ b -
<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 90
a^2b - 1
ab^2 - 1
</pre></div>
<p>Their Gröbner basis can be computed by the function <code class="code">Grobner</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">G := SGrobner([p1,p2]);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(G);</span>
b - a
a^3 - 1
</pre></div>
<p>One iteration of the Gröbner computations is invoked by use of the parameter <code class="code">max</code>:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := SGrobner([p1,p2],1);;</java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 81
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(R.G);</span>
b - a
<span class="java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 89
a^3 - 1
<span class="GAPprompt">gap></span> <span class="GAPinput">R.iterations;</span>
1
<span class</pre>/div>
false
</pre></div>
<p>The above list <code class="code">R.todo</code> can be used to resume the computation of the Gröbner basis computation with the Gröbner pair <code class="code">R.G</code>, <code class="code">R.todo</code>:</p
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(SGrobner(R.G,R.todo));</span>
b - a
a^3 - 1
</pre></div>
<p><a id="X80D4D22C7E643C7B" name="X80D4D22C7E643C7B"></a></p>
<h5>3.4-3 IsGrobnerBasis</h5>
<"func"><table class="func"width=100%"<tr>< "java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 221
<p>Returns: <code class="code
<p>When invoked with a list <var class="Arg">G</var> of polynomials in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span java.lang.StringIndexOutOfBoundsException: Index 142 out of bounds for length 0
<java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 77
<p><em>Example:</em> Consider the following list of two polynomials in NP format.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Lnp := [[[[1,1,2],[]],[1,-1]], [[[1,2,2],[]],[1,-1]]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(Lnp);</span>
a^2b - 1
ab^2 - 1
</pre></div>
<p>The function <code class="code">IsGrobner</code> checks whether the list is a Gröbner basis.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerBasis(Lnp);</span>
false
</pre></div>
<p>So the answer should be <code class="code">true</code> for the result of a Gröbner computation:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerBasis(Grobner(Lnp));</span>
true
</pre></div>
<p><a id="X7D17F9027F08CF0B" name="X7D17F9027F08CF0B"></a></p>
<h5>3.4-4 IsStrongGrobnerBasis</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; IsStrongGrobnerBasis</code>( <var class="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: <ode class=">/code> <ar class="Arg/ar> isa java.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 146
<p>When invoked with a list <var class="Arg">G</var> of polynomials in NP format (see Section <a href="chap2.html#X7FDF3E5E7F33D3A2"><span class="RefLink">2.1</span></a>), this functionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 77
<<java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
div class=example">pre>
sclass="java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 124
b-1
a^22
ab^2 - 1
</pre></div>p Grbner basiscanbebythefunction< class="code">Grobnercode.p>
<p>The function <code class="code">IsStrongGrobner</code> checks
<div class="example"><pre>
);/span>
false
</pre></div>
<>Butthe answer should < class="code">true</code> for the result of a strong Gröbner computation:</p>
<class=example"<pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 8
rue
<<java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 86
<p>An class=GAPprompt"gap&t;</span> <pan class=GAPinput">PrintNPList(R.odo);/span>
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 26
<span<pan class="GAPprompt">gap></span> <span class="GAPinput">R.completed;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Add(B,AddNP(Lnp[1],B[1],1,-1));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(B
b -a
a^3 - 1
a^2b - b + a - 1
<span class=GAPprompt"gap&t;<span><pan class=GAPinput"IsGrobnerBasis()<s
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsStrongGrobnerBasis(B);</span>
false
</pre></div>
<p><a id="X7E0105ED7FF4210F" name="X7E0105ED7FF4210F"></a></</re<div>
<h5>3.4-5 IsGrobnerPair</h5>
<class=func"<able class="func" width=100"<tr<tdclass=tdleft"><code class="func>#227;</ode> <ar =A>G<,<ar class=A">D</ar>)/<class="dright>&bsp;functionn)/td>tr>/<div>
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>When called with two lists of polynomials in NP format, this function returns true if they form a Gröbner pair. Testing whether <var class="Arg">D</var> is a basic set for <var class="java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
<p><em>Example:</em> Consider the following four polynomials in NP format.</p>
<div class="example"><pre>
<>gap>/span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
<span class="GAPprompt">gap><
<span class="GAPprompt">gap></span> <span class="GAPinput">q1 := [[[2],[1]],[1,-1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">q2 := [[[1,1,1],[]],[1,-1]];;</span>
</pre></div>
<>Thefunction <code class="code">IsGrobnerPair</code> is used to check whether some combinations of these polynomials in two lists provide Gröbner pairs.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerPair([p1,p2,q1],[q2]);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsGrobnerPair([q1,q2],[p1,p2]);</span>
false
</pre></div>
<p>The function <code class="code">IsGrobnerPair
<div class="example"><pre>
<spanclass=GAPprompt"">ap></span><span class="GAPinput>IsGrobnerPair(p1,2,[] = IsGrobnerBasis(p1,p2]);</span>
true
</pre></div>
<p><a id="X8752DA1A7CAF77D3" name="X8752DA1A7CAF77D3"></a></p>
<h5</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; MakeGrobnerPair</code>( <var class="Arg">G</var>, <var class="
<p>Returns: A record containing a new Grobner pair</p>
<p>When called with as arguments a pair <span class="SimpleMath">G, D</span>, this java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 4
<p><em>Example:</em> Consider the following two polynomials in NP format.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">p1 := [[[1,1,2],[]],[1,-1]];;</span>
span class="GAPprompt">gap></span> <span class="GAPinput">p2 := [[[1,2,2],[]],[1,-1]];;</span>
</pre></div>
<p>The function <code class="code">MakeGrobnerPair</code> turns the list with these two polynomials into a Gröbner pair, once the empty java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
<div class="example"><pre>
<span class="GAPprompt">gap></<span class="GAPprompt">gap></span class="GAPinput">Lnp := [[[[1,1,2],[]],[1,-1]], [[[1,2,2],[]],[1,-1]]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GP.G);</span>
a^2b -1
ab^2 - 1
<span class="java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
b - a
</pre></div>
<p>These fields are ready for use
<div class="example"><pre>
<GP.G,GP.odo;<span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PrintNPList(GB);</span>
b - a
a^3 - 1
</pre></java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 4
<p><a id="X7F387F7780425B9A" name="X7F387F7780425B9A"></a></p>
<h4>3.5 <span class="Heading">Finite-dimensional quotient
algebras</span></h4>
<p><a id="X7EAA04247B2C6330" name="X7EAA04247B2C6330"></a></p>
<h5>3.5-1 BaseQA</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">an style='color: green'>8227; BaseQA</code>( <var class="Arg">Gspan class="GAPprompt">gap></span> <span class="GAPinput">Add(B,AddNP(Lnp[1],B[1],1,-1));;<span>
<p>Returns: A list of terms forming a basis of the quotient algebra of the (non-commutative) polynomial algebra in <var class="Arg">t</var> variables by the 2-sided ideal generated by <var class="Arg">G</var></p>
<p>When called with a Gröbner basis <var class="Arg">G</var>, the number <var class="Arg">t</var> of generators of the algebra, and a maximum number of terms to be found <var class="Arg">maxno</var>, BaseQA will return a (partial) base of the quotient algebra. If this function is invoked with <var class="Arg">maxno</var> equal to 0, then a full basis will be given. If the dimension of this quotient algebra is infinite and <var class="Arg">maxno</var> is set to 0, then the algorithm behind this function will not terminate.</p> | | |