hcju/stacksqa huggingface dataset:
The problem is clearly local on $S$, hence we may replace $S$ by an affine open neighbourhood of $s$. The topology on $Y_s$ is induced from the topology on $Y$, see Schemes, Lemma \ref{schemes-lemma-fibre-topological}. Hence we can find a quasi-compact open $V \subset Y$ such that $V_s = T$. The restriction of $h$ to $V$ is quasi-compact (as $S$ affine and $V$ quasi-compact), quasi-separated, locally of finite presentation, and flat hence flat of finite presentation. Thus after replacing $Y$ by $V$ we may assume, in addition to (1) and (2) that $Y_s = T$ and $S$ affine. \medskip\noindent Pick a closed point $y \in Y_s$ such that $h$ is Cohen-Macaulay at $y$, see Lemma \ref{lemma-flat-finite-presentation-CM-open}. By Lemma \ref{lemma-slice-CM} there exists a diagram $$ \xymatrix{ Z \ar[r] \ar[rd] & Y \ar[d] \\ & S } $$ such that $Z \to S$ is flat, locally of finite presentation, locally quasi-finite with $Z_s = \{y\}$. Apply Lemma \ref{lemma-etale-makes-quasi-finite-finite-at-point} to find an elementary neighbourhood $(S', s') \to (S, s)$ and an open $Z' \subset Z_{S'} = S' \times_S Z$ with $Z' \to S'$ finite with a unique point $z' \in Z'$ lying over $s$. Note that $Z' \to S'$ is also locally of finite presentation and flat (as an open of the base change of $Z \to S$), hence $Z' \to S'$ is finite locally free, see Morphisms, Lemma \ref{morphisms-lemma-finite-flat}. Note that $Y_{S'} \to S'$ is flat and of finite presentation with geometrically reduced fibres as a base change of $h$. Also $Y_{s'} = Y_s$ is geometrically connected. Apply Lemma \ref{lemma-descent-connected-fibres} to $Z' \to Y_{S'}$ over $S'$ to get $V \subset Y_{S'}$ quasi-compact open satisfying (2) whose fibres over $S'$ are either empty or geometrically connected. As $V \to S'$ is open (Morphisms, Lemma \ref{morphisms-lemma-fppf-open}), after replacing $S'$ by an affine open neighbourhood of $s'$ we may assume $V \to S'$ is surjective, whence (1) holds.
Pick a point $x \in X$ with image $s \in S$. We will produce a diagram $$ \xymatrix{ X' \ar[r] \ar[rd] & S' \times_S X \ar[r] \ar[d] & X \ar[d] \\ & S' \ar[r] & S } $$ and points $s' \in S'$, $x' \in X'$, $y \in S' \times_S X$ such that $x'$ maps to $x$, $(S', s') \to (S, s)$ is an \'etale neighbourhood, $(X', x') \to (S' \times_S X, y)$ is an \'etale neighbourhood\footnote{The proof actually gives an open $X' \subset S' \times_S X$.}, and $X' \to S'$ has geometrically connected fibres. If we can do this for every $x \in X$, then the lemma follows (with members of the covering given by the collection of \'etale morphisms $X' \to X$ so produced). The first step is the replace $X$ and $S$ by affine open neighbourhoods of $x$ and $s$ which reduces us to the case that $X$ and $S$ are affine (and hence $f$ of finite presentation). \medskip\noindent Choose a separable algebraic extension $\overline{k}$ of $\kappa(s)$. Denote $X_{\overline{k}}$ the base change of $X_s$. Choose a point $\overline{x}$ in $X_{\overline{k}}$ mapping to $x \in X_s$. Choose a connected quasi-compact open neighbourhood $\overline{V} \subset X_{\overline{k}}$ of $\overline{x}$. (This is possible because any scheme locally of finite type over a field is locally connected as a locally Noetherian topological space.) By Varieties, Lemma \ref{varieties-lemma-Galois-action-quasi-compact-open} we can find a finite separable extension $k'/\kappa(s)$ and a quasi-compact open $V' \subset X_{k'}$ whose base change is $\overline{V}$. In particular $V'$ is geometrically connected over $k'$, see Varieties, Lemma \ref{varieties-lemma-characterize-geometrically-connected}. By Lemma \ref{lemma-realize-prescribed-residue-field-extension-etale} we can find an \'etale neighbourhood $(S', s') \to (S, s)$ such that $\kappa(s')$ is isomorphic to $k'$ as an extension of $\kappa(s)$. Denote $x' \in (S' \times_S X)_{s'} = X_{k'}$ the image of $\overline{x}$. Thus after replacing $(S, s)$ by $(S', s')$ and $(X, x)$ by $(S' \times_S X, x')$ we reduce to the case handled in the next paragrah. \medskip\noindent Assume there is a quasi-compact open $V \subset X_s$ which contains $x$ and is geometrically irreducible. Then we can apply Lemma \ref{lemma-fibre-geometrically-connected-reduced} to find an affine \'etale neighbourhood $(S', s') \to (S, s)$ and a quasi-compact open $X' \subset S' \times_S X$ such that $X' \to S'$ has geometrically connected fibres and such that $X'$ contains a point mapping to $x$. This finishes the proof.
Apply Lemma \ref{lemma-fibre-geometrically-connected-reduced} to find an affine elementary \'etale neighbourhood $(S', s') \to (S, s)$ and a quasi-compact open $V \subset Y_{S'}$ such that all fibres of $V \to S'$ are geometrically connected and $V_{s'} = T \times_s s'$. As $V$ is an open of the base change of $h$ all fibres of $V \to S'$ are geometrically normal, see Lemma \ref{lemma-normal}. In particular, they are geometrically reduced. To finish the proof we have to show they are geometrically irreducible. But, if $t \in S'$ then $V_t$ is of finite type over $\kappa(t)$ and hence $V_t \times_{\kappa(t)} \overline{\kappa(t)}$ is of finite type over $\overline{\kappa(t)}$ hence Noetherian. By choice of $S' \to S$ the scheme $V_t \times_{\kappa(t)} \overline{\kappa(t)}$ is connected. Hence $V_t \times_{\kappa(t)} \overline{\kappa(t)}$ is irreducible by Properties, Lemma \ref{properties-lemma-normal-Noetherian} and we win.
The problem is local on $X$ and $S$, hence we may assume that $X$ and $S$ are affine. By Algebra, Lemma \ref{algebra-lemma-refined-quasi-finite-over-polynomial-algebra} after replacing $X$ by a standard open neighbourhood of $x$ in $X$ we may assume there is a factorization $$ \xymatrix{ X \ar[r]^\pi & \mathbf{A}^n_S \ar[r] & S } $$ such that $\pi$ is quasi-finite and such that $\kappa(\pi(x))$ is purely transcendental over $\kappa(s)$. By Lemma \ref{lemma-etale-makes-quasi-finite-finite-at-point} there exists an elementary \'etale neighbourhood $$ (Y, y) \to (\mathbf{A}^n_S, \pi(x)) $$ and an open $X' \subset X \times_{\mathbf{A}^n_S} Y$ which contains a unique point $x'$ lying over $y$ such that $X' \to Y$ is finite. This proves (1) -- (4) hold. For the final assertion, use Morphisms, Lemma \ref{morphisms-lemma-finite-presentation-permanence}.
The question is local on $S$, hence we may replace $S$ by an affine open neighbourhood of $s$. Next, we apply Lemma \ref{lemma-local-structure-finite-type} to get a commutative diagram $$ \xymatrix{ X \ar[dd] & X' \ar[l]^g \ar[d]^\pi & x \ar@{|->}[dd] & x' \ar@{|->}[l] \ar@{|->}[d] \\ & Y \ar[d]^h & & y \ar@{|->}[d] \\ S \ar@{=}[r] & S & s & s \ar@{=}[l] } $$ where $h$ is smooth of relative dimension $n$ and $\kappa(y)$ is a purely transcendental extension of $\kappa(s)$. Since the question is local on $X$ also, we may replace $Y$ by an affine neighbourhood of $y$ (and $X'$ by the inverse image of this under $\pi$). As $S$ is affine this guarantees that $Y \to S$ is quasi-compact, separated and smooth, in particular of finite presentation. Let $T$ be the connected component of $Y_s$ containing $y$. As $Y_s$ is Noetherian we see that $T$ is open. We also see that $T$ is geometrically connected over $\kappa(s)$ by Varieties, Lemma \ref{varieties-lemma-geometrically-connected-if-connected-and-point}. Since $T$ is also smooth over $\kappa(s)$ it is geometrically normal, see Varieties, Lemma \ref{varieties-lemma-smooth-geometrically-normal}. We conclude that $T$ is geometrically irreducible over $\kappa(s)$ (as a connected Noetherian normal scheme is irreducible, see Properties, Lemma \ref{properties-lemma-normal-Noetherian}). Finally, note that the smooth morphism $h$ is normal by Lemma \ref{lemma-smooth-normal}. At this point we have verified all assumption of Lemma \ref{lemma-normal-morphism-irreducible} hold for the morphism $h : Y \to S$ and open $T \subset Y_s$. As a result of applying Lemma \ref{lemma-normal-morphism-irreducible} we obtain $e : S' \to S$, $s' \in S'$, $Y'$ as in the commutative diagram $$ \xymatrix{ X \ar[dd] & X' \ar[l]^g \ar[d]^\pi & X' \times_Y Y' \ar[l] \ar[d] & x \ar@{|->}[dd] & x' \ar@{|->}[l] \ar@{|->}[d] & (x', s') \ar@{|->}[l] \ar@{|->}[d] \\ & Y \ar[d]^h & Y' \ar[d] \ar[l] & & y \ar@{|->}[d] & (y, s') \ar@{|->}[l] \ar@{|->}[d] \\ S \ar@{=}[r] & S & S' \ar[l]_e & s & s \ar@{=}[l] & s' \ar@{|->}[l] } $$ where $e : (S', s') \to (S, s)$ is an elementary \'etale neighbourhood, and where $Y' \subset Y_{S'}$ is an open neighbourhood all of whose fibres over $S'$ are geometrically irreducible, such that $Y'_{s'} = T$ via the identification $Y_s = Y_{S', s'}$. Let $(y, s') \in Y'$ be the point corresponding to $y \in T$; this is also the unique point of $Y \times_S S'$ lying over $y$ with residue field equal to $\kappa(y)$ which maps to $s'$ in $S'$. Similarly, let $(x', s') \in X' \times_Y Y' \subset X' \times_S S'$ be the unique point over $x'$ with residue field equal to $\kappa(x')$ lying over $s'$. Then the outer part of this diagram is a solution to the problem posed in the lemma. Some minor details omitted.
Note that if $Y'$ is affine, then $X'$ is affine as $\pi$ is finite. Choose an affine open neighbourhood $U' \subset S'$ of $s'$. Choose an affine open neighbourhood $V' \subset h^{-1}(U')$ of $y'$. Let $W' = h(V')$. This is an open neighbourhood of $s'$ in $S'$, see Morphisms, Lemma \ref{morphisms-lemma-smooth-open}, contained in $U'$. Choose an affine open neighbourhood $U'' \subset W'$ of $s'$. Then $h^{-1}(U'') \cap V'$ is affine because it is equal to $U'' \times_{U'} V'$. By construction $h^{-1}(U'') \cap V' \to U''$ is a surjective smooth morphism whose fibres are (nonempty) open subschemes of geometrically integral fibres of $Y' \to S'$, and hence geometrically integral. Thus we may replace $S'$ by $U''$ and $Y'$ by $h^{-1}(U'') \cap V'$.
The first assertion is purely topological; use that $\pi$ is a continuous and closed map such that $\pi^{-1}(\{y\}) = \{x\}$. To prove the second and third parts we may assume $X = \Spec(B)$ and $Y = \Spec(A)$. Then $A \to B$ is a finite ring map and $y$ corresponds to a prime $\mathfrak p$ of $A$ such that there exists a unique prime $\mathfrak q$ of $B$ lying over $\mathfrak p$. Then $B_{\mathfrak q} = B_{\mathfrak p}$, see Algebra, Lemma \ref{algebra-lemma-unique-prime-over-localize-below}. In other words, the map $A_{\mathfrak p} \to B_{\mathfrak q}$ is equal to the map $A_{\mathfrak p} \to B_{\mathfrak p}$ you get from localizing $A \to B$ at $\mathfrak p$. Thus (2) and (3) follow from simple properties of localization (some details omitted). For the final statement, suppose that $\mathcal{F} = \widetilde M$ for some $B$-module $M$. Then $\mathcal{F} = M_{\mathfrak q}$ and $\pi_*\mathcal{F}_y = M_{\mathfrak p}$. By the above these localizations agree. Alternatively you can use part (1) and the definition of stalks to see that $\mathcal{F}_x = \pi_*\mathcal{F}_y$ directly.
We may assume that each $S_i \to S$ is locally quasi-finite, see Lemma \ref{lemma-qf-fp-flat-dominates-fppf}. \medskip\noindent Fix a point $s \in S$. Pick an $i \in I$ and a point $s_i \in S_i$ mapping to $s$. Choose an elementary \'etale neighbourhood $(S', s) \to (S, s)$ such that there exists an open $$ S_i \times_S S'  \supset V $$ which contains a unique point $v \in V$ mapping to $s \in S'$ and such that $V \to S'$ is finite, see Lemma \ref{lemma-etale-makes-quasi-finite-finite-at-point}. Then $V \to S'$ is finite locally free, because it is finite and because $S_i \times_S S' \to S'$ is flat and locally of finite presentation as a base change of the morphism $S_i \to S$, see Morphisms, Lemmas \ref{morphisms-lemma-base-change-finite-presentation}, \ref{morphisms-lemma-base-change-flat}, and \ref{morphisms-lemma-finite-flat}. Hence $V \to S'$ is open, and after shrinking $S'$ we may assume that $V \to S'$ is surjective finite locally free. Since we can do this for every point of $S$ we conclude that $\{S_i \to S\}$ can be refined by a covering of the form $\{V_a \to S\}_{a \in A}$ where each $V_a \to S$ factors as $V_a \to S'_a \to S$ with $S'_a \to S$ \'etale and $V_a \to S'_a$ surjective finite locally free.
Let $\{V_a \to S\}_{a \in A}$ be the fppf covering found in Lemma \ref{lemma-dominate-fppf-etale-locally}. In other words, this covering refines $\{S_i \to S\}$ and each $V_a \to S$ factors as $V_a \to S'_a \to S$ with $S'_a \to S$ \'etale and $V_a \to S'_a$ surjective finite locally free. \medskip\noindent By Remark \ref{remark-topologies} there exists a Zariski open covering $S = \bigcup U_j$, for each $j$ a finite locally free, surjective morphism $W_j \to U_j$, and for each $j$ a Zariski open covering $\{W_{j, k} \to W_j\}$ such that the family $\{W_{j, k} \to S\}$ refines the \'etale covering $\{S'_a \to S\}$, i.e., for each pair $j, k$ there exists an $a(j, k)$ and a factorization $W_{j, k} \to S'_a \to S$ of the morphism $W_{j, k} \to S$. Set $T_{j, k} = W_{j, k} \times_{S'_a} V_a$ and everything is clear.
Let $V' \to S$ be the normalization of $S$ in $U$, see Morphisms, Section \ref{morphisms-section-normalization-X-in-Y}. By construction $V' \to S$ is integral. By Morphisms, Lemmas \ref{morphisms-lemma-normalization-localization} and \ref{morphisms-lemma-normalization-in-integral} we see that the inverse image of $U$ in $V'$ is $V$. Let $Z$ be the reduced induced scheme structure on $S \setminus U$. Then $\overline{V} = V' \amalg Z$ works.
By Zariski's Main Theorem (Lemma \ref{lemma-quasi-finite-separated-pass-through-finite}) we can assume $V$ is a quasi-compact open in a scheme $V'$ finite over $S$. After replacing $V'$ by the scheme theoretic image of $V$ we may assume that $V$ is dense in $V'$. It follows that $V' \times_S U = V$ because $V \to V' \times_S U$ is closed as $V$ is finite over $U$. Let $Z$ be the reduced induced scheme structure on $S \setminus U$. Then $\overline{V} = V' \amalg Z$ works.
Choose $S = \bigcup U_j$, $W_j \to U_j$, $W_j = \bigcup W_{j, k}$, and $T_{j, k} \to W_{j, k}$ as in Lemma \ref{lemma-dominate-fppf}. By Lemma \ref{lemma-extend-integral-surjective-morphisms} we can extend $W_j \to U_j$ to a surjective integral morphism $\overline{W}_j \to S$. After this we can extend $T_{j, k} \to W_{j, k}$ to a surjective integral morphism $\overline{T}_{j, k} \to \overline{W}_j$. We set $\overline{T}_j$ equal to the product of all the schemes $\overline{T}_{j, k}$ over $\overline{W}_j$ (Limits, Lemma \ref{limits-lemma-infinite-product}). Then we set $S'$ equal to the product of all the schemes $\overline{T}_j$ over $S$. If $x \in S'$, then there is a $j$ such that the image of $x$ in $S$ lies in $U_j$. Hence there is a $k$ such that the image of $x$ under the projection $S' \to \overline{W}_j$ lies in $W_{j, k}$. Hence under the projection $S' \to \overline{T}_j \to \overline{T}_{j, k}$ the point $x$ ends up in $T_{j, k}$. And $T_{j, k} \to S$ factors through $S_i$ for some $i$. Finally, the morphism $S' \to S$ is integral and surjective by Limits, Lemmas \ref{limits-lemma-infinite-product-integral} and \ref{limits-lemma-infinite-product-surjective}.
Let $Y \to X$ be the integral surjective morphism found in Lemma \ref{lemma-dominate-fppf-integral}. Choose a finite affine open covering $Y = \bigcup V_j$ such that $V_j \to X$ factors through $S_{i(j)}$. We can write $Y = \lim Y_\lambda$ with $Y_\lambda \to X$ finite and of finite presentation, see Limits, Lemma \ref{limits-lemma-integral-limit-finite-and-finite-presentation}. For large enough $\lambda$ we can find affine opens $V_{\lambda, j} \subset Y_\lambda$ whose inverse image in $Y$ recovers $V_j$, see Limits, Lemma \ref{limits-lemma-descend-opens}. For even larger $\lambda$ the morphisms $V_j \to S_{i(j)}$ over $X$ come from morphisms $V_{\lambda, j} \to S_{i(j)}$ over $X$, see Limits, Proposition \ref{limits-proposition-characterize-locally-finite-presentation}. Setting $S' = Y_\lambda$ for this $\lambda$ finishes the proof.
Let $\{T_i \to T\}$ be an fppf covering of schemes, see Topologies, Definition \ref{topologies-definition-fppf-covering}. Observe that $T_i \to T$ is locally of finite type. Let $U \subset T$ be an affine open. It suffices to show that $\{T_i \times_T U \to U\}$ can be refined by a standard ph covering, see Topologies, Definition \ref{topologies-definition-ph-covering}. This follows immediately from Lemma \ref{lemma-dominate-fppf-finite} and the fact that a finite morphism is proper (Morphisms, Lemma \ref{morphisms-lemma-finite-proper}).
The implication (2) $\Rightarrow$ (1) is Morphisms, Lemma \ref{morphisms-lemma-H-quasi-projective-quasi-projective}. The implication (1) $\Rightarrow$ (2) is Morphisms, Lemma \ref{morphisms-lemma-projective-over-quasi-projective-is-H-projective}. The implication (2) $\Rightarrow$ (3) is Morphisms, Lemma \ref{morphisms-lemma-H-quasi-projective-open-H-projective} \medskip\noindent Assume $X \subset X'$ is as in (3). In particular $X \to S$ is of finite type. By Morphisms, Lemma \ref{morphisms-lemma-H-quasi-projective-open-H-projective} the morphism $X \to S$ is H-projective. Thus there exists a quasi-compact immersion $i : X \to \mathbf{P}^n_S$. Hence $\mathcal{L} = i^*\mathcal{O}_{\mathbf{P}^n_S}(1)$ is $f$-very ample. As $X \to S$ is quasi-compact we conclude from Morphisms, Lemma \ref{morphisms-lemma-ample-very-ample} that $\mathcal{L}$ is $f$-ample. Thus $X \to S$ is quasi-projective by definition. \medskip\noindent The implication (4) $\Rightarrow$ (2) is Morphisms, Lemma \ref{morphisms-lemma-quasi-projective-finite-type-over-S}. \medskip\noindent Assume the equivalent conditions (1), (2), (3) hold. Choose an immersion $i : X \to \mathbf{P}^n_S$ over $S$. Let $\mathcal{L}$ be an ample invertible sheaf on $S$. To finish the proof we will show that $\mathcal{N} = f^*\mathcal{L} \otimes_{\mathcal{O}_X} i^*\mathcal{O}_{\mathbf{P}^n_X}(1)$ is ample on $X$. By Properties, Lemma \ref{properties-lemma-ample-on-locally-closed} we reduce to the case $X = \mathbf{P}^n_S$. Let $s \in \Gamma(S, \mathcal{L}^{\otimes d})$ be a section such that the corresponding open $S_s$ is affine. Say $S_s = \Spec(A)$. Recall that $\mathbf{P}^n_S$ is the projective bundle associated to $\mathcal{O}_S T_0 \oplus \ldots \oplus \mathcal{O}_S T_n$, see Constructions, Lemma \ref{constructions-lemma-projective-space-bundle} and its proof. Let $s_i \in \Gamma(\mathbf{P}^n_S, \mathcal{O}(1))$ be the global section corresponding to the section $T_i$ of $\mathcal{O}_S T_0 \oplus \ldots \oplus \mathcal{O}_S T_n$. Then we see that $X_{f^*s \otimes s_i^{\otimes n}}$ is affine because it is equal to $\Spec(A[T_0/T_i, \ldots, T_n/T_i])$. This proves that $\mathcal{N}$ is ample by definition. \medskip\noindent The equivalence of (1) and (5) follows from Morphisms, Lemmas \ref{morphisms-lemma-ample-very-ample} and \ref{morphisms-lemma-finite-type-ample-very-ample}.
Part (1) follows from Morphisms, Lemma \ref{morphisms-lemma-base-change-quasi-projective}. \medskip\noindent Part (2) follows from the fourth characterization of Lemma \ref{lemma-quasi-projective}. \medskip\noindent If $X \to S$ and $Y \to S$ are quasi-projective, then $X \times_S Y \to Y$ is quasi-projective by Morphisms, Lemma \ref{morphisms-lemma-base-change-quasi-projective}. Hence (3) follows from (2). \medskip\noindent If $X = Y \amalg Z$ is a disjoint union of schemes and $\mathcal{L}$ is an invertible $\mathcal{O}_X$-module such that $\mathcal{L}|_Y$ and $\mathcal{L}|_Z$ are ample, then $\mathcal{L}$ is ample (details omitted). Thus part (4) follows from the fourth characterization of Lemma \ref{lemma-quasi-projective}. \medskip\noindent Part (5) follows from Morphisms, Lemma \ref{morphisms-lemma-projective-quasi-projective}. \medskip\noindent Part (6) follows from Morphisms, Lemma \ref{morphisms-lemma-quasi-affine-finite-type-quasi-projective}. \medskip\noindent Part (7) follows from part (6) and Lemma \ref{lemma-quasi-finite-separated-quasi-affine}. \medskip\noindent Part (8) follows from part (7) and Morphisms, Lemma \ref{morphisms-lemma-immersion-locally-quasi-finite}.
The scheme $U$ is quasi-affine because integral morphisms are affine, affine morphisms are quasi-affine, a scheme is quasi-affine if and only if the structure morphism to $\Spec(\mathbf{Z})$ is quasi-affine, and compositions of quasi-affine morphisms are quasi-affine. The first two statements follow immediately from the definition and the third is Morphisms, Lemma \ref{morphisms-lemma-composition-quasi-affine}. Set $U' = X \times_{\Spec(\Gamma(X, \mathcal{O}_X))} \Spec(\Gamma(U, \mathcal{O}_U))$ and consider the extended diagram $$ \xymatrix{ U \ar[r]_j \ar[rd] & U' \ar[d] \ar[r] & \Spec(\Gamma(U, \mathcal{O}_U)) \ar[d] \\ & X \ar[r] & \Spec(\Gamma(X, \mathcal{O}_X)) } $$ The morphism $j$ is closed by Morphisms, Lemma \ref{morphisms-lemma-image-proper-scheme-closed} combined with the fact that an integral morphism is universally closed (Morphisms, Lemma \ref{morphisms-lemma-integral-universally-closed}) and the fact that the vertical arrows are in the diagram are separated. On the other hand, $j$ is open because the horizontal arrows in the diagram of the lemma are open by Properties, Lemma \ref{properties-lemma-quasi-affine}. Thus $j$ identifies $U$ with an open and closed subscheme of $U'$. If $U \not = U'$ then $U$ isn't dense in $U'$ and a fortiori not dense in the spectrum of $\Gamma(U, \mathcal{O}_U)$. However, the scheme theoretic image of $U$ in $\Spec(\Gamma(U, \mathcal{O}_U))$ is $\Spec(\Gamma(U, \mathcal{O}_U))$ because any ideal in $\Gamma(U, \mathcal{O}_U)$ cutting out a closed subscheme through which $U$ factors would have to be zero. Hence $U$ is dense in $\Spec(\Gamma(U, \mathcal{O}_U))$ for example by Morphisms, Lemma \ref{morphisms-lemma-quasi-compact-scheme-theoretic-image}. Thus $U = U'$ and we win.
Observe first that in each case the morphism $f$ is proper, see Morphisms, Lemmas \ref{morphisms-lemma-H-projective} and \ref{morphisms-lemma-locally-projective-proper}. Hence it suffices to prove the equivalence of the notions in case $f$ is a proper morphism. We will use this without further mention in the following. \medskip\noindent The equivalences (1) $\Leftrightarrow$ (3) and (2) $\Leftrightarrow$ (4) are Morphisms, Lemma \ref{morphisms-lemma-projective-is-quasi-projective-proper}. \medskip\noindent The implication (2) $\Rightarrow$ (1) is Morphisms, Lemma \ref{morphisms-lemma-H-projective}. \medskip\noindent The implications (1) $\Rightarrow$ (2) and (3) $\Rightarrow$ (4) are Morphisms, Lemma \ref{morphisms-lemma-projective-over-quasi-projective-is-H-projective}. \medskip\noindent The implication (1) $\Rightarrow$ (7) is immediate from Morphisms, Definitions \ref{morphisms-definition-projective} and \ref{morphisms-definition-very-ample}. \medskip\noindent The conditions (3) and (6) are equivalent by Morphisms, Definition \ref{morphisms-definition-quasi-projective}. \medskip\noindent Thus (1) -- (4), (6) are equivalent and imply (7). By Lemma \ref{lemma-quasi-projective} conditions (3), (5), and (7) are equivalent. Thus we see that (1) -- (7) are equivalent. \medskip\noindent By Divisors, Lemma \ref{divisors-lemma-relative-proj-projective} we see that (8) implies (1). Conversely, if (2) holds, then we can choose a closed immersion $$ i : X \longrightarrow \mathbf{P}^n_S = \underline{\text{Proj}}_S(\mathcal{O}_S[T_0, \ldots, T_n]). $$ See Constructions, Lemma \ref{constructions-lemma-projective-space-bundle} for the equality. By Divisors, Lemma \ref{divisors-lemma-closed-subscheme-proj} we see that $X$ is the relative Proj of a quasi-coherent graded quotient algebra $\mathcal{A}$ of $\mathcal{O}_S[T_0, \ldots, T_n]$. Then $\mathcal{A}$ satisfies the conditions of (8).