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

That is, $h$ has a non-trivial factorization in $\Q \left[{X}\right]$.

Since the units of $\Q \left[{X}\right]$ are the units of $\Q$, this means that $h = f g$, with $f$ and $g$ both of positive degree.

Let $c_{f}$ and $c_{g}$ be the contents of $f$ and $g$ respectively.

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

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

Moreover by Polynomial has Integer Coefficients iff Content is Integer we have $\tilde f,\tilde g \in \Z\left[{X}\right]$.

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

Taking the content, and using Content of Scalar Multiple we have:
 * $\operatorname{cont} \left({\tilde f \tilde g}\right) = \dfrac{1}{c_{f} c_{g}}\operatorname{cont} \left({h}\right)$

By Gauss' lemma we know that $\operatorname{cont} \left({\tilde f \tilde g}\right) = 1$.

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

Therefore we must have $c_{f} c_{g} = 1$.

Thus we have a factorization in $\Z\left[{X}\right]$:
 * $\tilde f \tilde g = h$

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

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