# On the definition of the structure sheaf attached to $Spec A$

Let $A$ be a ring (commutative with $1$),if $X=Spec A$ we want to attach a sheaf of rings to $X$. If $f\in A$, $D(f)=X\setminus V(f)$ is an element of the base and we define $$\mathcal O_X(D(f)):=A_f$$

I've problems to show that $\mathcal O_X(\cdot)$ is well defined on the set $\mathcal B=\{D(f)\,:\, f\in A \}$. If $D(f)=D(g)$, then it is easy to show that $A_f\cong A_g$, but these two rings are not the same, so we have that $\mathcal O_X(D(f))\neq \mathcal O_X(D(g))$ even if they are isomorphic. Textbooks say "we can identify $A_f$ with $A_g$" but what they exactly mean with the word "identify"?

Since $A_f,A_g$ are localizations of $A$, there is almost one homomorphism of $A$-algebras between $A_f$ and $A_g$. Therefore all identifications between them are compatible with each other. So there is no harm to identify $A_f$ with $A_g$ when $D(f)=D(g)$.

However, I always wonder why this approach to the structure sheaf is so popular. As you observe, it is not clear at all why this is well-defined in the usual sense of this word. And it is also quite clumsy! Instead, you can do the following:

1) Define $\mathcal{O}_X(U)$ to be the set of all functions $s$ on $U$ with $s(\mathfrak{p}) \in A_{\mathfrak{p}}$, such that locally $s$ is equal to some fraction in $A_f$. Details can be found in Hartshorne's book, for example.

2) Let $S_U = A \setminus \cup_{\mathfrak{p} \in U} \mathfrak{p}$ and $\mathcal{O}'(U) = A[S_U^{-1}]$. Then $\mathcal{O}'$ is a presheaf of rings, and define $\mathcal{O}$ to be the associated sheaf. Details can be found in MO/80548.

• A functor should be a function between the objects. In this case, $D(f)$ is mapped on two different ring (even if they are isomorphic). Commented May 13, 2013 at 12:48
• Yes, exactly. It's an anafunctor (ncatlab.org/nlab/show/anafunctor). Commented May 13, 2013 at 12:55
• It's wrong from a set-theoretic point of view, yes. But modern mathematics doesn't really depend on set theory anyway ... (but rather category-theoretic foundations such as ETCS, and as I've said the structure sheaf is an anafunctor). Commented May 13, 2013 at 13:38
• Another more basic example: In practice, all trivial groups are considered to be the same and we write $A = 0$ (or $=1$ in the non-abelian case) when we actually mean that $A$ is trivial. But from a set-theoretic point of view, this is not correct, and there are lots of trivial groups. But this identification doesn't cause any problems, because any isomorphism $A \cong 0$ (if it exists at all) is unique. Commented May 13, 2013 at 18:17
• ok this is quite clear, however Vakil's definition of the structure sheaf on a base is the following: $$\mathcal O_X(D(f))=\{g\in A\,:\, V(g)\subseteq V(f)\}$$ I think that this definition works from a set-theoretic point of view. Commented May 13, 2013 at 19:04