# Morphisms of locally ringed spaces into affine schemes

In Görtz and Wedhorn's Algebraic Geometry I, there's the following proposition:

Proposition 3.4. Let $(X,\mathcal O_X)$ be a locally ringed space. If $Y$ is an affine scheme then the natural map below is an isomorphism $$\mathsf{Hom}(X,Y)\overset{\cong}{\longrightarrow} \mathsf{Hom}(R,\Gamma(X,\mathcal O_X))$$

A proof is given only for the case where $X$ is a scheme, and proceeds by reducing to the anti-equivalence of affine schemes with commutative rings and then gluing the morphisms.

For the general case, the authors cite Prop 1.6.3 of the 1971 edition of EGA I, to which I don't have access. Can anyone reproduce/explain the proof?

• The 1971 edition is in Springer Grundlehren series, which is widely available. – abx Jan 11 '16 at 13:30
• @abx widely available as it may be, I don't have access to it and I haven't been able to find it online. Also, will the downvoter explain the downvote? – Arrow Jan 11 '16 at 13:34
• Injectivity of the map follows from the characterization of the diagonal in $Y\times Y$ as the zero scheme of the kernel of the multiplication morphism $R\otimes R \to R$. For surjectivity, first you construct the set map $f:X\to Y$ by sending $p\in X$ to the kernel of $R\to \Gamma(X,\mathcal{O}_X) \to \kappa(p)$, then you check that $f^{-1}(D(r))$ is open for each $r\in R$, and finally you define $f^\#:\mathcal{O}_Y \to f_*\mathcal{O}_X$ to be the unique morphism of sheaves of algebras compatible with $\widetilde{R} \to \widetilde{\Gamma(X,\mathcal{O}_X)}$ on $Y$. – Jason Starr Jan 11 '16 at 13:35
• See also the elusive EGA I.1.8 which is found in... EGA II at the end as an addendum, which is freely available online. :) – Dylan Wilson Sep 23 '16 at 13:46
• – Jérôme Poineau Sep 23 '16 at 14:15

Here is a sketch: Let $\alpha : R \to \Gamma(X,\mathcal{O}_X)$ be a ring homomorphism. We want to define a morphism $f:X \to \mathrm{Spec}(R)$ which is $\alpha$ on global sections. Let $x \in X$, and consider the composition of $\alpha$ with $\Gamma(X,\mathcal{O}_X) \to \mathcal{O}_{X,x}$, $s \mapsto s_x$. Pull back the unique maximal ideal $\mathfrak{m}_x$ of $\mathcal{O}_{X,x}$ to $R$, this is a prime ideal of $R$. Denote this by $f(x)$. This defines a map of sets $f : X \to \mathrm{Spec}(R)$. To show continuity, let $r \in R$ and observe that the preimage of $D(r) \subseteq \mathrm{Spec}(R)$ in $X$ is the set of points $x \in X$ such that $\alpha(r)_x$ is invertible in $\mathcal{O}_{X,x}$. This set $D(\alpha(r))$ is easily seen to be open. Also notice that by the universal property of localization, $\alpha$ induces a homomorphism $R[r^{-1}] \to \Gamma(D(\alpha(r)),\mathcal{O}_X)$, i.e. $\Gamma(D(r),\mathcal{O}_{\mathrm{Spec}(R)}) \to \Gamma(f^{-1}(D(r)),\mathcal{O}_X)$. These maps are compatible and therefore glue to a morphism of sheaves $f^{\#}:\mathcal{O}_{\mathrm{Spec}(R)} \to f_* \mathcal{O}_X$.