hcju/stacksqa huggingface dataset:
There is a canonical map $|X| \to \lim |X_i|$. Choose $0 \in I$. If $W_0 \subset X_0$ is an open subspace, then we have $f_0^{-1}W_0 = \lim_{i \geq 0} f_{i0}^{-1}W_0$, see Lemma \ref{lemma-directed-inverse-system-has-limit}. Hence, if we can prove the lemma for inverse systems where $X_0$ is quasi-compact, then the lemma follows in general. Thus we may and do assume $X_0$ is quasi-compact. \medskip\noindent Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to X_0$. Set $U_i = X_i \times_{X_0} U_0$ and $U = X \times_{X_0} U_0$. Set $R_i = U_i \times_{X_i} U_i$ and $R = U \times_X U$. Recall that $U = \lim U_i$ and $R = \lim R_i$, see proof of Lemma \ref{lemma-directed-inverse-system-has-limit}. Recall that $|X| = |U|/|R|$ and $|X_i| = |U_i|/|R_i|$. By Limits, Lemma \ref{limits-lemma-topology-limit} we have $|U| = \lim |U_i|$ and $|R| = \lim |R_i|$. \medskip\noindent Surjectivity of $|X| \to \lim |X_i|$. Let $(x_i) \in \lim |X_i|$. Denote $S_i \subset |U_i|$ the inverse image of $x_i$. This is a finite nonempty set by the definition of decent spaces (Decent Spaces, Definition \ref{decent-spaces-definition-very-reasonable}). Hence $\lim S_i$ is nonempty, see Categories, Lemma \ref{categories-lemma-nonempty-limit}. Let $(u_i) \in \lim S_i \subset \lim |U_i|$. By the above this determines a point $u \in |U|$ which maps to an $x \in |X|$ mapping to the given element $(x_i)$ of $\lim |X_i|$. \medskip\noindent Injectivity of $|X| \to \lim |X_i|$. Suppose that $x, x' \in |X|$ map to the same point of $\lim |X_i|$. Choose lifts $u, u' \in |U|$ and denote $u_i, u'_i \in |U_i|$ the images. For each $i$ let $T_i \subset |R_i|$ be the set of points mapping to $(u_i, u'_i) \in |U_i| \times |U_i|$. This is a finite set by the definition of decent spaces (Decent Spaces, Definition \ref{decent-spaces-definition-very-reasonable}). Moreover $T_i$ is nonempty as we've assumed that $x$ and $x'$ map to the same point of $X_i$. Hence $\lim T_i$ is nonempty, see Categories, Lemma \ref{categories-lemma-nonempty-limit}. As before let $r \in |R| = \lim |R_i|$ be a point corresponding to an element of $\lim T_i$. Then $r$ maps to $(u, u')$ in $|U| \times |U|$ by construction and we see that $x = x'$ in $|X|$ as desired. \medskip\noindent Parenthetical statement: A quasi-separated algebraic space is decent, see Decent Spaces, Section \ref{decent-spaces-section-reasonable-decent} (the key observation to this is Properties of Spaces, Lemma \ref{spaces-properties-lemma-finite-fibres-presentation}). A locally separated algebraic space is decent by Decent Spaces, Lemma \ref{decent-spaces-lemma-locally-separated-decent}.
We will use the criterion of Topology, Lemma \ref{topology-lemma-characterize-limit}. We have seen that $|X| = \lim_i |X_i|$ as sets in Lemma \ref{lemma-inverse-limit-sets}. The maps $f_i : X \to X_i$ are morphisms of algebraic spaces hence determine continuous maps $|X| \to |X_i|$. Thus $f_i^{-1}(U_i)$ is open for each open $U_i \subset |X_i|$. Finally,  let $x \in |X|$ and let $x \in V \subset |X|$ be an open neighbourhood. We have to find an $i$ and an open neighbourhood $W_i \subset |X_i|$ of the image $x$ with $f_i^{-1}(W_i) \subset V$. Choose $0 \in I$. Choose a scheme $U_0$ and a surjective \'etale morphism $U_0 \to X_0$. Set $U = X \times_{X_0} U_0$ and $U_i = X_i \times_{X_0} U_0$ for $i \geq 0$. Then $U = \lim_{i \geq 0} U_i$ in the category of schemes by Lemma \ref{lemma-directed-inverse-system-has-limit}. Choose $u \in U$ mapping to $x$. By the result for schemes (Limits, Lemma \ref{limits-lemma-inverse-limit-top}) we can find an $i \geq 0$ and an open neighbourhood $E_i \subset U_i$ of the image of $u$ whose inverse image in $U$ is contained in the inverse image of $V$ in $U$. Then we can set $W_i \subset |X_i|$ equal to the image of $E_i$. This works because $|U_i| \to |X_i|$ is open.
Choose $0 \in I$. Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to X_0$. Set $U_i = X_i \times_{X_0} U_0$ and $U = X \times_{X_0} U_0$. Then each $U_i$ is a nonempty affine scheme. Hence $U = \lim U_i$ is nonempty (Limits, Lemma \ref{limits-lemma-limit-nonempty}) and thus $X$ is nonempty.
Set $Z = \overline{\{x\}} \subset |X|$ and $Z_i = \overline{\{x_i\}} \subset |X_i|$. Since $|X| \to |X_i|$ is continuous we see that $Z$ maps into $Z_i$ for each $i$. Hence we obtain an injective map $Z \to \lim Z_i$ because $|X| = \lim |X_i|$ as sets (Lemma \ref{lemma-inverse-limit-sets}). Suppose that $x' \in |X|$ is not in $Z$. Then there is an open subset $U \subset |X|$ with $x' \in U$ and $x \not \in U$. Since $|X| = \lim |X_i|$ as topological spaces (Lemma \ref{lemma-topology-limit}) we can write $U = \bigcup_{j \in J} f_j^{-1}(U_j)$ for some subset $J \subset I$ and opens $U_j \subset |X_j|$, see Topology, Lemma \ref{topology-lemma-describe-limits}. Then we see that for some $j \in J$ we have $f_j(x') \in U_j$ and $f_j(x) \not \in U_j$. In other words, we see that $f_j(x') \not \in Z_j$. Thus $Z = \lim Z_i$ as sets. \medskip\noindent Next, endow $Z$ and $Z_i$ with their reduced induced scheme structures, see Properties of Spaces, Definition \ref{spaces-properties-definition-reduced-induced-space}. The transition morphisms $X_{i'} \to X_i$ induce affine morphisms $Z_{i'} \to Z_i$ and the projections $X \to X_i$ induce compatible morphisms $Z \to Z_i$. Hence we obtain morphisms $Z \to \lim Z_i \to X$ of algebraic spaces. By Lemma \ref{lemma-directed-inverse-system-closed-immersions} we see that $\lim Z_i \to X$ is a closed immersion. By Lemma \ref{lemma-directed-inverse-system-reduced} the algebraic space $\lim Z_i$ is reduced. By the above $Z \to \lim Z_i$ is bijective on points. By uniqueness of the reduced induced closed subscheme structure we find that this morphism is an isomorphism of algebraic spaces.
Choose a surjective \'etale morphism $U_0 \to X_0$ where $U_0$ is an affine scheme (Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover}). Set $U_i = X_i \times_{X_0} U_0$. Set $R_0 = U_0 \times_{X_0} U_0$ and $R_i = R_0 \times_{X_0} X_i$. In the proof of Lemma \ref{lemma-directed-inverse-system-has-limit} we have seen that there exists a presentation $X = U/R$ with $U = \lim U_i$ and $R = \lim R_i$. Note that $U_i$ and $U$ are affine and that $R_i$ and $R$ are quasi-compact and separated (as $X_i$ is quasi-separated). Hence Limits, Lemma \ref{limits-lemma-descend-section} implies that $$ \mathcal{F}(U) = \colim \mathcal{F}_i(U_i) \quad\text{and}\quad \mathcal{F}(R) = \colim \mathcal{F}_i(R_i). $$ The lemma follows as $\Gamma(X, \mathcal{F}) = \Ker(\mathcal{F}(U) \to \mathcal{F}(R))$ and similarly $\Gamma(X_i, \mathcal{F}_i) = \Ker(\mathcal{F}_i(U_i) \to \mathcal{F}_i(R_i))$
Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to X_0$. Set $U_i = U_0 \times_{X_0} X_i$ and $U = U_0 \times_{X_0} X$. Apply Limits, Lemma \ref{limits-lemma-descend-isomorphism} to see that $Y_0 \times_{X_0} U_i \to Z_0 \times_{X_0} U_i$ is an isomorphism of schemes for some $i \geq 0$ (details omitted). As $U_i \to X_i$ is surjective \'etale, it follows that $Y_0 \times_{X_0} X_i \to Z_0 \times_{X_0} X_i$ is an isomorphism (details omitted).
Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to X_0$. For $i \geq 0$ set $U_i = U_0 \times_{X_0} X_i$ and set $U = U_0 \times_{X_0} X$. Note that $U_i$ and $U$ are affine schemes which come equipped with surjective \'etale morphisms $U_i \to X_i$ and $U \to X$. Set $R_i = U_i \times_{X_i} U_i$ and $R = U \times_X U$ with projections $s_i, t_i : R_i \to U_i$ and $s, t : R \to U$. Note that $R_i$ and $R$ are quasi-compact separated schemes (as the algebraic spaces $X_i$ and $X$ are quasi-separated). The maps $s_i : R_i \to U_i$ and $s : R \to U$ are of finite type. By definition $X_i$ is separated if and only if $(t_i, s_i) : R_i \to U_i \times U_i$ is a closed immersion, and since $X$ is separated by assumption, the morphism $(t, s) : R \to U \times U$ is a closed immersion. Since $R \to U$ is of finite type, there exists an $i$ such that the morphism $R \to U_i \times U$ is a closed immersion (Limits, Lemma \ref{limits-lemma-finite-type-eventually-closed}). Fix such an $i \in I$. Apply Limits, Lemma \ref{limits-lemma-descend-closed-immersion-finite-presentation} to the system of morphisms $R_{i'} \to U_i \times U_{i'}$ for $i' \geq i$ (this is permissible as indeed $R_{i'} = R_i \times_{U_i \times U_i} U_i \times U_{i'}$) to see that $R_{i'} \to U_i \times U_{i'}$ is a closed immersion for $i'$ sufficiently large. This implies immediately that $R_{i'} \to U_{i'} \times U_{i'}$ is a closed immersion finishing the proof of the lemma.
Choose $0 \in I$. Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to X_0$. Set $U = U_0 \times_{X_0} X$ and $U_i = U_0 \times_{X_0} X_i$ for $i \geq 0$. Since the transition morphisms are affine, the algebraic spaces $U_i$ and $U$ are affine. Thus $U \to X$ is an \'etale morphism of affine schemes. Hence we can write $X = \Spec(A)$, $U = \Spec(B)$ and $$ B = A[x_1, \ldots, x_n]/(g_1, \ldots, g_n) $$ such that $\Delta = \det(\partial g_\lambda/\partial x_\mu)$ is invertible in $B$, see Algebra, Lemma \ref{algebra-lemma-etale-standard-smooth}. Set $A_i = \mathcal{O}_{X_i}(X_i)$. We have $A = \colim A_i$ by Lemma \ref{lemma-descend-section}. After increasing $0$ we may assume we have $g_{1, i}, \ldots, g_{n, i} \in A_i[x_1, \ldots, x_n]$ mapping to $g_1, \ldots, g_n$. Set $$ B_i = A_i[x_1, \ldots, x_n]/(g_{1, i}, \ldots, g_{n, i}) $$ for all $i \geq 0$. Increasing $0$ if necessary we may assume that $\Delta_i = \det(\partial g_{\lambda, i}/\partial x_\mu)$ is invertible in $B_i$ for all $i \geq 0$. Thus $A_i \to B_i$ is an \'etale ring map. After increasing $0$ we may assume also that $\Spec(B_i) \to \Spec(A_i)$ is surjective, see Limits, Lemma \ref{limits-lemma-descend-surjective}. Increasing $0$ yet again we may choose elements $h_{1, i}, \ldots, h_{n, i} \in \mathcal{O}_{U_i}(U_i)$ which map to the classes of $x_1, \ldots, x_n$ in $B = \mathcal{O}_U(U)$ and such that $g_{\lambda, i}(h_{\nu, i}) = 0$ in $\mathcal{O}_{U_i}(U_i)$. Thus we obtain a commutative diagram \begin{equation} \label{equation-to-show-cartesian} \vcenter{ \xymatrix{ X_i \ar[d] & U_i \ar[l] \ar[d] \\ \Spec(A_i) & \Spec(B_i) \ar[l] } } \end{equation} By construction $B_i = B_0 \otimes_{A_0} A_i$ and $B = B_0 \otimes_{A_0} A$. Consider the morphism $$ f_0 : U_0 \longrightarrow X_0 \times_{\Spec(A_0)} \Spec(B_0) $$ This is a morphism of quasi-compact and quasi-separated algebraic spaces representable, separated and \'etale over $X_0$. The base change of $f_0$ to $X$ is an isomorphism by our choices. Hence Lemma \ref{lemma-descend-equality} guarantees that there exists an $i$ such that the base change of $f_0$ to $X_i$ is an isomorphism, in other words the diagram (\ref{equation-to-show-cartesian}) is cartesian. Thus Descent, Lemma \ref{descent-lemma-descent-data-sheaves} applied to the fppf covering $\{\Spec(B_i) \to \Spec(A_i)\}$ combined with Descent, Lemma \ref{descent-lemma-affine} give that $X_i \to \Spec(A_i)$ is representable by a scheme affine over $\Spec(A_i)$ as desired. (Of course it then also follows that $X_i = \Spec(A_i)$ but we don't need this.)
Choose a finite affine open covering $X = \bigcup W_j$. By Lemma \ref{lemma-descend-opens} we can find an $i \in I$ and open subspaces $W_{j, i} \subset X_i$ whose base change to $X$ is $W_j \to X$. By Lemma \ref{lemma-limit-is-affine} we may assume that each $W_{j, i}$ is an affine scheme. This means that $X_i$ is a scheme (see for example Properties of Spaces, Section \ref{spaces-properties-section-schematic}).
Let $0 \in I$. Choose an affine scheme $W$ and an \'etale morphism $W \to Y$ such that the image of $|W| \to |Y|$ contains the image of $|X_0| \to |Y|$. This is possible as $X_0$ is quasi-compact. It suffices to check that $W \times_Y X_i \to W$ is separated for some $i \geq 0$ because the diagonal of $W \times_Y X_i$ over $W$ is the base change of $X_i \to X_i \times_Y X_i$ by the surjective \'etale morphism $(X_i \times_Y X_i) \times_Y W \to X_i \times_Y X_i$. Since $Y$ is quasi-separated the algebraic spaces $W \times_Y X_i$ are quasi-compact (as well as quasi-separated). Thus we may base change to $W$ and assume $Y$ is an affine scheme. When $Y$ is an affine scheme, we have to show that $X_i$ is a separated algebraic space for $i$ large enough and we are given that $X$ is a separated algebraic space. Thus this case follows from Lemma \ref{lemma-descend-separated}.
Choose an affine scheme $W$ and a surjective \'etale morphism $W \to Y$. Then $X \times_Y W$ is affine and it suffices to check that $X_i \times_Y W$ is affine for some $i$ (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-affine-local}). This follows from Lemma \ref{lemma-limit-is-affine}.
Choose an affine scheme $W$ and a surjective \'etale morphism $W \to Y$. Then $X \times_Y W$ is finite over $W$ and it suffices to check that $X_i \times_Y W$ is finite over $W$ for some $i$ (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-integral-local}). By Lemma \ref{lemma-limit-is-scheme} this reduces us to the case of schemes. In the case of schemes it follows from Limits, Lemma \ref{limits-lemma-eventually-finite}.
Choose an affine scheme $W$ and a surjective \'etale morphism $W \to Y$. Then $X \times_Y W$ is a closed subspace of $W$ and it suffices to check that $X_i \times_Y W$ is a closed subspace $W$ for some $i$ (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-local}). By Lemma \ref{lemma-limit-is-scheme} this reduces us to the case of schemes. In the case of schemes it follows from Limits, Lemma \ref{limits-lemma-eventually-closed-immersion}.
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to V_0 \times_{Y_0} X_0$. Diagram $$ \xymatrix{ U_0 \ar[d] \ar[r] & V_0 \ar[d] \\ X_0 \ar[r] & Y_0 } $$ The vertical arrows are surjective and \'etale by construction. We can base change this diagram to $B_i$ or $B$ to get $$ \vcenter{ \xymatrix{ U_i \ar[d] \ar[r] & V_i \ar[d] \\ X_i \ar[r] & Y_i } } \quad\text{and}\quad \vcenter{ \xymatrix{ U \ar[d] \ar[r] & V \ar[d] \\ X \ar[r] & Y } } $$ Note that $U_i, V_i, U, V$ are affine schemes, the vertical morphisms are surjective \'etale, and the limit of the morphisms $U_i \to V_i$ is $U \to V$. Recall that $X_i \to Y_i$ is \'etale if and only if $U_i \to V_i$ is \'etale and similarly $X \to Y$ is \'etale if and only if $U \to V$ is \'etale (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-etale-local}). Since $f_0$ is locally of finite presentation, so is the morphism $U_0 \to V_0$. Hence the lemma follows from Limits, Lemma \ref{limits-lemma-descend-etale}.
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to V_0 \times_{Y_0} X_0$. Diagram $$ \xymatrix{ U_0 \ar[d] \ar[r] & V_0 \ar[d] \\ X_0 \ar[r] & Y_0 } $$ The vertical arrows are surjective and \'etale by construction. We can base change this diagram to $B_i$ or $B$ to get $$ \vcenter{ \xymatrix{ U_i \ar[d] \ar[r] & V_i \ar[d] \\ X_i \ar[r] & Y_i } } \quad\text{and}\quad \vcenter{ \xymatrix{ U \ar[d] \ar[r] & V \ar[d] \\ X \ar[r] & Y } } $$ Note that $U_i, V_i, U, V$ are affine schemes, the vertical morphisms are surjective \'etale, and the limit of the morphisms $U_i \to V_i$ is $U \to V$. Recall that $X_i \to Y_i$ is smooth if and only if $U_i \to V_i$ is smooth and similarly $X \to Y$ is smooth if and only if $U \to V$ is smooth (Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-smooth}). Since $f_0$ is locally of finite presentation, so is the morphism $U_0 \to V_0$. Hence the lemma follows from Limits, Lemma \ref{limits-lemma-descend-smooth}.
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to V_0 \times_{Y_0} X_0$. Diagram $$ \xymatrix{ U_0 \ar[d] \ar[r] & V_0 \ar[d] \\ X_0 \ar[r] & Y_0 } $$ The vertical arrows are surjective and \'etale by construction. We can base change this diagram to $B_i$ or $B$ to get $$ \vcenter{ \xymatrix{ U_i \ar[d] \ar[r] & V_i \ar[d] \\ X_i \ar[r] & Y_i } } \quad\text{and}\quad \vcenter{ \xymatrix{ U \ar[d] \ar[r] & V \ar[d] \\ X \ar[r] & Y } } $$ Note that $U_i, V_i, U, V$ are affine schemes, the vertical morphisms are surjective \'etale, the limit of the morphisms $U_i \to V_i$ is $U \to V$, and the morphisms $U_i \to X_i \times_{Y_i} V_i$ and $U \to X \times_Y V$ are surjective (as base changes of $U_0 \to X_0 \times_{Y_0} V_0$). In particular, we see that $X_i \to Y_i$ is surjective if and only if $U_i \to V_i$ is surjective and similarly $X \to Y$ is surjective if and only if $U \to V$ is surjective. Since $f_0$ is locally of finite presentation, so is the morphism $U_0 \to V_0$. Hence the lemma follows from the case of schemes (Limits, Lemma \ref{limits-lemma-descend-surjective}).
Recall that a morphism $X \to Y$ is universally injective if and only if the diagonal $X \to X \times_Y X$ is surjective (Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-universally-injective} and Lemma \ref{spaces-morphisms-lemma-universally-injective}). Observe that $X_0 \to X_0 \times_{Y_0} X_0$ is of locally of finite presentation (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-diagonal-morphism-finite-type}). Hence the lemma follows from Lemma \ref{lemma-descend-surjective} by considering the morphism $X_0 \to X_0 \times_{Y_0} X_0$.
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Set $V_i = V_0 \times_{Y_0} Y_i$ and $V = V_0 \times_{Y_0} Y$. Since $f$ is affine we see that $V \times_Y X = \lim V_i \times_{Y_i} X_i$ is affine. By Lemma \ref{lemma-limit-is-affine} we see that $V_i \times_{Y_i} X_i$ is affine for some $i \geq 0$. For this $i$ the morphism $f_i$ is affine (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-affine-local}).
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Set $V_i = V_0 \times_{Y_0} Y_i$ and $V = V_0 \times_{Y_0} Y$. Since $f$ is finite we see that $V \times_Y X = \lim V_i \times_{Y_i} X_i$ is a scheme finite over $V$. By Lemma \ref{lemma-limit-is-affine} we see that $V_i \times_{Y_i} X_i$ is affine for some $i \geq 0$. Increasing $i$ if necessary we find that $V_i \times_{Y_i} X_i \to V_i$ is finite by Limits, Lemma \ref{limits-lemma-descend-finite-finite-presentation}. For this $i$ the morphism $f_i$ is finite (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-integral-local}).
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Set $V_i = V_0 \times_{Y_0} Y_i$ and $V = V_0 \times_{Y_0} Y$. Since $f$ is a closed immersion we see that $V \times_Y X = \lim V_i \times_{Y_i} X_i$ is a closed subscheme of the affine scheme $V$. By Lemma \ref{lemma-limit-is-affine} we see that $V_i \times_{Y_i} X_i$ is affine for some $i \geq 0$. Increasing $i$ if necessary we find that $V_i \times_{Y_i} X_i \to V_i$ is a closed immersion by Limits, Lemma \ref{limits-lemma-descend-closed-immersion-finite-presentation}. For this $i$ the morphism $f_i$ is a closed immersion (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-integral-local}).
Apply Lemma \ref{lemma-descend-closed-immersion} to the diagonal morphism $\Delta_{X_0/Y_0} : X_0 \to X_0 \times_{Y_0} X_0$. (Diagonal morphisms are locally of finite type and the fibre product $X_0 \times_{Y_0} X_0$ is quasi-compact and quasi-separated. Some details omitted.)
Being an isomorphism is equivalent to being \'etale, universally injective, and surjective, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-etale-universally-injective-open}. Thus the lemma follows from Lemmas \ref{lemma-descend-etale}, \ref{lemma-descend-surjective}, and \ref{lemma-descend-universally-injective}.
Recall that a morphism is a monomorphism if and only if the diagonal is an isomorphism. The morphism $X_0 \to X_0 \times_{Y_0} X_0$ is locally of finite presentation by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-diagonal-morphism-finite-type}. Since $X_0 \times_{Y_0} X_0$ is quasi-compact and quasi-separated we conclude from Lemma \ref{lemma-descend-isomorphism} that $\Delta_i : X_i \to X_i \times_{Y_i} X_i$ is an isomorphism for some $i \geq 0$. For this $i$ the morphism $f_i$ is a monomorphism.
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Choose an affine scheme $U_0$ and a surjective \'etale morphism $U_0 \to V_0 \times_{Y_0} X_0$. Diagram $$ \xymatrix{ U_0 \ar[d] \ar[r] & V_0 \ar[d] \\ X_0 \ar[r] & Y_0 } $$ The vertical arrows are surjective and \'etale by construction. We can base change this diagram to $B_i$ or $B$ to get $$ \vcenter{ \xymatrix{ U_i \ar[d] \ar[r] & V_i \ar[d] \\ X_i \ar[r] & Y_i } } \quad\text{and}\quad \vcenter{ \xymatrix{ U \ar[d] \ar[r] & V \ar[d] \\ X \ar[r] & Y } } $$ Note that $U_i, V_i, U, V$ are affine schemes, the vertical morphisms are surjective \'etale, and the limit of the morphisms $U_i \to V_i$ is $U \to V$. Recall that $\mathcal{F}_i$ is flat over $Y_i$ if and only if $\mathcal{F}_i|_{U_i}$ is flat over $V_i$ and similarly $\mathcal{F}$ is flat over $Y$ if and only if $\mathcal{F}|_U$ is flat over $V$ (Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-flat}). Since $f_0$ is locally of finite presentation, so is the morphism $U_0 \to V_0$. Hence the lemma follows from Limits, Lemma \ref{limits-lemma-descend-module-flat-finite-presentation}.
Choose an affine scheme $V_0$ and a surjective \'etale morphism $V_0 \to Y_0$. Set $V_i = Y_i \times_{Y_0} V_0$ and $V = Y \times_{Y_0} V_0$. It suffices to prove that the base change of $f_i$ to $V_i$ is proper, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-proper-local}. Thus we may assume $Y_0$ is affine. \medskip\noindent By Lemma \ref{lemma-descend-separated-morphism} we see that $f_i$ is separated for some $i \geq 0$. Replacing $0$ by $i$ we may assume that $f_0$ is separated. Observe that $f_0$ is quasi-compact. Thus $f_0$ is separated and of finite type. By Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-weak-chow} we can choose a diagram $$ \xymatrix{ X_0 \ar[rd] & X_0' \ar[d] \ar[l]^\pi \ar[r] & \mathbf{P}^n_{Y_0} \ar[dl] \\ & Y_0 & } $$ where $X_0' \to \mathbf{P}^n_{Y_0}$ is an immersion, and $\pi : X_0' \to X_0$ is proper and surjective. Introduce $X' = X_0' \times_{Y_0} Y$ and $X_i' = X_0' \times_{Y_0} Y_i$. By Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-composition-proper} and \ref{spaces-morphisms-lemma-base-change-proper} we see that $X' \to Y$ is proper. Hence $X' \to \mathbf{P}^n_Y$ is a closed immersion (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-universally-closed-permanence}). By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-image-proper-is-proper} it suffices to prove that $X'_i \to Y_i$ is proper for some $i$. By Lemma \ref{lemma-descend-closed-immersion} we find that $X'_i \to \mathbf{P}^n_{Y_i}$ is a closed immersion for $i$ large enough. Then $X'_i \to Y_i$ is proper and we win.