Prime Number iff Generates Principal Maximal Ideal

Theorem
Let $$\mathbb{Z}^*_+$$ be the set of strictly positive integers.

Let $$p \in \mathbb{Z}^*_+$$.

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

Then $$p$$ is prime iff $$\left({p}\right)$$ is a maximal ideal of $$\mathbb{Z}$$.

Proof
First, note that $\mathbb{Z}$ is a principal ideal domain, so all ideals are principal.


 * Suppose $$\left({p}\right)$$ is prime.

From Integer Divisor Equivalent to Subset of Ideal, $$m \backslash n \iff \left({n}\right) \subseteq \left({m}\right)$$.

But as $$p$$ is prime, the only divisors of $$p$$ are $$1$$ and $$p$$ itself.

By Natural Numbers Isomorphic to Ideals of Integers, it follows that if $$p$$ is prime, then $$\left({p}\right)$$ must be a maximal ideal.


 * Conversely, let $$p \in \mathbb{Z}^*_+$$, $$(p)$$ maximal.

Then if $$ (p)\subseteq (q)$$ for some $$q\in \mathbb{Z}^*_+$$, we have $$(q)=(p) \Longrightarrow q=p$$ or $$(q)=(1) \Longrightarrow q=1$$.

Hence, as $$p \in (q)$$, we have $$p \in q \iff q=1~ \mbox{or} ~q=p$$ and $$p \in (q) \Longrightarrow q \backslash p$$.

Hence $$p$$ is prime, so $$(p)$$ is a prime ideal.