Macaulay2 » Documentation
Packages » FourTiTwo :: FourTiTwo
next | previous | forward | backward | up | index | toc

# FourTiTwo -- Interface for 4ti2

## Description

Interfaces most of the functionality of the software 4ti2 available at http://www.4ti2.de/. (The user needs to have 4ti2 installed on his/her machine.)

A $d\times n$ integral matrix $A$ (with nonnegative entries) specifies a map from a polynomial ring in d variables to a polynomial ring with n variables by specifying exponents of the variables indexing its columns. For example, if $A$ is a matrix $$\begin{pmatrix} 3&2&1&0\\ 0&1&2&3 \end{pmatrix}$$ the map from $k[s,t]$ to $k[a,b,c,d]$ is given by $(s,t) \mapsto \ (s^3,s^2t,st^2,t^3)$.

The toric ideal $I_A$ is the kernel of this map. It is minimally generated by the 2-minors of the matrix $$\begin{pmatrix} x&y&z\\ y&z&w \end{pmatrix}$$ Given the matrix $A$, one can compute its lattice basis ideal specified by the integral basis of the lattice $A$, the toric ideal $I_A$, its Groebner bases, etc. In practice, however, these are nontrivial computational tasks. The software 4ti2 is very efficient in computing these objects.

For more theoretical details (and more generality), see the standard reference: B. Sturmfels, Gr\"obner bases and convex polytopes. American Mathematical Society, University Lectures Series, No 8, Providence, Rhode Island, 1996.

Note for cygwin users: If a problem occurs during package installation and/or loading, it should be fixed by setting the path inside the file .Macaulay2/init-FourTiTwo.m2 to whatever folder 4ti2 is installed. For example, if 4ti2 has been installed in C:/cygwin/4ti2/win32, then the line inside the init-FourTiTwo.m2 file will look like this: "path" => "C:/cygwin/4ti2/win32/" . Alternately, the path for 4ti2 may be set when loading the package using the following command: loadPackage("FourTiTwo", Configuration=>{"path"=>"C:/cygwin/4ti2/win32/"}) assuming that 4ti2 has been installed in C:/cygwin/4ti2/win32.

## Caveat

If the package SimpleDoc is not found when installing FourTiTwo.m2, see questions and answers 6, 7, and 8 on the Macaulay 2 web site.

## Authors

- Mike Stillman <mike@math.cornell.edu>
- Josephine Yu <jyu@math.mit.edu>
- Sonja Petrovic <petrovic@psu.edu>

## Version

This documentation describes version 1.0 of FourTiTwo, released February 8, 2009.

## Citation

If you have used this package in your research, please cite it as follows:

    @misc{FourTiTwoSource,
      title = {{FourTiTwo: Interface to 4ti2. Version~1.0}},
      author = {Mike Stillman and Josephine Yu and Sonja Petrovic},
      howpublished = {A \emph{Macaulay2} package available at
        \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}}
    }

## Exports

- Functions and commands
  - getMatrix -- reads a matrix from a 4ti2-formatted input file
  - putMatrix -- writes a matrix into a file formatted for 4ti2
  - toBinomial -- creates a toric ideal from a given set of exponents of its generators
  - toricCircuits -- calculates the circuits of the toric ideal; invokes "circuits" from 4ti2
  - toricGraver -- calculates the Graver basis of the toric ideal; invokes "graver" from 4ti2
  - toricGraverDegrees -- displays the degrees of all Graver basis elements for the toric ideal I_A
  - toricGroebner -- calculates a Groebner basis of the toric ideal I_A, given A; invokes "groebner" from 4ti2
  - toricMarkov -- calculates a generating set of the toric ideal I_A, given A; invokes "markov" from 4ti2
- Methods
  - `getMatrix(String)` -- see getMatrix -- reads a matrix from a 4ti2-formatted input file
  - hilbertBasis(Matrix) -- calculates the Hilbert basis of the cone; invokes "hilbert" from 4ti2
  - `putMatrix(File,Matrix)` -- see putMatrix -- writes a matrix into a file formatted for 4ti2
  - rays(Matrix) -- calculates the extreme rays of the cone; invokes "rays" from 4ti2
  - `toBinomial(Matrix,Ring)` -- see toBinomial -- creates a toric ideal from a given set of exponents of its generators
  - `toricCircuits(Matrix)` -- see toricCircuits -- calculates the circuits of the toric ideal; invokes "circuits" from 4ti2
  - `toricGraver(Matrix)` -- see toricGraver -- calculates the Graver basis of the toric ideal; invokes "graver" from 4ti2
  - `toricGraver(Matrix,Ring)` -- see toricGraver -- calculates the Graver basis of the toric ideal; invokes "graver" from 4ti2
  - `toricGraverDegrees(Matrix)` -- see toricGraverDegrees -- displays the degrees of all Graver basis elements for the toric ideal I_A
  - `toricGroebner(Matrix)` -- see toricGroebner -- calculates a Groebner basis of the toric ideal I_A, given A; invokes "groebner" from 4ti2
  - `toricGroebner(Matrix,Ring)` -- see toricGroebner -- calculates a Groebner basis of the toric ideal I_A, given A; invokes "groebner" from 4ti2
  - `toricMarkov(Matrix)` -- see toricMarkov -- calculates a generating set of the toric ideal I_A, given A; invokes "markov" from 4ti2
  - `toricMarkov(Matrix,Ring)` -- see toricMarkov -- calculates a generating set of the toric ideal I_A, given A; invokes "markov" from 4ti2
- Symbols
  - InputType

## For the programmer

The object FourTiTwo is a package, defined in FourTiTwo.m2.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/FourTiTwo.m2:265:0.