hcju/stacksqa huggingface dataset:
By Lemma \ref{lemma-proper-flat-nr-geom-conn-comps-lower-semicontinuous} the function $n_{X/Y}$ is lower semincontinuous. Thus it suffices to show it is upper semi-continuous. To do this we may work \'etale locally on $Y$, hence we may assume $Y$ is an affine scheme. For $y \in Y$ consider the $\kappa(y)$-algebra $$ A = H^0(X_y, \mathcal{O}_{X_y}) $$ By Spaces over Fields, Lemma \ref{spaces-over-fields-lemma-proper-geometrically-reduced-global-sections} and the fact that $X_y$ is geometrically reduced $A$ is finite product of finite separable extensions of $\kappa(y)$. Hence $A \otimes_{\kappa(y)} \kappa(\overline{y})$ is a product of $\beta_0(y) = \dim_{\kappa(y)} A$ copies of $\kappa(\overline{y})$. Thus $X_{\overline{y}}$ has $\beta_0(y)$ connected components. In other words, we have $n_{X/S} = \beta_0$ as functions on $Y$. Thus $n_{X/Y}$ is upper semi-continuous by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-jump-loci-geometric}. This finishes the proof.
Formation of the Stein factorization commutes with flat base change, see Lemma \ref{lemma-stein-universally-closed}. Thus we may work \'etale locally on $Y$ and we may assume $Y$ is an affine scheme. Then $Y'$ is an affine scheme and $Y' \to Y$ is integral. \medskip\noindent Let $y \in Y$. Set $n$ be the number of connected components of the geometric fibre $X_{\overline{y}}$. Note that $n < \infty$ as the geometric fibre of $X \to Y$ at $y$ is a proper algebraic space over a field, hence Noetherian, hence has a finite number of connected components. By Lemma \ref{lemma-stein-universally-closed-residue-fields} there are finitely many points $y'_1, \ldots, y'_m \in Y'$ lying over $y$ and for each $i$ we can pick a finite type point $x_i \in |X_y|$ mapping to $y'_i$ the extension $\kappa(y'_i)/\kappa(y)$ is finite. Thus More on Morphisms, Lemma \ref{more-morphisms-lemma-etale-makes-integral-split} tells us that after replacing $Y$ by an \'etale neighbourhood of $y$ we may assume $Y' = V_1 \amalg \ldots \amalg V_m$ as a scheme with $y'_i \in V_i$ and $\kappa(y'_i)/\kappa(y)$ purely inseparable. In this case the algebraic spaces $X_{y_i'}$ are geometrically connected over $\kappa(y)$, hence $m = n$. The algebraic spaces $X_i = (f')^{-1}(V_i)$, $i = 1, \ldots, n$ are proper, flat, of finite presentation, with geometrically reduced fibres over $Y$. It suffices to prove the lemma for each of the morphisms $X_i \to Y$. This reduces us to the case where $X_{\overline{y}}$ is connected. \medskip\noindent Assume that $X_{\overline{y}}$ is connected. By Lemma \ref{lemma-proper-flat-geom-red} we see that $X \to Y$ has geometrically connected fibres in a neighbourhood of $y$. Thus we may assume the fibres of $X \to Y$ are geometrically connected. Then $f_*\mathcal{O}_X = \mathcal{O}_Y$ by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-proper-flat-geom-red-connected} which finishes the proof.
We will denote $T \mapsto T_0$ the base change by $\Spec(A/I) \to \Spec(A)$. By a weak version of Chow's lemma (in the form of Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-weak-chow}) there exists a surjective proper morphism $\varphi : X' \to X$ such that $X'$ admits an immersion into $\mathbf{P}^n_A$. Set $Y' = \varphi^{-1}(Y)$. This is an open and closed subscheme of $X'_0$. The lemma holds for $(X', Y')$ by More on Morphisms, Lemma \ref{more-morphisms-lemma-split-off-proper-part-henselian}. Let $W' \subset X'$ be the open and closed subscheme proper over $A$ such that $Y' = W'_0$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-universally-closed-permanence} $Q_1 = \varphi(|W'|) \subset |X|$ and $Q_2 = \varphi(|X' \setminus W'|) \subset |X|$ are closed subsets and by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-image-proper-is-proper} any closed subspace structure on $Q_1$ is proper over $A$. The image of $Q_1 \cap Q_2$ in $\Spec(A)$ is closed. Since $(A, I)$ is henselian, if $Q_1 \cap Q_2$ is nonempty, then we find that $Q_1 \cap Q_2$ has a point lying over $\Spec(A/I)$. This is impossible as $W'_0 = Y' = \varphi^{-1}(Y)$. We conclude that $Q_1$ is open and closed in $|X|$. Let $W \subset X$ be the corresponding open and closed subspace. Then $W$ is proper over $A$ with $W_0 = Y$.
It suffices to prove the pullback of $\mathcal{F}$ to a scheme surjective and \'etale over $X$ is of finite presentation. Hence we may assume $X$ is a scheme. Similarly, we can replace $Y$ by a scheme surjective and \'etale and over $Y$ (the inverse image of $V$ in this scheme is scheme theoretically dense, see Morphisms of Spaces, Section \ref{spaces-morphisms-section-scheme-theoretic-closure}). Thus we reduce to the case of schemes which is More on Flatness, Lemma \ref{flat-lemma-flat-finite-type-finitely-presented-over-dense-open}.
We may replace $Y$ by its reduction, hence we may assume $Y$ is reduced. Then $V$ is scheme theoretically dense in $Y$, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-immersion}. By definition the property of having relative dimension $\leq d$ can be checked on an \'etale covering, see Morphisms of Spaces, Sections \ref{spaces-morphisms-section-relative-dimension}. Thus it suffices to prove $f$ has relative dimension $\leq d$ after replacing $X$ by a scheme surjective and \'etale over $X$. Similarly, we can replace $Y$ by a scheme surjective and \'etale and over $Y$. The inverse image of $V$ in this scheme is scheme theoretically dense, see Morphisms of Spaces, Section \ref{spaces-morphisms-section-scheme-theoretic-closure}. Since a scheme theoretically dense open of a scheme is in particular dense, we reduce to the case of schemes which is More on Flatness, Lemma \ref{flat-lemma-flat-finite-presentation-dimension-over-dense-open}.
By Lemma \ref{lemma-flat-fp-dimension-over-dense-open} the fibres of $f$ have dimension zero. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite-rel-dimension-0} this implies that $f$ is locally quasi-finite. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable} this implies that $f$ is representable. We can check whether $f$ is finite \'etale locally on $Y$, hence we may assume $Y$ is a scheme. Since  $f$ is representable, we reduce to the case of schemes which is More on Flatness, Lemma \ref{flat-lemma-proper-flat-finite-over-dense-open}.
Applying Lemma \ref{lemma-flat-finite-type-finitely-presented-over-dense-open-X} we see that $f$ is locally of finite presentation. Applying Lemma \ref{lemma-flat-fp-dimension-over-dense-open} we see that $f$ has relative dimension $\leq 0$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite-rel-dimension-0} this implies that $f$ is locally quasi-finite. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable} this implies that $f$ is representable. By Descent on Spaces, Lemma \ref{spaces-descent-lemma-descending-property-open-immersion} we can check whether $f$ is an open immersion \'etale locally on $Y$. Hence we may assume that $Y$ is a scheme. Since $f$ is representable, we reduce to the case of schemes which is More on Flatness, Lemma \ref{flat-lemma-zariski}.
Choose a factorization $W \to Y \to X$ where $j : W \to Y$ is a quasi-compact open immersion and $\pi : Y \to X$ is a finite morphism of finite presentation (Lemma \ref{lemma-quasi-finite-separated-pass-through-finite-addendum}). Let $V = j(W) \cup \pi^{-1}(U) \subset Y$. Note that $\mathcal{I}$ on $W \cong j(W)$ and $\mathcal{O}_{\pi^{-1}(U)}$ glue to a finite type quasi-coherent sheaf of ideals $\mathcal{I}_1 \subset \mathcal{O}_V$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-extend} there exists a finite type quasi-coherent sheaf of ideals $\mathcal{I}_2 \subset \mathcal{O}_Y$ such that $\mathcal{I}_2|_V = \mathcal{I}_1$. In other words, $\mathcal{I}_2 \subset \mathcal{O}_Y$ is a finite type quasi-coherent sheaf of ideals such that $V(\mathcal{I}_2)$ is disjoint from $\pi^{-1}(U)$ and $j^{-1}\mathcal{I}_2 = \mathcal{I}$. Denote $i : Z \to Y$ the corresponding closed immersion which is of finite presentation (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-finite-presentation}). In particular the composition $\tau = \pi \circ i : Z \to X$ is finite and of finite presentation (Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-composition-finite-presentation} and \ref{spaces-morphisms-lemma-composition-integral}). \medskip\noindent Let $\mathcal{F} = \tau_*\mathcal{O}_Z$ which we think of as a quasi-coherent $\mathcal{O}_X$-module. By Descent on Spaces, Lemma \ref{spaces-descent-lemma-finite-finitely-presented-module} we see that $\mathcal{F}$ is a finitely presented $\mathcal{O}_X$-module. Let $\mathcal{J} = \text{Fit}_0(\mathcal{F})$. (Insert reference to fitting modules on ringed topoi here.) This is a finite type quasi-coherent sheaf of ideals on $X$ (as $\mathcal{F}$ is of finite presentation, see More on Algebra, Lemma \ref{more-algebra-lemma-fitting-ideal-basics}). Part (1) of the lemma holds because $|\tau|(|Z|) \cap |U| = \emptyset$ by our choice of $\mathcal{I}_2$ and because the $0$th Fitting ideal of the trivial module equals the structure sheaf. To prove (2) note that $\varphi^{-1}(\mathcal{J})\mathcal{O}_W = \text{Fit}_0(\varphi^*\mathcal{F})$ because taking Fitting ideals commutes with base change. On the other hand, as $\varphi : W \to X$ is separated and \'etale we see that $(1, j) : W \to W \times_X Y$ is an open and closed immersion. Hence $W \times_Y Z = V(\mathcal{I}) \amalg Z'$ for some finite and finitely presented morphism of algebraic spaces $\tau' : Z' \to W$. Thus we see that \begin{align*} \text{Fit}_0(\varphi^*\mathcal{F}) & = \text{Fit}_0((W \times_Y Z \to W)_*\mathcal{O}_{W \times_Y Z}) \\ & = \text{Fit}_0(\mathcal{O}_W/\mathcal{I}) \cdot \text{Fit}_0(\tau'_*\mathcal{O}_{Z'}) \\ & = \mathcal{I} \cdot \text{Fit}_0(\tau'_*\mathcal{O}_{Z'}) \end{align*} the second equality by More on Algebra, Lemma \ref{more-algebra-lemma-fitting-ideal-basics} translated in sheaves on ringed topoi. Setting $\mathcal{I}' = \text{Fit}_0(\tau'_*\mathcal{O}_{Z'})$ finishes the proof of the lemma.
Let $B' \to B$ be a $U$-admissible blowup. Note that the strict transform of $X$ is quasi-compact and quasi-separated over $B'$ as $X$ is quasi-compact and quasi-separated over $B$. Hence we only need to worry about finding a $U$-admissible blowup such that the strict transform becomes flat and locally of finite presentation. We cannot directly apply Theorem \ref{theorem-flatten-module} because $X$ is not locally of finite presentation over $B$. \medskip\noindent Choose an affine scheme $V$ and a surjective \'etale morphism $V \to X$. (This is possible as $X$ is quasi-compact as a finite type space over the quasi-compact space $B$.) Then it suffices to show the result for the morphism $V \to B$ (as strict transform commutes with \'etale localization, see Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-strict-transform-local}). Hence we may assume that $X \to B$ is separated as well as finite type. In this case we can find a closed immersion $i : X \to Y$ with $Y \to B$ separated and of finite presentation, see Limits of Spaces, Proposition \ref{spaces-limits-proposition-separated-closed-in-finite-presentation}. \medskip\noindent Apply Theorem \ref{theorem-flatten-module} to $\mathcal{F} = i_*\mathcal{O}_X$ on $Y/B$. We find a $U$-admissible blowup $B' \to B$ such that strict transform of $\mathcal{F}$ is flat over $B'$ and of finite presentation. Let $X'$ be the strict transform of $X$ under the blowup $B' \to B$. Let $i' : X' \to Y \times_B B'$ be the induced morphism. Since taking strict transform commutes with pushforward along affine morphisms (Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-strict-transform-affine}), we see that $i'_*\mathcal{O}_{X'}$ is flat over $B'$ and of finite presentation as a $\mathcal{O}_{Y \times_B B'}$-module. Thus $X' \to B'$ is flat and locally of finite presentation. This implies the lemma by our earlier remarks.
By Lemma \ref{lemma-flat-after-blowing-up} we may assume that $X \to B$ is flat and of finite presentation. After replacing $B$ by a $U$-admissible blowup if necessary, we may assume that $U \subset B$ is scheme theoretically dense. Then $f$ is finite by Lemma \ref{lemma-proper-flat-finite-over-dense-open}. Hence $f$ is finite locally free by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-flat}.
As the composition of $U$-admissible blowups is $U$-admissible (Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-composition-admissible-blowups}) we can proceed in stages. Pick a finite type quasi-coherent sheaf of ideals $\mathcal{I} \subset \mathcal{O}_B$ with $|B| \setminus |U| = |V(\mathcal{I})|$. Replace $B$ by the blowup of $B$ in $\mathcal{I}$ and $X$ by the strict transform of $X$. After this replacement $B \setminus U$ is the support of an effective Cartier divisor $D$ (Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-blowing-up-gives-effective-Cartier-divisor}). In particular $U$ is scheme theoretically dense in $B$ (Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-complement-effective-Cartier-divisor}). Next, we do another $U$-admissible blowup to get to the situation where $X \to B$ is flat and of finite presentation, see Lemma \ref{lemma-flat-after-blowing-up}. Note that $U$ is still scheme theoretically dense in $B$. Hence $X \to B$ is an open immersion by Lemma \ref{lemma-zariski}.
By Lemma \ref{lemma-zariski-after-blowup} we may find a $U$-admissible blowup $B' \to B$ such that the strict transform $X'$ is an open subspace of $B'$ and $U$ is scheme theoretically dense in $B'$. Since $X' \to B'$ is proper we see that $|X'|$ is closed in $|B'|$. As $U \subset B'$ is dense $X' = B'$.
We may and do replace $X$ by the scheme theoretic image of $s$. Then $X \to W$ is an isomorphism over $U$, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-scheme-theoretic-image-of-partial-section}. By Lemma \ref{lemma-dominate-modification-by-blowup} there exists a $U$-admissible blowup $W' \to W$ and an extension $W' \to X$ of $s$. We finish the proof by applying Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-extend-admissible-blowups} to extend $W' \to W$ to a $U$-admissible blowup of $Y$.
Throughout the proof all the algebraic spaces will be separated of finite type over $Y$. This in particular implies these algebraic spaces are quasi-compact and quasi-separated and that the morphisms between them will be quasi-compact and separated. See Morphisms of Spaces, Sections \ref{spaces-morphisms-section-separation-axioms} and \ref{spaces-morphisms-section-quasi-compact}. We will use that if $U \to W$ is an immersion of such spaces over $Y$, then the scheme theoretic image $Z$ of $U$ in $W$ is a closed subspace of $W$ and $U \to Z$ is an open immersion, $U \subset Z$ is scheme theoretically dense, and $|U| \subset |Z|$ is dense. See Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-immersion}. \medskip\noindent Let $X_{12} \subset X_1 \times_Y X_2$ be the scheme theoretic image of $U \to X_1 \times_Y X_2$. The projections $p_i : X_{12} \to X_i$ induce isomorphisms $p_i^{-1}(U) \to U$ by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-scheme-theoretic-image-of-partial-section}. Choose a $U$-admissible blowup $X_i^i \to X_i$ such that the strict transform $X_{12}^i$ of $X_{12}$ is isomorphic to an open subspace of $X_i^i$, see Lemma \ref{lemma-zariski-after-blowup}. Let $\mathcal{I}_i \subset \mathcal{O}_{X_i}$ be the corresponding finite type quasi-coherent sheaf of ideals. Recall that $X_{12}^i \to X_{12}$ is the blowup in $p_i^{-1}\mathcal{I}_i \mathcal{O}_{X_{12}}$, see Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-strict-transform}. Let $X_{12}'$ be the blowup of $X_{12}$ in $p_1^{-1}\mathcal{I}_1 p_2^{-1}\mathcal{I}_2 \mathcal{O}_{X_{12}}$, see Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-blowing-up-two-ideals} for what this entails. We obtain a commutative diagram $$ \xymatrix{ X_{12}' \ar[d] \ar[r] & X_{12}^2 \ar[d] \\ X_{12}^1 \ar[r] & X_{12} } $$ where all the morphisms are $U$-admissible blowing ups. Since $X_{12}^i \subset X_i^i$ is an open we may choose a $U$-admissible blowup $X_i' \to X_i^i$ restricting to $X_{12}' \to X_{12}^i$, see Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-extend-admissible-blowups}. Then $X_{12}' \subset X_i'$ is an open subspace and the diagram $$ \xymatrix{ X_{12}' \ar[d] \ar[r] & X_i' \ar[d] \\ X_{12}^i \ar[r] & X_i^i } $$ is commutative with vertical arrows blowing ups and horizontal arrows open immersions. Note that $X'_{12} \to X_1' \times_Y X_2'$ is an immersion and proper (use that $X'_{12} \to X_{12}$ is proper and $X_{12} \to X_1 \times_Y X_2$ is closed and $X_1' \times_Y X_2' \to X_1 \times_Y X_2$ is separated and apply Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-universally-closed-permanence}). Thus $X'_{12} \to  X_1' \times_Y X_2'$ is a closed immersion. If we define $X$ by glueing $X_1'$ and $X_2'$ along the common open subspace $X_{12}'$, then $X \to Y$ is of finite type and separated\footnote{Because we may check closedness of the diagonal $X \to X \times_Y X$ over the four open parts $X'_i \times_Y X'_j$ of $X \times_Y X$ where it is clear.}. As compositions of $U$-admissible blowups are $U$-admissible blowups (Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-composition-admissible-blowups}) the lemma is proved.
Let $Z \subset \mathbf{P}^n_Y$ be the scheme theoretic image of the immersion $U \to \mathbf{P}^n_Y$. Since $U \to \mathbf{P}^n_Y$ is quasi-compact we see that $U \subset Z$ is a (scheme theoretically) dense open subspace (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-immersion}). Apply Lemma \ref{lemma-find-common-blowups} to find a diagram $$ \xymatrix{ X' \ar[d] \ar[r] & \overline{X}' & Z' \ar[l] \ar[d] \\ X & U \ar[l] \ar[lu] \ar[u] \ar[ru] \ar[r] & Z } $$ with properties as listed in the statement of that lemma. As $X' \to X$ and $Z' \to Z$ are $U$-admissible blowups we find that $U$ is a scheme theoretically dense open of both $X'$ and $Z'$ (see Divisors on Spaces, Lemmas \ref{spaces-divisors-lemma-blowing-up-gives-effective-Cartier-divisor} and \ref{spaces-divisors-lemma-complement-effective-Cartier-divisor}). Since $Z' \to Z \to Y$ is proper we see that $Z' \subset \overline{X}'$ is a closed subspace (see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-universally-closed-permanence}). It follows that $X' \subset Z'$ (scheme theoretically), hence $X'$ is an open subspace of $Z'$ (small detail omitted) and the lemma is proved.
By Limits of Spaces, Lemma \ref{spaces-limits-lemma-embedding-into-affine-over-qs} there exists a dense open subspace $U \subset X$ and an immersion $U \to \mathbf{A}^n_Y$ over $Y$. Composing with the open immersion $\mathbf{A}^n_Y \to \mathbf{P}^n_Y$ we obtain a situation as in Lemma \ref{lemma-blowup-to-find-embedding} and the result follows.
By Limits of Spaces, Proposition \ref{spaces-limits-proposition-separated-closed-in-finite-presentation} we can find a closed immersion $X \to X_1$ where $X_1$ is separated and of finite presentation over $Y$. Clearly, if we prove the assertion for $X_1 \to Y$, then the result follows for $X$. Hence we may assume that $X$ is of finite presentation over $Y$. \medskip\noindent We may and do replace the base scheme $S$ by $\Spec(\mathbf{Z})$. Write $Y = \lim_i Y_i$ as a directed limit of quasi-separated algebraic spaces of finite type over $\Spec(\mathbf{Z})$, see Limits of Spaces, Proposition \ref{spaces-limits-proposition-approximate}. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-finite-presentation} we can find an index $i \in I$ and a scheme $X_i \to Y_i$ of finite presentation so that $X = Y \times_{Y_i} X_i$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-separated-morphism} we may assume that $X_i \to Y_i$ is separated. Clearly, if we prove the assertion for $X_i$ over $Y_i$, then the assertion holds for $X$. The case $X_i \to Y_i$ is treated by Lemma \ref{lemma-chow-noetherian}.
By Limits of Spaces, Proposition \ref{spaces-limits-proposition-separated-closed-in-finite-presentation} we can find a closed immersion $X \to X_1$ where $X_1$ is separated and of finite presentation over $Y$. Clearly, if we prove the assertion for $X_1 \to Y$, then the result follows for $X$. Hence we may assume that $X$ is of finite presentation over $Y$. \medskip\noindent We may and do replace the base scheme $S$ by $\Spec(\mathbf{Z})$. Write $Y = \lim_i Y_i$ as a directed limit of quasi-separated algebraic spaces of finite type over $\Spec(\mathbf{Z})$, see Limits of Spaces, Proposition \ref{spaces-limits-proposition-approximate}. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-separated} we may assume that $Y_i$ is separated for all $i$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-finite-presentation} we can find an index $i \in I$ and a scheme $X_i \to Y_i$ of finite presentation so that $X = Y \times_{Y_i} X_i$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-separated-morphism} we may assume that $X_i \to Y_i$ is separated. Clearly, if we prove the assertion for $X_i$ over $Y_i$, then the assertion holds for $X$. The case $X_i \to Y_i$ is treated by Lemma \ref{lemma-chow-noetherian-separated}.
Proof of (1). Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to X$. Set $U_1 = U_0 \times_X U_0$ and $U_2 = U_0 \times_X U_0 \times_X U_0$ as in our discussion of \'etale descent above. The categories $\textit{Coh}(U_i, \mathcal{I}_i)$ are abelian (Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-abelian}) and the pullback functors are exact functors $\textit{Coh}(U_0, \mathcal{I}_0) \to \textit{Coh}(U_1, \mathcal{I}_1)$ and $\textit{Coh}(U_1, \mathcal{I}_1) \to \textit{Coh}(U_2, \mathcal{I}_2)$ (Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-pullback}). The lemma then follows formally from the description of $\textit{Coh}(X, \mathcal{I})$ as a category of descent data. Some details omitted; compare with the proof of Groupoids, Lemma \ref{groupoids-lemma-abelian}. \medskip\noindent Part (2) follows immediately from the discussion in the previous paragraph. In the situation of (3) choose a commutative diagram $$ \xymatrix{ U' \ar[d] \ar[r] & U \ar[d] \\ X' \ar[r] & X } $$ where $U'$ and $U$ are affine schemes and the vertical morphisms are surjective \'etale. Then $U' \to U$ is a flat morphism of Noetherian schemes (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-local}) whence the pullback functor $\textit{Coh}(U, \mathcal{I}\mathcal{O}_U) \to \textit{Coh}(U', \mathcal{I}\mathcal{O}_{U'})$ is exact by Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-pullback}. Since we can check exactness in $\textit{Coh}(X, \mathcal{O}_X)$ on $U$ and similarly for $X', U'$ the assertion follows.
Since $\mathcal{H}$ is a sheaf on $X_\etale$ and since we have \'etale descent for objects of $\textit{Coh}(X, \mathcal{I})$ it suffices to prove this \'etale locally. Thus we reduce to the case of schemes which is Cohomology of Schemes, Lemma \ref{coherent-lemma-completion-internal-hom}.