hcju/stacksqa huggingface dataset:
As $X$ is integral the restriction mapping $\mathcal{O}(X) \to \mathcal{O}(U)$ is injective for any nonempty open subscheme $U \subset X$. Hence we may assume that $X$ is affine. Choose a closed immersion $X \to \mathbf{A}^n_k$ and denote $\overline{X}$ the closure of $X$ in $\mathbf{P}^n_k$ via the usual immersion $\mathbf{A}^n_k \to \mathbf{P}^n_k$. Thus we may assume that $X$ is an affine open of a projective variety $\overline{X}$. \medskip\noindent Let $\nu : \overline{X}^\nu \to \overline{X}$ be the normalization morphism, see Morphisms, Definition \ref{morphisms-definition-normalization}. We know that $\nu$ is finite, dominant, and that $\overline{X}^\nu$ is a normal irreducible scheme, see Morphisms, Lemmas \ref{morphisms-lemma-normalization-normal}, \ref{morphisms-lemma-Japanese-normalization}, and \ref{morphisms-lemma-ubiquity-nagata}. It follows that $\overline{X}^\nu$ is a proper variety, because $\overline{X} \to \Spec(k)$ is proper as a composition of a finite and a proper morphism (see results in Morphisms, Sections \ref{morphisms-section-proper} and \ref{morphisms-section-integral}). It also follows that $\nu$ is a surjective morphism, because the image of $\nu$ is closed and contains the generic point of $\overline{X}$. Hence setting $X^\nu = \nu^{-1}(X)$ we see that it suffices to prove the result for $X^\nu$. In other words, we may assume that $X$ is a nonempty open of a normal proper variety $\overline{X}$. This case is handled by Lemma \ref{lemma-open-in-normal-proper}.
Let $X = \bigcup X_i$ be the irreducible components. By Lemma \ref{lemma-units-integral-finite-type-algebraically-closed} we see that $\mathcal{O}(X_i)^*/k^*$ is a finitely generated abelian group. Let $f \in \mathcal{O}(X)^*$ be in the kernel of the map $$ \mathcal{O}(X)^* \longrightarrow \prod \mathcal{O}(X_i)^*/k^*. $$ Then for each $i$ there exists an element $\lambda_i \in k$ such that $f|_{X_i} = \lambda_i$. By restricting to $X_i \cap X_j$ we conclude that $\lambda_i = \lambda_j$ if $X_i \cap X_j \not = \emptyset$. Since $X$ is connected we conclude that all $\lambda_i$ agree and hence that $f \in k^*$. This proves that $$ \mathcal{O}(X)^*/k^* \subset \prod \mathcal{O}(X_i)^*/k^* $$ and the lemma follows as on the right we have a product of finitely many finitely generated abelian groups.
Let $k' \subset \Gamma(X, \mathcal{O}_X)$ be the integral closure of $k$. Then $X \to \Spec(k)$ factors through $\Spec(k')$, see Schemes, Lemma \ref{schemes-lemma-morphism-into-affine}. As $X$ is reduced we see that $k'$ has no nonzero nilpotent elements. As $k \to k'$ is integral we see that every prime ideal of $k'$ is both a maximal ideal and a minimal prime, and $\Spec(k')$ is totally disconnected, see Algebra, Lemmas \ref{algebra-lemma-integral-no-inclusion} and \ref{algebra-lemma-ring-with-only-minimal-primes}. As $X$ is connected the morphism $X \to \Spec(k')$ is constant, say with image the point corresponding to $\mathfrak p \subset k'$. Then any $f \in k'$, $f \not \in \mathfrak p$ maps to an invertible element of $\mathcal{O}_X$. By definition of $k'$ this then forces $f$ to be a unit of $k'$. Hence we see that $k'$ is local with maximal ideal $\mathfrak p$, see Algebra, Lemma \ref{algebra-lemma-characterize-local-ring}. Since we've already seen that $k'$ is reduced this implies that $k'$ is a field, see Algebra, Lemma \ref{algebra-lemma-minimal-prime-reduced-ring}.
If $X$ and $Y$ are separated or more generally have affine diagonal, then please see Lemma \ref{lemma-kunneth} for ``better'' proof (the feature it has over this proof is that it identifies the maps as pullbacks followed by cup products). Let $X'$, resp.\ $Y'$ be the infinitesimal thickening of $X$, resp.\ $Y$ whose structure sheaf is $\mathcal{O}_{X'} = \mathcal{O}_X \oplus \mathcal{F}$, resp.\ $\mathcal{O}_{Y'} = \mathcal{O}_Y \oplus \mathcal{G}$ where $\mathcal{F}$, resp.\ $\mathcal{G}$ is an ideal of square zero. Then $$ \mathcal{O}_{X' \times Y'} = \mathcal{O}_{X \times Y} \oplus \text{pr}_1^*\mathcal{F} \oplus \text{pr}_2^*\mathcal{G} \oplus \text{pr}_1^*\mathcal{F} \otimes_{\mathcal{O}_{X \times Y}} \text{pr}_2^*\mathcal{G} $$ as sheaves on $X \times Y$. In this way we see that it suffices to prove that $$ H^n(X \times Y, \mathcal{O}_{X \times Y}) = \bigoplus\nolimits_{p + q = n} H^p(X, \mathcal{O}_X) \otimes_k H^q(Y, \mathcal{O}_Y) $$ for any pair of quasi-compact and quasi-separated schemes over $k$. Some details omitted. \medskip\noindent To prove this statement we use cohomology and base change in the form of Cohomology of Schemes, Lemma \ref{coherent-lemma-hypercoverings}. This lemma tells us there exists a bounded below complex of $k$-vector spaces, i.e., a complex $\mathcal{K}^\bullet$ of quasi-coherent modules on $\Spec(k)$, which universally computes the cohomology of $Y$ over $\Spec(k)$. In particular, we see that $$ R\text{pr}_{1, *}(\mathcal{O}_{X \times Y}) \cong (X \to \Spec(k))^*\mathcal{K}^\bullet $$ in $D(\mathcal{O}_X)$. Up to homotopy the complex $\mathcal{K}^\bullet$ is isomorphic to $\bigoplus_{q \geq 0} H^q(Y, \mathcal{O}_Y)[-q]$ because this is true for every complex of vector spaces over a field. We conclude that $$ R\text{pr}_{1, *}(\mathcal{O}_{X \times Y}) \cong \bigoplus\nolimits_{q \geq 0} H^q(Y, \mathcal{O}_Y)[-q] \otimes_k \mathcal{O}_X $$ in $D(\mathcal{O}_X)$. Then we have \begin{align*} R\Gamma(X \times Y, \mathcal{O}_{X \times Y}) & = R\Gamma(X, R\text{pr}_{1, *}(\mathcal{O}_{X \times Y})) \\ & = R\Gamma(X, \bigoplus\nolimits_{q \geq 0} H^q(Y, \mathcal{O}_Y)[-q] \otimes_k \mathcal{O}_X) \\ & = \bigoplus\nolimits_{q \geq 0} R\Gamma(X,  H^q(Y, \mathcal{O}_Y) \otimes \mathcal{O}_X)[-q] \\ & = \bigoplus\nolimits_{q \geq 0} R\Gamma(X, \mathcal{O}_X) \otimes_k H^q(Y, \mathcal{O}_Y)[-q] \\ & = \bigoplus\nolimits_{p, q \geq 0} H^p(X, \mathcal{O}_X)[-p] \otimes_k H^q(Y, \mathcal{O}_Y)[-q] \end{align*} as desired. The first equality by Leray for $\text{pr}_1$ (Cohomology, Lemma \ref{cohomology-lemma-before-Leray}). The second by our decomposition of the total direct image given above. The third because cohomology always commutes with finite direct sums (and cohomology of $Y$ vanishes in sufficiently large degree by Cohomology of Schemes, Lemma \ref{coherent-lemma-vanishing-nr-affines-quasi-separated}). The fourth because cohomology on $X$ commutes with infinite direct sums by Cohomology, Lemma \ref{cohomology-lemma-quasi-separated-cohomology-colimit}. The final equality by our remark on the derived category of a field above.
Denote $\mathcal{L}_B$ the pullback of $\mathcal{L}$ to $X_B$. Choose an isomorphism $\mathcal{L}_B \to \mathcal{O}_{X_B}$. Set $R = H^0(X, \mathcal{O}_X)$, $M = H^0(X, \mathcal{L})$ and think of $M$ as an $R$-module. For every quasi-coherent $\mathcal{O}_X$-module $\mathcal{F}$ with pullback $\mathcal{F}_B$ on $X_B$ there is a canonical isomorphism $H^0(X_B, \mathcal{F}_B) = H^0(X, \mathcal{F}) \otimes_A B$, see Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}. Thus we have $$ M \otimes_R (R \otimes_A B) = M \otimes_A B = H^0(X_B, \mathcal{L}_B) \cong H^0(X_B, \mathcal{O}_{X_B}) = R \otimes_A B $$ Since $R \to R \otimes_A B$ is faithfully flat (as the base change of the faithfully flat map $A \to B$), we conclude that $M$ is an invertible $R$-module by Algebra, Proposition \ref{algebra-proposition-ffdescent-finite-projectivity}. Similarly $N = H^0(X, \mathcal{L}^{\otimes -1})$ is an invertible $R$-module. To see that the statement on tensor products is true, use that it is true after pulling back to $X_B$ and faithful flatness of $R \to R \otimes_A B$. Some details omitted.
Let $\mathcal{L}$ be an invertible $\mathcal{O}_X$-module whose pullback $\mathcal{L}'$ to $X_B$ is trivial. Set $M = H^0(X, \mathcal{L})$ and $N = H^0(X, \mathcal{L}^{\otimes - 1})$. By Lemma \ref{lemma-change-rings-pic-pre} the $R$-modules $M$ and $N$ are invertible. Since $R$ is semi-local $M \cong R$ and $N \cong R$, see Algebra, Lemma \ref{algebra-lemma-locally-free-semi-local-free}. Choose generators $s \in M$ and $t \in N$. Then $st \in R = H^0(X, \mathcal{O}_X)$ is a unit by the last part of Lemma \ref{lemma-change-rings-pic-pre}. We conclude that $s$ and $t$ define trivializations of $\mathcal{L}$ and $\mathcal{L}^{\otimes -1}$ over $X$.
The fibres of $X \times_{\Spec(k)} U \to X$ are open subschemes of affine $n$-space over fields. Hence these fibres have trivial Picard groups by Divisors, Lemma \ref{divisors-lemma-open-subscheme-UFD}. Applying Divisors, Lemma \ref{divisors-lemma-in-image-pullback} we see that $\mathcal{L}$ is the pullback of an invertible module $\mathcal{N}$ on $X$.
By Cohomology of Schemes, Lemma \ref{coherent-lemma-coherent-support-closed} we see that $\mathcal{F} = i_*\mathcal{G}$ where $i : Z \to X$ is the inclusion of the scheme theoretic support of $\mathcal{F}$ and where $\mathcal{G}$ is a coherent $\mathcal{O}_Z$-module. Since the dimension of $Z$ is $0$, we see $Z$ is affine (Properties, Lemma \ref{properties-lemma-locally-Noetherian-dimension-0}). Hence $\mathcal{G}$ is globally generated and the higher cohomology groups of $\mathcal{G}$ are zero (Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}). Hence $\mathcal{F} = i_*\mathcal{G}$ is globally generated. Since the cohomologies of $\mathcal{F}$ and $\mathcal{G}$ agree (Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}) we conclude that the higher cohomology groups of $\mathcal{F}$ are zero which gives the first formula. By the projection formula (Cohomology, Lemma \ref{cohomology-lemma-projection-formula}) we have $$ i_*(\mathcal{G} \otimes i^*\mathcal{E}) = \mathcal{F} \otimes \mathcal{E}. $$ Since $Z$ has dimension $0$ the locally free sheaf $i^*\mathcal{E}$ is isomorphic to $\mathcal{O}_Z^{\oplus n}$ and arguing as above we see that the second formula holds.
The formula makes sense: the sheaves $R^if_*\mathcal{G}$ are coherent and only a finite number of them are nonzero, see Cohomology of Schemes, Proposition \ref{coherent-proposition-proper-pushforward-coherent} and Lemma \ref{coherent-lemma-quasi-coherence-higher-direct-images}. By Cohomology, Lemma \ref{cohomology-lemma-Leray} there is a spectral sequence with $$ E_2^{p, q} = H^p(X, R^qf_*\mathcal{G}) $$ converging to $H^{p + q}(Y, \mathcal{G})$. By finiteness of cohomology on $X$ we see that only a finite number of $E_2^{p, q}$ are nonzero and each $E_2^{p, q}$ is a finite dimensional vector space. It follows that the same is true for $E_r^{p, q}$ for $r \geq 2$ and that $$ \sum (-1)^{p + q} \dim_k E_r^{p, q} $$ is independent of $r$. Since for $r$ large enough we have $E_r^{p, q} = E_\infty^{p, q}$ and since convergence means there is a filtration on $H^n(Y, \mathcal{G})$ whose graded pieces are $E_\infty^{p, q}$ with $p + q = n$ (this is the meaning of convergence of the spectral sequence), we conclude. Compare also with the more general Homology, Lemma \ref{homology-lemma-biregular-ss-relation-in-K0}.
Consider the closed subscheme $X \times Y \subset \mathbf{A}^{2n}_k$ where we use coordinates $x_1, \ldots, x_n, y_1, \ldots, y_n$. Then $X \cap Y = X \times Y \cap V(x_1 - y_1, \ldots, x_n - y_n)$. Let $t \in X \cap Y \subset X \times Y$ be a closed point. By Lemma \ref{lemma-dimension-product-locally-algebraic} we have $\dim_t(X \times Y) = \dim(X) + \dim(Y)$. Thus $\dim(\mathcal{O}_{X \times Y, t}) = r + s$ by Lemma \ref{lemma-dimension-locally-algebraic}. By Algebra, Lemma \ref{algebra-lemma-one-equation} we conclude that $$ \dim(\mathcal{O}_{X \cap Y, t}) = \dim(\mathcal{O}_{X \times Y, t}/(x_1 - y_1, \ldots, x_n - y_n)) \geq r + s - n $$ This implies the result by Lemma \ref{lemma-dimension-locally-algebraic}.
Write $\mathbf{A}^n = \Spec(k[x_0, \ldots, x_n])$ and $\mathbf{P}^n = \text{Proj}(k[T_0, \ldots, T_n])$. Consider the morphism $\pi : \mathbf{A}^{n + 1} \setminus \{0\} \to \mathbf{P}^n$ which sends $(x_0, \ldots, x_n)$ to the point $[x_0 : \ldots : x_n]$. More precisely, it is the morphism associated to the pair $(\mathcal{O}_{\mathbf{A}^{n + 1} \setminus \{0\}}, (x_0, \ldots, x_n))$, see Constructions, Lemma \ref{constructions-lemma-projective-space}. Over the standard affine open $D_+(T_i)$ we get the morphism associated to the ring map $$ k\left[\frac{T_0}{T_i}, \ldots, \frac{T_n}{T_i}\right] \longrightarrow k\left[T_0, \ldots, T_n, \frac{1}{T_i}\right] \cong k\left[\frac{T_0}{T_i}, \ldots, \frac{T_n}{T_i}\right] \left[T_i, \frac{1}{T_i}\right] $$ which is surjective and smooth of relative dimension $1$ with irreducible fibres (details omitted). Hence $\pi^{-1}(X)$ and $\pi^{-1}(Y)$ are nonempty closed subsets of dimension $r + 1$ and $s + 1$. Choose an irreducible component $V \subset \pi^{-1}(X)$ of dimension $r + 1$ and an irreducible component $W \subset \pi^{-1}(Y)$ of dimension $s + 1$. Observe that this implies $V$ and $W$ contain every fibre of $\pi$ they meet (since $\pi$ has irreducible fibres of dimension $1$ and since Lemma \ref{lemma-dimension-fibres-locally-algebraic} says the fibres of $V \to \pi(V)$ and $W \to \pi(W)$ have dimension $\geq 1$). Let $\overline{V}$ and $\overline{W}$ be the closure of $V$ and $W$ in $\mathbf{A}^{n + 1}$. Since $0 \in \mathbf{A}^{n + 1}$ is in the closure of every fibre of $\pi$ we see that $0 \in \overline{V} \cap \overline{W}$. By Lemma \ref{lemma-intersection-in-affine-space} we have $\dim(\overline{V} \cap \overline{W}) \geq r + s - n + 1$. Arguing as above using Lemma \ref{lemma-dimension-fibres-locally-algebraic} again, we conclude that $\pi(V \cap W) \subset X \cap Y$ has dimension at least $r + s - n$ as desired.
We have $\mathbf{P}^n_k = \text{Proj}(k[T_0, \ldots, T_n])$. The section $s$ corresponds to a homogeneous form in $T_0, \ldots, T_n$ of degree $1$, see Cohomology of Schemes, Section \ref{coherent-section-cohomology-projective-space}. Say $s = \sum a_i T_i$. Constructions, Lemma \ref{constructions-lemma-closed-in-projective-space} gives that $H = \text{Proj}(k[T_0, \ldots, T_n]/I)$ for the graded ideal $I$ defined by setting $I_d$ equal to the kernel of the map $\Gamma(\mathbf{P}^n_k, \mathcal{O}(d)) \to \Gamma(H, i^*\mathcal{O}(d))$. By our construction of $Z(s)$ in Divisors,  Definition \ref{divisors-definition-zero-scheme-s} we see that on $D_{+}(T_j)$ the ideal of $H$ is generated by $\sum a_i T_i/T_j$ in the polynomial ring $k[T_0/T_j, \ldots, T_n/T_j]$. Thus it is clear that $I$ is the ideal generated by $\sum a_i T_i$. Note that $$ k[T_0, \ldots, T_n]/I = k[T_0, \ldots, T_n]/(\sum a_i T_i) \cong k[S_0, \ldots, S_{n - 1}] $$ as graded rings. For example, if $a_n \not = 0$, then mapping $S_i$ equal to the class of $T_i$ works. We obtain the desired isomorphism by functoriality of $\text{Proj}$. Equality of twists of structure sheaves follows for example from Constructions, Lemma \ref{constructions-lemma-surjective-graded-rings-generated-degree-1-map-proj}.
The map $\mathcal{F}(-1) \to \mathcal{F}$ comes from Constructions, Equation (\ref{constructions-equation-multiply-on-sheaf}) with $n = 1$, $m = -1$ and the section $s$ of $\mathcal{O}(1)$. Let's work out what this map looks like if we restrict it to $D_{+}(T_0)$. Write $D_{+}(T_0) = \Spec(k[x_1, \ldots, x_n])$ with $x_i = T_i/T_0$. Identify $\mathcal{O}(1)|_{D_{+}(T_0)}$ with $\mathcal{O}$ using the section $T_0$. Hence if $s = \sum a_iT_i$ then $s|_{D_{+}(T_0)} = a_0 + \sum a_ix_i$ with the identification chosen above. Furthermore, suppose $\mathcal{F}|_{D_{+}(T_0)}$ corresponds to the finite $k[x_1, \ldots, x_n]$-module $M$. Via the identification $\mathcal{F}(-1) = \mathcal{F} \otimes \mathcal{O}(-1)$ and our chosen trivialization of $\mathcal{O}(1)$ we see that $\mathcal{F}(-1)$ corresponds to $M$ as well. Thus restricting $\mathcal{F}(-1) \to \mathcal{F}$ to $D_{+}(T_0)$ gives the map $$ M \xrightarrow{a_0 + \sum a_ix_i} M $$ To see that the arrow is injective, it suffices to pick $a_0 + \sum a_ix_i$ outside any of the associated primes of $M$, see Algebra, Lemma \ref{algebra-lemma-ass-zero-divisors}. By Algebra, Lemma \ref{algebra-lemma-finite-ass} the set $\text{Ass}(M)$ of associated primes of $M$ is finite. Note that for $\mathfrak p \in \text{Ass}(M)$ the intersection $\mathfrak p \cap \{a_0 + \sum a_i x_i\}$ is a proper $k$-subvector space. We conclude that there is a finite family of proper sub vector spaces $V_1, \ldots, V_m \subset \Gamma(\mathbf{P}^n_k, \mathcal{O}(1))$ such that if we take $s$ outside of $\bigcup V_i$, then multiplication by $s$ is injective over $D_{+}(T_0)$. Similarly for the restriction to $D_{+}(T_j)$ for $j = 1, \ldots, n$. Since $k$ is infinite, a finite union of proper sub vector spaces is never equal to the whole space, hence we may choose $s$ such that the map is injective. The cokernel of $\mathcal{F}(-1) \to \mathcal{F}$ is annihilated by $\Im(s : \mathcal{O}(-1) \to \mathcal{O})$ which is the ideal sheaf of $H$ by Divisors, Definition \ref{divisors-definition-zero-scheme-s}. Hence we obtain $\mathcal{G}$ on $H$ using Cohomology of Schemes, Lemma \ref{coherent-lemma-i-star-equivalence}.
Recall that $H^i(\mathbf{P}^n_k, i_*\mathcal{G}) = H^i(H, \mathcal{G})$ by Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}. Hence we see that for $i \geq 1$ we get $$ H^i(\mathbf{P}^n_k, \mathcal{F}(m - i)) \to H^i(H, \mathcal{G}(m - i)) \to H^{i + 1}(\mathbf{P}^n_k, \mathcal{F}(m - 1 - i)) $$ by Remark \ref{remark-exact-sequence-induction-cohomology}. The lemma follows.
We prove this by induction on $n$. If $n = 0$ every sheaf is $m$-regular for all $m$ and there is nothing to prove. By Lemma \ref{lemma-m-regular-extend-base-field} we may replace $k$ by an infinite overfield and assume $k$ is infinite. Thus we may apply Lemma \ref{lemma-exact-sequence-induction}. By Lemma \ref{lemma-m-regular} we know that $\mathcal{G}$ is $m$-regular. By induction on $n$ we see that $\mathcal{G}$ is $(m + 1)$-regular. Considering the long exact cohomology sequence associated to the sequence $$ 0 \to \mathcal{F}(m - i) \to \mathcal{F}(m + 1 - i) \to i_*\mathcal{G}(m + 1 - i) \to 0 $$ as in Remark \ref{remark-exact-sequence-induction-cohomology} the reader easily deduces for $i \geq 1$ the vanishing of $H^i(\mathbf{P}^n_k, \mathcal{F}(m + 1 - i))$ from the (known) vanishing of $H^i(\mathbf{P}^n_k, \mathcal{F}(m - i))$ and $H^i(\mathbf{P}^n_k, \mathcal{G}(m + 1 - i))$.
Let $k \subset k'$ be an extension of fields. Let $\mathcal{F}'$ be as in Lemma \ref{lemma-m-regular-extend-base-field}. By Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology} the base change of the linear map of the lemma to $k'$ is the same linear map for the sheaf $\mathcal{F}'$. Since $k \to k'$ is faithfully flat it suffices to prove the lemma over $k'$, i.e., we may assume $k$ is infinite. \medskip\noindent Assume $k$ is infinite. We prove the lemma by induction on $n$. The case $n = 0$ is trivial as $\mathcal{O}(1) \cong \mathcal{O}$ is generated by $T_0$. For $n > 0$ apply Lemma \ref{lemma-exact-sequence-induction} and tensor the sequence by $\mathcal{O}(m + 1)$ to get $$ 0 \to \mathcal{F}(m) \xrightarrow{s} \mathcal{F}(m + 1) \to i_*\mathcal{G}(m + 1) \to 0 $$ see Remark \ref{remark-exact-sequence-induction-cohomology}. Let $t \in H^0(\mathbf{P}^n_k, \mathcal{F}(m + 1))$. By induction the image $\overline{t} \in H^0(H, \mathcal{G}(m + 1))$ is the image of $\sum g_i \otimes \overline{s}_i$ with $\overline{s}_i \in \Gamma(H, \mathcal{O}(1))$ and $g_i \in H^0(H, \mathcal{G}(m))$. Since $\mathcal{F}$ is $m$-regular we have $H^1(\mathbf{P}^n_k, \mathcal{F}(m - 1)) = 0$, hence long exact cohomology sequence associated to the short exact sequence $$ 0 \to \mathcal{F}(m - 1) \xrightarrow{s} \mathcal{F}(m) \to i_*\mathcal{G}(m) \to 0 $$ shows we can lift $g_i$ to $f_i \in H^0(\mathbf{P}^n_k, \mathcal{F}(m))$. We can also lift $\overline{s}_i$ to $s_i \in H^0(\mathbf{P}^n_k, \mathcal{O}(1))$ (see proof of Lemma \ref{lemma-hyperplane} for example). After substracting the image of $\sum f_i \otimes s_i$ from $t$ we see that we may assume $\overline{t} = 0$. But this exactly means that $t$ is the image of $f \otimes s$ for some $f \in H^0(\mathbf{P}^n_k, \mathcal{F}(m))$ as desired.
For all $d \gg 0$ the sheaf $\mathcal{F}(d)$ is globally generated. This follows for example from the first part of Cohomology of Schemes, Lemma \ref{coherent-lemma-coherent-projective}. Pick $d \geq m$ such that $\mathcal{F}(d)$ is globally generated. Choose a basis $f_1, \ldots, f_r \in H^0(\mathbf{P}^n_k, \mathcal{F})$. By Lemma \ref{lemma-m-regular-multiply} every element $f \in H^0(\mathbf{P}^n_k, \mathcal{F}(d))$ can be written as $f = \sum P_if_i$ for some $P_i \in k[T_0, \ldots, T_n]$ homogeneous of degree $d - m$. Since the sections $f$ generate $\mathcal{F}(d)$ it follows that the sections $f_i$ generate $\mathcal{F}(m)$.
We prove this by induction on $n$. If $n = 0$, then $\mathbf{P}^n_k = \Spec(k)$ and $\mathcal{F}(d) = \mathcal{F}$. Hence in this case the function is constant, i.e., a polynomial of degree $0$. Assume $n > 0$. By Lemma \ref{lemma-euler-characteristic-extend-base-field} we may assume $k$ is infinite. Apply Lemma \ref{lemma-exact-sequence-induction}. Applying Lemma \ref{lemma-euler-characteristic-additive} to the twisted sequences $0 \to \mathcal{F}(d - 1) \to \mathcal{F}(d) \to i_*\mathcal{G}(d) \to 0$ we obtain $$ \chi(\mathbf{P}^n_k, \mathcal{F}(d)) - \chi(\mathbf{P}^n_k, \mathcal{F}(d - 1)) = \chi(H, \mathcal{G}(d)) $$ See Remark \ref{remark-exact-sequence-induction-cohomology}. Since $H \cong \mathbf{P}^{n - 1}_k$ by induction the right hand side is a polynomial. The lemma is finished by noting that any function $f : \mathbf{Z} \to \mathbf{Z}$ with the property that the map $d \mapsto f(d) - f(d - 1)$ is a polynomial, is itself a polynomial. We omit the proof of this fact (hint: compare with Algebra, Lemma \ref{algebra-lemma-numerical-polynomial}).
By Lemma \ref{lemma-frobenius} the morphisms $F_X : X \to X$ and the base change $h : X^{(p)} \to X$ of $F_S$ are universal homeomorphisms. Since $h \circ F_{X/S} = F_X$ we conclude that $F_{X/S}$ is a universal homeomorphism. By Morphisms, Lemmas \ref{morphisms-lemma-universal-homeomorphism} and \ref{morphisms-lemma-universally-injective} we conclude that $F_{X/S}$ has the other properties as well.
This translates into the following algebra fact. Let $A \to B$ be a finite type homomorphism of rings of characteristic $p$. Set $B' = B \otimes_{A, F_A} A$ and consider the ring map $F_{B/A} : B' \to B$, $b \otimes a \mapsto b^pa$. Then our assertion is that $F_{B/A}$ is finite. Namely, if $x_1, \ldots, x_n \in B$ are generators over $A$, then $x_i$ is integral over $B'$ because $x_i^p = F_{B/A}(x_i \otimes 1)$. Hence $F_{B/A} : B' \to B$ is finite by Algebra, Lemma \ref{algebra-lemma-characterize-finite-in-terms-of-integral}.