Theorem 4.11. (Buchberger’s criterion) Let \(I \subset k[X_1,\ldots , X_n]\) be a non-zero ideal and let \(G = \{g_1,\ldots , g_s\} \subset I \setminus \{0\}\) be such that \(I = (g_1,\ldots , g_s)\). Then, \(G\) is a Gröbner basis for \(I\) if and only if for all \(1 \leq i < j \leq s\), the remainder on division of \(S(g_i,g_j)\) by \(g_1,\ldots , g_s\) is \(0\).
For the proof of this theorem, we will need the following technical result. The idea is that every cancellation of leading terms among polynomials of the same leading monomial comes from the cancellation that occurs for \(S\)-polynomials.
Lemma 4.12. Suppose \(g_1,\ldots , g_s \in k[X_1,\ldots ,X_n]\) are non-zero, \(\alpha _1,\ldots ,\alpha _s \in \mathbb {N}^n\) and \(c_1,\ldots , c_s \in k \setminus \{0\}\). Let \[ f \coloneqq \sum _{i=1}^s c_i X^{\alpha _i} g_i \in k[X_1,\ldots , X_n] \] Suppose that for all \(i\), \(LM(X^{\alpha _i} g_i) = X^{\alpha _i} LM(g_i)= X^\delta \) for some \(\delta \in \mathbb {N}^n\), and that \(f = 0\) or \(LM(f) < X^\delta \). Then, we have \[ f = \sum _{1 \leq i < j \leq s} c_{ij} X^{\delta - \gamma _{ij}} S(g_i,g_j) \] for some \(c_{ij} \in k\), where \(X^{\gamma _{ij}} = \mathrm {lcm} (LM(g_i), LM(g_j))\). Moreover, \(LM(X^{\delta - \gamma _{ij}} S(g_i,g_j)) < X^\delta \) whenever \(S(g_i,g_j) \neq 0\).
Proof. We have \(X^\delta = X^{\alpha _i} LM(g_i) = X^{\alpha _j} LM(g_j)\) for all \(1 \leq i < j \leq s\). Hence, \(LM(g_i)\) and \(LM(g_j)\) both divide \(X^\delta \). Thus, \(X^{\gamma _{ij}} | X^\delta \). In particular, \(X^{\delta -\gamma _{ij}} \in k[X_1,\ldots , X_n]\).
We first prove the last assertion. We have \[ S(g_i,g_j) = \frac {X^{\gamma _{ij}}}{LT(g_i)} g_i - \frac {X^{\gamma _{ij}}}{LT(g_j)} g_j \] where both summands have leading term \(X^{\gamma _{ij}}\). Since the leading terms cancel, \(LM(S(g_i,g_j)) < X^{\gamma _{ij}}\) if \(S(g_i,g_j) \neq 0\), and multiplying by \(X^{\delta -\gamma _{ij}}\) gives \(LM(X^{\delta -\gamma _{ij}} S(g_i,g_j)) < X^\delta \).
Replacing \(g_i\) by \(g_i/LC(g_i)\) and \(c_i\) by \(c_i LC(g_i)\) changes neither \(f\) nor the \(S(g_i,g_j)\), so we may assume that \(LC(g_i)=1\), that is \(LT(g_i)= LM(g_i)\), for all \(i\).
We prove the first assertion by induction on \(s\). If \(s=0\) then \(f=0\) and there is nothing to prove, and \(s=1\) cannot occur, since then \(LM(f) = X^\delta \). For \(s \geq 2\) we compute \begin {align*} g &\coloneqq f - c_1 X^{\delta - \gamma _{12}} S(g_1,g_2) \\ &=c_1 X^{\alpha _1} g_1 + c_2 X^{\alpha _2} g_2 + \sum _{i=3}^s c_i X^{\alpha _i} g_i - c_1 X^{\delta - \gamma _{12}} \left ( \frac {X^{\gamma _{12}}}{LM(g_1)} g_1- \frac {X^{\gamma _{12}}}{LM(g_2)} g_2 \right ) \\ &= c_1 \left (X^{\alpha _1} - \frac {X^\delta }{LM(g_1)} \right ) g_1 + \left (c_2 X^{\alpha _2} + c_1 \frac {X^{\delta }}{LM(g_2)} \right ) g_2 + \sum _{i=3}^s c_i X^{\alpha _i} g_i\\ &= (c_1+c_2) X^{\alpha _2} g_2 + \sum _{i=3}^s c_i X^{\alpha _i} g_i \end {align*}
where the coefficient of \(g_1\) vanishes because \(X^{\alpha _1} LM(g_1) = X^{\delta }\) by assumption, and we used \(X^\delta /LM(g_2) = X^{\alpha _2}\). Now \(g\) is a sum of at most \(s-1\) terms of the same form as \(f\) (we drop the first term if \(c_1+c_2=0\)), and \(g = 0\) or \(LM(g) < X^\delta \), because this holds for \(f\) and for \(X^{\delta -\gamma _{12}}S(g_1,g_2)\). By induction, \(g\) is a linear combination of the \(X^{\delta -\gamma _{ij}}S(g_i,g_j)\), and hence so is \(f = g + c_1 X^{\delta -\gamma _{12}}S(g_1,g_2)\). □
We are now ready to give the proof of the theorem.
Proof. (of Theorem 4.11) One direction is easy: suppose \(G\) is a Gröbner basis. Since \(S(g_i,g_j) \in I\), division with remainder by \(G\) gives zero remainder by Theorem 4.8.
Conversely, suppose that all the remainders are zero, and let \(f \in I\) be non-zero; we have to show that \(LT(f) \in (LT(g_1), \ldots , LT(g_s))\). Write \[ f = \sum _{i=1}^s u_i g_i \text { with } u_i \in k[X_1,\ldots ,X_n] \] Let \(X^\delta = \mathrm {max} \{ LM(u_i g_i) : 1 \leq i \leq s, u_i \neq 0 \}\). We have \(LM(f) \leq X^\delta \). Below, we read an inequality \(LM(h) < X^\delta \) as satisfied also when \(h = 0\).
Case 1: Suppose \(LM(f) = X^\delta \). Then \[ LT(f) = \sum \limits _{\substack {1 \leq i \leq s, \\ LM(u_i g_i) = X^\delta }} LT(u_i g_i) = \sum \limits _{\substack {1 \leq i \leq s, \\ LM(u_i g_i) = X^\delta }} LT(u_i) LT(g_i) \in (LT(g_1), \ldots , LT(g_s)).\]
Case 2: Suppose \(LM(f) < X^\delta \). We define \[ f^* = \sum \limits _{\substack {1 \leq i \leq s, \\ LM(u_ig_i) = X^\delta }} LT(u_i) g_i. \] Then \(f - f^* = \sum _{i=1}^s v_i^* g_i\), where \(v_i^* = u_i - LT(u_i)\) if \(LM(u_i g_i) = X^\delta \) and \(v_i^* = u_i\) otherwise, so that \(LM(v_i^* g_i) < X^\delta \) for all \(i\). In particular \(LM(f^*) < X^\delta \), and applying Lemma 4.12 to \(f^*\), with \(c_i = LC(u_i)\) and \(X^{\alpha _i} = LM(u_i)\), we may write \[ f^* = \sum \limits _{1 \leq i < j \leq s} c_{ij} X^{\alpha _{ij}} S(g_i, g_j) \text {\ \ with\ \ } LM(X^{\alpha _{ij}} S(g_i,g_j)) < X^\delta . \] Now, by assumption, for each pair \(i < j\) division with remainder gives \[ S(g_i,g_j) = \sum _{k=1}^s v_k g_k \text { with } v_k \in k[X_1,\ldots , X_n] \text {\ \ and\ \ } LM(v_k g_k) \leq LM(S(g_i,g_j)) \] (the \(v_k\) depend on \(i\) and \(j\)). Therefore, \(X^{\alpha _{ij}} S(g_i,g_j) = \sum _{k=1}^s (X^{\alpha _{ij}} v_k) g_k\) with \(LM(X^{\alpha _{ij}} v_k g_k) < X^\delta \). It follows that there exist polynomials \(u_i^* \in k[X_1,\ldots , X_n]\) such that \[ f^* = \sum _{i=1}^s u_i^* g_i \text {\ \ with \ \ } LM(u_i^* g_i) < X^\delta \] Hence, we can write \[ f = (f-f^*) + f^* = \sum _{i=1}^s (u_i^* + v_i^*) g_i \text {\ \ with \ \ } LM((u_i^*+v_i^*)g_i) < X^\delta \] With this new expression of \(f\), we go back to the beginning of the proof; the new value of \(X^\delta \) is strictly smaller. If we are in the first case, we are done. Otherwise, we repeat the procedure of the second case. By Lemma 4.5, this has to stop after finitely many steps. □
\(\blacktriangleright \) Let \(X^{\alpha _i}= LM(g_i)\), \(X^{\alpha _j}= LM(g_j)\) and \(X^{\gamma _{ij}} = \mathrm {lcm}(LM(g_i), LM(g_j))\). By definition, \(S(g_i,g_j) = h_ig_i + h_j g_j\) where \(h_i = X^{\gamma _{ij} - \alpha _i}/LC(g_i)\) and \(h_{j} = -X^{\gamma _{ij}-\alpha _j}/LC(g_j)\). It is a common mistake to conclude that the division with remainder of \(S(g_i,g_j)\) by \(g_i,g_j\) has zero remainder. This is false in general: the expression \(h_ig_i+ h_j g_j\) is not usually the one produced by the division algorithm. For example, let \(g_1 = X^2\) and \(g_2 = XY+Y^2\) with the lex order \(X > Y\). Then \(S(g_1,g_2) = Y g_1 - X g_2 = -XY^2\), and division by \(g_1, g_2\) gives \(-XY^2 = 0 \cdot g_1 - Y g_2 + Y^3\) with remainder \(Y^3 \neq 0\).
Finally, let us explain how the results we have covered so far provide an algorithm for constructing a Gröbner basis (hence, an algorithm for determining whether a polynomial belongs to an ideal \(I\)).
Suppose we are given \(f_1,\ldots , f_t \in k[X_1,\ldots , X_n]\) such that \(I \coloneqq (f_1,\ldots , f_t)\) and we fix a monomial ordering \(\leq \).
Initialize with \(G = \{f_1,\ldots , f_t\}\). Now, suppose \(G= \{g_1,\ldots , g_s\}\). For \(1 \leq i < j \leq s\) divide \(S(g_i,g_j)\) with remainder by \(g_1,\ldots ,g_s\), and let \(r_{ij}\) denote the remainder. If \(r_{ij}=0\) for all \(i,j\), then stop: \(G\) is a Gröbner basis of \(I\) by Theorem 4.11. Otherwise, pick \(i,j\) with \(r_{ij} \neq 0\), replace \(G\) by \(G \cup \{ r_{ij}\}\) and repeat. Note that \(r_{ij} \in I\), so the new \(G\) still generates \(I\).
Proof. By applying the procedure, we obtain a chain of sets \[ G_0 = \{f_1,\ldots , f_t \} \subset G_1 \subset G_2 \subset \ldots \] and, writing \((LT(G))\) for the ideal generated by the leading terms of the elements of \(G\), an ascending chain of ideals \[ (LT(G_0)) \subset (LT(G_1)) \subset (LT(G_2)) \subset \ldots \] in \(k[X_1,\ldots , X_n]\). We claim that each step of the procedure makes this chain strictly larger. Indeed, if \(G_{m+1} = G_m \cup \{r\}\) with \(r \neq 0\) the remainder of some \(S(g,h)\) on division by the elements of \(G_m\), then no term of \(r\) is divisible by any \(LT(g_i)\), \(g_i \in G_m\), so \(LT(r) \notin (LT(G_m))\) by Lemma 4.4, while \(LT(r) \in (LT(G_{m+1}))\). Since \(k[X_1,\ldots , X_n]\) is Noetherian by the Hilbert basis theorem (Theorem 4.1), a strictly ascending chain of ideals is finite, so the procedure stops. □
\(\blacktriangleright \) Note that the algorithmic construction of Gröbner basis gives another (constructive) approach to proving Hilbert’s basis theorem for a general ideal \(I\). By elementary techniques, one first proves Dickson’s lemma, i.e. any monomial ideal is finitely generated, and then uses the above argument to deduce the existence of a (finite) Gröbner basis for any ideal.
\(\sphericalangle \) Compute a Gröbner basis (by hand) for the ideal \(I=(X^2, XY+Y^2)\).
\(\blacktriangleright \) Here is an example of how you can compute a Gröbner basis in Macaulay2:
R = QQ[x,y,z, MonomialOrder => Lex] I = ideal (x^2-z-1,z^2-y-1,x*y^2-x-1) gens gb I
\(\sphericalangle \) (Elimination theory) Let \(I \subset k[X_1,\ldots , X_n]\) be a non-zero ideal, \(G\) a Gröbner basis for \(I\) with respect to the \(\leq _{lex}\) order with \(X_1 > X_2 > \ldots > X_n\). Then \(G \cap k[X_{l+1},\ldots , X_n]\) generates the ideal \(I \cap k[X_{l+1},\ldots , X_n]\) for all \(0 \leq l \leq n\).
A Gröbner basis \(G=\{g_1,\ldots ,g_s \}\) of an ideal \(I\) is said to be reduced if \(LC(g_i)=1\) for all \(i\) and for all \(i\) none of the terms of \(g_i\) is divisible by any of the \(LT(g_j)\) for \(j\neq i\). Starting from any Gröbner basis \(G\), it is easy to produce a reduced Gröbner basis. First, if for some \(g \in G\) we have \(LT(g) \in (LT(g_i) : g_i \in G, g_i \neq g)\), then replace \(G\) with \(G \setminus \{g\}\), which is still a Gröbner basis of \(I\); repeat until no \(LT(g_i)\) is divisible by another \(LT(g_j)\). Next, for each \(i\) in turn, replace \(g_i\) by its remainder on division by the other elements of \(G\). Since no \(LT(g_j)\) with \(j \neq i\) divides \(LT(g_i)\), this does not change \(LT(g_i)\), so \(G\) remains a Gröbner basis, and now no term of \(g_i\) is divisible by any \(LT(g_j)\), \(j \neq i\). Finally, make sure that \(LC(g_i)=1\) for all \(i\) by rescaling with an element of \(k\). This gives a reduced Gröbner basis. An important property is that an ideal \(I\) has a unique reduced Gröbner basis with respect to a fixed monomial order. This is an easy result to prove but we omit the proof in order to save time for other topics.
\(\blacktriangleright \) Consider the ideal \(I=(X-Z^2,Y-Z^3)\) in \(k[X,Y,Z]\). For the lexicographic order with \(X>Y>Z\), it is easy to verify that \(\{X-Z^2,Y-Z^3\}\) is the reduced Gröbner basis. On the other hand, for the graded lexicographic order with \(X>Y>Z\), it is easy to verify that \(\{X^2-YZ, XZ-Y, Z^2-X\}\) is the reduced Gröbner basis. This example shows that the number of elements in the reduced Gröbner basis for a given ideal depends on the monomial ordering.