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 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 \Z^*_+$$, $$(p)$$ maximal.

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

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

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