# Functional sheaf (Hartshorne, Cartier divisors)

In Hartshorne there is the following description of the sheaf $K$ on the scheme. For each open $U = Spec \, A$ we define $K(U) = S^{-1} A$, where $S$ is the set of non-zero-divisors. Why is it a presheaf? If we have $Spec \, B \subset Spec \, A$, why non-zero-divisor restricts to non-divisor? If we have arbitrary ring homomorphism $A \rightarrow B$, then it can map non-divisor into divisor. Probably, we should use some property of the morphism $A \rightarrow B$, which give an open immersion $Spec \, B \rightarrow Spec \, A$.

-
The 'restrictions' are given by us, and in this case it is always the identity map $S^{-1}A\to S^{-1}A$, if I understand it well. – Berci Oct 29 '12 at 20:14
No! Let $S_A$ be the set of non-zero-divisors of A. Then the restriction map, corresponding to $Spec \, B \subset Spec \, A$ is the map $S_A^{-1} A \rightarrow S_B^{-1} B$, which continues $A \rightarrow B$. It exist if and only if all non-zero-divisors maps into non-zero-divisors (because only they are invertible). – user46336 Oct 29 '12 at 20:18
by the usual stuff you should be able to reduce to considering $A \rightarrow A_f$ – uncookedfalcon Oct 29 '12 at 20:39
I'm not sure which edition of Hartshorne you have, but if the definition of the "presheaf" therein is given by sending an arbitrary open $U$ to the total ring of fractions of $\mathscr{O}_X(U)$, then this is not a presheaf because regular elements need to restrict to regular elements. It is corrected in my version of the book. See the discussion on MO here: mathoverflow.net/questions/28553/… – Keenan Kidwell Oct 29 '12 at 20:41
Yes, of course, this presheaf is defined only on the affine open subsets, and then canonically extends. But why it is correctly defined on the base? Why $S_A$ restricts into $S_B$? – user46336 Oct 29 '12 at 20:46

Slight alternative to what $QiL$ wrote, but roughly the same. On $Spec \; A$, let's put over $D_f = Spec \; A_f$ the ring $S^{-1} A_f$, where $S$ is the collection of non-zero-divisors.
What should our restriction maps be? Well, we have $A \rightarrow A_f \rightarrow S^{-1} A_f$, so if we know a non-zero-divisor in $A$ maps to a non-zero-divisor in $A_f$, we get a restriction map via our universal property.
And sure enough, suppose $a \in A$ is not a zero divisor. Suppose we had $$\frac{a}{1} \cdot \frac{a'}{f^n} = \frac{0}{1} \Rightarrow f^Na' a = 0 \in A$$for some $N$, which means that in fact $f^N a' = 0$, hence $\frac{a'}{f^n} = 0$, as desired!
Great, now we have a nice presheaf on a base, but we can be even more explicit, namely give restriction maps and sections of our presheaf on arbitrary affine opens. For any open affine $Spec \; B \subseteq Spec \; A$, we have $A \rightarrow B \rightarrow S^{-1} B$, to get our restriction map we again just have to check that $a$ as before is a nonzero divisor. Indeed, suppose $a \cdot b = 0$ for some $b \in B$, now cover $Spec \; B$ by $Spec \; A_{f_i}$, we deduce $b$ restricts to 0 in each of them hence is 0.