Let $f(t)$ be an irreducible polynomial in $k(x_1, \ldots, x_n)[t]$. Show that $f(t)$ is irreducible in $k[x_1,\ldots,x_n][t]$.
I guess it's clear that I am required to apply Gauss' Lemma. The statement in my course notes is:
Let $R$ be a UFD and $F$ its field of fractions. A non-constant polynomial in $R[X]$ is irreducible in $R[X]$ if and only if it is both irreducible in $F[X]$ and primitive in $R[X]$. And a polynomial $P$ in $R[X]$ is primitive if the only elements of $R$ that divide all coefficients of $P$ at once are the invertible elements of $R$.
I first cleared the denominators of the coefficients $a_i \in k(x_1,\ldots,x_n)$ of $f(t)$. But this modified polynomial is not monic anymore, so I ran into trouble showing that $f$ is primitive in $k[x_1,\ldots,x_n][t]$ - or at least, things get very messy.
* * *
EDIT: Additional context added. I am trying to understand Proposition 4.9 in Hartshorne's Algebraic Geometry. The argument given goes as follows:
Let $K$ be a finitely generated extension field of $k$. Then $K$ is seperably generated over $k$ since we are working over an algebraically closed field. Hence we can find a transcendence base $x_1,\ldots,x_n \in K$ such that $K$ is a finite seperable extension of $k(x_1,\ldots,x_n)$. By the primitive element therem we can find one further element $y \in K$ such that $K=k(x_1,\ldots,x_n,y)$. Now $y$ is algebraic over $k(x_1,\ldots,x_n)$. So it satisfies a polynomial equation with coefficients which are rational functions in $x_1,\ldots,x_n$. Clearing denominators we get an irreducible polynomial, satisfying $f(x_1,\ldots,x_n,y)=0$
My original question aimed to clarify this last step. I assumed he used Gauss' Lemma.
EDIT 2: Reformulation of original question (related to comments on first post).
Let $f(t)$ be an irreducible polynomial in $k(x_1, \ldots, x_n)[t]$. Let $f'(t)$ be the polynomial where we have cleared up the denominators of $f(t)$. Show that $f'(t)$ is irreducible in $k[x_1,\ldots,x_n][t]$.
From the comments, it seems like you want to ask the following question. Suppose $f(t) \in k(x_1,...,x_n)[t]$ is irreducible (where $k$ is a field). We can assume that the coefficients are reduced so that for each coefficient $\frac{c_i}{d_i}$, the numerator and denominator are relatively prime. Then $k[x_1, ..., x_n]$ is a UFD so we can take the least common multiple $m$ of the denominators of the coefficients of $f(t)$ and gcd $n$ of all the numerators of the coefficients. Let $f'(t)=\frac{m}{n}f(t) \in k[x_1,...,x_n][t]$. We are in an integral domain and $\frac{m}{n} \neq 0$ so the roots of $f'$ are the same as the roots of $f$. If $f$ is irreducible in $k(x_1, ..., x_n)[t]$, is $f'(t)$ irreducible in $k[x_1,...,x_n][t]$?
Suppose $p$ is a prime factor dividing each coefficient $\frac{m}{d_i} \cdot \frac{c_i}{n}$ of $f'$. Then for each $i$, $p|\frac{m}{d_i}$ or $p|\frac{c_i}{n}$. If in all cases the latter is true, then $p| c_i$ for each $i$ so this contradicts the definition of $n$. Thus, $p|\frac{m}{d_i}$ for some $i$, and in particular, $p|m$. Thus, if $d_i$ contains the largest power of $p$ of all the denominators, then $p$ does not divide $\frac{m}{d_i}$ so must divide $\frac{c_i}{n}$. But then $p|c_i$ which contradicts $p|d_i$ (and we assumed $\frac{c_i}{d_i}$ is reduced). Thus, $f'$ is primitive and so if we can show it is irreducible in $k(x_1, ..., x_n)[t]$, then it is irreducible in $k[x_1, ..., x_n][t]$ by Gauss's Lemma.
But in particular, if $gh=f'$, then by Gauss's Lemma, we can assume $g, h \in k[x_1, ..., x_n][t]$. Then we have $(ng)h=mf$. Each prime factor of $m$ must divide $ng$ or $h$, and so canceling prime factors, we end up with a factorization of $f$.
I haven't checked this too carefully. Does this seem right?