Prime Number iff Generates Principal Maximal Ideal

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

Let $$p \in \Z^*_+$$.

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

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

Proof
First, note that $\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 Set Equivalent to Ideals of Integers, it follows that if $$p$$ is prime, then $$\left({p}\right)$$ must be a maximal ideal.


 * Conversely, let $$p \in \Z^*_+$$ such that $$\left({p}\right)$$ is maximal.

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

Hence, as $$p \in \left({q}\right)$$, we have $$p \in q \iff q = 1 \text { or } q = p$$ and $$p \in \left({q}\right) \implies q \backslash p$$.

Hence $$p$$ is prime, so $$\left({p}\right)$$ is a prime ideal.