I'm working out in detail the well known example of a PID which is not euclidean, $A=\mathbb{Z}\left[\frac{1+i\sqrt{19}}{2}\right]$. I've already shown it is not euclidean, and now I'm trying to show it is a PID.
The path I'm trying to take is the following :
show it is almost euclidean in the sense that for all $a,b \in A$ with $b$ non-zero, then there exists $q,r$ s.t. $r=0$ or $\mid r \mid < \mid a\mid $ and either $a=bq +r$ or $2a = bq+r$ ; where $\mid \cdot \mid$ denotes the usual norm on $\mathbb{C}$
Take $I$ an ideal of $A$, and $a\in I$ non-zero minimising the norm. Then by the "division" defined in point 1. we prove $I=(a)$.
There's just two things I can't quite figure out.
The first point I sort of assumed would be easy because a point in $A$ would be close enough to a lattice point in $\mathbb{Z}[i]$ so that you could do the division there and then figure out something to make it work in $A$. Turns out when I tried to write it down I don't actually know how to go about it.
The second thing I'm struggling with is the following : Assuming I've proven the first part, take $a \in I$ non-zero minimising $\mid\cdot\mid$, and let $x\in I$ be given. Then there exists $q,r$ with either $r=0$ or $\mid r\mid < \mid a \mid$ such that either $x=aq+r$ or $2x=aq+r$. Now one can easily check that $r\in I$ so that $r$ must be 0, for other wise $\mid a\mid $ would not be minimal. Hence either $x=aq$ or $2x=aq$. The first case then gives us the result, i.e. $I\subset (a)$ whence $I=(a)$. But if the second case, i.e. if $2x=aq$, I can't reach the same conclusion, nor can I find a contradiction. I've tried proving that $q$ is divisible by 2, using 1, but again I've hit a wall, I've been pondering about this on and off for a few days when I have time and I can't seem to crack this problem. I've seen a bunch of solutions I could understand but they didn't specifically go this exact route and that's fine, I'm just very curious on how to resolve the issues here, because I know this should work I just can't see why. Any hint is appreciated.