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.

Sufficient Condition
Suppose $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.

Necessary Condition
Let $p \in \Z_{>0}$ such that $\ideal p$ is maximal.

Let $q \in \Z_{>0}$ be a divisor of $p$.

Then:

Thus $p$ is prime.