Suppose we would like to comput the toric ideal defining the variety parametrized by the following matrix:
A = matrix"1,1,1,1;0,1,2,3" |
Since there are 4 columns, the ideal will live in the polynomial ring with 4 variables.
R = QQ[a..d] |
M = toricMarkov(A) |
Note that rows of M are the exponents of minimal generators of IA. To get the ideal, we can do the following:
I = toBinomial(M,R) |
Alternately, we might wish to give a lattice basis ideal instead of the matrix A. The lattice basis will be specified by a matrix, as follows:
B = syz A |
N = toricMarkov(transpose B, InputType => "lattice") |
J = toBinomial(N,R) -- toricMarkov(transpose B, R, InputType => "lattice") |
We can see that the two ideals are equal:
I == J |
Also, notice that instead of the sequence of commands above, we could have used the following:
toricMarkov(A,R) |