# Computing GKZ systems

This page contains the code we used to compute the GKZ system associated to the polynomial $$f = -c_1 xy^2 + c_2 xy^3 + c_3 x^2y - c_4 x^2y^3 - c_5 x^3y + c_6 x^3y^2.$$ The matrix $$A\in\mathbb{Z}^{3\times 6}$$ associated to the polynomial $$f$$ is

$\begin{split}\begin{pmatrix} 1 & 1 & 2 & 2 & 3 & 3\\ 2 & 3 & 1 & 3 & 1 & 2 \\ 1 & 1 & 1 & 1 & 1 & 1 \end{pmatrix}.\end{split}$

Using the $$\verb|Macaulay2|$$ package Dmodules, one attains $$9$$ binomials generating the toric ideal $$I_A$$ and $$3$$ operators generating the ideal $$J_{A,\kappa}$$:

restart

needsPackage "Dmodules"
A = matrix{{1,1,1,1,1,1},
{1,1,2,2,3,3},
{2,3,1,3,1,2}};
# choose non resonant values for the vector b = (-\nu,s)^T
k = {1/2,1/3,1/5}

D = makeWA(QQ[x_1..x_6])

G = gkz(A,k)

holonomicRank G


Alternatively, one can compute exclusively the toric ideal $$I_A$$ using the package Quasidegrees:

needsPackage "Quasidegrees"
D6 = QQ[d_1..d_6]
T = toricIdeal(A,D6)
degree T


This last computation can also be done in $$\verb|Singular|$$ by running the following lines:

LIB "toric.lib";
ring s = 0,(d1,d2,d3,d4,d5,d6),dp; setring s;
intmat Amat[3][6] = 1,1,2,2,3,3,2,3,1,3,1,2,1,1,1,1,1,1;
ideal I = toric_ideal(Amat,"du"); I;