Let R be a principal ideal domain that has no zero-divisors but $0$. Show that every prime ideal I ≤ R with I $\neq$ ($0$) is a maximal ideal.

I'm new to rings and ideals and don't know how to wrap my head around this question.


Let $(p)$ be the prime ideal generated by $p$ and $(m)$ an ideal generated by $m$ which contains $p$, since $p\in (m)$, there exists $a\in R$ such that $p=am$. This implies that $am\in (p)$ since $(p)$ is a prime, $m\in (p)$ or $a\in (p)$.

Suppose that $a\in (p)$ write $a=up$, we have $p=upm$ implies that $p(1-um)=0$ since does not have zero divisors and $p\neq 0$, we deduce that $1-um=0$ an $um=1$. This implies that $m$ is invertible and $(m)=R$.

Suppose that $m\in (p)$, $m=bp$, for every $x\in (m), x=um=ubp$ we deduce that $x\in (p)$ and $(m)\subset (p)$. This implies that $(p)$ is maximal since an ideal which contains $(p)$ is either $R$ or $(p)$.