Lemma 61.5.5 (Universal property of the construction). Let $A$ be a ring. Let $A \to A_ w$ be the ring map constructed in Lemma 61.5.3. For any ring map $A \to B$ such that $\mathop{\mathrm{Spec}}(B)$ is w-local, there is a unique factorization $A \to A_ w \to B$ such that $\mathop{\mathrm{Spec}}(B) \to \mathop{\mathrm{Spec}}(A_ w)$ is w-local.

Proof. Denote $Y = \mathop{\mathrm{Spec}}(B)$ and $Y_0 \subset Y$ the set of closed points. Denote $f : Y \to X$ the given morphism. Recall that $Y_0$ is profinite, in particular every constructible subset of $Y_0$ is open and closed. Let $E \subset A$ be a finite subset. Recall that $A_ w = \mathop{\mathrm{colim}}\nolimits A_ E$ and that the set of closed points of $\mathop{\mathrm{Spec}}(A_ w)$ is the limit of the closed subsets $Z_ E \subset X_ E = \mathop{\mathrm{Spec}}(A_ E)$. Thus it suffices to show there is a unique factorization $A \to A_ E \to B$ such that $Y \to X_ E$ maps $Y_0$ into $Z_ E$. Since $Z_ E \to X = \mathop{\mathrm{Spec}}(A)$ is bijective, and since the strata $Z(E', E'')$ are constructible we see that

$Y_0 = \coprod f^{-1}(Z(E', E'')) \cap Y_0$

is a disjoint union decomposition into open and closed subsets. As $Y_0 = \pi _0(Y)$ we obtain a corresponding decomposition of $Y$ into open and closed pieces. Thus it suffices to construct the factorization in case $f(Y_0) \subset Z(E', E'')$ for some decomposition $E = E' \amalg E''$. In this case $f(Y)$ is contained in the set of points of $X$ specializing to $Z(E', E'')$ which is homeomorphic to $X_{E', E''}$. Thus we obtain a unique continuous map $Y \to X_{E', E''}$ over $X$. By Lemma 61.3.7 this corresponds to a unique morphism of schemes $Y \to X_{E', E''}$ over $X$. This finishes the proof. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).