Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/pkg/4ti2interface/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 23.10.2024 mit Größe 15 kB image not shown  

Quelle  chap3.html   Sprache: HTML

 
 products/sources/formale Sprachen/GAP/pkg/4ti2interface/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 (4ti2Interface) - Chapter 3: 4ti2 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="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="X876DE76280B7AB01" name="X876DE76280B7AB01"></a></p>
<div class="ChapSects"><a href="chap3.html#X876DE76280B7AB01">3 <span class="Heading">4ti2 functions</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7C635ACB7DD200CF">3.1 <span class="Heading">Groebner</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7CCB80AD7BA246B0">3.1-1 4ti2Interface_groebner_matrix</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X86736FF783E8F6AF">3.1-2 4ti2Interface_groebner_basis</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X8485878A84333E15">3.1-3 <span class="Heading">Defining ideal of toric variety</span></a>
</span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7F5D3AAB7834A607">3.2 <span class="Heading">Hilbert</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7DDFDF9D7DE9A29D">3.2-1 4ti2Interface_hilbert_inequalities</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7F9E586C817E3C08">3.2-2 4ti2Interface_hilbert_equalities_in_positive_orthant</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X80878F7E7F1DDDDE">3.2-3 4ti2Interface_hilbert_equalities_and_inequalities</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7822ED3E7DC13FAE">3.2-4 <span class="Heading">Generators of semigroup</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X7C9AE7868537AB0A">3.2-5 <span class="Heading">Hilbert basis of dual cone</span></a>
</span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X84237872798DB501">3.3 <span class="Heading">ZSolve</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X82FD0D9F7B7EA6F8">3.3-1 4ti2Interface_zsolve_equalities_and_inequalities</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7D34D2A17EE6F480">3.4 <span class="Heading">Graver</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap3.html#X84F90D9B79886CA6">3.4-1 4ti2Interface_graver_equalities</a></span>
</div></div>
</div>

<h3>3 <span class="Heading">4ti2 functions</span></h3>

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

<h4>3.1 <span class="Heading">Groebner</span></h4>

<p>These are wrappers of some use cases of 4ti2s groebner command.</p>

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

