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]$.

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

Let $\displaystyle h = a_0 + a_1 X + \cdots + a_n X^n$.

If $\deg h = 0$, then the content of $h$ is
 * $\operatorname{cont}\left({h}\right) = \gcd\left\{a_0\right\} = \left|{a_0}\right|$.

Since $h$ is primitive by hypothesis, we have $h = \pm 1$.

Now the units of $\Q\left[X\right]$ are the units of $\Q$, so $h$ is a unit of $\Q\left[X\right]$.

Therefore $h$ is not irreducible.

If $\deg h \geq 1$, then since the units of $\Z\left[X\right]$ are the units of $\Z$, $h$ is not a unit of $\Z\left[X\right]$.

Thus since $h$ is reducible, there is a non-trivial factorization $h = fg$ in $\Z \left[{X}\right]$, with $f$ and $g$ both 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 $\operatorname{cont}\left(h\right) = 1$.

But the divisors of $1$ are $\pm 1$, so $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, $g$ is a non-unit in $\Q \left[{X}\right]$.

Therefore $h = fg$ is a non-trivial factorization in $\Q \left[{X}\right]$.

Necessary Condition
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]$.