hcju/stacksqa huggingface dataset:
We have already seen that $H^0 \circ \text{Can}$ is isomorphic to the identity functor, see Lemma \ref{lemma-H0-inverse}. Consider an object $\mathbf{M} = (M', M_i, \alpha_i, \alpha_{ij})$ of $\text{Glue}(R \to S, f_1, \ldots, f_t)$. We get a natural morphism $$ \Psi : (H^0(\mathbf{M}) \otimes_R S, H^0(\mathbf{M})_{f_i}, \text{can}_i, \text{can}_{ij}) \longrightarrow (M', M_i, \alpha_i, \alpha_{ij}). $$ Namely, by definition $H^0(\mathbf{M})$ comes equipped with compatible $R$-module maps $H^0(\mathbf{M}) \to M'$ and $H^0(\mathbf{M}) \to M_i$. We have to show that this map is an isomorphism. \medskip\noindent Pick an index $i$ and set $R' = R_{f_i}$. Combining Lemmas \ref{lemma-base-change-glue} and \ref{lemma-equivalence-I-unit} we see that $\Psi \otimes_R R'$ is an isomorphism. Hence the kernel, resp.\ cokernel of $\Psi$ is a system of the form $(K, 0, 0, 0)$, resp.\ $(Q, 0, 0, 0)$. Note that $H^0((K, 0, 0, 0)) = K$, that $H^0$ is left exact, and that by construction $H^0(\Psi)$ is bijective. Hence we see $K = 0$, i.e., the kernel of $\Psi$ is zero. \medskip\noindent The conclusion of the above is that we obtain a short exact sequence $$ 0 \to H^0(\mathbf{M}) \otimes_R S \to M' \to Q \to 0 $$ and that $M_i = H^0(\mathbf{M})_{f_i}$. Note that we may think of $Q$ as an $R$-module which is $I$-power torsion so that $Q = Q \otimes_R S$. By Lemma \ref{lemma-neighbourhood-extensions} we see that there exists a commutative diagram $$ \xymatrix{ 0 \ar[r] & H^0(\mathbf{M}) \ar[r] \ar[d] & E \ar[r] \ar[d] & Q \ar[r] \ar[d] & 0 \\ 0 \ar[r] & H^0(\mathbf{M}) \otimes_R S \ar[r] & M' \ar[r] & Q \ar[r] & 0 } $$ with exact rows. This clearly determines an isomorphism $\text{Can}(E) \to (M', M_i, \alpha_i, \alpha_{ij})$ in the category $\text{Glue}(R \to S, f_1, \ldots, f_t)$ and we win. (Of course, a posteriori we have $Q = 0$.)
The ring map $R \to R^\wedge$ is flat by Algebra, Lemma \ref{algebra-lemma-completion-flat}. It is clear that $R/fR = R^\wedge/fR^\wedge$. By Algebra, Lemma \ref{algebra-lemma-completion-tensor} the completion of a finite $R$-module $M$ is equal to $M \otimes_R R^\wedge$. Hence the displayed functor of the proposition is equal to the functor occurring in Theorem \ref{theorem-formal-glueing}. In particular it is fully faithful. Let $(M_1, M_2, \psi)$ be an object of the right hand side. By Theorem \ref{theorem-formal-glueing} there exists an $R$-module $M$ such that $M_1 = M \otimes_R R^\wedge$ and $M_2 = M_f$. As $R \to R^\wedge \times R_f$ is faithfully flat we conclude from Algebra, Lemma \ref{algebra-lemma-cover} that $M$ is finitely generated, i.e., $M \in \text{Mod}^{fg}_R$. This proves the proposition.
Say $(f_1, \ldots, f_r) = I$ and let $K_n^\bullet$ be the Koszul complex with respect to $f_1^n, \ldots, f_r^n$. By Lemma \ref{lemma-derived-completion-koszul} it suffices to prove that $$ R\lim (K \otimes_A^\mathbf{L} K_n^\bullet) = R\lim (K \otimes_A^\mathbf{L} A/(f_1^n, \ldots, f_r^n) ) = R\lim (K \otimes_A^\mathbf{L} A/I^n ). $$ By Lemma \ref{lemma-sequence-Koszul-complexes} the pro-objects $\{K_n^\bullet\}$ and $\{A/(f_1^n, \ldots, f_r^n)\}$ of $D(A)$ are isomorphic. It is clear that the pro-objects $\{A/(f_1^n, \ldots, f_r^n)\}$ and $\{A/I^n\}$ are isomorphic. Thus the map from left to right is an isomorphism by Lemma \ref{lemma-tensor-Rlim-pro-equal}.
The equivalence of (1) and (2) is proved in Morphisms, Lemma \ref{morphisms-lemma-unramified-at-point}. \medskip\noindent If $f$ is unramified at $x$, then $f$ is unramified in an open neighbourhood of $x$; this does not follow immediately from Definition \ref{definition-unramified-schemes} of this chapter but it does follow from Morphisms, Definition \ref{morphisms-definition-unramified} which we proved to be equivalent in Lemma \ref{lemma-unramified-definition}. Choose affine opens $V \subset Y$, $U \subset X$ with $f(U) \subset V$ and $x \in U$, such that $f$ is unramified on $U$, i.e., $f|_U : U \to V$ is unramified. By Morphisms, Lemma \ref{morphisms-lemma-diagonal-unramified-morphism} the morphism $U \to U \times_V U$ is an open immersion. This proves that (1) implies (4). \medskip\noindent If $\Delta_{X/Y}$ is a local isomorphism at $x$, then $\Omega_{X/Y, x} = 0$ by Morphisms, Lemma \ref{morphisms-lemma-differentials-diagonal}. Hence we see that (4) implies (2). At this point we know that (1), (2) and (4) are all equivalent. \medskip\noindent Assume (3). The assumption on the diagram combined with Morphisms, Lemma \ref{morphisms-lemma-differentials-relative-immersion} show that $\Omega_{U/V, x} = 0$. Since $\Omega_{U/V, x} = \Omega_{X/Y, x}$ we conclude (2) holds. \medskip\noindent Finally, assume that (2) holds. To prove (3) we may localize on $X$ and $Y$ and assume that $X$ and $Y$ are affine. Say $X = \Spec(B)$ and $Y = \Spec(A)$. The point $x \in X$ corresponds to a prime $\mathfrak q \subset B$. Our assumption is that $\Omega_{B/A, \mathfrak q} = 0$ (see Morphisms, Lemma \ref{morphisms-lemma-differentials-affine} for the relationship between differentials on schemes and modules of differentials in commutative algebra). Since $Y$ is locally Noetherian and $f$ locally of finite type we see that $A$ is Noetherian and $B \cong A[x_1, \ldots, x_n]/(f_1, \ldots, f_m)$, see Properties, Lemma \ref{properties-lemma-locally-Noetherian} and Morphisms, Lemma \ref{morphisms-lemma-locally-finite-type-characterize}. In particular, $\Omega_{B/A}$ is a finite $B$-module. Hence we can find a single $g \in B$, $g \not \in \mathfrak q$ such that the principal localization $(\Omega_{B/A})_g$ is zero. Hence after replacing $B$ by $B_g$ we see that $\Omega_{B/A} = 0$ (formation of modules of differentials commutes with localization, see Algebra, Lemma \ref{algebra-lemma-differentials-localize}). This means that $\text{d}(f_j)$ generate the kernel of the canonical map $\Omega_{A[x_1, \ldots, x_n]/A} \otimes_A B \to \Omega_{B/A}$. Thus the surjection $A[x_1, \ldots, x_n] \to B$ of $A$-algebras gives the commutative diagram of (3), and the theorem is proved.
See More on Morphisms, Lemma \ref{more-morphisms-lemma-unramified-formally-unramified} for a more general statement and proof. What follows is a sketch of the proof in the current case. \medskip\noindent Firstly, one checks both properties are local on the source and the target. This we may assume that $S$ and $X$ are affine. Say $X = \Spec(B)$ and $S = \Spec(R)$. Say $T = \Spec(C)$. Let $J$ be the square-zero ideal of $C$ with $T_0 = \Spec(C/J)$. Assume that we are given the diagram $$ \xymatrix{ & B \ar[d]^\phi \ar[rd]^{\bar{\phi}} & \\ R \ar[r] \ar[ur] & C \ar[r] & C/J } $$ Secondly, one checks that the association $\phi' \mapsto \phi' - \phi$ gives a bijection between the set of liftings of $\bar{\phi}$ and the module $\text{Der}_R(B, J)$. Thus, we obtain the implication (1) $\Rightarrow$ (2) via the description of unramified morphisms having trivial module of differentials, see Theorem \ref{theorem-unramified-equivalence}. \medskip\noindent To obtain the reverse implication, consider the surjection $q : C = (B \otimes_R B)/I^2 \to B = C/J$ defined by the square zero ideal $J = I/I^2$ where $I$ is the kernel of the multiplication map $B \otimes_R B \to B$. We already have a lifting $B \to C$ defined by, say, $b \mapsto b \otimes 1$. Thus, by the same reasoning as above, we obtain a bijective correspondence between liftings of $\text{id} : B \to C/J$ and $\text{Der}_R(B, J)$. The hypothesis therefore implies that the latter module is trivial. But we know that $J \cong \Omega_{B/R}$. Thus, $B/R$ is unramified.
Write $B = B'_{\mathfrak q}$ for some finite type $A$-algebra $B'$ (we can do this because $B$ is essentially of finite type over $A$). By Lemma \ref{lemma-characterize-etale-Noetherian} we see that $A \to B'$ is \'etale at $\mathfrak q$. Hence we may apply Algebra, Proposition \ref{algebra-proposition-etale-locally-standard} to see that a principal localization of $B'$ is standard \'etale.
Write $B = B'_{\mathfrak q}$ for some finite type $A$-algebra $B'$ (we can do this because $B$ is essentially of finite type over $A$). By Lemma \ref{lemma-characterize-unramified-Noetherian} we see that $A \to B'$ is unramified at $\mathfrak q$. Hence we may apply Algebra, Proposition \ref{algebra-proposition-unramified-locally-standard} to see that a principal localization of $B'$ is a quotient of a standard \'etale $A$-algebra.
An open immersion is universally injective since any base change of an open immersion is an open immersion. Moreover, it is \'etale by Morphisms, Lemma \ref{morphisms-lemma-open-immersion-etale}. Hence (1) implies (2). \medskip\noindent Assume $f$ is universally injective and \'etale. Since $f$ is \'etale it is flat and locally of finite presentation, see Morphisms, Lemmas \ref{morphisms-lemma-etale-flat} and \ref{morphisms-lemma-etale-locally-finite-presentation}. By Lemma \ref{lemma-universally-injective-unramified} we see that $f$ is a monomorphism. Hence (2) implies (3). \medskip\noindent Assume $f$ is flat, locally of finite presentation, and a monomorphism. Then $f$ is open, see Morphisms, Lemma \ref{morphisms-lemma-fppf-open}. Thus we may replace $Y$ by $f(X)$ and we may assume $f$ is surjective. Then $f$ is open and bijective hence a homeomorphism. Hence $f$ is quasi-compact. Hence Descent, Lemma \ref{descent-lemma-flat-surjective-quasi-compact-monomorphism-isomorphism} shows that $f$ is an isomorphism and we win.
After base changing via $Y \to S$, we may assume that $Y = S$. In this case the theorem states that any $S$-morphism $\sigma_0 : S_0 \to X$ actually factors uniquely through a section $S \to X$ of the \'etale structure morphism $f : X \to S$. \medskip\noindent Uniqueness. Suppose we have two sections $\sigma, \sigma'$ through which $\sigma_0$ factors. Because $X \to S$ is \'etale we see that $\Delta : X \to X \times_S X$ is an open immersion (Morphisms, Lemma \ref{morphisms-lemma-diagonal-unramified-morphism}). The morphism $(\sigma, \sigma') : S \to X \times_S X$ factors through this open because for any $s \in S$ we have $(\sigma, \sigma')(s) = (\sigma_0(s), \sigma_0(s))$. Thus $\sigma = \sigma'$. \medskip\noindent To prove existence we first reduce to the affine case (we suggest the reader skip this step). Let $X = \bigcup X_i$ be an affine open covering such that each $X_i$ maps into an affine open $S_i$ of $S$. For every $s \in S$ we can choose an $i$ such that $\sigma_0(s) \in X_i$. Choose an affine open neighbourhood $U \subset S_i$ of $s$ such that $\sigma_0(U_0) \subset X_{i, 0}$. Note that $X' = X_i \times_S U = X_i \times_{S_i} U$ is affine. If we can lift $\sigma_0|_{U_0} : U_0 \to X'_0$ to $U \to X'$, then by uniqueness these local lifts will glue to a global morphism $S \to X$. Thus we may assume $S$ and $X$ are affine. \medskip\noindent Existence when $S$ and $X$ are affine. Write $S = \Spec(A)$ and $X = \Spec(B)$. Then $A \to B$ is \'etale and in particular smooth (of relative dimension $0$). As $|S_0| = |S|$ we see that $S_0 = \Spec(A/I)$ with $I \subset A$ locally nilpotent. Thus existence follows from Algebra, Lemma \ref{algebra-lemma-smooth-strong-lift}.
By Theorem \ref{theorem-etale-topological} we see that this functor is fully faithful. It remains to show that the functor is essentially surjective. Let $Y \to S_0$ be an \'etale morphism of schemes. \medskip\noindent Suppose that the result holds if $S$ and $Y$ are affine. In that case, we choose an affine open covering $Y = \bigcup V_j$ such that each $V_j$ maps into an affine open of $S$. By assumption (affine case) we can find \'etale morphisms $W_j \to S$ such that $W_{j, 0} \cong V_j$ (as schemes over $S_0$). Let $W_{j, j'} \subset W_j$ be the open subscheme whose underlying topological space corresponds to $V_j \cap V_{j'}$. Because we have isomorphisms $$ W_{j, j', 0} \cong V_j \cap V_{j'} \cong W_{j', j, 0} $$ as schemes over $S_0$ we see by fully faithfulness that we obtain isomorphisms $\theta_{j, j'} : W_{j, j'} \to W_{j', j}$ of schemes over $S$. We omit the verification that these isomorphisms satisfy the cocycle condition of Schemes, Section \ref{schemes-section-glueing-schemes}. Applying Schemes, Lemma \ref{schemes-lemma-glue-schemes} we obtain a scheme $X \to S$ by glueing the schemes $W_j$ along the identifications $\theta_{j, j'}$. It is clear that $X \to S$ is \'etale and $X_0 \cong Y$ by construction. \medskip\noindent Thus it suffices to show the lemma in case $S$ and $Y$ are affine. Say $S = \Spec(R)$ and $S_0 = \Spec(R/I)$ with $I$ locally nilpotent. By Algebra, Lemma \ref{algebra-lemma-etale-standard-smooth} we know that $Y$ is the spectrum of a ring $\overline{A}$ with $$ \overline{A} = (R/I)[x_1, \ldots, x_n]/(\overline{f}_1, \ldots, \overline{f}_n) $$ such that $$ \overline{g} = \det \left( \begin{matrix} \partial \overline{f}_1/\partial x_1 & \partial \overline{f}_2/\partial x_1 & \ldots & \partial \overline{f}_n/\partial x_1 \\ \partial \overline{f}_1/\partial x_2 & \partial \overline{f}_2/\partial x_2 & \ldots & \partial \overline{f}_n/\partial x_2 \\ \ldots & \ldots & \ldots & \ldots \\ \partial \overline{f}_1/\partial x_n & \partial \overline{f}_2/\partial x_n & \ldots & \partial \overline{f}_n/\partial x_n \end{matrix} \right) $$ maps to an invertible element in $\overline{A}$. Choose any lifts $f_i \in R[x_1, \ldots, x_n]$. Set $$ A = R[x_1, \ldots, x_n]/(f_1, \ldots, f_n) $$ Since $I$ is locally nilpotent the ideal $IA$ is locally nilpotent (Algebra, Lemma \ref{algebra-lemma-locally-nilpotent}). Observe that $\overline{A} = A/IA$. It follows that the determinant of the matrix of partials of the $f_i$ is invertible in the algebra $A$ by Algebra, Lemma \ref{algebra-lemma-locally-nilpotent-unit}. Hence $R \to A$ is \'etale and the proof is complete.
Part (1) is a special case of Algebra, Lemma \ref{algebra-lemma-finite-after-completion}. For part (2), note that the $\kappa(\mathfrak m_A)$-vector space $B^\wedge/\mathfrak m_{A^\wedge}B^\wedge$ is generated by $1$. Hence by Nakayama's lemma (Algebra, Lemma \ref{algebra-lemma-NAK}) the map $A^\wedge \to B^\wedge$ is surjective. Part (3) is a special case of part (2). Part (4) is immediate from the definitions.
The equivalence of (1) and (2) follows from the fact that $\mathfrak m_AA^\wedge$ is the maximal ideal of $A^\wedge$ (and similarly for $B$) and faithful flatness of $B \to B^\wedge$. For example if $A^\wedge \to B^\wedge$ is unramified, then $\mathfrak m_AB^\wedge = (\mathfrak m_AB)B^\wedge = \mathfrak m_BB^\wedge$ and hence $\mathfrak m_AB = \mathfrak m_B$. \medskip\noindent Assume the equivalent conditions (1) and (2). By Lemma \ref{lemma-unramified-completions} we see that $A^\wedge \to B^\wedge$ is finite. Hence $A^\wedge \to B^\wedge$ is of finite presentation, and by Algebra, Lemma \ref{algebra-lemma-characterize-unramified} we conclude that $A^\wedge \to B^\wedge$ is unramified at $\mathfrak m_{B^\wedge}$. Since $B^\wedge$ is local we conclude that $A^\wedge \to B^\wedge$ is unramified. \medskip\noindent Assume (3). By Algebra, Lemma \ref{algebra-lemma-unramified-at-prime} we conclude that $A^\wedge \to B^\wedge$ is an unramified homomorphism of local rings, i.e., (2) holds.
Assume first $X \to S$ is separated (which is often the case in practice). Since $Y$ is Noetherian it has finitely many connected components. Thus we may assume $Y$ is connected. Choose a point $y \in Y$ with image $s \in S$. Since $X \to S$ is unramified and quasi-compact then fibre $X_s$ is finite, say $X_s = \{x_1, \ldots, x_n\}$ and $\kappa(s) \subset \kappa(x_i)$ is a finite field extension. See Morphisms, Lemma \ref{morphisms-lemma-unramified-quasi-finite}, \ref{morphisms-lemma-residue-field-quasi-finite}, and \ref{morphisms-lemma-quasi-finite}. For each $i$ there are at most finitely many $\kappa(s)$-algebra maps $\kappa(x_i) \to \kappa(y)$ (by elementary field theory). Thus $\Mor_S(Y, X)$ is finite by Proposition \ref{proposition-equality}. \medskip\noindent General case. There exists a nonempty open $U \subset X$ such that $X_U \to U$ is finite (in particular separated), see Morphisms, Lemma \ref{morphisms-lemma-generically-finite} (the lemma applies since we've already seen above that a quasi-compact unramified morphism is quasi-finite and since $X \to S$ is quasi-separated by Morphisms, Lemma \ref{morphisms-lemma-finite-type-Noetherian-quasi-separated}). Let $Z \subset S$ be the reduced closed subscheme supported on the complement of $U$. By Noetherian induction, we see that $\Mor_Z(Y_Z, X_Z)$ is finite (details omitted). By the result of the first paragraph the set $\Mor_U(Y_U, X_U)$ is finite. Thus it suffices to show that $$ \Mor_S(Y, X) \longrightarrow \Mor_Z(Y_Z, X_Z) \times \Mor_U(Y_U, X_U) $$ is injective. This follows from the fact that the set of points where two morphisms $a, b : Y \to X$ agree is open in $Y$, due to the fact that $\Delta : X \to X \times_S X$ is open, see Morphisms, Lemma \ref{morphisms-lemma-diagonal-unramified-morphism}.
We have seen in More on Morphisms, Lemma \ref{more-morphisms-lemma-unramified-formally-unramified} that being formally unramified and locally of finite type is the same thing as being unramified. Hence (4) is equivalent to (2). A monomorphism is certainly universally injective and formally unramified hence (3) implies (4). It is clear that (1) implies (3). Finally, if (2) holds, then $\Delta : X \to X \times_S X$ is both an open immersion (Morphisms, Lemma \ref{morphisms-lemma-diagonal-unramified-morphism}) and surjective (Morphisms, Lemma \ref{morphisms-lemma-universally-injective}) hence an isomorphism, i.e., $f$ is a monomorphism. In this way we see that (2) implies (1). \medskip\noindent Condition (3) implies (5) because monomorphisms are preserved under base change (Schemes, Lemma \ref{schemes-lemma-base-change-monomorphism}) and because of the description of monomorphisms towards the spectra of fields in Schemes, Lemma \ref{schemes-lemma-mono-towards-spec-field}. Condition (5) implies (4) by Morphisms, Lemmas \ref{morphisms-lemma-universally-injective} and \ref{morphisms-lemma-unramified-etale-fibres}.
The equivalence of (4) -- (7) follows immediately from Lemma \ref{lemma-universally-injective-unramified}. \medskip\noindent Let $f : X \to S$ satisfy (6). Then $f$ is separated, see Schemes, Lemma \ref{schemes-lemma-monomorphism-separated} and has finite fibres. Hence More on Morphisms, Lemma \ref{more-morphisms-lemma-characterize-finite} shows $f$ is finite. Then Morphisms, Lemma \ref{morphisms-lemma-finite-monomorphism-closed} implies $f$ is a closed immersion, i.e., (1) holds. \medskip\noindent Note that (1) $\Rightarrow$ (2) because a closed immersion is proper and a monomorphism (Morphisms, Lemma \ref{morphisms-lemma-closed-immersion-proper} and Schemes, Lemma \ref{schemes-lemma-immersions-monomorphisms}). By Lemma \ref{lemma-universally-injective-unramified} we see that (2) implies (3). It is clear that (3) implies (5).
The question is local on $S$. Hence we may assume that $S = \Spec(A)$. By definition of a finite morphism this implies $X = \Spec(B)$. Note that the ring map $\varphi : A \to B$ defining $\pi$ is a finite unramified ring map. Let $\mathfrak p \subset A$ be the prime corresponding to $s$. Let $\mathfrak q \subset B$ be the prime corresponding to $x$. Conditions (2), (3) and (4) imply that $B_{\mathfrak q}/\mathfrak pB_{\mathfrak q} = \kappa(\mathfrak p)$. By Algebra, Lemma \ref{algebra-lemma-unique-prime-over-localize-below} we have $B_{\mathfrak q} = B_{\mathfrak p}$ (note that a finite ring map satisfies going up, see Algebra, Section \ref{algebra-section-going-up}.) Hence we see that $B_{\mathfrak p}/\mathfrak pB_{\mathfrak p} = \kappa(\mathfrak p)$. As $B$ is a finite $A$-module we see from Nakayama's lemma (see Algebra, Lemma \ref{algebra-lemma-NAK}) that $B_{\mathfrak p} = \varphi(A_{\mathfrak p})$. Hence (using the finiteness of $B$ as an $A$-module again) there exists a $f \in A$, $f \not \in \mathfrak p$ such that $B_f = \varphi(A_f)$ as desired.
To see the equivalences of (1), (2) and (3), as we have the corresponding results for unramified ring maps (Lemma \ref{lemma-characterize-unramified-completions}) it suffices to prove that $A \to B$ is flat if and only if $A^\wedge \to B^\wedge$ is flat. This is clear from our lists of properties of flat maps since the ring maps $A \to A^\wedge$ and $B \to B^\wedge$ are faithfully flat. For the final statement, by Lemma \ref{lemma-unramified-completions} we see that $B^\wedge$ is a finite flat $A^\wedge$ module. Hence it is finite free by our list of properties on flat modules in Section \ref{section-flat-morphisms}.
By Lemma \ref{lemma-finite-unramified-one-point} there exists an open neighbourhood $U$ of $s$ such that $\pi|_{\pi^{-1}(U)} : \pi^{-1}(U) \to U$ is a closed immersion. But a morphism which is \'etale and a closed immersion is an open immersion (for example by Theorem \ref{theorem-etale-radicial-open}). Hence after shrinking $U$ we obtain an isomorphism.
The morphism $F_{U/X}$ is a universal homeomorphism by Varieties, Lemma \ref{varieties-lemma-relative-frobenius}. The morphism $F_{U/X}$ is \'etale as a morphism between schemes \'etale over $X$ (Morphisms, Lemma \ref{morphisms-lemma-etale-permanence}). Hence $F_{U/X}$ is an isomorphism by Theorem \ref{theorem-etale-radicial-open}.
By Morphisms, Definition \ref{morphisms-definition-unramified} there exists an open neighbourhood of each $x_i$ which is locally of finite type over $S$. Replacing $X$ by an open neighbourhood of $\{x_1, \ldots, x_n\}$ we may assume $f$ is locally of finite type. Apply More on Morphisms, Lemma \ref{more-morphisms-lemma-etale-makes-quasi-finite-finite-multiple-points-var} to get the \'etale neighbourhood $(U, u)$ and the opens $V_{i, j}$ finite over $U$. By Lemma \ref{lemma-finite-unramified-one-point} after possibly shrinking $U$ we get that $V_{i, j} \to U$ is a closed immersion.
Apply Lemma \ref{lemma-unramified-etale-local}. We may assume $U$ is affine, so $X_U$ is separated. Then $V_{i, j} \to X_U$ is a closed map, see Morphisms, Lemma \ref{morphisms-lemma-image-proper-scheme-closed}. Suppose $(i, j) \not = (i', j')$. Then $V_{i, j} \cap V_{i', j'}$ is closed in $V_{i, j}$ and its image in $U$ does not contain $u$. Hence after shrinking $U$ we may assume that $V_{i, j} \cap V_{i', j'} = \emptyset$. Moreover, $\bigcup V_{i, j}$ is a closed and open subscheme of $X_U$ and hence has an open and closed complement $W$. This finishes the proof.
Since $X \to S$ is finite the fibre over $s$ is a finite set $\{x_1, \ldots, x_n\}$ of points of $X$. Apply Lemma \ref{lemma-unramified-etale-local-technical} to this set (a finite morphism is separated, see Morphisms, Section \ref{morphisms-section-integral}). The image of $W$ in $U$ is a closed subset (as $X_U \to U$ is finite, hence proper) which does not contain $u$. After removing this from $U$ we see that $W = \emptyset$ as desired.
An \'etale morphism is unramified, hence we may apply Lemma \ref{lemma-unramified-etale-local}. Now $V_{i, j} \to U$ is a closed immersion and \'etale. Hence it is an open immersion, for example by Theorem \ref{theorem-etale-radicial-open}. Replace $U$ by the intersection of the images of $V_{i, j} \to U$ to get the lemma.
Let $a, b : U_1 \to U_2$ be two morphisms between schemes \'etale over $S$. Assume the base changes of $a$ and $b$ to $X$ agree. We have to show that $a = b$. By Proposition \ref{proposition-equality} it suffices to show that $a$ and $b$ agree on points and residue fields. This is clear because for every $u \in U_1$ we can find a point $v \in X \times_S U_1$ mapping to $u$.