Every toric ideal comes as the ideal of some vector configuration. This function gives one such vector configuration whose ideal is the given ideal.
i1 : V = {{0, 0}, {0, 1}, {1, 1}, {1, 0}}; |
i2 : I = slackIdeal V Order of vertices is {{0, 0}, {1, 0}, {0, 1}, {1, 1}} o2 = ideal(x x x x - x x x x ) 0 3 5 6 1 2 4 7 o2 : Ideal of QQ[x ..x ] 0 7 |
i3 : Q = toricPolytope I o3 = | 1 0 0 0 1 0 0 0 | | 0 1 0 0 0 1 0 0 | | 0 0 0 0 1 1 0 0 | | 0 0 0 0 1 0 1 0 | | 0 0 1 0 -1 0 0 0 | | 0 0 0 0 0 1 0 1 | | 0 0 0 1 0 -1 0 0 | 7 8 o3 : Matrix ZZ <--- ZZ |
This function does not test for binomiality. If it is given an ideal which is not toric, it will return the polytope of the ideal whose generators are the first two terms of each generator of the input ideal. If the input toric ideal is scaled (lattice ideal with not all coefficients one) the toric polytope of the unscaled ideal is returned.
The object toricPolytope is a method function.