A question from the mod p irreducibility test's proof

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, $$ which is a contradiction.