An inequality about intersection multiplicity [Hartshorne Ex.I.5.4] Let $Y,Z\subset \mathbb{A}^2$ defined by the polynomials $f$ and $g$. The intersection multiplicity of $Y$ and $Z$ at $p$ is defined as the length of the module $\mathcal{O}_{\mathbb{A}^2,P}/(f,g)$, denotes by $(Y Z)_p$. For simplicity,let us assume $P=(0,0)$. This length is finite (an argument can be found on this website), but Hartshorne also wants us to prove that it satisfies an inequality $$(YZ)_p\geq \mu_P(f)\mu_P(g),$$ where $\mu_P(f)$ is the the smallest integer $r$ such that the homogenous degree $r$ part of $f$ is non-zero.
I am quite frankly unable to prove this, or have any idea where this could come from.
 A: First here the length over $\mathcal{O}_P$ coincide with lenth over $k$ that is the dimension over $k$ (cf Atiyah-MacDonald 6.10).
taking $m=\mu_P(X)$ and $n=\mu_P(Y)$ (notation of Hartshorne ex I.5.4), and suppose that $m\leqslant n$. Then we have in $k[X,Y]/(f,g)$:

*

*1 degree 0 monomial which is not in $(f,g)$: the constant 1

*2 degree 1 monomials which are not in $(f,g)$: $x$ and $y$

*$\ldots$

*$m$ degree $m-1$ monomials which are not in $(f,g)$

*$m$ degree $m$ monomials which are not in $(f,g)$: we could have $f_m\in (f,g)$

*$m$ degree $m+1$ monomials which are not in $(f,g)$: we could have $x f_m$ and $y f_m$ in $(f,g)$

*$\ldots$

*$m$ degree $q$ monomials which are not in $(f,g)$: because between the $q+1$ monomials of degree $q$ there are the $f_m\times$(monomials of degree $q-m$) that could be in $(f,g)$: that make $q+1-(q-m+1)$ monomials ie $m$ monomials.

*$\ldots$

*$m$ degree $n-1$ monomials which are not in $(f,g)$: idem

*$m-1$ degree $n$ monomials which are not in $(f,g)$: there are the $m$ usuals monomials without $g_n$ which could be in $(f,g)$

*$m-2$ degree $n+1$ monomials which are not in $(f,g)$: the $m$ usuals without $xg_n$ and $y g_n$.

*$\ldots$

*$1$ monomial of degree $n+m-1$ which is not in $(f,g)$: following the same logic

From here this is a simple calculus, for example
$$ (1+2+\ldots+m)\times 2+m\times(n-m+1)=m\times(m-1)+(n-m+1)\times m=nm $$
which says that there is in $k[X,Y]/(f,g)$ $nm$ independant monomials (over $k$). This gives $mn$ independants elements in $\mathcal{O}_P/(f,g)$ so the dimension is greater than $mn$.
I guess there should be some more conceptual and short answer.
