special case where the degrees of polynomial ideals are not just bounded but completely determined by a function $f$. Then we reduce the general case to this special one.

The longest chain of specified degrees
--------------------------------------

In this subsection, we only consider a special type of $f$-generating sequences $m_1,\cdots,m_n$ such that: $$\label{equ:special}\forall i\in\{1,\cdots,n\}.\, \deg(m_i)=f(i).$$

We inductively construct a $f$-generating sequence of monomials $\hat{m}_1,\hat{m}_2,\cdots,\hat{m}_N$ as follows: Initially define $\hat{m}_1=x_1^{f(1)}$; suppose $\hat{m}_1,\hat{m}_2,\cdots,\hat{m}_n$ are defined for some $n\geq 1$, then let $$\label{equ:hatm}\hat{m}_{n+1}\triangleq \min\{m|\deg(m)=f(n+1), m\notin \langle \hat{m}_1,...,\hat{m}_n\rangle\},$$ until $\{m|\deg(m)=f(N+1)\}\subseteq\langle \hat{m}_1,...,\hat{m}_N\rangle$ for some $N$.

Obviously, this sequence satisfies equation (\[equ:special\]). It follows immediately from the equation (\[equ:hatm\]) that the corresponding ideal $\hat{I}_n\triangleq\langle\hat{m}_1,\hat{m}_2,\cdots,\hat{m}_n\rangle$ is $f(n)$-compressed for every $n=1,2,\cdots,N$, and $H_{\hat{I}_N}(f(N+1))=0$ from the definition of Hilbert’s function.

\[exm:4382\] For $d=3$ and $f(n)=2\times3^{n-1}$ , we have a set $$\begin{split}
\{\hat{m}_1,\hat{m}_2,\ldots,\hat{m}_{4382}\}
=&\{x^2,xy^5,xy^4z^3,xy^3z^{50},xy^2z^{159}, xyz^{484},\\
&xz^{1457},y^{4374},y^{4373}z^{8749},\ldots,y^0z^{2\cdot3^{4381}}\}.\end{split}$$ Then $N=4382$ in this case.

Now we shall prove that the sequence we construct has the greatest number of monomials among all $f$-generating sequences that satisfies (\[equ:special\]).

If $m_1,m_2,\cdots,m_n$ is a $f$-generating sequence that satisfies equation (\[equ:special\]), then $n\leq N$.

*Proof:* We proceed by contradiction. Suppose $n\geq N+1$. Let $I_i=\langle m_1,\cdots,m_i\rangle$ for all $i\in{1,2,\cdots,n}$. For simplicity, we define $H_i(j)\triangleq H_{I_i}(j)$ and $\hat{H}_{i}(j)\triangleq H_{\hat{I}_i}(j)$, for all 