I need to prove: $p$ is a positive integer and $(p)$ is a maximal ideal in the ring $(\mathbb Z, +,\cdot)$, then $p$ is a prime number.
My attempt:
1) $(p)$ is a maximal ideal, so it is a prime ideal.
2) Assume $p$ is not prime, then $p = ab, a,b \in \mathbb Z, a>0, b>0,a \ne 1,p$.
3) Because $(p)$ is a prime ideal, it means that either $b=z_1p$ or $a=z_2p, z_1>0,z_2>0, z_1,z_2 \in \mathbb Z$.
4) Assume that $b=z_1p$, then $1=az_1$ so $a= 1, z_1 =1$.
5) Assume that $a=z_2p$, then $1=bz_2$, so $b= 1, z_1 =1$, but then $a=p$.
Thus $p$ must be prime.
Is it a correct proof?
I find the contrapositive to be the clearest approach:
Indeed, if $p$ is not prime, then $p$ has a proper divisor $a$ with $1 < a < p$.
But then $ \mathbb Z=(1) \supset (a) \supset (p)$, where all inclusions are strict, and $(p)$ is not a maximal ideal.