A finite correspondence in $Cor_k(X,\mathbb A^1)$ is a principal Weil divisor

I am trying to understand Lemma 4.4 of "Lectures on Motivic Cohomology" by Mazza-Weibel-Voevodsky.
In the following, $X$ is a smooth scheme over a field $k$. In the proof of the lemma, the authors say " If $Z$ is an element of $Cor(X,\mathbb A^1)$, then $\exists ! \ f$, a rational function on $X\times \mathbb P^1$ and an integer $n$ such that $\operatorname{div}f=Z$ and $f/t^n=1$ on $X\times \{\infty\}$." I am struggling to figure out why this is true.

It suffices to show this for an elementary correspondence. So let $Z$ be an irreducible closed subset of $X\times \mathbb A^1$ which is finite and surjective over $X$. I want to show that $Z=\operatorname {div}(f)$ for some rational function $f$. If I just concentrate on $X=\operatorname{Spec}A$ an affine $k$-domain, then $Z=V(p)$ where $A\rightarrow A[t]/p$ is injective and finite. But I am not quite sure how this implies $p$ is a rational Weil-divisor.
Any help will be highly appreciated.

EDIT: It seems to prove the lemma I only need to understand the group $Cor_k(X,\mathbb G_m)$ where $G_m=\mathbb A^1-0$. So if $X=\operatorname{Spec}A$, then an elementary finite correspondence in $Cor_k(X,\mathbb G_m)$ is a prime ideal $p\in\operatorname{Spec}A[t,t^{-1}]$ such that $A\hookrightarrow \frac{A[t,t^{-1}]}{p}$ is finite and injective. Now $p$ has a polynomial in $A[t]$ with leading coefficient unit as well as a polynomial in $A[t]$ with constant term a unit. Let $f_+$ be the monic polynomial in $p\cap A[t]$ of min degree and $f_-$ is the polynomial in $p\cap A[t]$ of min degree with constant term $1$. Then it can be easily seen that the two polynomials have same degree $n$. Not sure if this helps.


Solution 1:

Let $\eta$ be the generic point of $X$, and consider $Z\cap (\{\eta\}\times\Bbb A^1)$. This is a codimension-one subscheme of $\{\eta\}\times\Bbb A^1\cong \Bbb A^1_{k(X)}$, so it's $V(f)$ for some unique monic element $f\in k(X)[t]$ of positive degree in $t$. I claim that this $f$ is the $f$ you're looking for (up to adjustment by $t$ to make the second claim true).

To check this, we have that $(f)$, the divisor associated to $f$, agrees with $Z$ on an open neighborhood of $\{\eta\}\times\Bbb A^1\subset X\times\Bbb A^1$. Therefore their difference as divisors must be a sum of elements of the form $D\times\Bbb A^1$ for $D\subset X$ a divisor. Now I claim that neither $(f)$ nor $Z$ contain any such divisors. For $Z$, such a divisor is of dimension $\dim X=\dim Z$, but must be a proper subset of $Z$ since it doesn't contain any point of $\{\eta\}\times\Bbb A^1$ and so we have a contradiction for dimension reasons. On the other hand, since $f$ is monic in $t$ it can't ever have value $0$ or $\infty$ on the whole of any fiber. So $(f)=Z$ and we're done.