Lecture 8. The Hilbert function and the Hilbert polynomial

4.4 Hilbert polynomial

Problem: How to measure the “size” of an ideal \(I\), or equivalently the “dimension” of the affine variety \(\mathcal {V}(I)\)?

Definition 4.14. Let \(I \subset k[X_1,\ldots ,X_n]\) be an ideal and \(s \in \mathbb {N}\), and let us write \[ k[X_1,\ldots , X_n]_{\leq s} \coloneqq \{ f\in k[X_1,\ldots , X_n] : f=0 \text { or } \mathrm {deg}(f) \leq s \} \] and \[ I_{\leq s} \coloneqq I \cap k[X_1,\ldots , X_n]_{\leq s}. \] The Hilbert function of \(I\) is the function \(HF_I : \mathbb {N} \to \mathbb {N}\), \[ HF_I(s) = \mathrm {dim}_{k} \left ( \frac {k[X_1,\ldots , X_n]_{\leq s}}{I_{\leq s} } \right ) < \infty . \]

\(\blacktriangleright \) (a) Let \(I = k[X_1,\ldots , X_n]\). Then \(HF_I(s)=0\) for all \(s\in \mathbb {N}\).

(b) Let \(I = \{0 \}\). Then \begin {align*} HF_I(s) &= \mathrm {dim}_k k[X_1,\ldots , X_n]_{\leq s} \\ &= \text { number of monomials } X^\alpha \text { with } |\alpha | \leq s \\ &= | \{ (\alpha _1,\ldots ,\alpha _n) \in \mathbb {N}^n : \alpha _1 + \ldots + \alpha _n \leq s \} | = { s+n \choose n } \\ &= \frac {1}{n!}(s+n)(s+n-1)\cdots (s+1) = \frac {1}{n!} s^n + \frac {1}{n!} { n+1 \choose 2 } s^{n-1} + \ldots + \sum _{i=1}^n \frac {1}{i} s + 1 \end {align*}

is a polynomial of degree \(n\).

(c) Suppose that \(I=(f)\) where \(0 \neq f \in k[X_1,\ldots ,X_n]\) with \(\deg (f) = d\). Then \[ HF_I(s) = \mathrm {dim}_k k[X_1,\ldots ,X_n]_{\leq s} - \mathrm {dim}_k I_{\leq s}. \] Since \(\deg (gf) = \deg (g) + d\) for \(g \neq 0\), we have \[ I_{\leq s} = \{ g \cdot f : g \in k[X_1,\ldots ,X_n]_{\leq s-d} \}, \] which is \(\{0\}\) if \(s < d\). If \(s \geq d\), then \(g \mapsto gf\) is an injective linear map from \(k[X_1,\ldots ,X_n]_{\leq s-d}\) onto \(I_{\leq s}\), so \(\mathrm {dim}_k I_{\leq s} = | \{ X^\alpha : |\alpha | \leq s-d \} | = {n+s-d \choose n}\). Hence \[ HF_I(s) = \begin {cases} { n+s \choose n } & \text {if } s < d, \\[4pt] { n+s \choose n} - {n+s-d \choose n} = \dfrac {d}{(n-1)!} s^{n-1} + \text {lower order terms} & \text {if } s \geq d. \end {cases} \]

Lemma 4.15. (Macaulay) Let us equip \(k[X_1,\ldots , X_n]\) with the graded lexicographic order \(\leq _{grlex}\) (any graded monomial order would do). Let \(I\) be an ideal, and \(\ini (I) = (LT(f) : f \in I)\). Then \[ HF_{I}(s) = HF_{\ini (I)}(s) \text {\ \ for all\ \ }s \geq 0. \]

Proof. Since the order is graded, \(\deg LM(f) = \deg f\) for every non-zero \(f\). Hence the set of leading monomials \[ \{ LM(f) : 0 \neq f \in I_{\leq s} \} = \{ LM(f_1),\ldots , LM(f_m) \} \] is finite, where \(f_1, \ldots , f_m \in I_{\leq s}\) and \(LM(f_1) > LM(f_2) > \ldots > LM(f_m)\).

We will show that (a) \(\{f_1,\ldots , f_m\}\) is a \(k\)-basis of \(I_{\leq s}\), (b) \(\{ LM(f_1), \ldots , LM(f_m) \}\) is a \(k\)-basis of \(\ini (I)_{\leq s}\). Then \(\dim _k I_{\leq s} = m = \dim _k \ini (I)_{\leq s}\), which implies the stated result.

