Reducible in $R[X]$ implies reducibility in $(R/I)[X]$ 
Let $R$ be an integral domain, $I$ a proper ideal of $R$, $\pi:R \to R/I$ the canonical projection. Let $f=\sum_{i=0}^n a_iX^i$ be a monic polynomial and $\overline{f}=\sum_{i=0}^n \pi(a_i)X^i \in (R/I)[X]$. Show that if $f$ is reducible in $R[X]$ then $\overline{f}$ is reducible in $(R/I)[X]$.

I am stuck on this exercise. I tried to show this by the contrapositive statement:
Suppose $\overline{f}$ is irreducible in $(R/I)[X]$ and suppose $f=ab$ in $R[X]$, I want to show that $f$ is irreducible. Since $\overline{f}=\overline{a}\overline{b}$ is irreducible in $(R/I)[X]$ , without loss of generality, we can assume $\overline{a} \in \mathcal U((R/I)[X])=\mathcal U(R/I)$. This means there is $b \in R$ with $ab \in I$. I don't know how to conclude from here that $a$ or $b$ is a unit. I would like any suggestions to complete my solution and also if another one has a straightforward proof, he or she is welcome to share it.
 A: You could proceed by proving the contrapositive. However, I think it is easier to do things directly here. Let $f(x) \in R[x]$ be a reducible monic polynomial of degree $n$. Then it admits a factorization $f(x)=g(x)h(x)$ where neither $g(x)$ nor $h(x)$ is a unit. Now let
$$g(x) = \sum_{i=0}^{\alpha}m_{i}x^{i}$$
and
$$h(x) = \sum_{j=0}^{\beta}n_{j}x^{j}.$$
where $\alpha+\beta = n$. The main idea here is that if $h(x)$ and $g(x)$ are not units in $R[x]$, then they are not units when reduced modulo $I$. To see this, first note that $I$ cannot contain any units, since it is a proper ideal of $R$. Next, note that $m_{\alpha}$ and $n_{\beta}$ are units, since $f$ is monic and $m_{\alpha}n_{\beta} = 1$ is the coefficient of the leading term. This further tells us that $\alpha, \beta \geq 1$, since $n_{\beta}$ is a unit, and $f(x)$ is reducible by assumption. Hence, $\pi(m_{\alpha}) \neq 0$ and $\pi(n_{\beta}) \neq 0$. Now note that $\pi(g(x)) = \pi(m_{\alpha})x^{\alpha} + \cdots$ and $\pi(h(x)) = \pi(n_{\beta})x^{\beta}+\cdots$. The leading coefficients are themselves units, since
$$\pi(m_{\alpha})\pi(n_{\beta}) = \pi(m_{\alpha}n_{\beta}) = \pi(1) = 1.$$
As $\deg(g(x)), \deg(h(x)) \geq 1$, it follows that $h(x)$ and $g(x)$ are not units in $(R/I)[x]$. Feel free to comment if you need further clarification on any part!
