**Proof.**
Proof of (1). We may replace $X$, $Y$, $S$ by suitable affine open neighbourhoods of $x$, $y$, $s$ and reduce to the following algebra problem: given a ring $R$, two $R$-algebra maps $\varphi , \psi : B \to A$ such that

$R \to B$ is of finite type, or $A$ is a domain, or $A$ is Noetherian, or $A$ is reduced and has finitely many minimal primes,

the two maps $B \to A_\mathfrak p$ are the same for some prime $\mathfrak p \subset A$,

show that $\varphi , \psi $ define the same map $B \to A_ g$ for a suitable $g \in A$, $g \not\in \mathfrak p$. If $R \to B$ is of finite type, let $t_1, \ldots , t_ m \in B$ be generators of $B$ as an $R$-algebra. For each $j$ we can find $g_ j \in A$, $g_ j \not\in \mathfrak p$ such that $\varphi (t_ j)$ and $\psi (t_ j)$ have the same image in $A_{g_ j}$. Then we set $g = \prod g_ j$. In the other cases (if $A$ is a domain, Noetherian, or reduced with finitely many minimal primes), we can find a $g \in A$, $g \not\in \mathfrak p$ such that $A_ g \subset A_\mathfrak p$. See Algebra, Lemma 10.31.9. Thus the maps $B \to A_ g$ are equal as desired.

Proof of (2). To do this we may replace $X$, $Y$, and $S$ by suitable affine opens. Say $X = \mathop{\mathrm{Spec}}(A)$, $Y = \mathop{\mathrm{Spec}}(B)$, and $S = \mathop{\mathrm{Spec}}(R)$. Let $\mathfrak p \subset A$ be the prime ideal corresponding to $x$. Let $\mathfrak q \subset B$ be the prime corresponding to $y$. Then $\varphi $ is a local $R$-algebra map $\varphi : B_\mathfrak q \to A_\mathfrak p$. If $R \to B$ is a ring map of finite presentation, then there exists a $g \in A \setminus \mathfrak p$ and an $R$-algebra map $B \to A_ g$ such that

\[ \xymatrix{ B_\mathfrak q \ar[r]_\varphi & A_\mathfrak p \\ B \ar[u] \ar[r] & A_ g \ar[u] } \]

commutes, see Algebra, Lemmas 10.127.3 and 10.9.9. The induced morphism $\mathop{\mathrm{Spec}}(A_ g) \to \mathop{\mathrm{Spec}}(B)$ works. If $B$ is of finite type over $R$, let $t_1, \ldots , t_ m \in B$ be generators of $B$ as an $R$-algebra. Then we can choose $g_ j \in A$, $g_ j \not\in \mathfrak p$ such that $\varphi (t_ j) \in \mathop{\mathrm{Im}}(A_{g_ j} \to A_\mathfrak p)$. Thus after replacing $A$ by $A[1/\prod g_ j]$ we may assume that $B$ maps into the image of $A \to A_\mathfrak p$. If we can find a $g \in A$, $g \not\in \mathfrak p$ such that $A_ g \to A_\mathfrak p$ is injective, then we'll get the desired $R$-algebra map $B \to A_ g$. Thus the proof is finished by another application of See Algebra, Lemma 10.31.9.
$\square$

## Comments (0)