Solution (source code)

= Solution

Consider the <ideal> $I=(2,x)$ in $\mathbb Z[x]$. It is proper: evaluation at zero followed by reduction modulo $2$ maps the ring onto $\mathbb F_2$ and has kernel $I$. Suppose $I=(f)$. Then $f$ divides the constant polynomial $2$, so $f$ is a constant integer dividing $2$. Up to sign, the only possibilities are $1$ and $2$. The first would make the ideal the whole ring; the second cannot divide $x$ in $\mathbb Z[x]$. Both are impossible. This proves the <integer polynomial ring is not a principal ideal domain> result: \b[$\mathbb Z[x]$ is not a principal ideal domain].