Prime Number iff Generates Principal Maximal Ideal

Theorem
Let $\Z_{>0}$ be the set of strictly positive integers.

Let $p \in \Z_{>0}$.

Let $\ideal p$ be the principal ideal of $\Z$ generated by $p$.

Then $p$ is prime $\ideal p$ is a maximal ideal of $\Z$.

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

Suppose $\ideal p$ is prime.

From Integer Divisor is Equivalent to Subset of Ideal, $m \divides n \iff \ideal n \subseteq \ideal m$.

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 $\ideal p$ must be a maximal ideal.

Conversely, let $p \in \Z_{>0}$ such that $\ideal p$ is maximal.

Then if $\ideal p \subseteq \ideal q$ for some $q \in \Z_{>0}$, we have:
 * $\ideal q = \ideal p \implies q = p$

or
 * $\ideal q = \ideal 1 \implies q = 1$

Hence, as $p \in \ideal q$, we have:
 * $p \in q \iff q = 1 \text { or } q = p$

and:
 * $p \in \ideal q \implies q \divides p$

Hence $p$ is prime, so $\ideal p$ is a prime ideal.