Linear independence for (a): Suppose there exist \(a_i \in k\), not all zero, such that \(\sum _{i=1}^m a_i f_i =0\). Choose the smallest \(i_0\) such that \(a_{i_0} \neq 0\). Then \[ 0 = a_{i_0} f_{i_0} + a_{i_0+1} f_{i_0+1} + \ldots + a_m f_m \] but \(LM(f_i) < LM(f_{i_0})\) for \(i > i_0\), so the term \(a_{i_0} LT(f_{i_0})\) cannot cancel, a contradiction.

Linear independence for (b): distinct monomials are linearly independent.

Spanning property for (a): Let \(0 \neq f \in I_{\leq s}\). Then \(LM(f) = LM(f_i)\) for some \(i\). Hence \(LT(f) = c LT(f_i)\) for some \(c \in k\). Consider \(f' = f - c f_i \in I_{\leq s}\). If \(f'=0\), then \(f = cf_i\) as desired. Otherwise \(LM(f') < LM(f)\), and we repeat the argument with \(f'\). By Lemma 4.5 this terminates after finitely many steps.

Spanning property for (b): Let \(g \in \ini (I)_{\leq s}\). Since \(\ini (I)\) is the monomial ideal generated by \(\{LM(f) : f \in I\}\), by Lemma 4.4 each term of \(g\) is divisible by some \(LM(f)\) with \(f \in I\): say the term is \(c X^\gamma \) with \(X^\gamma = X^\alpha LM(f) = LM(X^\alpha f)\). Now \(X^\alpha f \in I\) and \(\deg (X^\alpha f) = |\gamma | \leq \deg g \leq s\), so \(X^\alpha f \in I_{\leq s}\) and \(X^\gamma \) is one of \(LM(f_1), \ldots , LM(f_m)\). Therefore \(g\) is a linear combination of \(LM(f_1), \ldots , LM(f_m)\). □

\(\blacktriangleright \) The hypothesis that the order is graded cannot be dropped. Let \(I = (X - Y^2) \subset k[X,Y]\) with the lex order, \(X > Y\). Then \(\ini (I) = (X)\) and \(HF_{\ini (I)}(s) = s+1\), since the monomials of degree \(\leq s\) not in \((X)\) are \(1, Y, \ldots , Y^s\), but \(HF_I(s) = \binom {s+2}{2} - \binom {s}{2} = 2s+1\) by Example (c). The proof breaks down in the spanning property for (b): \(X \in \ini (I)_{\leq 1}\), but the elements of \(I\) with leading monomial \(X\) are the \(c(X-Y^2)\), \(c \in k^*\), which are not in \(I_{\leq 1}\).

\(\blacktriangleright \) Let \(I = (Y-X^2, Z-X^3) \subset k[X,Y,Z]\). Using \(\leq _{grlex}\), one can show that \(G=\{ X^2-Y,XY-Z, XZ-Y^2,Y^3-Z^2 \}\) is a Gröbner basis. Here is how to check this in Macaulay2:

R = QQ[x,y,z, MonomialOrder => GLex];
I = ideal (y-x^2,z-x^3);
gens gb I

Thus, \(\ini (I) = (X^2,XY,XZ,Y^3)\). By Macaulay’s lemma and Lemma 4.4, \(HF_I(s)\) is the number of standard monomials of degree \(\leq s\), that is, monomials of degree \(\leq s\) not in \(\ini (I)\). These are \(1, X, Y, Z\) and \(Z^{r}, Y Z^{r-1}, Y^2 Z^{r-2}\) for \(r \geq 2\), so \(HF_I(s) = 3s+1\) for all \(s \geq 0\). The next theorem shows that \(HF_I(s)\) is always given by a polynomial for large \(s\).

Theorem 4.16. Let \(I \subset k[X_1,\ldots , X_n]\) be an ideal. There exist a unique polynomial \(HP_I(t) \in \mathbb {Q}[t]\), called the Hilbert polynomial of \(I\), and an integer \(s_0 \geq 0\) such that \[ HF_I(s) = HP_I(s) \text { \ \ for all \ \ } s \geq s_0. \] If \(I=k[X_1,\ldots ,X_n]\) then \(HP_I(t)=0\). Otherwise \(HP_I(t) \neq 0\), and if we write \[ HP_I(t) = a_d t^d + a_{d-1}t^{d-1} + \ldots +a_0 \] with \(a_d \neq 0\), then \(a_i d! \in \mathbb {Z}\) for all \(i\) and \(a_d d! > 0\).

Proof. By the previous lemma, we may assume without loss of generality that \(I = \ini (I) = (X^{\beta ^{(1)}}, \ldots , X^{\beta ^{(m)}})\) is a monomial ideal with \(\beta ^{(i)} \in \mathbb {N}^n\) (generated by the leading monomials of a Gröbner basis). By Lemma 4.4, a polynomial \(f\) is in \(I\) if and only if each term of \(f\) is divisible by \(X^{\beta ^{(i)}}\) for some \(i\). Therefore \(I_{\leq s}\) has \(k\)-basis \(\{ X^\alpha : |\alpha | \leq s \text { and } X^{\beta ^{(i)}} \mid X^\alpha \text { for some } i \}\). Put \(C(I) \coloneqq \{\alpha \in \mathbb {N}^n : X^{\beta ^{(i)}} \nmid X^\alpha \text { for all } i \}\) and \(C(I)_{\leq s} \coloneqq \{ \alpha \in C(I) : |\alpha | \leq s \}\). Then the monomials \(X^\alpha \) with \(\alpha \in C(I)_{\leq s}\) form a basis of \(k[X_1,\ldots ,X_n]_{\leq s}/I_{\leq s}\), so \[ HF_I(s) = | C(I)_{\leq s} |. \]

Next, we need to compute \(|C(I)_{\leq s}|\). We will show that \(C(I)\) is a finite union of translates of coordinate subspaces, which we denote as follows: for \(J \subset \{1,2,\ldots , n\}\) and a function \(\tau : J \to \mathbb {N}\), we set \[ C(J,\tau ) \coloneqq \{ (\alpha _1,\ldots , \alpha _n) \in \mathbb {N}^n : \alpha _j = \tau (j) \text { for all } j \in J \}. \] Extend \(\tau \) to \(\{1,\ldots , n\}\) by setting \(\tau (i)=0\) for \(i \notin J\). Then \[ C(J,\tau ) = \{ (\alpha _1 + \tau (1), \ldots , \alpha _n + \tau (n)) : \alpha = (\alpha _1,\ldots , \alpha _n) \in \mathbb {N}^n \text { such that } \alpha _j = 0 \text { for all } j \in J \}. \] Let \(|\tau | = \sum _{j \in J} \tau (j)\) and \(e = n - |J|\). For \(s \geq |\tau |\) we have \begin {align*} |C(J,\tau )_{\leq s}| &= | \{ \alpha \in \mathbb {N}^n : |\alpha | \leq s - |\tau | \text { and } \alpha _j = 0 \text { for all } j \in J\} | \\ &= { e + s - |\tau | \choose e } = \frac {1}{e!} (s^e + \text { lower order terms}), \end {align*}

a polynomial in \(s\) of degree \(e\) with positive leading coefficient, and \(e!\) times it has integer coefficients.

We also note that for two pairs \((J,\tau )\) and \((J',\tau ')\), we have \[ C(J,\tau ) \cap C(J',\tau ') = \begin {cases} \emptyset \text { if } J \cap J' \neq \emptyset \text { and } \tau (j) \neq \tau '(j) \text { for some } j \in J\cap J' \\ C(J \cup J', \tau \cup \tau ') \text { otherwise. } \end {cases} \] Claim: There exists a finite collection \(\mathcal {J}\) of pairs \((J,\tau )\) such that \[ C(I) = \bigcup _{(J,\tau ) \in \mathcal {J}} C(J,\tau ). \]

For \(\beta \in \mathbb {N}^n\) let \(C(\beta ) = \{ \alpha \in \mathbb {N}^n : X^\beta \nmid X^\alpha \}\). Then \(C(I) = \bigcap _{i=1}^m C(\beta ^{(i)}) \). Now \(\alpha \in C(\beta )\) if and only if \(\alpha _i < \beta _i\) for some \(i \in \{1,\ldots , n\}\). Hence \[ C(\beta ) = \bigcup _{i=1}^n \bigcup _{t=0}^{\beta _i -1} \{ \alpha \in \mathbb {N}^n : \alpha _i = t \} = \bigcup _{i=1}^n \bigcup _{t=0}^{\beta _i -1} C(\{ i \} , i \mapsto t) \] is a finite union of sets of the form \(C(J,\tau )\). Therefore \(C(I)\) is a finite intersection of finite unions of such sets, hence a finite union of finite intersections of such sets, and by the formula above each of these intersections is empty or again of the form \(C(J,\tau )\). This proves the claim.

The theorem now follows from the inclusion-exclusion principle: if \(A_1,\ldots , A_k\) are finite sets then \[ |A_1 \cup A_2 \cup \ldots \cup A_k| = \sum _{r=1}^k \sum _{1 \leq i_1 < \ldots < i_r \leq k} (-1)^{r-1} | A_{i_1} \cap \ldots \cap A_{i_r} |. \] Apply this to \(C(I)_{\leq s} = \bigcup _{(J,\tau ) \in \mathcal {J}} C(J,\tau )_{\leq s}\). For \((J_1,\tau _1), \ldots , (J_r,\tau _r) \in \mathcal {J}\), the intersection \(C(J_1,\tau _1) \cap \ldots \cap C(J_r,\tau _r)\) is empty or of the form \(C(J,\tau )\) with \(J = J_1 \cup \ldots \cup J_r\), and there are finitely many such intersections; let \(s_0\) be the largest \(|\tau |\) that occurs. By the computation of \(|C(J,\tau )_{\leq s}|\), for \(s \geq s_0\) the function \(HF_I(s) = |C(I)_{\leq s}|\) agrees with a \(\mathbb {Z}\)-linear combination \(HP_I(s)\) of polynomials \(e + s - |\tau | \choose e\) with \(e = n-|J|\). The polynomial \(HP_I\) is unique, since a polynomial is determined by its values at infinitely many points.

If \(I = k[X_1,\ldots ,X_n]\) then \(C(I) = \emptyset \) and \(HP_I = 0\). Otherwise \(0 \in C(I)\), so \(\mathcal {J} \neq \emptyset \), and we let \(D = \max \{ n - |J| : (J,\tau ) \in \mathcal {J} \}\). Each \(e\) above is at most \(D\), so \(\deg HP_I \leq D\), and since \(e!\) divides \(D!\), the polynomial \(D! \, HP_I(t)\) has integer coefficients. On the other hand, if \((J,\tau )\) is any pair with \(C(J,\tau ) \subset C(I)\), then \[ HP_I(s) = HF_I(s) \geq |C(J,\tau )_{\leq s}| = {n - |J| + s - |\tau | \choose n-|J|} \quad \text {for } s \geq \max (s_0,|\tau |), \] and the right hand side is a polynomial in \(s\) of degree \(n-|J|\) with positive leading coefficient. Hence \(\deg HP_I \geq n - |J|\), and the leading coefficient of \(HP_I\) is positive. Taking \((J,\tau ) \in \mathcal {J}\) with \(n - |J| = D\) gives \(d = \deg HP_I = D\), so \(a_d d! > 0\) and \(a_i d! \in \mathbb {Z}\) for all \(i\). We have also shown that \[ \deg HP_I(t) = \max \{ n- |J| : \exists (J,\tau ) \text { with } C(J,\tau ) \subset C(I) \}, \] which will be used in the next lecture. □

\(\blacktriangleright \) The proof can be visualised on the staircase diagram of a monomial ideal; see Figure 3 for \(I = (XY^3, X^2Y, X^5) \subset k[X,Y]\), the ideal of Figure 2. The points of \(C(I)\) lie below the staircase, and they form the \(\alpha _2\)-axis \(C(\{1\}, 1 \mapsto 0)\) together with six isolated points \(C(\{1,2\},\tau )\). Now \(HF_I(s)\) counts the points of \(C(I)\) on or below the line \(\alpha _1 + \alpha _2 = s\): the axis contributes \(s+1\) and each isolated point contributes \(1\) once \(s \geq |\tau |\). Hence \(HF_I(s) = s+7\) for \(s \geq 4\), and \(HP_I(t) = t + 7\) with \(s_0 = 4\). In general, \(\deg HP_I(t)\) is the largest dimension of a translated coordinate subspace fitting under the staircase, and for an irredundant decomposition \(d!\, a_d\) is the number of such subspaces of dimension \(d\).

Figure

Figure 3: The points of \(C(I)\) for \(I = (XY^3, X^2Y, X^5)\), in blue: the \(\alpha _2\)-axis and six isolated points. \(HF_I(5) = 12\) counts those on or below the dashed line.