TITLE: Hartshorne's definition of structure sheaf
QUESTION [6 upvotes]: Hartshorne at page $70$ defines the structure sheaf on Spec $A$. The elements of $\mathcal O_{\textrm{Spec}A}(U)$ are particular functions $s:U\longrightarrow\coprod_{p\in U}A_p$. With the symbol  $\coprod_{p\in U}$ I think he means the coproduct in the category of commutative rings, but in can't figure out what precisely is $\coprod_{p\in U}A_p$ in this case. It is the direct sum of the rings $A_p$? Does the coproduct always exist in the category of commutative rings?

REPLY [5 votes]: It is just the disjoint union of the underlying sets. The elements of $\mathcal{O}_{\text{Spec}A}(U)$ are functions on $U$ whose value at the point $\mathfrak{p}$ is an element of the local ring $A_{\mathfrak{p}}$