# toricGraver -- calculates the Graver basis of the toric ideal; invokes "graver" from 4ti2

## Synopsis

• Usage:
toricGraver(A) or toricGraver(A,R)
• Inputs:
• A, , whose columns parametrize the toric variety. The toric ideal $I_A$ is the kernel of the map defined by A
• R, a ring, polynomial ring in which the toric ideal $I_A$ should live
• Outputs:
• B, , whose rows give binomials that form the Graver basis of the toric ideal of A, or
• I, an ideal, whose generators form the Graver basis for the toric ideal

## Description

The Graver basis for any toric ideal $I_A$ contains (properly) the union of all reduced Groebner basis of $I_A$. Any element in the Graver basis of the ideal is called a primitive binomial.

 i1 : A = matrix "1,1,1,1; 1,2,3,4" o1 = | 1 1 1 1 | | 1 2 3 4 | 2 4 o1 : Matrix ZZ <--- ZZ i2 : toricGraver(A) o2 = | 1 -2 1 0 | | 2 -3 0 1 | | 1 -1 -1 1 | | 0 1 -2 1 | | 1 0 -3 2 | 5 4 o2 : Matrix ZZ <--- ZZ

If we prefer to store the ideal instead, we may use:

 i3 : R = QQ[a..d] o3 = R o3 : PolynomialRing i4 : toricGraver(A,R) 2 3 2 2 3 2 o4 = ideal (- b + a*c, - b + a d, - b*c + a*d, - c + b*d, - c + a*d ) o4 : Ideal of R

Note that this last ideal equals the toric ideal $I_A$ since every Graver basis element is actually in $I_A$.

## Ways to use toricGraver :

• "toricGraver(Matrix)"
• "toricGraver(Matrix,Ring)"

## For the programmer

The object toricGraver is .