Element in Integral Domain is Unit iff Principal Ideal is Whole Domain

Theorem
Let $\struct {D, +, \circ}$ be an integral domain.

Let $U_D$ be the group of units of $D$.

Let $\ideal x$ be the principal ideal of $D$ generated by $x$.

Let $x, y \in \struct {D, +, \circ}$.

Then:
 * $x \in U_D \iff \ideal x = D$

Proof
Conversely: