hcju/stacksqa huggingface dataset:
By Proposition \ref{proposition-characterize-ample} there exists an integer $n_0$ such that $\mathcal{L}^{\otimes n}$ is globally generated for all $n \geq n_0$. Let $x \in X$ be a point. By the above we can find $a \in S_{n_0}$ and $b \in S_{n_0 + 1}$ such that $a$ and $b$ do not vanish at $x$. Hence $f(x) \in D_{+}(a) \cap D_{+}(b) = D_{+}(ab)$. By Constructions, Lemma \ref{constructions-lemma-where-invertible} we see that $f(x) \in W_1$ as desired. By Constructions, Lemma \ref{constructions-lemma-invertible-map-into-proj} which was used in the construction of the map $f$ the maps $f^*\mathcal{O}_Y(n_0) \to \mathcal{L}^{\otimes n_0}$ and $f^*\mathcal{O}_Y(n_0 + 1) \to \mathcal{L}^{\otimes n_0 + 1}$ are isomorphisms in a neighbourhood of $x$. By compatibility with the algebra structure and the fact that $f$ maps into $W$ we conclude all the maps $f^*\mathcal{O}_Y(n) \to \mathcal{L}^{\otimes n}$ are isomorphisms in a neighbourhood of $x$. Hence we win.
Let $s \in S_{+}$ be homogeneous such that $X_s$ is affine open in $X$. Recall that $\widetilde{M}|_{D_{+}(s)}$ corresponds to the $S_{(s)}$-module $M_{(s)}$, see Constructions, Lemma \ref{constructions-lemma-proj-sheaves}. Recall that $f^{-1}(D_{+}(s)) = X_s$. As $X$ carries an ample invertible sheaf it is quasi-compact and quasi-separated, see Section \ref{section-ample}. By Lemma \ref{lemma-invert-s-sections} there is a canonical isomorphism $M_{(s)} = \Gamma_*(X, \mathcal{L}, \mathcal{F})_{(s)} \to \Gamma(X_s, \mathcal{F})$. Since $\mathcal{F}$ is quasi-coherent this leads to a canonical isomorphism $$ f^*\widetilde{M}|_{X_s} \to \mathcal{F}|_{X_s} $$ Since $\mathcal{L}$ is ample on $X$ we know that $X$ is covered by the affine opens of the form $X_s$. Hence it suffices to prove that the displayed maps glue on overlaps. Proof of this is omitted.
Since $X$ is quasi-compact we can find homogeneous elements $f_1, \ldots, f_n \in S$ of positive degrees such that $X = D_+(f_1) \cup \ldots \cup D_+(f_n)$. Let $d$ be the least common multiple of the degrees of $f_1, \ldots, f_n$. After replacing $f_i$ by a power we may assume that each $f_i$ has degree $d$. Then we see that $\mathcal{L} = \mathcal{O}_X(d)$ is invertible, the multiplication maps $\mathcal{O}_X(ad) \otimes \mathcal{O}_X(bd) \to \mathcal{O}_X((a + b)d)$ are isomorphisms, and each $f_i$ determines a global section $s_i$ of $\mathcal{L}$ such that $X_{s_i} = D_+(f_i)$, see Constructions, Lemmas \ref{constructions-lemma-where-invertible} and \ref{constructions-lemma-principal-open}. Thus $\Gamma(X, \mathcal{F}(ad)) = \Gamma(X, \mathcal{F} \otimes \mathcal{L}^{\otimes a})$. Recall that $\widetilde{M}|_{D_{+}(f_i)}$ corresponds to the $S_{(f_i)}$-module $M_{(f_i)}$, see Constructions, Lemma \ref{constructions-lemma-proj-sheaves}. Since the degree of $f_i$ is $d$, the isomorphism class of $M_{(f_i)}$ depends only on the homogeneous summands of $M$ of degree divisible by $d$. More precisely, the isomorphism class of $M_{(f_i)}$ depends only on the graded $\Gamma_*(X, \mathcal{L})$-module $\Gamma_*(X, \mathcal{L}, \mathcal{F})$ and the image $s_i$ of $f_i$ in $\Gamma_*(X, \mathcal{L})$. The scheme $X$ is quasi-compact by assumption and separated by Constructions, Lemma \ref{constructions-lemma-proj-separated}. By Lemma \ref{lemma-invert-s-sections} there is a canonical isomorphism $$ M_{(f_i)} = \Gamma_*(X, \mathcal{L}, \mathcal{F})_{(s_i)} \to \Gamma(X_{s_i}, \mathcal{F}). $$ The construction of the map in Constructions, Lemma \ref{constructions-lemma-comparison-proj-quasi-coherent} then shows that it is an isomorphism over $D_+(f_i)$ hence an isomorphism as $X$ is covered by these opens. We omit the proof of the final statement.
Let $V_i$ be any affine open containing $\eta_i$ and disjoint from the closed set $Z_1 \cup \ldots \hat Z_i \ldots \cup Z_n$. Since $X$ is quasi-separated for each $i$ the union $W_i = \bigcup_{j, j \not = i} V_i \cap V_j$ is a quasi-compact open of $V_i$ not containing $\eta_i$. We can find open neighbourhoods $U_i \subset V_i$ containing $\eta_i$ and disjoint from $W_i$ by Algebra, Lemma \ref{algebra-lemma-standard-open-containing-maximal-point}. Finally, $U$ is affine since it is the spectrum of the ring $R_1 \times \ldots \times R_n$ where $R_i = \mathcal{O}_X(U_i)$, see Schemes, Lemma \ref{schemes-lemma-disjoint-union-affines}.
Suppose that $x \in Z_1 \cap \ldots \cap Z_r$ and $x \not \in Z_{r + 1}, \ldots, Z_n$. Then we may choose an affine open $W \subset X$ such that $x \in W$ and $W \cap Z_i = \emptyset$ for $i = r + 1, \ldots, n$. Note that clearly $\eta_i \in W$ for $i = 1, \ldots, r$. By Lemma \ref{lemma-maximal-points-affine} we may choose affine opens $U_i \subset X$ which are pairwise disjoint such that $\eta_i \in U_i$ for $i = r + 1, \ldots, n$. Since $X$ is quasi-separated the opens $W \cap U_i$ are quasi-compact and do not contain $\eta_i$ for $i = r + 1, \ldots, n$. Hence by Algebra, Lemma \ref{algebra-lemma-standard-open-containing-maximal-point} we may shrink $U_i$ such that $W \cap U_i = \emptyset$ for $i = r + 1, \ldots, n$. Then the union $U = W \cup \bigcup_{i = r + 1, \ldots, n} U_i$ is disjoint and hence (by Schemes, Lemma \ref{schemes-lemma-disjoint-union-affines}) a suitable affine open.
By Properties, Definition \ref{definition-quasi-affine} a quasi-affine scheme is a quasi-compact open subscheme of an affine scheme. Any affine scheme $\Spec(R)$ is isomorphic to $\text{Proj}(R[X])$ where $R[X]$ is graded by setting $\deg(X) = 1$. By Proposition \ref{proposition-characterize-ample} if $X$ has an ample invertible sheaf then $X$ is isomorphic to an open subscheme of $\text{Proj}(S)$ for some graded ring $S$. Hence, it suffices to prove the lemma in case (4). (We urge the reader to prove case (2) directly for themselves.) \medskip\noindent Thus assume $X \subset \text{Proj}(S)$ is a locally closed subscheme where $S$ is some graded ring. Let $T = \overline{X} \setminus X$. Recall that the standard opens $D_{+}(f)$ form a basis of the topology on $\text{Proj}(S)$. Since $E$ is finite we may choose finitely many homogeneous elements $f_i \in S_{+}$ such that $$ E \subset D_{+}(f_1) \cup \ldots \cup D_{+}(f_n) \subset \text{Proj}(S) \setminus T $$ Suppose that $E = \{\mathfrak p_1, \ldots, \mathfrak p_m\}$ as a subset of $\text{Proj}(S)$. Consider the ideal $I = (f_1, \ldots, f_n) \subset S$. Since $I \not \subset \mathfrak p_j$ for all $j = 1, \ldots, m$ we see from Algebra, Lemma \ref{algebra-lemma-graded-silly} that there exists a homogeneous element $f \in I$, $f \not \in \mathfrak p_j$ for all $j = 1, \ldots, m$. Then $E \subset D_{+}(f) \subset D_{+}(f_1) \cup \ldots \cup D_{+}(f_n)$. Since $D_{+}(f)$ does not meet $T$ we see that $X \cap D_{+}(f)$ is a closed subscheme of the affine scheme $D_{+}(f)$, hence is an affine open of $X$ as desired.
The reader can modify the proof of Lemma \ref{lemma-ample-finite-set-in-affine} to prove this lemma; we will instead deduce the lemma from it. By Lemma \ref{lemma-ample-finite-set-in-affine} we can choose an affine open $U \subset W$ such that $E \subset U$. Consider the graded ring $S = \Gamma_*(X, \mathcal{L}) = \bigoplus_{n \geq 0} \Gamma(X, \mathcal{L}^{\otimes n})$. For each $x \in E$ let $\mathfrak p_x \subset S$ be the graded ideal of sections vanishing at $x$. It is clear that $\mathfrak p_x$ is a prime ideal and since some power of $\mathcal{L}$ is globally generated, it is clear that $S_{+} \not \subset \mathfrak p_x$. Let $I \subset S$ be the graded ideal of sections vanishing on all points of $X \setminus U$. Since the sets $X_s$ form a basis for the topology we see that $I \not \subset \mathfrak p_x$ for all $x \in E$. By (graded) prime avoidance (Algebra, Lemma \ref{algebra-lemma-graded-silly}) we can find $s \in I$ homogeneous with $s \not \in \mathfrak p_x$ for all $x \in E$. Then $E \subset X_s \subset U$ and $X_s$ is affine by Lemma \ref{lemma-affine-cap-s-open}.
The proof of this lemma has a lot in common with the proof of Algebra, Lemma \ref{algebra-lemma-silly}. Say $E = \{x_1, \ldots, x_n\}$. If $E = W = \emptyset$, then $s = 0$ works. If $W \not = \emptyset$, then we may assume $E \not = \emptyset$ by adding a point if necessary. Thus we may assume $n \geq 1$. We will prove the lemma by induction on $n$. \medskip\noindent Base case: $n = 1$. After replacing $W$ by an affine open neighbourhood of $x_1$ in $W$, we may assume $W$ is affine. Combining Lemmas \ref{lemma-quasi-affine-O-ample} and Proposition \ref{proposition-characterize-ample} we see that every quasi-coherent $\mathcal{O}_X$-module is globally generated. Hence there exists a global section $s$ of $\mathcal{L}$ which does not vanish at $x_1$. On the other hand, let $Z \subset X$ be the reduced induced closed subscheme on $X \setminus W$. Applying global generation to the quasi-coherent ideal sheaf $\mathcal{I}$ of $Z$ we find a global section $f$ of $\mathcal{I}$ which does not vanish at $x_1$. Then $s' = fs$ is a global section of $\mathcal{L}$ which does not vanish at $x_1$ such that $X_{s'} \subset W$. Then $X_{s'}$ is affine by Lemma \ref{lemma-affine-cap-s-open}. \medskip\noindent Induction step for $n > 1$. If there is a specialization $x_i \leadsto x_j$ for $i \not = j$, then it suffices to prove the lemma for $\{x_1, \ldots, x_n\} \setminus \{x_i\}$ and we are done by induction. Thus we may assume there are no specializations among the $x_i$. By either Lemma \ref{lemma-ample-finite-set-in-affine} or Lemma \ref{lemma-ample-finite-set-in-principal-affine} we may assume $W$ is affine. By induction we can find a global section $s$ of $\mathcal{L}$ such that $X_s \subset W$ is affine and contains $x_1, \ldots, x_{n - 1}$. If $x_n \in X_s$ then we are done. Assume $s$ is zero at $x_n$. By the case $n = 1$ we can find a global section $s'$ of $\mathcal{L}$ with $\{x_n\} \subset X_{s'} \subset W \setminus \overline{\{x_1, \ldots, x_{n - 1}\}}$. Here we use that $x_n$ is not a specialization of $x_1, \ldots, x_{n - 1}$. Then $s + s'$ is a global section of $\mathcal{L}$ which is nonvanishing at $x_1, \ldots, x_n$ with $X_{s + s'} \subset W$ and we conclude as before.
Part (1) means $\QCoh(\mathcal{O}_X)$ (a) has all colimits, (b) filtered colimits are exact, and (c) has a generator, see Injectives, Section \ref{injectives-section-grothendieck-conditions}. By Schemes, Section \ref{schemes-section-quasi-coherent} colimits in $\QCoh(\mathcal{O}_X)$ exist and agree with colimits in $\textit{Mod}(\mathcal{O}_X)$. By Modules, Lemma \ref{modules-lemma-limits-colimits} filtered colimits are exact. Hence (a) and (b) hold. To construct a generator $U$, pick a cardinal $\kappa$ as in Lemma \ref{lemma-colimit-kappa}. Pick a collection $(\mathcal{F}_t)_{t \in T}$ of $\kappa$-generated quasi-coherent sheaves as in Lemma \ref{lemma-set-of-iso-classes}. Set $U = \bigoplus_{t \in T} \mathcal{F}_t$. Since every object of $\QCoh(\mathcal{O}_X)$ is a filtered colimit of $\kappa$-generated quasi-coherent modules, i.e., of objects isomorphic to $\mathcal{F}_t$, it is clear that $U$ is a generator. The assertions on limits and injectives hold in any Grothendieck abelian category, see Injectives, Theorem \ref{injectives-theorem-injective-embedding-grothendieck} and Lemma \ref{injectives-lemma-grothendieck-products}. \medskip\noindent Proof of (2). To construct $Q$ we use the following general procedure. Given an object $\mathcal{F}$ of $\textit{Mod}(\mathcal{O}_X)$ we consider the functor $$ \QCoh(\mathcal{O}_X)^{opp} \longrightarrow \textit{Sets},\quad \mathcal{G} \longmapsto \Hom_X(\mathcal{G}, \mathcal{F}) $$ This functor transforms colimits into limits, hence is representable, see Injectives, Lemma \ref{injectives-lemma-grothendieck-brown}. Thus there exists a quasi-coherent sheaf $Q(\mathcal{F})$ and a functorial isomorphism $\Hom_X(\mathcal{G}, \mathcal{F}) = \Hom_X(\mathcal{G}, Q(\mathcal{F}))$ for $\mathcal{G}$ in $\QCoh(\mathcal{O}_X)$. By the Yoneda lemma (Categories, Lemma \ref{categories-lemma-yoneda}) the construction $\mathcal{F} \leadsto Q(\mathcal{F})$ is functorial in $\mathcal{F}$. By construction $Q$ is a right adjoint to the inclusion functor. The fact that $Q(\mathcal{F}) \to \mathcal{F}$ is an isomorphism when $\mathcal{F}$ is quasi-coherent is a formal consequence of the fact that the inclusion functor $\QCoh(\mathcal{O}_X) \to \textit{Mod}(\mathcal{O}_X)$ is fully faithful.
Let $\mathcal{U}$ be a representable category fibred in groupoids over $S$. Let $f : \mathcal{U} \to \mathcal{Y}$ be a $1$-morphism. We have to show that $\mathcal{X} \times_\mathcal{Y} \mathcal{U}$ is representable by an algebraic space and \'etale over $\mathcal{U}$. Consider the composition $h : \mathcal{U} \to \mathcal{Z}$. Then $$ \mathcal{X} \times_\mathcal{Z} \mathcal{U} \longrightarrow \mathcal{Y} \times_\mathcal{Z} \mathcal{U} $$ is a $1$-morphism between categories fibres in groupoids which are both representable by algebraic spaces and both \'etale over $\mathcal{U}$. Hence by Properties of Spaces, Lemma \ref{spaces-properties-lemma-etale-permanence} this is represented by an \'etale morphism of algebraic spaces. Finally, we obtain the result we want as the morphism $f$ induces a morphism $\mathcal{U} \to \mathcal{Y} \times_\mathcal{Z} \mathcal{U}$ and we have $$ \mathcal{X} \times_\mathcal{Y} \mathcal{U} = (\mathcal{X} \times_\mathcal{Z} \mathcal{U}) \times_{(\mathcal{Y} \times_\mathcal{Z} \mathcal{U})} \mathcal{U}. $$
Given two schemes $T_1$, $T_2$ over $S$ denote $\mathcal{T}_i = (\Sch/T_i)_{fppf}$ the associated representable fibre categories. Suppose given $1$-morphisms $f_i : \mathcal{T}_i \to \mathcal{X}$. According to Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal} it suffices to prove that the $2$-fibered product $\mathcal{T}_1 \times_\mathcal{X} \mathcal{T}_2$ is representable by an algebraic space. By Stacks, Lemma \ref{stacks-lemma-2-fibre-product-stacks-in-setoids-over-stack-in-groupoids} this is in any case a stack in setoids. Thus $\mathcal{T}_1 \times_\mathcal{X} \mathcal{T}_2$ corresponds to some sheaf $F$ on $(\Sch/S)_{fppf}$, see Stacks, Lemma \ref{stacks-lemma-stack-in-setoids-characterize}. Let $U$ be the algebraic space which represents $\mathcal{U}$. By assumption $$ \mathcal{T}_i' = \mathcal{U} \times_{u, \mathcal{X}, f_i} \mathcal{T}_i $$ is representable by an algebraic space $T'_i$ over $S$. Hence $\mathcal{T}_1' \times_\mathcal{U} \mathcal{T}_2'$ is representable by the algebraic space $T'_1 \times_U T'_2$. Consider the commutative diagram $$ \xymatrix{ & \mathcal{T}_1 \times_{\mathcal X} \mathcal{T}_2 \ar[rr]\ar'[d][dd] & & \mathcal{T}_1 \ar[dd] \\ \mathcal{T}_1' \times_\mathcal{U} \mathcal{T}_2' \ar[ur]\ar[rr]\ar[dd] & & \mathcal{T}_1' \ar[ur]\ar[dd] \\ & \mathcal{T}_2 \ar'[r][rr] & & \mathcal X \\ \mathcal{T}_2' \ar[rr]\ar[ur] & & \mathcal{U} \ar[ur] } $$ In this diagram the bottom square, the right square, the back square, and the front square are $2$-fibre products. A formal argument then shows that $\mathcal{T}_1' \times_\mathcal{U} \mathcal{T}_2' \to \mathcal{T}_1 \times_{\mathcal X} \mathcal{T}_2$ is the ``base change'' of $\mathcal{U} \to \mathcal{X}$, more precisely the diagram $$ \xymatrix{ \mathcal{T}_1' \times_\mathcal{U} \mathcal{T}_2' \ar[d] \ar[r] & \mathcal{U} \ar[d] \\ \mathcal{T}_1 \times_{\mathcal X} \mathcal{T}_2 \ar[r] & \mathcal{X} } $$ is a $2$-fibre square. Hence $T'_1 \times_U T'_2 \to F$ is representable by algebraic spaces, flat, locally of finite presentation and surjective, see Algebraic Stacks, Lemmas \ref{algebraic-lemma-map-fibred-setoids-representable-algebraic-spaces}, \ref{algebraic-lemma-base-change-representable-by-spaces}, \ref{algebraic-lemma-map-fibred-setoids-property}, and \ref{algebraic-lemma-base-change-representable-transformations-property}. Therefore $F$ is an algebraic space by Bootstrap, Theorem \ref{bootstrap-theorem-final-bootstrap} and we win.
Assume (2). Let $U = \lim_{i \in I} U_i$ be the directed limit of affine schemes $U_i$ over $S$, let $y_i$ be an object of $\mathcal{Y}$ over $U_i$ for some $i$, let $x$ be an object of $\mathcal{X}$ over $U$, and let $\gamma : p(x) \to y_i|_U$ be an isomorphism. Let $X_{y_i}$ denote an algebraic space over $U_i$ representing the $2$-fibre product $$ (\Sch/U_i)_{fppf} \times_{y_i, \mathcal{Y}, p} \mathcal{X}. $$ Note that $\xi = (U, U \to U_i, x, \gamma^{-1})$ defines an object of this $2$-fibre product over $U$. Via the $2$-Yoneda lemma $\xi$ corresponds to a morphism $f_\xi : U \to X_{y_i}$ over $U_i$. By Limits of Spaces, Proposition \ref{spaces-limits-proposition-characterize-locally-finite-presentation} there exists an $i' \geq i$ and a morphism $f_{i'} : U_{i'} \to X_{y_i}$ such that $f_\xi$ is the composition of $f_{i'}$ and the projection morphism $U \to U_{i'}$. Also, the $2$-Yoneda lemma tells us that $f_{i'}$ corresponds to an object $\xi_{i'} = (U_{i'}, U_{i'} \to U_i, x_{i'}, \alpha)$ of the displayed $2$-fibre product over $U_{i'}$ whose restriction to $U$ recovers $\xi$. In particular we obtain an isomorphism $\gamma : x_{i'}|U \to x$. Note that $\alpha : y_i|_{U_{i'}} \to p(x_{i'})$. Hence we see that taking $x_{i'}$, the isomorphism $\gamma : x_{i'}|U \to x$, and the isomorphism $\beta = \alpha^{-1} : p(x_{i'}) \to y_i|_{U_{i'}}$ is a solution to the problem. \medskip\noindent Assume (1). Choose a scheme $T$ and a $1$-morphism $y : (\Sch/T)_{fppf} \to \mathcal{Y}$. Let $X_y$ be an algebraic space over $T$ representing the $2$-fibre product $(\Sch/T)_{fppf} \times_{y, \mathcal{Y}, p} \mathcal{X}$. We have to show that $X_y \to T$ is locally of finite presentation. To do this we will use the criterion in Limits of Spaces, Remark \ref{spaces-limits-remark-limit-preserving}. Consider an affine scheme $U = \lim_{i \in I} U_i$ written as the directed limit of affine schemes over $T$. Pick any $i \in I$ and set $y_i = y|_{U_i}$. Also denote $i'$ an element of $I$ which is bigger than or equal to $i$. By the $2$-Yoneda lemma morphisms $U \to X_y$ over $T$ correspond bijectively to isomorphism classes of pairs $(x, \alpha)$ where $x$ is an object of $\mathcal{X}$ over $U$ and $\alpha : y|_U \to p(x)$ is an isomorphism. Of course giving $\alpha$ is, up to an inverse, the same thing as giving an isomorphism $\gamma : p(x) \to y_i|_U$. Similarly for morphisms $U_{i'} \to X_y$ over $T$. Hence (1) guarantees that the canonical map $$ \colim_{i' \geq i} X_y(U_{i'}) \longrightarrow X_y(U) $$ is surjective in this situation. It follows from Limits of Spaces, Lemma \ref{spaces-limits-lemma-surjection-is-enough} that $X_y \to T$ is locally of finite presentation.
This follows from Lemma \ref{lemma-representable-by-spaces-limit-preserving} and (via the general principle Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-transformations-property-implication}) from the fact that an open immersion of algebraic spaces is locally of finite presentation, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-open-immersion-locally-finite-presentation}.
Let $V$ be a scheme over $S$ and $y \in \mathcal{Y}_V$. We have to prove $(\Sch/V)_{fppf} \times_{y, \mathcal{Y}} \mathcal{X}$ is representable by an algebraic space. \medskip\noindent Case I: $V$ is affine and maps into an affine open $\Spec(\Lambda) \subset S$. Then we can write $V = \lim V_i$ with each $V_i$ affine and of finite presentation over $\Spec(\Lambda)$, see Algebra, Lemma \ref{algebra-lemma-ring-colimit-fp}. Then $y$ comes from an object $y_i$ over $V_i$ for some $i$ by assumption (1). By assumption (3) the fibre product $(\Sch/V_i)_{fppf} \times_{y_i, \mathcal{Y}} \mathcal{X}$ is representable by an algebraic space $Z_i$. Then  $(\Sch/V)_{fppf} \times_{y, \mathcal{Y}} \mathcal{X}$ is representable by $Z \times_{V_i} V$. \medskip\noindent Case II: $V$ is general. Choose an affine open covering $V = \bigcup_{i \in I} V_i$ such that each $V_i$ maps into an affine open of $S$. We first claim that $\mathcal{Z} = (\Sch/V)_{fppf} \times_{y, \mathcal{Y}} \mathcal{X}$ is a stack in setoids for the Zariski topology. Namely, it is a stack in groupoids for the Zariski topology by Stacks, Lemma \ref{stacks-lemma-2-product-stacks-in-groupoids}. Then suppose that $z$ is an object of $\mathcal{Z}$ over a scheme $T$. Denote $g : T \to V$ the morphism corresponding to the projection of $z$ in $(\Sch/V)_{fppf}$. Consider the Zariski sheaf $\mathit{I} = \mathit{Isom}_{\mathcal{Z}}(z, z)$. By Case I we see that $\mathit{I}|_{g^{-1}(V_i)} = *$ (the singleton sheaf). Hence $\mathcal{I} = *$. Thus $\mathcal{Z}$ is fibred in setoids. To finish the proof we have to show that the Zariski sheaf $Z : T \mapsto \Ob(\mathcal{Z}_T)/\cong$ is an algebraic space, see Algebraic Stacks, Lemma \ref{algebraic-lemma-characterize-representable-by-space}. There is a map $p : Z \to V$ (transformation of functors) and by Case I we know that $Z_i = p^{-1}(V_i)$ is an algebraic space. The morphisms $Z_i \to Z$ are representable by open immersions and $\coprod Z_i \to Z$ is surjective (in the Zariski topology). Hence $Z$ is a sheaf for the fppf topology by Bootstrap, Lemma \ref{bootstrap-lemma-glueing-sheaves}. Thus Spaces, Lemma \ref{spaces-lemma-glueing-algebraic-spaces} applies and we conclude that $Z$ is an algebraic space\footnote{ To see that the set theoretic condition of that lemma is satisfied we argue as follows: First choose the open covering such that $|I| \leq \text{size}(V)$. Next, choose schemes $U_i$ of size $\leq \max(\kappa, \text{size}(V))$ and surjective \'etale morphisms $U_i \to Z_i$; we can do this by assumption (2) and Sets, Lemma \ref{sets-lemma-bound-size-fibre-product} (details omitted). Then Sets, Lemma \ref{sets-lemma-what-is-in-it} implies that $\coprod U_i$ is an object of $(\Sch/S)_{fppf}$. Hence $\coprod Z_i$ is an algebraic space by Spaces, Lemma \ref{spaces-lemma-coproduct-algebraic-spaces}. }.
Let $V$ be a scheme over $S$ and $y \in \mathcal{Y}_V$. We have to show that $F_y \to V$ has property $\mathcal{P}$. Since $\mathcal{P}$ is fppf local on the base we may assume that $V$ is an affine scheme which maps into an affine open $\Spec(\Lambda) \subset S$. Thus we can write $V = \lim V_i$ with each $V_i$ affine and of finite presentation over $\Spec(\Lambda)$, see Algebra, Lemma \ref{algebra-lemma-ring-colimit-fp}. Then $y$ comes from an object $y_i$ over $V_i$ for some $i$ by assumption (2). By assumption (3) the morphism $F_{y_i} \to V_i$ has property $\mathcal{P}$. As $\mathcal{P}$ is stable under arbitrary base change and since $F_y = F_{y_i} \times_{V_i} V$ we conclude that $F_y \to V$ has property $\mathcal{P}$ as desired.
Assume (2). Let $k$ be a field and let $y$ be an object of $\mathcal{Y}$ over $k$. Let $X_y$ denote an algebraic space over $k$ representing the $2$-fibre product $$ (\Sch/\Spec(k))_{fppf} \times_{y, \mathcal{Y}, p} \mathcal{X}. $$ As we've assumed that $p$ is surjective we see that $X_y$ is not empty. Hence we can find a field extension $k \subset K$ and a $K$-valued point $x$ of $X_y$. Via the $2$-Yoneda lemma this corresponds to an object $x$ of $\mathcal{X}$ over $K$ together with an isomorphism $p(x) \cong y|_{\Spec(K)}$ and we see that (1) holds. \medskip\noindent Assume (1). Choose a scheme $T$ and a $1$-morphism $y : (\Sch/T)_{fppf} \to \mathcal{Y}$. Let $X_y$ be an algebraic space over $T$ representing the $2$-fibre product $(\Sch/T)_{fppf} \times_{y, \mathcal{Y}, p} \mathcal{X}$. We have to show that $X_y \to T$ is surjective. By Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-surjective} we have to show that $|X_y| \to |T|$ is surjective. This means exactly that given a field $k$ over $T$ and a morphism $t : \Spec(k) \to T$ there exists a field extension $k \subset K$ and a morphism $x : \Spec(K) \to X_y$ such that $$ \xymatrix{ \Spec(K) \ar[d] \ar[r]_x & X_y \ar[d] \\ \Spec(k) \ar[r]^t & T } $$ commutes. By the $2$-Yoneda lemma this means exactly that we have to find $k \subset K$ and an object $x$ of $\mathcal{X}$ over $K$ such that $p(x) \cong t^*y|_{\Spec(K)}$. Hence (1) guarantees that this is the case and we win.