Let $S = k[x\_1,\dots,x\_n]$ be a polynomial ring over a field $k$ of characteristic zero. Let $M$ be a finitely generated graded $S$-module. The regularity of the Hilbert function $H(n,M)$ of $M$ is the smallest degree $r(M)$ such that for any $n \ge r(M)$ the Hilbert function agrees with the Hilbert polynomial $P\_M(n)$. On the other hand, the Castelnuovo-Mumford regularity $reg(M)$ is the largest $i+j$ such that $(H\_m^i(M))\_j \neq 0$, where $H\_m^i(M)$ is the $i$th graded local cohomology of $M$.
By using Serre's formula
\begin{align}
H(n,M) - P(n,M) = \sum\_{i= depth(M)}^{dim(M)} (-1)^i dim\_k (H\_m^i(M))\_n,
\end{align} we can show that $r(M) \le reg(M)-depth(M)+1$; just plug the upper bound $reg(M)-depth(M)+1$ into the formula and notice that the right hand side is zero. 


**Question:** How can we show that $reg(M)-dim(M)+1 \le r(M)$? 



regularity of Hilbert function and CM regularity
**Notation.** Let $k$ be a field, and let $R = k[x\_1,\ldots,x\_d]$, with maximal homogeneous ideal $\mathfrak m = (x\_1,\ldots,x\_d)$. Let $M$ be a finitely generated homogeneous $R$-module.


If $r(M)$ is the smallest number such that $H(n,M) = P\_M(n)$ for all $n \geq r(M)$, then in fact the result is false, as shown by the following example. However, we will show below that the result is trivially true if we redefine $r(M)$; see the remark below.


**Example.** Let $d = 1$, and consider the module $M = R \oplus k(1) \oplus \ldots \oplus k(a)$ for some $a \in \mathbb Z\_{> 0}$. Here, $k(n)$ is nonzero only in degree $-n$. Thus,
$$H(n,M) = \dim M\_n = \left\{\begin{array}{cc}1 & n \geq -a,\\ 0 & n<-a. \end{array}\right.$$
Thus, $P\_M(n) = 1$ and $r(M) = -a$. We have an exact sequence
$$0 \to \Gamma\_{\mathfrak m}(M) \to M \to \bigoplus\_{n \in \mathbb Z} H^0(\mathbb P^0, \tilde{M}(n)) \to H^1\_{\mathfrak m}(M) \to 0;\label{Seq 1}\tag{1}$$
see Eidenbud's *Commutative Algebra*, **Theorem A4.1**. Thus, we compute
\begin{align\*}
\Gamma\_{\mathfrak m}(M) &= k(1) \oplus \ldots \oplus k(a),\\
H^1\_{\mathfrak m}(M) &= \bigoplus\_{d > 0} k(d).
\end{align\*}
Thus, $\operatorname{reg}(M) = 0$, coming from $H^1\_{\mathfrak m}(M)\_{-1} \neq 0$. Since $a$ is arbitrary, we see that there can be no lower bound on $r(M)$ in terms of $\operatorname{reg}(M)$ and $\dim\operatorname{Supp}(M)$.


This example is not limited to $d = 1$: in any odd dimension one can add finite length modules to $M = R$ to extend the range where the Hilbert function equals the Hilbert polynomial. We need odd dimension because by Serre's formula and since $\operatorname{depth}(M) = \dim\operatorname{Supp}(M) = d$ (for $M = R$), the difference $H(n,M) - P\_M(n)$ is positive if $d$ is even, so we cannot add something to $H(n,M)$ to make them equal in a larger range (note that finite length stuff does not affect $P\_M(n)$).


**Remark.** If we let $r'(M)$ be the smallest integer such that $H^i\_\mathfrak m(M)\_n = 0$ for all $n \geq r'(M)$, then Serre's formula implies $r(M) \leq r'(M)$, and the above example shows that the difference can be arbitrarily large. Moreover, with this new definition, the inequalities
$$\operatorname{reg}(M) - \dim\operatorname{Supp}(M) + 1 \leq r'(M) \leq \operatorname{reg}(M) - \operatorname{depth}(M) + 1$$
become obvious: if $H^i\_\mathfrak m(M)\_j \neq 0$, then $\operatorname{depth}(M) \leq i \leq \dim\operatorname{Supp}(M)$, so
$$i+j - \dim\operatorname{Supp}(M) \leq j \leq i+j - \operatorname{depth}(M).\label{Eq 2}\tag{2}$$
The result follows from taking the supremum of (\ref{Eq 2}) over all $i,j$ for which $H^i\_\mathfrak m(M)\_j \neq 0$. (The $+1$ comes from the fact that $r'(M)$ is defined in terms of vanishing rather than nonvanishing.) $\square$


