Solution (source code)

= Solution

For a nonzero integer-coefficient <polynomial> $F$, its <polynomial content> $c(F)$ is the positive <greatest common divisor> of all its coefficients; one may set $c(0)=0$. A <primitive polynomial> has content one.

For $f\in\mathbb Q[t]\setminus\{0\}$, choose a positive integer $m$ clearing its denominators, so $F=mf\in\mathbb Z[t]$. Put $d=c(F)>0$. Then
$$
f=\frac dm\frac Fd,
$$
where $f_1=F/d$ is an integer-coefficient <primitive polynomial>. This proves existence with $\alpha=d/m>0$.

For uniqueness, suppose $\alpha f_1=\beta g_1$, where both integer-coefficient polynomials are primitive and $\alpha,\beta>0$. Write $\alpha/\beta=a/b$ in lowest terms with $a,b$ positive. Then $g_1=(a/b)f_1$ has integer coefficients. Coprimality forces $b$ to divide every coefficient of $f_1$, hence $b=1$. Now $g_1=af_1$ has content $a$, so $a=1$. Therefore $\alpha=\beta$ and $f_1=g_1$.

Define the <rational polynomial content> by this unique positive multiplier. If $f=\alpha f_1$ and $g=\beta g_1$, <Gauss lemma for polynomials> says that $f_1g_1$ is primitive. Thus
$$
fg=(\alpha\beta)(f_1g_1),\qquad
\boxed{c(fg)=c(f)c(g).}
$$
The uniqueness argument also shows that the construction is independent of the chosen denominator-clearing integer $m$.