TITLE: From polynomial ideal over $\mathbb{Q}$ to polynomial ideal over $\mathbb{Z}$
QUESTION [16 upvotes]: Is there an algorithm to compute, given a polynomial ideal $I\subset \mathbb{Q}[x_1,\dotsc,x_n]$, the ideal $I\cap \mathbb{Z}[x_1,\dotsc,x_n]$ in $\mathbb{Z}[x_1,\dotsc,x_n]$?

The input and output can be given via a finite set of generators. From chapter 10 of book "Gröbner bases" by Becker and Weispfenning, I am familiar with Gröbner bases over PID, and in particular understand how to compute the intersection of polynomial ideals over PID (though it is not explicitly mentioned in the book, as far as I can see). However, $\mathbb{Z}[x_1,\dotsc,x_n]$ is not an ideal in $\mathbb{Q}[x_1,\dotsc,x_n]$. It is tempting to work in the ring $\frac{1}{D}\mathbb{Z}[x_1,\dotsc,x_n]$ for large very composite integer $D$, but how large is large enough?

REPLY [10 votes]: I am aware that I am replying to an old question that has been satisfactorily answered, but I think it might be worth while pointing out, for the completeness of MathOverflow, that the question is discussed (in slightly greater generality, and with an example) as corollary 4.4.5 in the book An Introduction to Gröbner Bases by William Adams and Philippe Loustaunau (AMS 1994, Graduate Studies in Mathematics 3).  The method is the same as in the approved answer, but formulated in a slightly different way.  Their statements (very slightly reworded) are:
Proposition 4.4.1 [computation of the saturation]: Let $R$ be an integral domain and $I$ a non-zero ideal of $A = R[x_1,\ldots,x_n]$.  Let $g\in A$, $g\neq 0$.  Let $w$ be a new variable.  Consider the ideal $\langle I,wg-1\rangle$ of $A[w]$.  Then $I A_g \cap A = \langle I, wg-1\rangle \cap A$ where $A_g = A[\frac{1}{g}]$.
(Note that the intersection $\langle I, wg-1\rangle \cap A$ in $A[w]$ can be computed using an elimination order on the variables: it is theorem 4.3.6 in that book.)
Proposition 4.4.4: Let $R$ be an integral domain with $k$ its quotient field.  Let $I$ be a non-zero ideal of $A = R[x_1,\ldots,x_n]$ and let $G = \{g_1,\ldots,g_t\}$ be a Gröbner basis for $I$ with respect to some term ordering.  Let $s$ be the product of the leading coefficients of $g_1,\ldots,g_t$.  Then
$$I k[x_1,\ldots,x_n] \cap R[x_1,\ldots,x_n] = IR_s[x_1,\ldots,x_n] \cap R[x_1,\ldots,x_n]$$
(This is essentially what the approved answer to this question explains.)
Corollary 4.4.5: Let $R$ be an integral domain in which linear equations are algorithmically solvable and let $k$ be its quotient field.  Let $I$ be an ideal of $A = R[x_1,\ldots,x_n]$.  Then we can compute generators for the ideal $I k[x_1,\ldots,x_n] \cap R[x_1,\ldots,x_n]$.
(This follows immediately from the above results.)