Example where $\operatorname{grade}(I,M)>\operatorname{height} I$ Let $I$ be an ideal of a noetherian ring $R$ and let $M$ be a finite $R$-module. We need to show if $I$ is generated by $n$ elements, then $\operatorname{grade}(I,M)\le n$. Could any one give an example where $\operatorname{grade}(I,M)>\operatorname{height} I$?
 A: This is basically the exercise 1.2.22 from Bruns and Herzog, Cohen-Macaulay Rings. In order to prove that $\operatorname{grade}(I,M)\le n$, show first that $\operatorname{grade}(I,M)\le \operatorname{height}(IR^*)$, where $R^*=R/\operatorname{Ann}M$. This is not difficult and involves few reductions: first we may assume that $\operatorname{Ann}(M)=0$. Then we can take $I$ to be a prime ideal (denoted by $\mathfrak{p}$) and localize at $\mathfrak{p}$: $\operatorname{grade}(\mathfrak{p},M)$ eventually increases, $\operatorname{height}(\mathfrak{p})$ remains the same and $\operatorname{Ann}_{R_{\mathfrak{p}}}M_{\mathfrak{p}}=0$. Now the inequality is obvious (see, for instance, Proposition 1.2.12 from the same book). Since the ideal $IR^*$ is also generated by $n$ elements, its height is $\le n$.
The required example can be: $R$ a local Noetherian ring, $\mathfrak{p},\mathfrak{q}$ minimal prime ideals such that $\mathfrak{p}\neq \mathfrak{q}$ and $\mathfrak{p}\cap \mathfrak{q}=(0)$, $I=\mathfrak{p}$ and $M=R/\mathfrak{q}$. Then $\operatorname{height}(I)=0$ and $\operatorname{grade}(I,M)\geq 1$. (A concrete example: $R=K[[X,Y]]/(XY)$.)
Remark. If $I$ is generated by $n$ elements and $\operatorname{grade}(I,M)=n$, then $I$ can be generated by $n$ elements that form an $M$-regular sequence.
A: This is the exercise 1.2.22 from Bruns-Herzog, Cohen-Macaulay Rings. We prove that $\operatorname{grade}(I,M)≤\operatorname{ht}(I‎\overline{R})$, where $‎\overline{R}‎‎=R/\operatorname{Ann}M$ and $IM\neq M$.
By Prop 1.2.10(a) from the same book we have 
$\operatorname{grade}(I,M)$ $=$ $\inf\lbrace \operatorname{depth} M_{\mathfrak p}: \mathfrak p\in \operatorname{V}(I)\rbrace$ $=$ $\inf \lbrace \operatorname{depth} M_{\mathfrak p}:  \mathfrak p\in \operatorname{Supp}(M)\cap\operatorname{V}(I)\rbrace$ $\leq$ $\inf\lbrace \operatorname{dim} R_{\mathfrak p}:  \mathfrak p\in \operatorname{Supp}(M)\cap\operatorname{V}(I)\rbrace$ $=$ $\inf\lbrace \operatorname{ht}\mathfrak p:  \mathfrak p\in \operatorname{V}(\operatorname{Ann}(M)+I)\rbrace$ $=$ $\inf \lbrace \operatorname{ht}\left(\frac{\mathfrak p}{\operatorname{Ann}M}\right):  \mathfrak p\in \operatorname{V}((I+\operatorname{Ann}M))\rbrace$ $=$ $\operatorname{ht}(\frac{I+\operatorname{Ann}M}{\operatorname{Ann}M})$ $=$ $\operatorname{ht}(I‎\overline{R})$.
A: First, let $R$ be a Noetherian ring, and $I$ a proper ideal and let $gr(I)=k$ then, there is an $R$-sequence $x_1,\cdots,x_k$ in $I$ with $ht(x_1,⋯,x_k)=k.$ Now, since $(x_1,\cdots,x_k)\subseteq I,$ therefore, $k=ht(x_1,\cdots,x_k)\leq ht(I).$ Now, if $I$ is generated by $n$ elements, by Krull's height theorem, $gr(I) \leq ht(I) \leq n.$
To have the strict inequality, define $R=k[x,y]/(x^2,xy)$ where $k$ is a field and $I=(x,y)/(x^2,xy).$ Show that $I \subseteq Z_R(R)$ where $Z_R(R)$ is the set of all zero-divisors in $R,$ implying that $gr(I)=0,$ however, $(x)/(x^2,xy) \subsetneq I$ implies that $ht(I) \geq 1.$ (In fact, $ht(I)=1$.)
