Solution (source code)

= Solution

Suppose $I$ is prime. If
$$
(a+I)(b+I)=0+I,
$$
then $ab\in I$, so $a\in I$ or $b\in I$. Thus one factor is zero and $R/I$ is an <integral> domain.

Conversely, if $R/I$ is an <integral> domain and $ab\in I$, then
$$
(a+I)(b+I)=0+I,
$$
so $a+I=0+I$ or $b+I=0+I$. Therefore $a\in I$ or $b\in I$, and $I$ is prime. This proves the <prime ideal quotient criterion>.