Hartshorne Exercise II.6.9(a): Picard group of a singular curve

First, one preliminary note: we'll need to assume that either $\def\ol{\overline} k = \ol{k}$ or that $X$ is geometrically integral here. Either version of this gives that $\def\cO{\mathcal{O}}\cO_X(X)=k$, which is an important tool we'll need some ways on in the proof. $\def\Spec{\operatorname{Spec}} \def\Pic{\operatorname{Pic}} \def\cK{\mathcal{K}} \def\G{\Gamma}$


On any affine open $\Spec A\subset X$, we have that $(\pi_*\cO_{\widetilde{X}}^*)=\widetilde{A}$, the normalization of $A$, so $\cO_X^*\subset \pi_*\cO_{\widetilde{X}}^*$ as subsheaves of $\cK^*$. We get an exact sequence of sheaves $0\to \pi_*\cO_{\widetilde{X}}^*/\cO_X^* \to \cK^*/\cO_X^*\to \cK^*/\pi_*\cO_{\widetilde{X}}^*\to 0$ on $X$ by the third isomorphism theorem.

As normalization is birational, we have that $\pi_*\cO_{\widetilde{X}}^*/\cO_X^*$ is supported on a proper closed subset of $X$, which is a finite set of points since we're working with a curve. Since a sheaf on a finite discrete space is equal to the direct sum of the skyscraper sheaves of the stalks at each point, we have that $$\pi_*\cO_{\widetilde{X}}^*/\cO_X^*\cong \bigoplus_{P\in X} i_P((\pi_*\cO_{\widetilde{X}}^*)_P/\cO_{X,P}^*).$$ Next, by definition of $\cO_{\widetilde{X}}$ and the fact that integral closure commutes with localization, we have that $(\pi_*\cO_{\widetilde{X}})_P\cong \widetilde{\cO_{X,P}}$, and thus $\bigoplus_{P\in X} i_P((\pi_*\cO_{\widetilde{X}}^*)_P/\cO_{X,P}^*)\cong \bigoplus_{P\in X} i_P(\widetilde{\cO_{X,P}}^*/\cO_{X,P}^*)$, so our exact sequence of sheaves stands at $$0\to \bigoplus_{P\in X} i_P(\widetilde{\cO_{X,P}}^*/\cO_{X,P}^*) \to \cK_X^*/\cO_X^*\to \cK_X^*/\pi_*\cO_{\widetilde{X}}^*\to 0.$$

The next thing to do is to take global sections. As $\G(X,\cK_X^*/\cO_X^*)\cong \operatorname{CaDiv} X$, we have that the middle term is isomorphic to $\operatorname{CaDiv} X$. As a direct sum of skyscraper sheaves is flasque, we have that taking global sections of this sequence remains exact by exercise II.1.16(a). Next, we argue that $\G(X,\cK_X^*/\pi_*\cO_{\widetilde{X}}^*)\cong \operatorname{CaDiv}(\widetilde{X})$: given a global section $\{(U_i,f_i)\}_{i\in I}$, we get that $\{(\pi^{-1}(U_i),f_i)\}_{i\in I}$ is a global section of $\cK_{\widetilde{X}}^*/\cO_{\widetilde{X}}^*$, so we have an injection $\G(X,\cK_X^*/\pi_*\cO_{\widetilde{X}}^*)\to \G(\widetilde{X},\cK_{\widetilde{X}}^*/\cO_{\widetilde{X}}^*)\cong \operatorname{CaDiv}(\widetilde{X})$.

To see this map is surjective, we know that by proposition II.6.11 the Weil and Cartier divisors on $\widetilde{X}$ are the same, so it suffices to show that we can represent any prime Weil divisor on $\widetilde{X}$ as a global section of $\cK_{\widetilde{X}}^*/\pi_*\cO_{\widetilde{X}}^*$. Let $Q\in X$ be an arbitrary closed point and let $U\subset X$ be an affine open neighborhood of $Q$. Consider the closed subscheme $$Y=\bigsqcup_{P\mapsto Q} (\{P\},\cO_{\widetilde{X},P}/(u_P^2))\subset \pi^{-1}(U)$$ where $u_P$ is a generator of the maximal ideal of $\cO_{\widetilde{X},P}$. Since $\pi$ is affine, $\pi^{-1}(U)$ is affine and therefore the map $\cO_{\widetilde{X}}(\pi^{-1}(U)) \to \cO_Y(U)$ is surjective. Let $s_P\in\cO_{\widetilde{X}}(\pi^{-1}(U))$ be a section which maps to $u_{P'}\in\cO_{\widetilde{X},P'}/(u_{P'}^2)$ if $P=P'$ and $1_{P'}\in\cO_{\widetilde{X},P'}/(u_{P'}^2)$ otherwise. This section might have other zeroes on $\pi^{-1}(U)$, but none of them are at any point mapping to $Q$. Because $\pi$ is finite and therefore closed, we may find a smaller open subset $U'\subset U$ which does not contain any point of $\pi(V(s_P))$ except for $Q$. Then $\{(X\setminus Q,1),(U',s_P)\}$ is a global section of $\cK^*/\pi_*\cO_{\widetilde{X}}^*$ which has $P$ as its divisor, and we've shown that our map is indeed surjective. So our exact sequence stands at $$0\to \bigoplus_{P\in X} \widetilde{\cO_{X,P}}^*/\cO_{X,P}^* \to \operatorname{CaDiv} X \to \operatorname{CaDiv} \widetilde{X} \to 0.$$

To get from here to the requested exact sequence, our goal is to mod out the group of principal Cartier divisors in $\operatorname{CaDiv} X$ and $\operatorname{CaDiv} \widetilde{X}$ without touching the first term in our exact sequence. If we can do that, we're done by proposition II.6.15: $X$ and $\widetilde{X}$ are both integral, implying $\operatorname{CaCl} X\cong \Pic X$. To be precise, we need to show that the image of our first term only has trivial intersection with the image $\G(X,\cK^*)=K(X)^*$ in $\operatorname{CaDiv} X$, or that the map $\operatorname{CaDiv} X\to \operatorname{CaDiv} \widetilde{X}$ doesn't send any nontrivial principal divisor to $0$.

If some element of $\bigoplus_{P\in X} \widetilde{\cO_P}^*/\cO_P^* $ has image the principal Cartier divisor associated to $f$ on $X$, then as $K(X)=K(\widetilde{X})$ and the map $\operatorname{CaDiv} X\to \operatorname{CaDiv} \widetilde{X}$ sends the principal Cartier divisor associated to $f\in K(X)$ on $X$ to the principal Cartier divisor associated to $f\in K(\widetilde{X})$ on $\widetilde{X}$, we need to show that any $f$ which determines a trivial Cartier divisor on $\widetilde{X}$ also determines a trivial Cartier divisor on $X$.

As any element $f$ of $K(\widetilde{X})^*$ determining the trivial Cartier divisor must be in $\cO_{\widetilde{X},x}^*$ for every $x\in X$, we have by proposition II.6.3 that $f$ is in $A$ for every affine open $\Spec A\subset \widetilde{X}$ and therefore $f$ is a global section. By the preliminary note, $\cO_X(X)=\cO_{\widetilde{X}}(\widetilde{X})=k$, so $f\in k^*$, which clearly determines the trivial Cartier divisor on $X$ too. So quotienting out by principal Cartier divisors gives an exact sequence $$0\to \bigoplus_{P\in X} \widetilde{\cO_P}^*/\cO_P^* \to \Pic X\to \stackrel{\pi^*}{\to} \Pic \widetilde{X}\to 0$$ and we're done.