TITLE: Picard group, Fundamental group, and deformation
QUESTION [8 upvotes]: One of the most elementary theorems about Picard group is probably $\mathrm{Pic} (X \times \mathbb{A}^n)  \cong \mathrm{Pic} X$ and $\mathrm{Pic} (X \times \mathbb{P}^n) \cong \mathrm{Pic} X \times \mathbb{Z}$ (we probably need some restriction for $X$ but let's forget about it for now).  This looks very similar to the formulas for $\pi_1$ (the fundamental group).  So, my question is whether the who has any relationship and whether one can prove those formulas of the Picard groups using some kind of deformation (as in Topology).

REPLY [3 votes]: First:  The identity map on $X$ factors through the inclusion from $X$ to $X\times {\mathbb A}^1$.  Therefore $Pic(X)$ is a direct summand of $Pic(X\times{\mathbb A}^1)$.  This is the same argument you'd use in topology to show that $\pi_1(X)$ is a direct summand of $\pi_1(X\times I)$ ($I$ being the unit interval).
To show that $Pic(X)$ is equal to all of $Pic(X\times {\mathbb A}^1)$, you can (as you surmise) take a class in $Pic(X\times {\mathbb A}^1)$ and ``deform'' it until it evidently comes from $X$.  
Here (roughly) is one way to do this:  Represent your class by a divisor $D$.  Pull $D$ back to a divisor on $X\times {\mathbb A}^1 \times {\mathbb A}^1$ along the map that sends $(x,s,t)$ to $(x,st)$.  Call the pullback $D'$.  Then $D'$ restricts to $D$ when $t=1$ and to a divisor that comes from $X$ when $t=0$.  Call that latter divisor $D_0$.
You can think of $D'$ as deforming $D$ into $D_0$, which completes the proof.  The reason this deformation sets $D$ equal to $D_0$ in the Picard group is that you can think of $D'$ as (roughly) the graph of a function with zeros along $D_0$ and poles along $D$ (after a transformation that takes $1$ to infinity).  That's exactly what it takes to make $D-D_0$ trivial in the divisor class group, which, given appropriate assumptions, is the same as the Picard group.  So yes, this kind of deformation is just what you need, and just what you've got.