The Graver basis for any toric ideal IA contains (properly) the union of all reduced Groebner basis of IA. Any element in the Graver basis of the ideal is called a primitive binomial.
A = matrix "1,1,1,1; 1,2,3,4" |
toricGraver(A) |
If we prefer to store the ideal instead, we may use:
R = QQ[a..d] |
toricGraver(A,R) |
Note that this last ideal equals the toric ideal IA since every Graver basis element is actually in IA.