# Unique morphism of Schemes into the spectrum of integers

I wish to prove the following: For every scheme $$X$$ there exists a unique morphism of schemes $$X\rightarrow Spec(\mathbb{Z})$$.

Here is what I have so far: if $$X$$ is affine, say $$X\simeq Spec(A)$$ for a ring $$A$$, I know that morphisms of schemes $$Spec(A)\rightarrow Spec(B)$$ are in one to one correspondence with ring homomorphisms $$B\rightarrow A$$. Any homomorphism $$\phi:\mathbb{Z}\rightarrow A$$ must satisfy $$\phi(1) = 1$$ and is thus unique.

If $$X$$ is a scheme, we have an open cover $$(X_i)_{i\in I}$$ such that $$(X_i,\mathcal{O}_{X}\mid X_i ) \simeq (Spec(A_i),\mathcal{O}_{Spec(A_i)})$$ and hence, there are unique morphisms $$f_i:(X_i,\mathcal{O}_{X}\mid X_i )\rightarrow (Spec(\mathbb{Z}),\mathcal{O}_{Spec(\mathbb{Z})})$$.

Now I would like to construct a global morphism $$f$$ by glueing together the local parts $$f_i$$ but I am not sure how (or even if) this works.

• Yes this works because the morphisms are unique. More precisely, on $X_i\cap X_j$, one can find an open cover by affines $(U_k)$. Now the restriction of $f_i$ and $f_j$ to $U_k$ must agree by unicity. It follows that $f_i=f_j$ on $X_i\cap X_j$ since they agree an open cover. This implies that the $f_i$ can be glued together to give a morphism $X\to\operatorname{Spec}\mathbb{Z}$. The unicity is easy. – Roland Jul 29 '19 at 19:44
• Thanks, I get the idea. What worries me a little is that I can see that $f_i\mid_{U_k}=f_j\mid_{U_k}$ implies $f_i = f_j$ as continous maps, but what about the morphisms of sheaves $f_i^{\sharp}:\mathcal{O}_{Spec(\mathbb{Z})}\rightarrow (f_i)_*\mathcal{O}_X\mid_{X_i}$? My guess here is that it follows from the fact that the Hom - sheaf $\underline{Hom}(\mathcal{F},\mathcal{G})$ is a sheaf if $\mathcal{G}$ is one. Or am I thinking too complicated here? – Teddyboer Jul 29 '19 at 20:58
• Two morphisms of sheaves which agree on an open cover are equal, this is straightforward. Of course it follows from the fact that the Hom sheaf is a sheaf, but I don't usually mention this proposition when glueing or checking equality locally morphisms of schemes. – Roland Jul 30 '19 at 12:12

Let $$X$$ be a scheme an let $$R$$ be a ring. Let me maybe suggest you to try to prove the following:
There is a natural bijection $$\text{Hom}_{\text{Sch}}(X, \text{Spec}(R)) \cong \text{Hom}_{\text{Ring}}(R, \Gamma(X,\mathcal{O}_X)).$$
This is not only a very useful statement, but also implies what you want to prove as you can use that $$\mathbb{Z}$$ is a initial object in the category of rings like you were doing for the affine case.