I'm having trouble trying to prove the following theorem:

**Proposition:** Let $R$ be a PID. The prime ideals of $R[y]$ are precisely the ideals of the following form:

- $(0)$,
- $(f(y))$ where $f$ is an irreducible polynomial in $R[Y]$
- $(p, f(y))$ where $p \in R$ is prime and $f(y)$ is irreducible in $R[y]$ and its image is irreducible in $(R/p)[y]$.

The proof essentially goes as follows: (Sketch) Suppose $P$ is a non-principal prime ideal that contains a prime ideal $p'=(p_0)$ of $R$ where $p_0$ is prime in $R$. Then the image of $P$ under the canonical map $\phi:R[Y]\rightarrow (R/p')[Y]$ is non-zero and prime which implies that $\phi(P)=(f')$ where $f'\in (R/p')[Y]$ is irreducible. Now, I can show that $P=(p_0, f)$ where $f$ is some element in the pre-image of $f'$. However, I need $f$ to be irreducible in $R[Y]$ as well.

- How do I choose $f$ to be an irreducible element in $R[Y]$
- Why are prime ideals of the third form maximal ideals in $R[Y]$.

As suggested by user26857:

We should consider the following map: $R[Y]\rightarrow (R/p)[Y]\rightarrow (R/p)[Y]/(\bar{f})$. The kernel of this surjective map is $(p,f(y))$ and $(R/p)[Y]/(\bar{f})$ is a field which implies that $(p,f(y))$ is maximal.

Any ideas or suggestions? (For the first question)