I'm reading the proof of Theorem 1.3.2(c) in Hartshorne. We want to show that for any affine variety $Y$, $\dim \mathcal{O}_P = \dim Y$.
The argument that Hartshorne gave was that there is a natural map from the localized coordinate ring $A(Y)_{\mathfrak{m}_P} \to \mathcal{O}_P$. This map is in fact injective and surjective, therefore, an isomorphism. Now Hartshorne claims that $\dim \mathcal{O}_P =$ height $\mathfrak{m}_P$ without any justification. Why is this true?
Here is my thought: because of the isomorphism, $\dim \mathcal{O}_P =$ height of maximal ideal in $A(Y)_{\mathfrak{m}_P} = $ height of $(\mathfrak{m}_P) A(Y)_{\mathfrak{m}_P}$ in which it is not entirely clear to me why this should give the hight of $\mathfrak{m}_P$.
Any help is appeciated!
The height of $(\mathfrak{m}_P) A(Y)_{\mathfrak{m}_P}$ is the height of $\mathfrak{m}_P$ in $A(Y)$ thanks to the Correspondence Theorem for Localizations of Rings.