Prove that every ideal of a Euclidean domain is principal.
I'm new to algebra, so the solution below is probably really awkward and unconcise.
So I was given the hint that I should let $I$ be an ideal and consider when $I= \{0\}$ and when $I\neq \{0\}.$ Obviously, $I=\{0\}=\langle 0\rangle$ is principal. As for $I\neq \{0\},$ I think I need to think of the smallest/minimal nonzero element, say $a$, in $I$ and show that $I=\langle a\rangle.$ As well, I know that an integral domain $D$ is a Euclidean domain iff for all $a,b\in D,$ $a=bq+r,$ where $b\neq 0,$ and $r=0$ or $N(r)<N(b),$ where $N(r)$ denotes the norm of $r.$ That is, from my understanding, $N(r)$ is the function $N : R \to \mathbb{N}\cup \{0\}$ such that $N(0)=0$ (am I forgetting anything here?) I just need to show that $\forall x\in I\Leftrightarrow x\in \langle a\rangle.$ Let $x,y\in I$ and $r=x-ya.$ If $r=0,$ we are done. If $r\neq 0,$ then by the well-ordering principle, there is a minimum value of $r,$ say $r_1.$ But $a$ is the minimum value of $I,$ so $r_1<a,$ which means that $r_1$ must be zero and thus $I=\langle a\rangle.$ I think I'm missing something here.