TITLE: Ring of integers is a PID but not a Euclidean domain
QUESTION [42 upvotes]: I have noticed that to prove fields like $\mathbb{Q}(i)$ and $\mathbb{Q}(e^{\frac{2\pi i}{3}})$ have class number one, we show they are Euclidean domains by tessellating the complex plane with the points $a+bv : a, b \in \mathbb{Z}$, where $1, v$ is an integral basis.  Then any $c +dv$ in the field has distance $\leq 1$ from some lattice point.  On the other hand a similar geometric argument fails with the field $\mathbb{Q}(\sqrt{-5})$, which does not have class number one.    
Any ring of integers of a finite extension of $\mathbb{Q}$ is a Dedekind domain, hence a PID if and only if a UFD.  But can such a ring be a PID but fail to be a Euclidean domain?

REPLY [2 votes]: $\Bbb{Z}[\frac{1+\sqrt{-19}}{2}]$ is not a E.D..
Supose that $R=\Bbb{Z}[\frac{1+\sqrt{-19}}{2}]$ is a E.D..
Let $N(\cdot)$ be the Euclidean norm.
Recall that the set of all unit in $R$ is $\{\pm 1\}$.
Take an element $a\notin \{0, \pm 1\}$ such that $N(a)$ is minimal.
For any $b\in R$,
we have $b=aq+r$,
where $r=0$ or $N(r)<N(a)$.
By the minimality of $N(a)$,
we have $r\in \{0, \pm 1\}$.
Thus, $R/\langle a\rangle\cong \Bbb{Z}_2$ or $\Bbb{Z}_3$.
On the other hand,
the polynomial $x^2+x+5$ has root in $R$
because $x^2+x+5=[x-(-\frac{1+\sqrt{-19}}{2})][x-(-1+\frac{1+\sqrt{-19}}{2})]$.
So $x^2+x+5$ has root in $R/\langle a\rangle$.
But $x^2+x+5$ has no root in $\Bbb{Z}_2$ nor in $\Bbb{Z}_3$.
Hence, $R/\langle a\rangle$ can't be isomorphic to $\Bbb{Z}_2$ nor $\Bbb{Z}_3$.
$\Bbb{Z}[\frac{1+\sqrt{-19}}{2}]$ is a P.I.D. (See Artin's Algebra ch.13)
Since $-19\equiv 1\pmod{4}$,
we compute $\mu=\sqrt{\frac{|-19|}{2}}\approx 2.52$
and the prime integers don't exceed $\mu$ is $2$.
Note that $x^2-x+\frac{1-(-19)}{4}=x^2-x+5$ is irreducible in $\Bbb{F}_2[x]$.
Hence, $\langle 2\rangle$ is a prime ideal in $\Bbb{Z}[\frac{1+\sqrt{-19}}{2}]$.
Since $\langle 2\rangle$ is principal,
the ideal class of $\langle 2\rangle$ in the class group is the identity.
Thus,
the ideal class group is trivial and $\Bbb{Z}[\frac{1+\sqrt{-19}}{2}]$ is a P.I.D..
Lemma 1.
The ideal class group $\mathcal{C}$ is generated by the classes of prime ideal $P$ whose norms are prime integers $p\leq \mu$
Lemma 2.
If $d\equiv 1\pmod{4}$,
then $\langle p\rangle$ is a prime ideal in $\Bbb{Z}[\frac{1+\sqrt{d}}{2}]$ if and only if
the polynomial $x^2-x+\frac{1-d}{4}$ is irreducible in $\Bbb{F}_p[x]$.
$$\begin{array}{rcl}
\Bbb{Z}[x] & \stackrel{\langle p\rangle}{\longrightarrow} & \Bbb{F}_p[x] \\
/\langle x^2-x+\frac{1-d}{4}\rangle \downarrow& & \downarrow /\langle x^2-x+\frac{1-d}{4}\rangle \\
\Bbb{Z}[\frac{1+\sqrt{d}}{2}] & \stackrel{\langle p\rangle}{\longrightarrow} & R'
\end{array}
$$