divisor class group of a product of schemes
The first part of this question is quite general: let $X$ and $Y$ be noetherian integral separated schemes which are regular in codimension one. Is there any relationship between the divisor class group $\text{Cl}(X \times Y)$ and the groups $\text{Cl}(X)$, $\text{Cl}(Y)$? For instance, I think there are natural maps on divisors $\text{Div}(X) \to \text{Div}(X \times Y)$ and $\text{Div}(Y) \to \text{Div}(X \times Y)$ which send $Z \mapsto Z \times Y$ and $Z \mapsto X \times Z$. Are these maps well-defined modulo linear equivalence? If so, are the induced maps on class groups injective?
This question occurred to me while working on Hartshorne exercise II.6.1, which claims that $\text{Cl}(X \times \mathbb{P}^n) \cong \text{Cl}(X) \times \mathbb{Z}$. In this case, taking $H_{\infty} \subset \mathbb{P}^n$ to be the hyperplane at infinity, $Z = X \times H_{\infty}$, and $U = X \setminus Z$, there is a natural surjection $\text{Cl}(X \times \mathbb{P}^n) \to \text{Cl}(U) \cong \text{Cl}(X)$ whose kernel is the image of the map $\mathbb{Z} \to \text{Cl}(X \times \mathbb{P}^n)$ which sends $n \mapsto n \cdot Z$. Why is this map injective?
Solution 1:
For the general situation, you have to consider the fiber product of $X, Y$ over some base scheme, then see this answer in MO.
For the specific question, you probably ask why the map is surjective. Take a Weil divisor $D=\sum_i n_i Z_i$ on $U$, then the class of the Weil divisor $\overline{D}:=\sum_i n_i\overline{Z}_i$, where $\overline{Z}_i$ is the Zariski closure of $Z_i$ in $X\times \mathbb P^n$, is mapped to the class of $D$ in Cl$(U)$.
Add answer to the real question: suppose $kZ=0$ in Cl$(X\times \mathbb P^n)$. One can take $k\le 0$. Let $f$ be a rational function whose divisor is $kZ$. Then $f$ has no pole, hence $f\in O(X\times\mathbb P^n)=O(X)$ and the divisor of $f$ is of the form $D\times \mathbb P^n\ne kZ$ unless $k=0$.