Problem in the "proof" of Eisenstein's criterion on irreducibility. I have a problem about a line inside the following proof which is actually from the book Abstract Algebra by Dummit & Foote

Proposition (Eisenstein's Criterion). Let $P$ be a prime ideal in the integral domain $R$ and let $~f(x)=x^n+a_{n-1}x^{n-1}+\dots +a_0$ be a polynomial in $R[x]$ $(n\ge1)$. Suppose $a_{n-1},\dots ,a_0$ are all elements of $P$ and $a_0$ is not an element of $P^2$. Then $f(x)$ is irreducible.

Proof. Suppose $f(x)$ is reducible, say $f(x)=a(x)b(x)$ in $R[x]$, where $a(x),b(x)$ are non-constant polynomials. Reducing this equation modulo $P$ and using the assumptions on the coefficients of $f(x)$ we obtain the equation $x^n=\overline{a(x)b(x)}$ in $(R/P)[x]$, where bar denotes the polynomials with coefficients reduced mod $P$. Since $P$ is prime ideal, $R/P$ is an integral domain, and it follows that both of $\overline{a(x)}$ and $\overline{b(x)}$ have $0$ constant term, i.e, the constant term of both $a(x)$ and $b(x)$ are elements of $P$. But then constant term of $a_0$ of $~f(x)$ as the product of these two would be an element of $P^2$, a contradiction. This completes the proof.
But I cannot understand the line which I have bold in the proof. What I understand is that since $x^n=\overline{a(x)b(x)}$, so comparing the coefficients on both sides we get the product of the constant terms of $~\overline{a(x)}$ and $~\overline{b(x)}$ is zero in $(R/P)[x]$, which is a Integral domain.....then either the constant term of $~\overline{a(x)}=0$ or constant term of $~\overline{b(x)}=0$...But how does both of them is zero?
Please help.
 A: Suppose $b$ mod $P$ has nonzero constant term.  Then $a$ mod $P$ must be identically zero, since otherwise its lowest nonzero coefficient would multiply by the constant term in $b$ mod $P$ to produce a nonzero term of degree less than $n$ in the product $ab$ mod $P$, since $P$ is prime.  (It wouldn't be cancelled by anything else since all lower degrees of $a$ mod $P$ are $0$.)  But that means $a$ is in $P$, and yet the original polynomial is not in $P$, so this can't happen.
A: Since $R/P$ is a domain, $R/P[x]$ is a domain. In this ring you have $$x^n = \overline{a(x)} \cdot \overline{b(x)}$$ and $\overline{a(x)},\overline{b(x)}$ have degree $<n$.
Call $$\overline{a(x)} = \sum_{k \le i \le K} \overline{a_i} x^i \\
\overline{b(x)}=\sum_{h \le j \le H} \overline{b_j} x^j
$$
Then
$$x^n = \left( \sum_{k \le i \le K} \overline{a_i} x^i\right) \cdot \left( \sum_{h \le j \le H} \overline{b_j} x^j\right) = \sum_{m=0}^n \left(\sum_{i+j=m} \overline{a_i b_j} \right) x^m$$
A: This can be done by recursion: We now have $a_0b_0\in P$. By the definition of prime ideal, one of $a_0$ and $b_0$ must be in $P$. Suppose $a_0\in P$ but $b_0\notin P.$ Then since $\overline{a(x)}\cdot \overline{b(x)}=\overline{x^n}$. Then $a_1b_0+a_0b_1\in P$. By our assumption, $a_1b_0\in P$ since ideals are closed under subtraction. But $b_0\notin P$. This forces $a_1\in P$. Similarly, $a_0b_2+a_1b_1+a_2b_0\in P$ forces $a_2$ to be in $P$. Proceeding by the same method, then all coefficients of $a(x)$ are in $P$. Finally, we have $b_0+b_1a_{m-1}+\cdots +b_ma_0\in P$ where $m$ is the degree of $a(x)$.Notice that we let $b_i=0$ if $i>\deg b(x)$. Anyway, we know that $a_{m-1},a_{m-2},\cdots,a_0\in P$. Then this forces $b_0\in P$ which contradicts to our assumption.
A: One idea could be to use the fraction field of $R/P$ that we can note $F_{R/P}$. We look at $\overline{x}^n=\overline{f(x)}=\overline{a(x)b(x)}= \overline{a(x)} .\overline{b(x)}$ in $F_{R/P}[X]$ and we directly get that : $\overline{a(x)} = \alpha.\overline{x}^m$ and $\overline{b(x)}=\beta. \overline{x}^l$ with $\alpha, \beta \in (F_{R/P})^{\times}$ and $m,l\ge 1$ such that $n=m+l$.
Then write for instance $\alpha = \dfrac{\overline{e}}{\overline{d}}$ with $\overline{d}\neq \overline{0}$. Hence $\overline{d}.\overline{a(x)}=\overline{e}.\overline{x}^m$ with $\overline{d}.\overline{a(x)} \in R/P[X]$.
Now if $b_0$ is the constant term of $a$ we then have identifying and using that $m\ge 1$ that : $\overline{d}.\overline{b_0}= \overline{0}$ and then we deduce that $\overline{b_0}= \overline{0}$. Hence $b_0 \in P$.
We do the same for $c_0$ the constant term of $b$.
We then get that $b_0c_0=a_0 \in P^2$.
