Solution (source code)

= Solution

A polynomial over a <unique factorization domain> is primitive when its coefficients have no common nonunit factor. If a prime divided every coefficient of a product of two primitive polynomials, reduction modulo that prime would turn the product of two nonzero polynomials over an integral domain into zero, impossible. This proves <Gauss lemma for polynomials>.

If positive-degree $f,g\in R[X]$ became non-coprime in $F[X]$, they would share a positive-degree primitive factor after clearing content. Gauss's lemma then makes that factor divide both in $R[X]$, contrary to coprimality. Hence they remain coprime over the fraction field.