# Why is $\mathrm{Spec}(\mathbb{Z})$ a terminal object in the category of affine schemes?

I've seen this claim repeated in many places (always without source or proof), that $\mathrm{Spec}(\mathbb{Z})$ is a terminal object – however, the most I've been able to prove myself is that for any affine scheme $\mathrm{Spec}(R)$, $\exists$ a morphism $\varphi:\mathrm{Spec}(R)\to\mathrm{Spec}(\mathbb{Z})$.

How? Let $X=\mathrm{Spec}(\mathbb{Z})$, $Y=\mathrm{Spec}(R)$, then $\forall\ \emptyset\neq U\subseteq X$ open, $\mathcal{O}_X(U)=\mathbb{Z}$, so that we may let $\varphi$ be the map induced by the canonical homomorphism $\mathbb{Z}\to R,n\mapsto \overline{n}=1+\cdots+1$, so that $\varphi(\mathfrak{p}):=\mathfrak{p}^c$. It can be checked that $\varphi$ is continuous, and $\forall\ U\subseteq X$ open, we let $\varphi^\#(U):\mathcal{O}_X(U)\to(\varphi_*\mathcal{O}_Y)(U)=\mathcal{O}_Y(\varphi^{-1}(U))$, with $\varphi^\#(U)(n)=\overline{n}\in\mathcal{O}_Y(\varphi^{-1}(U))$, and it can be checked that this commutes with the restriction homomorphism, and defines therefore a morphism of sheaves.

But how do I check that $\varphi$ is unique? My first thought would be a category theoretic proof; clearly, $\mathbb{Z}$ is initial in the category of commutative rings, and it can be shown that $\mathrm{Spec}:\mathbf{CRng}\to\mathbf{AfSc}$ is a contravariant functor; unfortunately this functor is easily seen not to be faithful(*), and is therefore immediately not an equivalence of categories. According to wikipedia, if a functor preserves direct/inverse limits, then it maps initial/terminal objects to initial/terminal objects, respectively. Is there an analogous statement for contravariant functors, and does it apply here? Or is there some other way to prove the result?

*Edit: I now realize that statement was incorrect; though two functions might induce the same map on spaces, the maps induced on the entire scheme are nonetheless distinct. My difficulty is now in proving exercise II.2.4 of Hartshorne, which shows essentially that we can define the desired equivalence of categories.

• Sorry, why isn't Spec faithful?
– Hoot
Jul 14, 2016 at 1:20
• It is true that rings and affine schemes are equivalent categories (given by Spec and taking global sections). This will yield your result. For a complete proof of the equivalence of categories, see Eisenbud and Harris's Geometry of Schemes. I don't have my copy but it's in there somewhere. Jul 14, 2016 at 1:20
• @hwong557 puu.sh/q0UMK/4dce2a2e38.png
– user204299
Jul 14, 2016 at 1:32
• I now realize that that part was a mistake – I was looking at the action of $\mathrm{Spec}$ only on the topological space, not on the entire scheme. Right now, I'm trying to find the precise map on sheaves induced by the ring homomorphism Jul 14, 2016 at 1:36
• After you do that, put it as an Edit so that others won't make the scheme and space mistake. Jul 14, 2016 at 2:10

From the comments, the original issue is solved and now you ask how to figure out the nature of this unique map. You can think of the map $X \to \operatorname{Spec} \mathbb Z$ as a map, which sends a point to the characteristic of its residue field.
The category of affine schemes is nothing but the opposite category of commutative rings. So $\mathrm{Spec}\, \mathbb Z$ is a terminal object in the category of affine schemes because $\mathbb Z$ is an initial object in the category of commutative rings (the only morphism $\mathbb Z \to R$ is the one sending $1$ to $1_R$...).