# Example showing why Macaulay's lemma doesn't work for inhomogeneous ideals

Macaulay's lemma states:

Let R be a polynomial ring and I a homogeneous ideal. Then the Hilbert function of I is the same as the Hilbert function of in(I).

(Schenck, Computational Algebraic Geometry, p55)

(Where in(I) / lt(I) is the ideal consisting of leading terms of elements of I, and by the Hilbert function of I we mean the Hilbert function of R/I.)

Is there a counterexample showing that this isn't necessarily true for inhomogeneous ideals? (In all the cases that I have tried, it seems also to be true for inhomogeneous ideals.)

-
How do you define the Hilbert function of an inhomogenous ideal? (Not saying there isn't an answer, just that there isn't a standard one.) –  David Speyer Sep 4 '11 at 14:43
Hmm. Well for an inhomogeneous ideal, R/I is still well-defined, and still has a monomial basis. We can still count the number of monomials of different degrees, and they appear to match the Hilbert function of the leading term ideal. So I guess my question should be, why does the definition of Hilbert function (of ideal) require that R/I be graded? (since it seems to work more generally) –  DavidA Sep 4 '11 at 17:32
Look at $k[x,y]/(y-x^2)$. One monomial basis is $x^k$, as $k$ ranges through all integers. Another is $y^k$ and $x y^k$, again as $k$ ranges through all integers. So is the Hilbert function $1$, $1$, $1$, $1$ ... or is it $1$, $2$, $2$, $2$, ... ? –  David Speyer Sep 4 '11 at 17:44
Okay I see, so if I is not homogeneous, then the "Hilbert function" becomes relative to the monomial ordering that you choose, so it's not really well-defined. That's what comes of thinking too computationally about these things. Thanks. –  DavidA Sep 4 '11 at 17:58
@DownvotemeifIanswer9-5 It sounds like that comment has the makings of a solution. If you have the time, could you please convert it? Thank you! –  rschwieb Aug 1 '13 at 14:57

An answer to repeat what I wrote in the comments: There is no standard way of defining the Hilbert function of an inhomogeneous ideal, so the original question is undefined. Moreover, there is no definition that would make the OP's question true. Consider the ideal $\langle y-x^2 \rangle$ in $k[x,y]$. If we choose a term order such that $y$ is the leading term, then the initial ideal is $\langle y \rangle$ with Hilbert function $(1,1,1,1,\ldots)$; if we choose a term order such that $x^2$ is the leading term, then the initial ideal is $\langle x^2 \rangle$ with Hilbert function $(1,2,2,2,\ldots)$.
One could imagine ways to salvage the statement. For example, one could ask that our term order always obey $\prod x_i^{d_i} > \prod x_i^{e_i}$ if $\sum d_i > \sum e_i$. However, the OP seemed to be satisfied with the observations in the first paragraph, so I never thought through the details of such a salvage.