**Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 7.1 Exercise 7.1.27**

A specific example of a discrete valuation ring is obtained when $p$ is a prime, $K = \mathbb{Q}$, and $v_p : \mathbb{Q}^\times \rightarrow \mathbb{Z}$ is given by $v_p(a/b) = \alpha$, where $a/b = p^\alpha(c/d)$, and $p$ does not divide $c$ or $d$. Prove that the corresponding valuation ring $R$ is the ring of all rational numbers whose denominators are relatively prime to $p$. Describe the units of this valuation ring.

Solution: First we show that $$R = \{ a/b \in \mathbb{Q} \ |\ a = 0\ \mathrm{or}\ \mathsf{gcd}(b,p) = 1 \}.$$ ($\subseteq$) Suppose $v_p(a/b) \geq 0$, and write $a = p^mc$ and $b = p^nd$, where $p$ does not divide $c$ or $d$. By definition, $v_p(a/b) = m-n \geq 0$. Without loss of generality, say $a/b$ is in lowest terms; then either $m$ or $n$ is $0$. If $n \neq 0$, then $m = 0$, and $v_p(a/b) < 0$, a contradiction. Thus $n = 0$, and in fact $\mathsf{gcd}(b,p) = 1$.

($\supseteq$) If $a/b \in \mathbb{Q}$ and $p$ does not divide $b$, then $a/b = (p^\alpha c)/d$ for some $\alpha \geq 0$. Thus $v_p(a/b) \geq 0$, and we have $a/b \in R$.

Now we show that the units of $R$ are precisely those fractions in lowest terms whose numerator and denominator are both relatively prime to $p$. If $p$ does not divide $a$ or $b$, then $v_p(a/b) = 0$, and $a/b$ is a unit in $R by Exercise 7.1.26. Now suppose $a/b$ is a unit in $R$; then $b/a \in R$, so that $p$ does not divide $a$ or $b$.