Ideals have the same height

166 Views Asked by At

When I solved an exercise, I had got the following situation: I had to show that $I=J$, where $I,J$ are prime ideals of a noetherian ring. I also proved that $I \subset J$ and they have the same height. Then my argument is that:
Let $f \in J$ be such that not belong to $I$. Let $p_0 \subset ... \subset p_n$ be a maximal chain of prime ideals of $I$. Let $m$ be the maximal ideal containing $p_n+\left ( f \right )$. This implies that $$\text{height } J > \text{height } I,$$ which is a contradiction. Therefore $I$ and $J$ must be equal.
Is my argument correct? If yes, whether it is still correct when $I$ and $J$ are not prime ideals?
Thank you very much for helps.