Understanding "only if" statement of Valuative Criteria for Separatedness This is a follow up question to my earlier question here. I am reading the same document, namely the one by Brian Osserman available here. Now in the document he has stated the Valuative Criteria for Separatedness: 

Now I am trying to understand the only if part of the statement, namely that if $f$ is separatedness then there is at most one way of filling in the dashed arrow. So assume that there were two arrows $g_1,g_2 : \operatorname{Spec} A \to X$ making the diagram above commute. This gives rise to a map $g : \operatorname{Spec} A \to X \times_Y X$. If $\iota$ denotes the canonical map $\iota: \operatorname{Spec} K \to \operatorname{Spec} A$, we thus get a map $g \circ \iota$ whch must factor through the diagonal morphism $\Delta_f$. 


My questions are: 
    
    
*
    
*I know that $\Delta_f$ is a closed immersion by assumption but why does this mean that $g(\operatorname{Spec} A) \subseteq \Delta_f(X)$?
    
*Also, I know that $\operatorname{Spec} A$ is reduced, but why does this mean $g$ factors through $X$?
    
*How can I conclude from here that $g_1 = g_2$?


 A: Prelude. Recall the notion of equalizers and that they can be constructed using fiber products. For $S$-morphisms $f_1,f_2 : X \to Y$ we have $\mathrm{eq}(f_1,f_2) = X \times_{Y \times_S Y} Y \to X$. This is the base change of the diagonal $Y \to Y \times_S Y$ along $(f_1,f_2) : X \to Y \times_S Y$. Hence, if $Y \to S$ is separated, it is a closed subscheme of $X$ (in general, it is just a locally closed subscheme). In fact, this offers a useful and geometric characterization of separated schemes: $Y$ is separated if and only if for any two morphisms to $Y$ the locus where they agree is closed. By the way, the same property characterizes Hausdorff spaces within the category of topological spaces.
Now the necessity in the valuative criterion is obvious: Given two morphisms $\mathrm{Spec}(A) \rightrightarrows X$ over $Y$ which extend the given morphism on $\mathrm{Spec}(K)$, consider their equalizer. Since $X$ is separated over $Y$, it is a closed subscheme of $\mathrm{Spec}(A)$. But it also contains the generic point. Then it has to be $\mathrm{Spec}(A)$ (since the closed set $V(I)$ contains the zero ideal iff $I=0$).
