next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
FourTiTwo :: toricGroebner

toricGroebner -- calculates a Groebner basis of the toric ideal I_A, given A; invokes "groebner" from 4ti2

Synopsis

Description

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 : toricGroebner(A)
using temporary file name /tmp/M2-6316-0/0

o2 = | -1 1  1  -1 |
     | -1 2  -1 0  |
     | 0  -1 2  -1 |

              3        4
o2 : Matrix ZZ  <--- ZZ
Note that the output of the command is a matrix whose rows are the exponents of the binomials that for a Groebner basis of the toric ideal IA. As a shortcut, one can ask for the output to be an ideal instead:
i3 : R = QQ[a..d]

o3 = R

o3 : PolynomialRing
i4 : toricGroebner(A,R)
using temporary file name /tmp/M2-6316-0/1

                        2         2
o4 = ideal (b*c - a*d, b  - a*c, c  - b*d)

o4 : Ideal of R
4ti2 offers the use of weight vectors representing term orders, as follows:
i5 : toricGroebner(A,Weights=>{1,2,3,4})
using temporary file name /tmp/M2-6316-0/2

o5 = | -1 1  1  -1 |
     | -1 2  -1 0  |
     | 0  -1 2  -1 |

              3        4
o5 : Matrix ZZ  <--- ZZ

Caveat

It seems that some versions of 4ti2 do not pick up on the weight vector. It may be better to run gb computation in M2 directly with specified weights.

Ways to use toricGroebner :

  • toricGroebner(Matrix)
  • toricGroebner(Matrix,Ring)