I am trying to fill in the details of the proof of Proposition 2, II. Preschemes, §6, in Mumford's Red Book (page 114, 2nd edition).
For any two preschemes $X_1,X_2$, $$\operatorname{hom}(X_1,X_2) \cong \operatorname{hom}(h_{X_1}^{(0)},h_{X_2}^{(0)}), $$ where $h_{X_i}^{(0)}$ is in $Funct((Rings),(Sets))$ defined by $h_{X_i}^{(0)}(R)=\operatorname{hom}(\operatorname{Spec}(R), X_i)$.
I have checked that the claim is true if $X_1$ is affine, so it all boils down to proving that, for an affine open covering $(U_i)$ of $X_1$ and for affine open coverings $(U^{ij}_k)$ of $U_i \cap U_j$, the sequence $$ \operatorname{hom}(h_{X_1}^{(0)},h_{X_2}^{(0)}) \overset{(\iota_i)}{\rightarrow} \prod\limits_i\operatorname{hom}(h_{U_i}^{(0)},h_{X_2}^{(0)}) \rightrightarrows \prod\limits_{i,j} \prod\limits_k \operatorname{hom}(h_{U^{ij}_k}^{(0)},h_{X_2}^{(0)}) $$ is exact.
Injectivity of $(\iota_i)$: Suppose $f,g \in \operatorname{hom}(h_{X_1}^{(0)},h_{X_2}^{(0)})$ such that $f \circ \iota_i = g \circ \iota_i$ for all $i$, i.e. $f_R \circ (\iota_{i})_R = g_R \circ (\iota_{i})_R$ for all commutative rings $R$, for all $i$. But how can I conclude from this that $f_R=g_R$?
Help is appreciated.
As you already checked, the theorem holds when $X_1$ is affine. Let me just note that this case is an immediate consequence of the Yoneda lemma:
We apply this to the category $\mathscr C = \underline{\operatorname{Ring}}^{\operatorname{op}} = \underline{\operatorname{Aff}}$, with $X = X_1$, and $F = h_{X_2}^{(0)}$.
It seems that you want to use the commutative diagram $$\begin{array}{ccccc}\operatorname{Hom}(X_1,X_2) & \to & \prod\limits_i \operatorname{Hom}(U_i, X_2) & \rightrightarrows & \prod\limits_{i,j,k} \operatorname{Hom}(U_{ij}^k,X_2) \\ \downarrow & & \downarrow & & \downarrow \\ \operatorname{Hom}(h_{X_1}^{(0)},h_{X_2}^{(0)}) & \to & \prod\limits_i \operatorname{Hom}(h_{U_i}^{(0)}, h_{X_2}^{(0)}) & \rightrightarrows &\ \prod\limits_{i,j,k} \operatorname{Hom}(h_{U_{ij}^k}^{(0)},h_{X_2}^{(0)}).\end{array}$$ We know that the top row is exact, and that the middle and right vertical arrows are isomorphisms.
You could then try to prove injectivity of the first arrow on the bottom row, but actually it's easier to use a different approach. Indeed, Mumford suggests constructing an inverse to the left vertical map (so you don't really need the diagram).
Definition. Given $F \colon h_{X_1}^{(0)} \to h_{X_2}^{(0)}$, define $f_i \colon U_i \to X_2$ by $f_i = F_{U_i}(\iota_i)$.
Remark. Naturality of $F$ gives the commutative diagram $$\begin{array}{ccc}\operatorname{Hom}(U_i,X_1) & \stackrel{F_{U_i}}\to & \operatorname{Hom}(U_i, X_2) \\ \downarrow & & \downarrow \\ \operatorname{Hom}(U_{ij}^k,X_1) & \stackrel{F_{U_{ij}^k}}\to &\ \operatorname{Hom}(U_{ij}^k, X_2).\end{array}$$ This shows that $f_i|_{U_{ij}^k} = F_{U_{ij}^k}(\iota_{ij}^k)$. Since the same holds for $f_j|_{U_{ij}^k}$ by a similar diagram, we conclude that the $f_i$ glue to a well-defined morphism $f \colon X_1 \to X_2$.
Remark. In fancy language, we have checked that the horizontal compositions on the bottom row of the big diagram above are equal, and thus by the universal property of the kernel of the top row, there is a unique retraction of the left vertical arrow keeping the left square commutative.
Again using the universal property of kernels, it follows that the map $$\operatorname{Hom}(X_1,X_2) \to \operatorname{Hom}(h_{X_1}^{(0)},h_{X_2}^{(0)}) \to \operatorname{Hom}(X_1,X_2)$$ is the identity. It suffices to prove: that the other composition is the identity.
Lemma. The composition $\operatorname{Hom}(h_{X_1}^{(0)},h_{X_2}^{(0)}) \to \operatorname{Hom}(X_1,X_2) \to \operatorname{Hom}(h_{X_1}^{(0)},h_{X_2}^{(0)})$ is the identity.
Proof. Let $F \colon h_{X_1}^{(0)} \to h_{X_2}^{(0)}$ as above, and let $f \colon X_1 \to X_2$ be the corresponding morphism. For any ring $R$, we need to prove that $F_R$ is the map \begin{align*} \operatorname{Hom}(\operatorname{Spec} R, X_1) &\to \operatorname{Hom}(\operatorname{Spec} R, X_2)\\ \phi &\mapsto f \circ \phi. \end{align*} First consider the case that $\phi$ lands inside a single $U_i$. Writing $\psi \colon \operatorname{Spec} R \to U_i$ for the induced map, we get $\phi = \iota_i \circ \psi$. By naturality of $F$, the diagram $$\begin{array}{ccc}\operatorname{Hom}(U_i,X_1) & \stackrel{F_{U_i}}\to & \operatorname{Hom}(U_i, X_2) \\ \downarrow & & \downarrow \\ \operatorname{Hom}(\operatorname{Spec} R,X_1) & \stackrel{F_R}\to & \operatorname{Hom}(\operatorname{Spec} R, X_2)\end{array}$$ commutes. Thus, we see that $$F_R(\phi) = F_R (\iota_i \circ \psi) = F_{U_i}(\iota_i) \circ \psi.$$ The right hand side equals $f_i \circ \psi = f \circ \phi$ by construction of $f$, which settles the first case.
Now let $\phi \colon \operatorname{Spec} R \to X_1$ be arbitrary. Cover $V_i = \phi^{-1}(U_i)$ by affines $W_i^\ell$. To show that $F_R(\phi) = f \circ \phi$, it suffices to prove this on each $W_i^\ell$. Setting $\phi_i^\ell = \phi|_{W_i^\ell}$, we see that $$F_R(\phi)\big|_{W_i^\ell} = F_{W_i^\ell}(\phi_i^\ell) = f \circ \phi_i^\ell,$$ using naturality of $F$ and the case (treated above) where $\phi$ lands inside a single $U_i$. $\square$
Remark. If you are familiar with Grothendieck topologies, there is a slightly more highbrow way to think about the above proof. Note that
The above proof more or less (with admittedly more hand waving than I would like) boils down to two things:
For the first one, note that the replacement of presheaves by sheaves is harmless, since the hom-sets are the same. However, it's really not true that $h_U \to h_X$ is an epimorphism (let alone an effective one) of presheaves, so we really need to introduce sheaves to use this argument.