Gauss's Lemma on Irreducible Polynomials

Theorem
Let $\Z \left[{X}\right]$ be the ring of polynomial forms over the integers.

Let $h \in \Z \left[{X}\right]$ be primitive.

Then $h$ is irreducible in $\Q \left[{X}\right]$ iff $h$ is irreducible in $\Z \left[{X}\right]$.

Proof
Suppose first that $h$ is not irreducible in $\Z \left[{X}\right]$.

If $\deg h = 0$, then $h$ is a unit of $\Q \left[{X}\right]$, hence not irreducible in $\Q \left[{X}\right]$.

Let $h = fg$ be a non-trivial factorization in $\Z \left[{X}\right]$.

That is $f$ and $g$ are not units.

If $\deg f = 0$, that is $f \in \Z$, then $f$ divides each coefficient of $h$.

Since $h$ is primitive, this means that $f$ divides $1$, i.e. $f = \pm 1$.

But then $f$ is a unit in $\Z\left[{X}\right]$, a contradiction.

Therefore $\deg f \geq 1$, so $f$ is a non-unit in $\Q \left[{X}\right]$.

Similarly, $h$ is a non-unit in $\Q \left[{X}\right]$.

Therefore $h$ is not irreducible in $\Q \left[{X}\right]$.

Suppose now that $h$ is not irreducible in $\Q \left[{X}\right]$.

Note that $h$ is reducible iff $c h$ is reducible for any non-zero constant $c \in \Q$.

Let $\tilde h = \dfrac 1 {\operatorname{cont} \left({h}\right) } h$.

By Content of Scalar Multiple, we have $\operatorname{cont} \left({\tilde h}\right) = 1$.

Therefore by Polynomial has Integer Coefficients iff Content is Integer, $\tilde h \in \Z\left[{X}\right]$.

By assumption, $\tilde h$ has non-trivial factors in $\Q \left[{X}\right]$.

Suppose $\tilde h = \tilde f \tilde g$, with $\tilde f$ and $\tilde g$ both of positive degree.

Let $c_f$ and $c_g$ be the contents of $\tilde f$ and $\tilde g$ respectively.

Define $f = c_f^{-1} \tilde f$ and $g = c_g^{-1} \tilde g$.

By Content of Scalar Multiple, it follows that $\operatorname{cont} \left({f}\right) = \operatorname{cont} \left({g}\right) = 1$.

Now we have:
 * $f g = \dfrac {\tilde f \tilde g} {c_f c_g} = \dfrac {\tilde h} {c_f c_g}$

Taking the content, by Content of Scalar Multiple we have:
 * $\operatorname{cont} \left({fg}\right) = \dfrac{1}{c_f c_g}\operatorname{cont} \left({\tilde h}\right)$

By the theorem we know that $\operatorname{cont} \left({fg}\right) = 1$.

Moreover we already have that $\operatorname{cont} \left({\tilde h}\right) = 1$.

Therefore we must have $c_f c_g = 1$.

This means that already $\tilde f, \tilde g \in \Z \left[{X}\right]$.

Now multiply both sides of the equation by $\operatorname{cont} \left({h}\right) \in \Z$:
 * $\operatorname{cont} \left({h}\right) \tilde f \tilde g = \operatorname{cont} \left({h}\right) \tilde h = h$

This is a non-trivial factorization of $h$, since $\tilde f$ and $\tilde g$ have positive degree.

Thus $h$ is not irreducible in $\Z \left[{X}\right]$.