<h5>3.1-1 4ti2Interface_groebner_matrix</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_groebner_matrix</code>( <var class="Arg">matrix</var>[, <var class="Arg">ordering</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A list of vectors</p>

<p>This launches the 4ti2 groebner command with the argument as matrix input. The output will be the the Groebner basis of the binomial ideal generated by the left kernel of the input matrix. Note that this is different from 4ti2's convention which takes the right kernel. It returns the output of the groebner command as a list of lists. The second argument can be a vector to specify a monomial ordering, in the way that x^m > x^n if ordering*m > ordering*n



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

<h5>3.1-2 4ti2Interface_groebner_basis</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_groebner_basis</code>( <var class="Arg">basis</var>[, <var class="Arg">ordering</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A list of vectors</p>

<p>This launches the 4ti2 groebner command with the argument as matrix input. The outpur will be the Groebner basis of the binomial ideal generated by the rows of the input matrix. It returns the output of the groebner command as a list of lists. The second argument is like before.</p>

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

<h5>3.1-3 <span class="Heading">Defining ideal of toric variety</span></h5>

<p>We want to compute the groebner basis of the ideal defining the affine toric variety associated to the cone generated by the inequalities [ [ 7, -1 ], [ 0, 1 ] ], i.e. a rational normal curve.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">cone := [ [ 7, -1 ], [ 0, 1 ] ];</span>
[ [ 7, -1 ], [ 0, 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">basis := 4ti2Interface_hilbert_inequalities( cone );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Sort( basis );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">basis;</span>
[ [ 1, 0 ], [ 1, 1 ], [ 1, 2 ], [ 1, 3 ],
  [ 1, 4 ], [ 1, 5 ], [ 1, 6 ], [ 1, 7 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">groebner := 4ti2Interface_groebner_matrix( basis );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Sort( groebner );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">groebner;</span>
[ [ -1, 0, 0, 1, 1, 0, 0, -1 ], [ -1, 0, 0, 2, 0, 0, -1, 0 ],
  [ -1, 0, 1, 0, 0, 1, 0, -1 ], [ -1, 0, 1, 0, 1, 0, -1, 0 ],
  [ -1, 0, 1, 1, 0, -1, 0, 0 ], [ -1, 0, 2, 0, -1, 0, 0, 0 ],
  [ -1, 1, 0, 0, 0, 0, 1, -1 ], [ -1, 1, 0, 0, 0, 1, -1, 0 ],
  [ -1, 1, 0, 0, 1, -1, 0, 0 ], [ -1, 1, 0, 1, -1, 0, 0, 0 ],
  [ -1, 1, 1, -1, 0, 0, 0, 0 ], [ -1, 2, -1, 0, 0, 0, 0, 0 ],
  [ 0, -1, 0, 0, 2, 0, 0, -1 ], [ 0, -1, 0, 1, 0, 1, 0, -1 ],
  [ 0, -1, 1, 0, 0, 0, 1, -1 ], [ 0, 0, -1, 0, 1, 1, 0, -1 ],
  [ 0, 0, -1, 1, 0, 0, 1, -1 ], [ 0, 0, 0, -1, 0, 2, 0, -1 ],
  [ 0, 0, 0, -1, 1, 0, 1, -1 ], [ 0, 0, 0, 0, -1, 1, 1, -1 ],
  [ 0, 0, 0, 0, 0, -1, 2, -1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">Length( groebner );</span>
21
</pre></div>

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

<h4>3.2 <span class="Heading">Hilbert</span></h4>

<p>These are wrappers of some use cases of 4ti2s hilbert command.</p>

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

<h5>3.2-1 4ti2Interface_hilbert_inequalities</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_hilbert_inequalities</code>( <var class="Arg">A</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_hilbert_inequalities_in_positive_orthant</code>( <var class="Arg">A</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a list of vectors</p>

<p>This function produces the hilbert basis of the cone C given by <var class="Arg">A</var>x >= 0 for all x in C. For the second function also x >= 0 is assumed.</p>

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

<h5>3.2-2 4ti2Interface_hilbert_equalities_in_positive_orthant</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_hilbert_equalities_in_positive_orthant</code>( <var class="Arg">A</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a list of vectors</p>

<p>This function produces the hilbert basis of the cone C given by the equations <var class="Arg">A</var>x = 0 in the positive orthant of the coordinate system.</p>

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

<h5>3.2-3 4ti2Interface_hilbert_equalities_and_inequalities</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_hilbert_equalities_and_inequalities</code>( <var class="Arg">A</var>, <var class="Arg">B</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_hilbert_equalities_and_inequalities_in_positive_orthant</code>( <var class="Arg">A</var>, <var class="Arg">B</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a list of vectors</p>

<p>This function produces the hilbert basis of the cone C given by the equations <var class="Arg">A</var>x = 0 and the inequations <var class="Arg">B</var>x >= 0. For the second function x>=0 is assumed.</p>

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

<h5>3.2-4 <span class="Heading">Generators of semigroup</span></h5>

<p>We want to compute the Hilbert basis of the cone obtained by intersecting the positive orthant with the hyperplane given by the equation below.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">gens := [ 23, 25, 37, 49 ];</span>
[ 23, 25, 37, 49 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">equation := [ Concatenation( gens, -gens ) ];</span>
[ [ 23, 25, 37, 49, -23, -25, -37, -49 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">basis := 4ti2Interface_hilbert_equalities_in_positive_orthant( equation );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Length( basis );</span>
436
</pre></div>

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

<h5>3.2-5 <span class="Heading">Hilbert basis of dual cone</span></h5>

<p>We want to compute the Hilbert basis of the cone which faces are represented by the inequalities below. This example is taken from the toric and the ToricVarieties package manual. In both packages it is very slow with the internal algorithms.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">inequalities := [ [1,2,3,4], [0,1,0,7], [3,1,0,2], [0,0,1,0] ];</span>
[ [ 1, 2, 3, 4 ], [ 0, 1, 0, 7 ], [ 3, 1, 0, 2 ], [ 0, 0, 1, 0 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">basis := 4ti2Interface_hilbert_inequalities( inequalities );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Length( basis );</span>
29
</pre></div>

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

<h4>3.3 <span class="Heading">ZSolve</span></h4>

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

<h5>3.3-1 4ti2Interface_zsolve_equalities_and_inequalities</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_zsolve_equalities_and_inequalities</code>( <var class="Arg">eqs</var>, <var class="Arg">eqs_rhs</var>, <var class="Arg">ineqs</var>, <var class="Arg">ineqs_rhs</var>[, <var class="Arg">signs</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_zsolve_equalities_and_inequalities_in_positive_orthant</code>( <var class="Arg">eqs</var>, <var class="Arg">eqs_rhs</var>, <var class="Arg">ineqs</var>, <var class="Arg">ineqs_rhs</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a list of three matrices</p>

<p>This function produces a basis of the system <var class="Arg">eqs</var> = <var class="Arg">eqs_rhs</var> and <var class="Arg">ineqs</var> >= <var class="Arg">ineqs_rhs</var>. It outputs a list containing three matrices. The first one is a list of points in a polytope, the second is the hilbert basis of a cone. The set of solutions is then the minkowski sum of the polytope generated by the points in the first list and the cone generated by the hilbert basis in the second matrix. The third one is the free part of the solution polyhedron. The optional argument <var class="Arg">signs</var> must be a list of zeros and ones which length is the number of variables. If the ith entry is one, the ith variable must be >= 0. If the entry is 0, the number is arbitraty. Default is all zero. It is also possible to set the option precision to 32, 64 or gmp. The default, if no option is given, 32 is used. Please note that a higher precision leads to slower computation. For the second function xi >= 0 for all variables is assumed.</p>

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

<h4>3.4 <span class="Heading">Graver</span></h4>

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

<h5>3.4-1 4ti2Interface_graver_equalities</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_graver_equalities</code>( <var class="Arg">eqs</var>[, <var class="Arg">signs</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ 4ti2Interface_graver_equalities_in_positive_orthant</code>( <var class="Arg">eqs</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a matrix</p>

<p>This calls the function graver with the equalities <var class="Arg">eqs</var> = 0. It outputs one list containing the graver basis of the system. the optional argument <var class="Arg">signs</var> is used like in zsolve. The second command assumes <span class="SimpleMath">x_i ≥ 0</span>.</p>


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


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

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

99%


¤ Dauer der Verarbeitung: 0.37 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.