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

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)
-------------------------------------------------
4ti2 version 1.3.2, Copyright (C) 2006 4ti2 team.
4ti2 comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome
to redistribute it under certain conditions.
For details, see the file COPYING.
-------------------------------------------------
Using 64 bit integers.
4ti2 Total Time:  0.00 secs.
using temporary file name /tmp/M2-52479-1

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)
-------------------------------------------------
4ti2 version 1.3.2, Copyright (C) 2006 4ti2 team.
4ti2 comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome
to redistribute it under certain conditions.
For details, see the file COPYING.
-------------------------------------------------
Using 64 bit integers.
4ti2 Total Time:  0.00 secs.
using temporary file name /tmp/M2-52479-2

                        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})
-------------------------------------------------
4ti2 version 1.3.2, Copyright (C) 2006 4ti2 team.
4ti2 comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome
to redistribute it under certain conditions.
For details, see the file COPYING.
-------------------------------------------------
Using 64 bit integers.
4ti2 Total Time:  0.00 secs.
using temporary file name /tmp/M2-52479-3

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)