Principal Ideal of Principal Ideal Domain is of Irreducible Element iff Maximal

Theorem
Let $\left({D, +, \circ}\right)$ be a principal ideal domain.

Let $\left({p}\right)$ be the principal ideal of $D$ generated by $p$.

Then $p$ is irreducible $\left({p}\right)$ is a maximal ideal of $D$.