hcju/stacksqa huggingface dataset:
We know the theorem is true if $X$ is a scheme, see \'Etale Cohomology, Theorem \ref{etale-cohomology-theorem-exactness-stalks}. Choose a surjective \'etale morphism $f : U \to X$ where $U$ is a scheme. Since $\{U \to X\}$ is a covering (in $X_{spaces, \etale}$) we can check whether a map of sheaves is injective, or surjective by restricting to $U$. Now if $\overline{u} : \Spec(k) \to U$ is a geometric point of $U$, then $(\mathcal{F}|_U)_{\overline{u}} = \mathcal{F}_{\overline{x}}$ where $\overline{x} = f \circ \overline{u}$. (This is clear from the colimits defining the stalks at $\overline{u}$ and $\overline{x}$, but it also follows from Lemma \ref{lemma-stalk-pullback}.) Hence the result for $U$ implies the result for $X$ and we win.
Using Spaces, Lemma \ref{spaces-lemma-category-of-spaces-over-smaller-base-scheme} we see that we may assume $S = \Spec(\mathbf{Z})$. Since $U \times_X V = X \times_{X \times X} (U \times V)$ and since $U \times V$ is quasi-compact if $U$ and $V$ are so, we see that (1) implies (2). It is clear that (2) implies (3). Assume (3). Choose a scheme $W$ and a surjective \'etale morphism $W \to X$. Then $W \times W \to X \times X$ is surjective \'etale. Hence it suffices to show that $$ j : W \times_X W = X \times_{(X \times X)} (W \times W) \to W \times W $$ is quasi-compact, see Spaces, Lemma \ref{spaces-lemma-descent-representable-transformations-property}. If $U \subset W$ and $V \subset W$ are affine opens, then $j^{-1}(U \times V) = U \times_X V$ is quasi-compact by assumption. Since the affine opens $U \times V$ form an affine open covering of $W \times W$ (Schemes, Lemma \ref{schemes-lemma-affine-covering-fibre-product}) we conclude by Schemes, Lemma \ref{schemes-lemma-quasi-compact-affine}.
Using Spaces, Lemma \ref{spaces-lemma-category-of-spaces-over-smaller-base-scheme} we see that we may assume $S = \Spec(\mathbf{Z})$. Since $U \times_X V = X \times_{X \times X} (U \times V)$ and since $U \times V$ is affine if $U$ and $V$ are so, we see that (1) implies (2). Assume (2). Choose a scheme $W$ and a surjective \'etale morphism $W \to X$. Then $W \times W \to X \times X$ is surjective \'etale. Hence it suffices to show that $$ j : W \times_X W = X \times_{(X \times X)} (W \times W) \to W \times W $$ is a closed immersion, see Spaces, Lemma \ref{spaces-lemma-descent-representable-transformations-property}. If $U \subset W$ and $V \subset W$ are affine opens, then $j^{-1}(U \times V) = U \times_X V$ is affine by assumption and the map $U \times_X V \to U \times V$ is a closed immersion because the corresponding ring map is surjective. Since the affine opens $U \times V$ form an affine open covering of $W \times W$ (Schemes, Lemma \ref{schemes-lemma-affine-covering-fibre-product}) we conclude by Morphisms, Lemma \ref{morphisms-lemma-closed-immersion}.
Assume (1). Let $x : \Spec(K) \to X$ be a morphism from the spectrum of a field into $X$. By assumption the morphism of schemes $\Spec(K) \times_X T \to \Spec(K)$ is surjective. Hence there exists a field extension $K \subset K'$ and a morphism $\Spec(K') \to \Spec(K) \times_X T$ such that the left square in the diagram $$ \xymatrix{ \Spec(K') \ar[r] \ar[d] & \Spec(K) \times_X T \ar[d] \ar[r] & T \ar[d] \\ \Spec(K) \ar@{=}[r] & \Spec(K) \ar[r]^-x & X } $$ is commutative. This shows that $|f| : |T| \to |X|$ is surjective. \medskip\noindent Assume (2). Let $Z \to X$ be a morphism where $Z$ is a scheme. We have to show that the morphism of schemes $Z \times_X T \to T$ is surjective, i.e., that $|Z \times_X T| \to |Z|$ is surjective. This follows from (2) and Lemma \ref{lemma-points-cartesian}.
The assumption means that $U$ is a scheme, $p : U \to X$ is a surjective, \'etale morphism, $R = U \times_X U$ is a scheme and defines an \'etale equivalence relation on $U$ such that $X = U/R$ as sheaves. By Lemma \ref{lemma-characterize-surjective} we see that $|U| \to |X|$ is surjective. By Lemma \ref{lemma-points-cartesian} the map $$ |R| \longrightarrow |U| \times_{|X|} |U| $$ is surjective. Hence the image of $|R| \to |U| \times |U|$ is exactly the set of pairs $(u_1, u_2) \in |U| \times |U|$ such that $u_1$ and $u_2$ have the same image in $|X|$. Combining these two statements we get the result of the lemma.
Let $X$ be an algebraic space over $S$. Let $p : U \to X$ be a surjective \'etale morphism where $U$ is a scheme over $S$. We define $W \subset |X|$ is open if and only if $|p|^{-1}(W)$ is an open subset of $|U|$. This is a topology on $|X|$ (it is the quotient topology on $|X|$, see Topology, Lemma \ref{topology-lemma-quotient}). \medskip\noindent Let us prove that the topology is independent of the choice of the presentation. To do this it suffices to show that if $U'$ is a scheme, and $U' \to X$ is an \'etale morphism, then the map $|U'| \to |X|$ (with topology on $|X|$ defined using $U \to X$ as above) is open and continuous; which in addition will prove that (3) holds. Set $U'' = U \times_X U'$, so that we have the commutative diagram $$ \xymatrix{ U'' \ar[r] \ar[d] & U' \ar[d] \\ U \ar[r] & X } $$ As $U \to X$ and $U' \to X$ are \'etale we see that both $U'' \to U$ and $U'' \to U'$ are \'etale morphisms of schemes. Moreover, $U'' \to U'$ is surjective. Hence we get a commutative diagram of maps of sets $$ \xymatrix{ |U''| \ar[r] \ar[d] & |U'| \ar[d] \\ |U| \ar[r] & |X| } $$ The lower horizontal arrow is surjective (see Lemma \ref{lemma-characterize-surjective} or Lemma \ref{lemma-points-presentation}) and continuous by definition of the topology on $|X|$. The top horizontal arrow is surjective, continuous, and open by Morphisms, Lemma \ref{morphisms-lemma-etale-open}. The left vertical arrow is continuous and open (by Morphisms, Lemma \ref{morphisms-lemma-etale-open} again.) Hence it follows formally that the right vertical arrow is continuous and open. \medskip\noindent To finish the proof we prove (2). Let $a : X \to Y$ be a morphism of algebraic spaces. According to Spaces, Lemma \ref{spaces-lemma-lift-morphism-presentations} we can find a diagram $$ \xymatrix{ U \ar[d]_p \ar[r]_\alpha & V \ar[d]^q \\ X \ar[r]^a & Y } $$ where $U$ and $V$ are schemes, and $p$ and $q$ are surjective and \'etale. This gives rise to the diagram $$ \xymatrix{ |U| \ar[d]_p \ar[r]_\alpha & |V| \ar[d]^q \\ |X| \ar[r]^a & |Y| } $$ where all but the lower horizontal arrows are known to be continuous and the two vertical arrows are surjective and open. It follows that the lower horizontal arrow is continuous as desired.
In order to prove (1) let us construct the inverse of the rule. Namely, suppose that $W \subset |X|$ is open. Choose a presentation $X = U/R$ corresponding to the surjective \'etale map $p : U \to X$ and \'etale maps $s, t : R \to U$. By construction we see that $|p|^{-1}(W)$ is an open of $U$. Denote $W' \subset U$ the corresponding open subscheme. It is clear that $R' = s^{-1}(W') = t^{-1}(W')$ is a Zariski open of $R$ which defines an \'etale equivalence relation on $W'$. By Spaces, Lemma \ref{spaces-lemma-finding-opens} the morphism $X' = W'/R' \to X$ is an open immersion. Hence $X'$ is an algebraic space by Spaces, Lemma \ref{spaces-lemma-representable-over-space}. By construction $|X'| = W$, i.e., $X'$ is a subspace of $X$ corresponding to $W$. Thus (1) is proved. \medskip\noindent To prove (2), note that if $\{X_i \subset X\}_{i \in I}$ is a collection of open subspaces, then it is a Zariski covering if and only if the $U = \bigcup U \times_X X_i$ is an open covering. This follows from the definition of a Zariski covering and the fact that the morphism $U \to X$ is surjective as a map of presheaves on $(\Sch/S)_{fppf}$. On the other hand, we see that $|X| = \bigcup |X_i|$ if and only if $U = \bigcup U \times_X X_i$ by Lemma \ref{lemma-points-presentation} (and the fact that the projections $U \times_X X_i \to X_i$ are surjective and \'etale). Thus the equivalence of (2) follows.
The existence of the factorization follows from Lemma \ref{lemma-factor-through-open-subspace}. The morphism $f'$ is surjective according to Lemma \ref{lemma-characterize-surjective}. To see $f'$ is \'etale, suppose that $T \to X'$ is a morphism where $T$ is a scheme. Then $T \times_X U = T \times_{X'} U$ as $X' \to X$ is a monomorphism of sheaves. Thus the projection $T \times_{X'} U \to T$ is \'etale as we assumed $f$ \'etale. We have $U \times_X U = U \times_{X'} U$ as $X' \to X$ is a monomorphism. Then $X' = U/R$ follows from Spaces, Lemma \ref{spaces-lemma-space-presentation}.
Suppose that $\varphi_i : \Spec(k_i) \to X$ are monomorphisms for $i = 1, 2$. If $\varphi_1$ and $\varphi_2$ define the same point of $|X|$, then we see that the scheme $$ Y = \Spec(k_1) \times_{\varphi_1, X, \varphi_2} \Spec(k_2) $$ is nonempty. Since the base change of a monomorphism is a monomorphism this means that the projection morphisms $Y \to \Spec(k_i)$ are monomorphisms. Hence $\Spec(k_1) = Y = \Spec(k_2)$ as schemes over $X$, see Schemes, Lemma \ref{schemes-lemma-mono-towards-spec-field}. We conclude that $\varphi_1 = \varphi_2$, which proves the lemma.
Choose a scheme $U$ and an \'etale surjective morphism $U \to X$. We will use Lemma \ref{lemma-characterize-surjective}. If $U$ is quasi-compact, then since $|U| \to |X|$ is surjective we conclude that $|X|$ is quasi-compact. If $|X|$ is quasi-compact, then since $|U| \to |X|$ is open we see that there exists a quasi-compact open $U' \subset U$ such that $|U'| \to |X|$ is surjective (and still \'etale). Hence we win.
Let $V \to X$ be a surjective \'etale morphism. Let $V = \bigcup_{i \in I} V_i$ be a Zariski open covering such that each $V_i$ maps into an affine open of $S$. Then set $U = \coprod_{i \in I} V_i$ with induced morphism $U \to V \to X$. This is \'etale and surjective as a composition of \'etale and surjective representable transformations of functors (via the general principle Spaces, Lemma \ref{spaces-lemma-composition-representable-transformations-property} and Morphisms, Lemmas \ref{morphisms-lemma-composition-surjective} and \ref{morphisms-lemma-composition-etale}).
By Lemma \ref{lemma-cover-by-union-affines} we can find a surjective \'etale morphism $U = \coprod U_i \to X$, with $U_i$ affine and mapping into an affine open of $S$. Let $X_i \subset X$ be the open subspace of $X$ such that $U_i \to X$ factors through an \'etale surjective morphism $U_i \to X_i$, see Lemma \ref{lemma-etale-image-open}. Since $U = \bigcup U_i$ we see that $X = \bigcup X_i$. As $U_i \to X_i$ is surjective it follows that $X_i \to S$ maps into an affine open of $S$.
If there exists an \'etale surjective morphism $U \to X$ with $U$ affine then $X$ is quasi-compact by Definition \ref{definition-quasi-compact}. Conversely, if $X$ is quasi-compact, then $|X|$ is quasi-compact. Let $U = \coprod_{i \in I} U_i$ be a disjoint union of affine schemes with an \'etale and surjective map $\varphi : U \to X$ (Lemma \ref{lemma-cover-by-union-affines}). Then $|X| = \bigcup \varphi(|U_i|)$ and by quasi-compactness there is a finite subset $i_1, \ldots, i_n$ such that $|X| = \bigcup \varphi(|U_{i_j}|)$. Hence $U_{i_1} \cup \ldots \cup U_{i_n}$ is an affine scheme with a finite surjective morphism towards $X$.
Let $X' \subset X$ be the open subscheme such that $U \to X$ factors through an \'etale surjection $U \to X'$, see Lemma \ref{lemma-etale-image-open}. If $U \to X'$ is separated, then so is $U \to X$, see Spaces, Lemma \ref{spaces-lemma-composition-representable-transformations-property} (as the open immersion $X' \to X$ is separated by Spaces, Lemma \ref{spaces-lemma-representable-transformations-property-implication} and Schemes, Lemma \ref{schemes-lemma-immersions-monomorphisms}). Moreover, since $U \times_{X'} U = U \times_X U$ it suffices to prove the result after replacing $X$ by $X'$, i.e., we may assume $U \to X$ surjective. Consider the commutative diagram $$ \xymatrix{ R = U \times_X U \ar[r] \ar[d] & U \ar[d] \\ U \ar[r] & X } $$ In the proof of Spaces, Lemma \ref{spaces-lemma-properties-diagonal} we have seen that $j : R \to U \times_S U$ is separated. The morphism of schemes $U \to S$ is separated as $U$ is a separated scheme, see Schemes, Lemma \ref{schemes-lemma-compose-after-separated}. Hence $U \times_S U \to U$ is separated as a base change, see Schemes, Lemma \ref{schemes-lemma-separated-permanence}. Hence the scheme $U \times_S U$ is separated (by the same lemma). Since $j$ is separated we see in the same way that $R$ is separated. Hence $R \to U$ is a separated morphism (by Schemes, Lemma \ref{schemes-lemma-compose-after-separated} again). Thus by Spaces, Lemma \ref{spaces-lemma-representable-morphisms-spaces-property} and the diagram above we conclude that $U \to X$ is separated.
We may think of $X$ as an algebraic space over $\mathbf{Z}$. Consider the cartesian diagram $$ \xymatrix{ U \times_X U \ar[r] \ar[d]_j & X \ar[d]^\Delta \\ U \times U \ar[r] & X \times X } $$ Since $U$ is quasi-separated the projection $U \times U \to U$ is quasi-separated (as a base change of a quasi-separated morphism of schemes, see Schemes, Lemma \ref{schemes-lemma-separated-permanence}). Hence the assumption in the lemma implies $j$ is quasi-compact by Schemes, Lemma \ref{schemes-lemma-quasi-compact-permanence}. By Spaces, Lemma \ref{spaces-lemma-representable-morphisms-spaces-property} we see that $\Delta$ is quasi-compact as desired.
Assume  $U_i \to X_i \subset X$ are as in (3). To prove (4) choose for each $i$ a finite affine open covering $U_i = U_{i1} \cup \ldots \cup U_{in_i}$ such that each $U_{ij}$ maps into an affine open of $S$. The compositions $U_{ij} \to U_i \to X_i$ are \'etale and quasi-compact (see Spaces, Lemma \ref{spaces-lemma-composition-representable-transformations-property}). Let $X_{ij} \subset X_i$ be the open subspace corresponding to the image of $|U_{ij}| \to |X_i|$, see Lemma \ref{lemma-etale-image-open}. Note that $U_{ij} \to X_{ij}$ is quasi-compact as $X_{ij} \subset X_i$ is a monomorphism and as $U_{ij} \to X$ is quasi-compact. Then $X = \bigcup X_{ij}$ is a covering as in (4). The implication (4) $\Rightarrow$ (3) is immediate. \medskip\noindent Assume (4). To show that $X$ is Zariski locally quasi-separated over $S$ it suffices to show that $X_i$ is quasi-separated over $S$. Hence we may assume there exists an affine scheme $U$ mapping into an affine open of $S$ and a quasi-compact surjective \'etale morphism $U \to X$. Consider the fibre product square $$ \xymatrix{ U \times_X U \ar[r] \ar[d] & U \times_S U \ar[d] \\ X \ar[r]^-{\Delta_{X/S}} & X \times_S X } $$ The right vertical arrow is surjective \'etale (see Spaces, Lemma \ref{spaces-lemma-product-representable-transformations-property}) and $U \times_S U$ is affine (as $U$ maps into an affine open of $S$, see Schemes, Section \ref{schemes-section-fibre-products}), and $U \times_X U$ is quasi-compact because the projection $U \times_X U \to U$ is quasi-compact as a base change of $U \to X$. It follows from Spaces, Lemma \ref{spaces-lemma-representable-morphisms-spaces-property} that $\Delta_{X/S}$ is quasi-compact as desired. \medskip\noindent Assume (1). To prove (3) there is an immediate reduction to the case where $X$ is quasi-separated over $S$. By Lemma \ref{lemma-union-of-quasi-compact} we can find a Zariski open covering $X = \bigcup X_i$ such that each $X_i$ maps into an affine open of $S$, and such that there exist affine schemes $U_i$ and surjective \'etale morphisms $U_i \to X_i$. Since $U_i \to S$ maps into an affine open of $S$ we see that $U_i \times_S U_i$ is affine, see Schemes, Section \ref{schemes-section-fibre-products}. As $X$ is quasi-separated over $S$, the morphisms $$ R_i = U_i \times_{X_i} U_i = U_i \times_X U_i \longrightarrow U_i \times_S U_i $$ as base changes of $\Delta_{X/S}$ are quasi-compact. Hence we conclude that $R_i$ is a quasi-compact scheme. This in turn implies that each projection $R_i \to U_i$ is quasi-compact. Hence, applying Spaces, Lemma \ref{spaces-lemma-representable-morphisms-spaces-property} to the covering $U_i \to X_i$ and the morphism $U_i \to X_i$ we conclude that the morphisms $U_i \to X_i$ are quasi-compact as desired. \medskip\noindent At this point we see that (1), (3), and (4) are equivalent. Since (3) does not refer to the base scheme we conclude that these are also equivalent with (2).
Denote $R = U \times_X U$, and $s, t : R \to U$ the projections. Let $u \in U$ be a point, and let $x \in |X|$ be its image. The fibre of $|U| \to |X|$ over $x$ is equal to $s(t^{-1}(\{u\}))$ by Lemma \ref{lemma-points-cartesian}, and the fibre of $|R| \to |X|$ over $x$ is $t^{-1}(s(t^{-1}(\{u\})))$. Since $t : R \to U$ is \'etale and quasi-compact, it has finite fibres (as its fibres are disjoint unions of spectra of fields by Morphisms, Lemma \ref{morphisms-lemma-etale-over-field} and quasi-compact). Hence we win.
The implication (2) $\Rightarrow$ (1) is immediate. For the converse, choose a surjective \'etale morphism $U \to X$ with $U$ a scheme that has $\mathcal{P}$ and let $V$ be an \'etale $X$-scheme. Then $U \times_X V \rightarrow V$ is an \'etale surjection of schemes, so $V$ inherits $\mathcal{P}$ from $U \times_X V$, which in turn inherits $\mathcal{P}$ from $U$ (see discussion following Descent, Definition \ref{descent-definition-property-local}). The last claim is clear from (1) and Descent, Definition \ref{descent-definition-property-local}.
By Properties, Lemma \ref{properties-lemma-locally-constructible} we see that (1) and (2) are equivalent. It is immediate that (1) implies (3). Thus we assume we have a surjective \'etale morphism $\varphi : U \to X$ where $U$ is a scheme such that $\varphi^{-1}(E)$ is locally constructible. Let $\varphi' : U' \to X$ be another \'etale morphism where $U'$ is a scheme. Then we have $$ E'' = \text{pr}_1^{-1}(\varphi^{-1}(E)) = \text{pr}_2^{-1}((\varphi')^{-1}(E)) $$ where $\text{pr}_1 : U \times_X U' \to U$ and $\text{pr}_2 : U \times_X U' \to U'$ are the projections. By Morphisms, Lemma \ref{morphisms-lemma-inverse-image-constructible} we see that $E''$ is locally constructible in $U \times_X U'$. Let $W' \subset U'$ be an affine open. Since $\text{pr}_2$ is \'etale and hence open, we can choose a quasi-compact open $W'' \subset U \times_X U'$ with $\text{pr}_2(W'') = W'$. Then $\text{pr}_2|_{W''} : W'' \to W'$ is quasi-compact. We have $W' \cap (\varphi')^{-1}(E) = \text{pr}_2(E'' \cap W'')$ as $\varphi$ is surjective, see Lemma \ref{lemma-points-cartesian}. Thus $W' \cap (\varphi')^{-1}(E) = \text{pr}_2(E'' \cap W'')$ is locally constructible by Morphisms, Theorem \ref{morphisms-theorem-chevalley} as desired.
The numbers in (1) and (3) are equal by Definition \ref{definition-dimension}. Let $U \to X$ be a surjective \'etale morphism from a scheme $U$. The supremum of $\dim_x(X)$ for $x \in |X|$ is the same as the supremum of $\dim_u(U)$ for points $u$ of $U$ by definition. This is the same as the supremum of $\dim(\mathcal{O}_{U, u})$ by Properties, Lemma \ref{properties-lemma-dimension}. This in turn is the same as (2) by definition.
Observe that a point $u$ of a scheme $U$ is a generic point of an irreducible component of $U$ if and only if $\dim(\mathcal{O}_{U, u}) = 0$ (Properties, Lemma \ref{properties-lemma-generic-point}). Hence this follows from the definition of the codimension of a point on $X$ (Definition \ref{definition-dimension-local-ring}).
If $U$ is a scheme, then the set of generic points of irreducible components is dense in $U$ (holds for any quasi-sober topological space). Thus if $U \to X$ is a surjective \'etale morphism, then the set of codimension $0$ points of $X$ is the image of a dense subset of $|U|$ (Lemma \ref{lemma-codimension-0-points}). Since $|X|$ has the quotient topology for $|U| \to |X|$ we conclude.
Let $U$ be a scheme and $U \to X$ a surjective \'etale morphism. Then $Z \times_X U \to U$ is an immersion of schemes, hence gives a homeomorphism of $|Z \times_X U|$ with a locally closed subset $T'$ of $|U|$. By Lemma \ref{lemma-points-cartesian} the subset $T'$ is the inverse image of the image $T$ of $|Z| \to |X|$. The map $|Z| \to |X|$ is injective because the transformation of functors $Z \to X$ is injective, see Spaces, Section \ref{spaces-section-Zariski}. By Topology, Lemma \ref{topology-lemma-open-morphism-quotient-topology} we see that $T$ is locally closed in $|X|$. Moreover, the continuous map $|Z| \to T$ is a homeomorphism as the map $|Z \times_X U| \to T'$ is a homeomorphism and $|Z \times_Y U| \to |Z|$ is submersive.
Denote $\varphi : U \to X$ the canonical map. The bijection sends $Z \to X$ to $Z' = Z \times_X U \to U$. It is immediate from the definition that $Z' \to U$ is an immersion, resp.\ closed immersion, resp.\ open immersion if $Z \to X$ is so. It is also clear that $Z'$ is $R$-invariant (see Groupoids, Definition \ref{groupoids-definition-invariant-open}). \medskip\noindent Conversely, assume that $Z' \to U$ is an immersion which is $R$-invariant. Let $R'$ be the restriction of $R$ to $Z'$, see Groupoids, Definition \ref{groupoids-definition-restrict-groupoid}. Since $R' = R \times_{s, U} Z' = Z' \times_{U, t} R$ in this case we see that $R'$ is an \'etale equivalence relation on $Z'$. By Spaces, Theorem \ref{spaces-theorem-presentation} we see $Z = Z'/R'$ is an algebraic space. By construction we have $U \times_X Z = Z'$, so $U \times_X Z \to Z$ is an immersion. Note that the property ``immersion'' is preserved under base change and fppf local on the base (see Spaces, Section \ref{spaces-section-lists}). Moreover, immersions are separated and locally quasi-finite (see Schemes, Lemma \ref{schemes-lemma-immersions-monomorphisms} and Morphisms, Lemma \ref{morphisms-lemma-immersion-locally-quasi-finite}). Hence by More on Morphisms, Lemma \ref{more-morphisms-lemma-separated-locally-quasi-finite-morphisms-fppf-descend} immersions satisfy descent for fppf covering. This means all the hypotheses of Spaces, Lemma \ref{spaces-lemma-morphism-sheaves-with-P-effective-descent-etale} are satisfied for $Z \to X$, $\mathcal{P}=$``immersion'', and the \'etale surjective morphism $U \to X$. We conclude that $Z \to X$ is representable and an immersion, which is the definition of a subspace (see Spaces, Definition \ref{spaces-definition-immersion}). \medskip\noindent It is clear that these constructions are inverse to each other and we win.
Let $U \to X$ be a surjective \'etale morphism, where $U$ is a scheme. Set $R = U \times_X U$, so that $X = U/R$, see Spaces, Lemma \ref{spaces-lemma-space-presentation}. As usual we denote $s, t : R \to U$ the two projection morphisms. By Lemma \ref{lemma-points-presentation} we see that $T$ corresponds to a closed subset $T' \subset |U|$ such that $s^{-1}(T') = t^{-1}(T')$. Let $Z' \subset U$ be the reduced induced scheme structure on $T'$. In this case the fibre products $Z' \times_{U, t} R$ and $Z' \times_{U, s} R$ are closed subschemes of $R$ (Schemes, Lemma \ref{schemes-lemma-base-change-immersion}) which are \'etale over $Z'$ (Morphisms, Lemma \ref{morphisms-lemma-base-change-etale}), and hence reduced (because being reduced is local in the \'etale topology, see Remark \ref{remark-list-properties-local-etale-topology}). Since they have the same underlying topological space (see above) we conclude that $Z' \times_{U, t} R = Z' \times_{U, s} R$. Thus we can apply Lemma \ref{lemma-subspaces-presentation} to obtain a closed subspace $Z \subset X$ whose pullback to $U$ is $Z'$. By construction $|Z| = T$ and $Z$ is reduced. This proves existence. We omit the proof of uniqueness.
Assume $f(|Y|) \subset |Z|$. Choose a diagram $$ \xymatrix{ V \ar[d]_b \ar[r]_h & U \ar[d]^a \\ Y \ar[r]^f & X } $$ where $U$, $V$ are schemes, and the vertical arrows are surjective and \'etale. The scheme $V$ is reduced, see Lemma \ref{lemma-type-property}. Hence $h$ factors through $a^{-1}(Z)$ by Schemes, Lemma \ref{schemes-lemma-map-into-reduction}. So $a \circ h$ factors through $Z$. As $Z \subset X$ is a subsheaf, and $V \to Y$ is a surjection of sheaves on $(\Sch/S)_{fppf}$ we conclude that $X \to Y$ factors through $Z$.