Question on Hartshorne Theorem II.4.9 In the proof of the theorem, Hartshorne claims that $X=\mathbb{P}_\mathbb{Z}^n=\operatorname{Proj}\mathbb{Z}[x_0,\cdots,x_n]$ is proper over $\operatorname{Spec} \mathbb{Z}$, and he uses the valuative criterion to prove his claim:

For a given valuation ring $R$, let $K=\operatorname{Frac}(R)$.
Given morphisms $U=\operatorname{Spec} K\to X$, $T=\operatorname{Spec} R\to \operatorname{Spec}\mathbb{Z}$ as shown:

Then there exists a unique morphism $T\to X$ making the whole diagram commutative.

I understand how he gives the morphism, but I cannot figure out why it is unique.  In the proof, he says "The uniqueness of this morphism follows from the construction and the way the $V_i=D_+(x_i)$ patch together."
The followings are my attempt:
To give a morphism $T\to X$ is equivalent to give a point $y_0\in X$ corresponding to the image of maximal ideal of $R$ and a local homomorphism between $\mathcal{O}_{X,y_o}\to R$.  And the whole commuting diagram requires us to have a commutative diagram:

where vertical homomorphisms are natural and horizon local homomorphisms are given by $T\to X$ and $U\to X$.
But I don't know whether this requirement can imply the local homomorphism $\mathcal{O}_{X,y_o}\to R$ is unique.
Thanks for your answer!
 A: Assume that two such morphisms $f,g: T \rightarrow X$ exist. Let $x_1,x_2$ be their images of the closed point $s \in T$ ($f$ and $g$ map the generic point $\eta \in T$ to the same point of $X$, by definition). Let $V,W \subset X$ be standard affine open subsets of $X$ containing $x_1$ and $x_2$ respectively, then $V \cap W$ contains $f(\eta)=g(\eta)$.
Thus $f$ factors as a morphism $T \rightarrow V$, $g$ as a morphism $T \rightarrow W$.
Then $f$ induces compatible morphisms $f^{\sharp} O(V) \rightarrow R$, $h: O(V \cap W) \rightarrow K$, and $g$ induces comptible morphisms $g^{\sharp} O(W) \rightarrow R$, $h: O(V \cap W) \rightarrow K$.
The compatibilities imply that the two morphisms $O(V) \otimes O(W) \rightarrow O(V \cap W) \overset{h}{\rightarrow} K$ and $O(V) \otimes O(W) \overset{f^{\sharp}\otimes g^{\sharp}}{\rightarrow} R \rightarrow K$ are equal. But it’s straightforward to see that $O(V) \otimes O(W) \rightarrow O(V \cap W)$ is onto, which implies that the image of $h$ is contained in $R$.
Therefore, as $V \cap W$ is affine, $f,g$ factor as the morphisms of affines schemes $T \rightarrow V \cap W$. But if $f_1, g_1$ are their structure maps $O(V \cap W) \rightarrow R$, theirs compositions with $R \subset K$ are both exactly $h$, hence $f_1=g_1$ and $f=g$.

This uniqueness property is far more common than the existence+uniqueness property. It is a necessary and sufficient condition for another property of schemes, separatedness.
A scheme $X$ is separated if the diagonal $X \rightarrow X \times_{\mathbb{Z}} X$ is a closed immersion (one can see it’s always an immersion; there’s also a relative notion of separatedness which isn’t entirely relevant here).
Equivalently, it is enough for $X$ to have an open cover by affine open subsets $U_i$ such that every $U_i \cap U_j \rightarrow U_i \times_{\mathbb{Z}} U_j$ is a closed immersion – ie $U_i \cap U_j$ is affine and $O(U_i) \otimes O(U_j) \rightarrow O(U_i \cap U_j)$ is onto… looks familiar?
More generally, we can consider the following setting: take a dense open subscheme $U$ of a scheme $T$ (eg the generic point in a DVR), and two morphisms $X \rightarrow Y$ that agree on $U$ – must they be equal on all of $X$? If $Y$ is separated and $X$ is reduced, the answer is yes (by a generalization of the above argument).
