Lemma 10.49.4. Let $A \subset K$ be a subring of a field $K$ such that for all $x \in K$ either $x \in A$ or $x^{-1} \in A$ or both. Then $A$ is a valuation ring with fraction field $K$.

Proof. If $A$ is not $K$, then $A$ is not a field and there is a nonzero maximal ideal $\mathfrak m$. If $\mathfrak m'$ is a second maximal ideal, then choose $x, y \in A$ with $x \in \mathfrak m$, $y \not\in \mathfrak m$, $x \not\in \mathfrak m'$, and $y \in \mathfrak m'$ (see Lemma 10.14.2). Then neither $x/y \in A$ nor $y/x \in A$ contradicting the assumption of the lemma. Thus we see that $A$ is a local ring. Suppose that $A'$ is a local ring contained in $K$ which dominates $A$. Let $x \in A'$. We have to show that $x \in A$. If not, then $x^{-1} \in A$, and of course $x^{-1} \in \mathfrak m_ A$. But then $x^{-1} \in \mathfrak m_{A'}$ which contradicts $x \in A'$. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).