The following items illustrate an algorithm to compute saturation of ideals. Let $I\subset S := k[x_1,\dots,x_n]$ be an ideal and fix $f\in S$. Then the saturation of $I$ w.r.t. $f$ is the set
$$I:f^\infty=\{g\in S|f^m g\in I \text{ for some } m>0\}.$$
- $I:f^\infty$ is an ideal.
- We have the ascending chain of ideals
$I:f \subset I:f^2\subset I:f^3 \subset \dots.$
- There is an integer $N$ for which $I:f^N=I:f^{N+1}=I:f^\infty$.
- $I:f^\infty=I:f^m$ iff $I:f^m=I:f^{m+1}$.
- $I:f=\frac{1}{f}(I\cap \langle f \rangle )$.
Let $L\subset \mathbb{Z}^m$ be a sublattice and $\ell^1, \dots, \ell^r$ be a basis for $L$. Then the lattice ideal $I_L$ can be computed as the saturation
$$I_L = \langle x^{\ell^i_{+}}-x^{\ell^i_{-}}|i=1,\dots,r\rangle:\langle x_1\cdots x_m\rangle^\infty,$$
where $\ell_{+}=\sum_{\ell_i>0}\ell_{i}e_i$ and $\ell_{-}=-\sum_{\ell_i<0}\ell_{i} e_i$,
both in $\mathbb{N}^m$.
In the given exercise we define the matrix of parametrization by
$$A:=\begin{pmatrix}
4 & 0 &0 \\
0& 4& 0 \\
0& 0& 4\\
8& 0& 1\\
0& 12& 3\\
\end{pmatrix}.$$
If $V$ is a toric affine variety given by a parametrization matrix $A\in \mathbb{Z}^{s\times r}$, then the toric ideal of $V$ is the lattice ideal $I_L$, where $L$ is the kernel of the map $\mathbb{Z}^s \rightarrow \mathbb{Z}^r; e_i \mapsto i\mbox{'th row of } A$, i.e., the basis of $L$ is the set of rows of the matrix of row-syzygies of $A$.
gap> LoadPackage( "RingsForHomalg" );
true
gap> ZZ := HomalgRingOfIntegers();
Z
gap> A := HomalgMatrix( [[4,0,0],[0,4,0],[0,0,4],[8,0,1],[0,12,3]],5,3,ZZ );
<A 5 x 3 matrix over an internal ring>
gap> L := SyzygiesOfRows(A);
<A non-zero 2 x 5 matrix over an internal ring>
gap> Display( L );
[ [ -8, 0, -1, 4, 0 ],
[ 6, -3, 0, -3, 1 ] ]
Hence $I_L=\langle x_1^8 x_3 - x_4^4,
x_1^6 x_5 - x_2^3 x_4^3 \rangle:(x_1 x_2 x_3 x_4 x_5)^\infty$
which can easily be computed as described above.
In Gap the toric ideal can also be computed using 4ti2
gap> LoadPackage( "4ti2Interface" );
true
gap> A := [ [ 4, 0, 0 ], [ 0, 4, 0 ], [ 0, 0, 4 ], [ 8, 0, 1 ], [ 0, 12, 3 ] ];;
gap> 4ti2Interface_groebner_matrix(A);
[ [ -8, 0, -1, 4, 0 ], [ -6, 3, 0, 3, -1 ], [ -4, 6, 1, 2, -2 ], [ -2, -3, -1, 1, 1 ], [ -2, 9, 2, 1, -3 ], [ 0, -12, -3, 0, 4 ] ]