# do you need $P$ prime to show that $R/P$ is a PID if $R$ is a PID?

My question relates to this question, which is exercise 3 in Section 8.2 of Dummit and Foote. They ask to prove that a quotient of a PID by a prime ideal is again a PID. The answers to the previous question point out that in a PID $R$ a prime ideal is maximal, the quotient is a field, and any field is a PID since its only ideals are $0=(0)$ and $R=(1)$.

Fine, but before I turned to SE I undertook to answer this is on my own, and I came up with the following argument:

Let $P$ be an ideal of PID $R$, $\bar R=R/P$ the quotient, $\bar I$ any ideal of $\bar R$ and $\varphi$ the natural homomorphism from $R\to\bar R$. By the lattice isomorphism theorem $I=\varphi^{-1}(\bar I)$ is an ideal of $R$ that contains $P$. Since $R$ is a PID, there is an $a\in R$ such that $I=(a)$. Now let $\bar b$ be any element of $\bar I$, and $b$ a representative of $\bar b$ in $R$. Then there is some $r\in R$ such that $b=ra$. Since $\varphi$ is a homomorphism, $\varphi(b)=\bar b=\varphi(r)\varphi(a)=\bar r\bar a$. Therefore $\bar I=(\bar a)$, and $\bar I$ is principal. Since this argument placed no restrictions on $\bar I$, every ideal of $\bar R$ is principal. $\square$

I was bothered by this because I have always learned that if you don't use everything you're given when solving a problem, you're probably missing something, and I made no use of the information that $P$ is a prime ideal.

So here's my question: do you need the fact that $P$ is prime to prove that $R/P$ is a PID? If so, where did I go wrong? Can someone give me a counterexample so I can see where the argument fails?

Muchas gracias!

Yes, because $R/P$ is an integral domain iff $P$ is prime.
If you don't have the fact that PIDs are 1 dimensional at your disposal, you can still continue with "and any quotient of a principal ideal ring is also a principal ideal ring, therefore $R/P$ is a PID."