# A question from the mod p irreducibility test's proof

Let $p$ be a prime an suppose that $f\in \mathbb Z[x]$ with $\deg f\geq 1$. Let $f_1$ be the polynomial in $\mathbb Z_p[x]$ obtained from $f$ by reducing all the coefficients of $f$ modulo $p$. If $f_1$ is irreducible over $\mathbb Z_p$ and $\deg f_1=\deg f$, then $f$ is irreducible over $\mathbb Q$.

Proof: Let us assume $f$ is reducible over $\mathbb Q$. From a known result, it follows that if $f$ is reducible over $\mathbb Q \implies f =gh$ with $g,h\in \mathbb Z[x]$.

Both $g,h$ have degrees $< \deg f$, but $\geq 1$ as $f$ is reducible.

Let $f_1,g_1,h_1$ be the polynomials obtained from $f,g,h$ by reducing all coefficients modulo $p$. Since $\deg f=\deg f_1$, we have

$\deg g_1\leq \deg g< \deg f_1$ and

$\deg h_1 \leq \deg h < \deg h_1$.

But, $f_1=h_1g_1$ which is a contradiction from the given statement that $f$ is irreducible over $\mathbb Z_p$. Hence, our assumption that $f$ is reducible over $\mathbb Q$ is false.

My question arises here. Since, $g_1$ is obtained from $g$ by reducing all coefficients modulo $p$,

hence $\deg g_1\leq \deg g < \deg f_1$ and

is it not possible that $g_1$ may reduced to a constant polynomial and hence, factorization of $f_1$ may turn out to be the trivial factorization and hence, $f_1$ may actually be irreducible, as opposed to the claim made above?

One of the listed assumptions was that $\deg f_1=\deg f$. A consequence of this is that $\deg g_1=\deg g$ and $\deg h_1=h$. For if this were not the case, then we would have
$$\deg f_1=\deg (g_1h_1)=\deg g_1+\deg h_1<\deg g+\deg h=\deg gh=\deg f,$$