<#GAPDoc Label="Groebner1">
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.
<Example><![CDATA[
gap> cone := [ [ 7, -1 ], [ 0, 1 ] ];
[ [ 7, -1 ], [ 0, 1 ] ]
gap> basis := 4ti2Interface_hilbert_inequalities( cone );;
gap> Sort( basis );
gap> basis;
[ [ 1, 0 ], [ 1, 1 ], [ 1, 2 ], [ 1, 3 ],
[ 1, 4 ], [ 1, 5 ], [ 1, 6 ], [ 1, 7 ] ]
gap> groebner := 4ti2Interface_groebner_matrix( basis );;
gap> Sort( groebner );
gap> groebner;
[ [ -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 ] ]
gap> Length( groebner );
21
]]></Example>
<#/GAPDoc>
<#GAPDoc Label="HilbertBasis">
We want to compute the Hilbert basis of the cone obtained
by intersecting the positive orthant with the hyperplane
given by the equation below.
<Example><![CDATA[
gap> gens := [ 23, 25, 37, 49 ];
[ 23, 25, 37, 49 ]
gap> equation := [ Concatenation( gens, -gens ) ];
[ [ 23, 25, 37, 49, -23, -25, -37, -49 ] ]
gap> basis := 4ti2Interface_hilbert_equalities_in_positive_orthant( equation );;
gap> Length( basis );
436
]]></Example>
<#/GAPDoc>
<#GAPDoc Label="HilbertBasis2">
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.
<Example><![CDATA[
gap> inequalities := [ [1,2,3,4], [0,1,0,7], [3,1,0,2], [0,0,1,0] ];
[ [ 1, 2, 3, 4 ], [ 0, 1, 0, 7 ], [ 3, 1, 0, 2 ], [ 0, 0, 1, 0 ] ]
gap> basis := 4ti2Interface_hilbert_inequalities( inequalities );;
gap> Length( basis );
29
]]></Example>
<#/GAPDoc>
¤ Dauer der Verarbeitung: 0.2 Sekunden
¤
*© Formatika GbR, Deutschland
|
|