hcju/stacksqa huggingface dataset:
Let $s = f(x)$. By Proposition \ref{proposition-finite-type-flat-at-point} there exists an elementary \'etale neighbourhood $(S', s') \to (S, s)$ such that the pullback of $\mathcal{F}$ to $X \times_S \Spec(\mathcal{O}_{S', s'})$ is of finite presentation in a neighbourhood of the point $x' \in X_{s'} = X_s$ corresponding to $x$. The ring map $$ \mathcal{O}_{X, x} \longrightarrow \mathcal{O}_{X \times_S \Spec(\mathcal{O}_{S', s'}), x'} = \mathcal{O}_{X \times_S S', x'} $$ is flat and local as a localization of an \'etale ring map. Hence $\mathcal{F}_x$ is of finite presentation over $\mathcal{O}_{X, x}$ by descent, see Algebra, Lemma \ref{algebra-lemma-descend-properties-modules} (and also that a flat local ring map is faithfully flat, see Algebra, Lemma \ref{algebra-lemma-local-flat-ff}).
We may assume $X$ and $S$ affine. Write $X = \Spec(B)$, $S = \Spec(A)$ and write $B = A[x_1, \ldots, x_n]/I$. In other words we obtain a closed immersion $i : X \to \mathbf{A}^n_S$. Denote $t = i(x) \in \mathbf{A}^n_S$. We may apply Lemma \ref{lemma-finite-type-flat-at-point-local} to $\mathbf{A}^n_S \to S$, the sheaf $\mathcal{F} = i_*\mathcal{O}_X$ and the point $t$. We conclude that $\mathcal{O}_{X, x}$ is of finite presentation over $\mathcal{O}_{\mathbf{A}^n_S, t}$ which implies what we want.
The problem is local on $X$ and $S$, hence we may assume $X$ and $S$ affine. Write $S = \Spec(A)$ and $X = \Spec(B)$. Let $N$ be a finite $B$-module such that $\mathcal{F}$ is the quasi-coherent sheaf associated to $N$. We have $U = D(f_1) \cup \ldots \cup D(f_n)$ for some $f_i \in A$, see Algebra, Lemma \ref{algebra-lemma-qc-open}. As $U$ is schematically dense the map $A \to A_{f_1} \times \ldots \times A_{f_n}$ is injective. Pick a prime $\mathfrak q \subset B$ lying over $\mathfrak p \subset A$ corresponding to $x \in X$ mapping to $s \in S$. By Lemma \ref{lemma-finite-type-flat-at-point-local} the module $N_\mathfrak q$ is of finite presentation over $B_\mathfrak q$. Choose a surjection $\varphi : B^{\oplus m} \to N$ of $B$-modules. Choose $k_1, \ldots, k_t \in \Ker(\varphi)$ and set $N' = B^{\oplus m}/\sum Bk_j$. There is a canonical surjection $N' \to N$ and $N$ is the filtered colimit of the $B$-modules $N'$ constructed in this manner. Thus we see that we can choose $k_1, \ldots, k_t$ such that (a) $N'_{f_i} \cong N_{f_i}$, $i = 1, \ldots, n$ and (b) $N'_\mathfrak q \cong N_\mathfrak q$. This in particular implies that $N'_\mathfrak q$ is flat over $A$. By openness of flatness, see Algebra, Theorem \ref{algebra-theorem-openness-flatness} we conclude that there exists a $g \in B$, $g \not \in \mathfrak q$ such that $N'_g$ is flat over $A$. Consider the commutative diagram $$ \xymatrix{ N'_g \ar[r] \ar[d] & N_g \ar[d] \\ \prod N'_{gf_i} \ar[r] & \prod N_{gf_i} } $$ The bottom arrow is an isomorphism by choice of $k_1, \ldots, k_t$. The left vertical arrow is an injective map as $A \to \prod A_{f_i}$ is injective and $N'_g$ is flat over $A$. Hence the top horizontal arrow is injective, hence an isomorphism. This proves that $N_g$ is of finite presentation over $B_g$. We conclude by applying Algebra, Lemma \ref{algebra-lemma-cover}.
Proof in case (1). Let $W \subset X$ be the open subscheme constructed and studied in More on Morphisms, Lemmas \ref{more-morphisms-lemma-flat-finite-presentation-CM-open} and \ref{more-morphisms-lemma-flat-finite-presentation-CM-pieces}. Note that every generic point of every fibre is contained in $W$, hence it suffices to prove the result for $W$. Since $W = \bigcup_{d \geq 0} U_d$, it suffices to prove that $U_d = \emptyset$ for $d > e$. Since $f$ is flat and locally of finite presentation it is open hence $f(U_d)$ is open (Morphisms, Lemma \ref{morphisms-lemma-fppf-open}). Thus if $U_d$ is not empty, then $f(U_d) \cap U \not = \emptyset$ as desired. \medskip\noindent Proof in case (2). We may replace $S$ by its reduction. Then $U$ is scheme theoretically dense. Hence $f$ is locally of finite presentation by Lemma \ref{lemma-flat-finite-type-finitely-presented-over-dense-open-X}. In this way we reduce to case (1).
By Lemma \ref{lemma-flat-finite-presentation-dimension-over-dense-open} the fibres of $f$ have dimension zero. Hence $f$ is quasi-finite (Morphisms, Lemma \ref{morphisms-lemma-locally-quasi-finite-rel-dimension-0}) whence has finite fibres (Morphisms, Lemma \ref{morphisms-lemma-quasi-finite}). Hence $f$ is finite by More on Morphisms, Lemma \ref{more-morphisms-lemma-characterize-finite}.
By Lemma \ref{lemma-flat-finite-type-finitely-presented-over-dense-open-X} the morphism $f$ is locally of finite presentation. The image $f(X) \subset S$ is open (Morphisms, Lemma \ref{morphisms-lemma-fppf-open}) hence we may replace $S$ by $f(X)$. Thus we have to prove that $f$ is an isomorphism. We may assume $S$ is affine. We can reduce to the case that $X$ is quasi-compact because it suffices to show that any quasi-compact open $X' \subset X$ whose image is $S$ maps isomorphically to $S$. Thus we may assume $f$ is quasi-compact. All the fibers of $f$ have dimension $0$, see Lemma \ref{lemma-flat-finite-presentation-dimension-over-dense-open}. Hence $f$ is quasi-finite, see Morphisms, Lemma \ref{morphisms-lemma-locally-quasi-finite-rel-dimension-0}. Let $s \in S$. Choose an elementary \'etale neighbourhood $g : (T, t) \to (S, s)$ such that $X \times_S T = V \amalg W$ with $V \to T$ finite and $W_t = \emptyset$, see More on Morphisms, Lemma \ref{more-morphisms-lemma-etale-splits-off-quasi-finite-part}. Denote $\pi : V \amalg W \to T$ the given morphism. Since $\pi$ is flat and locally of finite presentation, we see that $\pi(V)$ is open in $T$ (Morphisms, Lemma \ref{morphisms-lemma-fppf-open}). After shrinking $T$ we may assume that $T = \pi(V)$. Since $f$ is an isomorphism over $U$ we see that $\pi$ is an isomorphism over $g^{-1}U$. Since $\pi(V) = T$ this implies that $\pi^{-1}g^{-1}U$ is contained in $V$. By Morphisms, Lemma \ref{morphisms-lemma-flat-morphism-scheme-theoretically-dense-open} we see that $\pi^{-1}g^{-1}U \subset V \amalg W$ is scheme theoretically dense. Hence we deduce that $W = \emptyset$. Thus $X \times_S T = V$ is finite over $T$. This implies that $f$ is finite (after replacing $S$ by an open neighbourhood of $s$), for example by Descent, Lemma \ref{descent-lemma-descending-property-finite}. Then $f$ is finite locally free (Morphisms, Lemma \ref{morphisms-lemma-finite-flat}) and after shrinking $S$ to a smaller open neighbourhood of $s$ we see that $f$ is finite locally free of some degree $d$ (Morphisms, Lemma \ref{morphisms-lemma-finite-locally-free}). But $d = 1$ as is clear from the fact that the degree is $1$ over the dense open $U$. Hence $f$ is an isomorphism.
To obtain $\alpha$ set $r = \dim_{\kappa(\mathfrak p)} N \otimes_S \kappa(\mathfrak p)$ and pick $x_1, \ldots, x_r \in N$ which form a basis of $N \otimes_S \kappa(\mathfrak p)$. Define $\alpha(s_1, \ldots, s_r) = \sum s_i x_i$. This proves the existence. \medskip\noindent Fix a choice of $\alpha$. We may apply Lemma \ref{lemma-induction-step} to the map $\alpha_{\mathfrak r} : S_{\mathfrak r}^{\oplus r} \to N_{\mathfrak r}$. Hence we see that (1), (3), (4), (5), and (6) are all equivalent. Since it is also clear that (2) implies (3) we see that all we have to do is show that (1) implies (2). \medskip\noindent Assume (1). By openness of flatness, see Algebra, Theorem \ref{algebra-theorem-openness-flatness}, the set $$ U_1 = \{\mathfrak q' \subset S \mid N_{\mathfrak q'}\text{ is flat over }R\} $$ is open in $\Spec(S)$. It contains $\mathfrak q$ by assumption and hence $\mathfrak p$. Because $S^{\oplus r}$ and $N$ are finitely presented $S$-modules the set $$ U_2 = \{\mathfrak q' \subset S \mid \alpha_{\mathfrak q'}\text{ is an isomorphism}\} $$ is open in $\Spec(S)$, see Algebra, Lemma \ref{algebra-lemma-map-between-finitely-presented}. It contains $\mathfrak p$ by (5). As $R \to S$ is finitely presented and flat the map $\Phi : \Spec(S) \to \Spec(R)$ is open, see Algebra, Proposition \ref{algebra-proposition-fppf-open}. For any prime $\mathfrak r' \in \Phi(U_1 \cap U_2)$ we see that there exists a prime $\mathfrak q'$ lying over $\mathfrak r'$ such that $N_{\mathfrak q'}$ is flat and such that $\alpha_{\mathfrak q'}$ is an isomorphism, which implies that $\alpha \otimes \kappa(\mathfrak p')$ is an isomorphism where $\mathfrak p' = \mathfrak r' S$. Thus $\alpha_{\mathfrak r'}$ is $R_{\mathfrak r'}$-universally injective by the implication (1) $\Rightarrow$ (3). Hence if we pick $f \in R$, $f \not \in \mathfrak r$ such that $D(f) \subset \Phi(U_1 \cap U_2)$ then we conclude that $\alpha_f$ is $R_f$-universally injective, see Algebra, Lemma \ref{algebra-lemma-universally-injective-check-stalks}. The same reasoning also shows that for any $\mathfrak q' \in U_1 \cap \Phi^{-1}(\Phi(U_1 \cap U_2))$ the module $\Coker(\alpha)_{\mathfrak q'}$ is $R$-flat. Note that $\mathfrak q \in U_1 \cap \Phi^{-1}(\Phi(U_1 \cap U_2))$. Hence we can find a $g \in S$, $g \not \in \mathfrak q$ such that $D(g) \subset U_1 \cap \Phi^{-1}(\Phi(U_1 \cap U_2))$ and we win.
Let $(A_i, B_i, M_i, \alpha_i)_{i = 1, \ldots, n}$ be the given complete d\'evissage. We prove the lemma by induction on $n$. Note that the assertions of the lemma are entirely about the structure of $N$ as an $R$-module. Hence we may replace $N$ by $M_1$, and we may think of $M_1$ as a $B_1$-module. See Remark \ref{remark-finite-presentation} in order to see why $M_1$ is of finite presentation as a $B_1$-module. By Lemma \ref{lemma-induction-step-fp} we may, after replacing $R$ by $R_f$ for some $f \in R$, $f \not \in \mathfrak r$, assume the map $\alpha_1 : B_1^{\oplus r_1} \to M_1$ is $R$-universally injective. Since $M_1$ and $B_1^{\oplus r_1}$ are $R$-flat and finitely presented as $B_1$-modules we see that $\Coker(\alpha_1)$ is $R$-flat (Algebra, Lemma \ref{algebra-lemma-ui-flat-domain}) and finitely presented as a $B_1$-module. Note that $(A_i, B_i, M_i, \alpha_i)_{i = 2, \ldots, n}$ is a complete d\'evissage of $\Coker(\alpha_1)$. Hence the induction hypothesis implies that, after replacing $R$ by $R_f$ for some $f \in R$, $f \not \in \mathfrak r$, we may assume that $\Coker(\alpha_1)$ has a decomposition as in the lemma and is projective. In particular $M_1 = B_1^{\oplus r_1} \oplus \Coker(\alpha_1)$. This proves the statement regarding the decomposition. The statement on projectivity follows as $B_1$ is projective as an $R$-module by Lemma \ref{lemma-fibres-irreducible-flat-projective-nonnoetherian}.
For every point $x \in X_s$ we can use Proposition \ref{proposition-finite-presentation-flat-at-point} to find a commutative diagram $$ \xymatrix{ (X, x) \ar[d] & (Y_x, y_x) \ar[l]^{g_x} \ar[d] \\ (S, s) & (S_x, s_x) \ar[l] } $$ whose horizontal arrows are elementary \'etale neighbourhoods such that $Y_x$, $S_x$ are affine and such that $\Gamma(Y_x, g_x^*\mathcal{F})$ is a projective $\Gamma(S_x, \mathcal{O}_{S_x})$-module. In particular $g_x(Y_x) \cap X_s$ is an open neighbourhood of $x$ in $X_s$. Because $X_s$ is quasi-compact we can find a finite number of points $x_1, \ldots, x_n \in X_s$ such that $X_s$ is the union of the $g_{x_i}(Y_{x_i}) \cap X_s$. Choose an elementary \'etale neighbourhood $(S' , s') \to (S, s)$ which dominates each of the neighbourhoods $(S_{x_i}, s_{x_i})$, see More on Morphisms, Lemma \ref{more-morphisms-lemma-elementary-etale-neighbourhoods}. We may also assume that $S'$ is affine. Set $X' = \coprod Y_{x_i} \times_{S_{x_i}} S'$ and endow it with the obvious morphism $g : X' \to X$. By construction $g(X')$ contains $X_s$ and $$ \Gamma(X', g^*\mathcal{F}) = \bigoplus \Gamma(Y_{x_i}, g_{x_i}^*\mathcal{F}) \otimes_{\Gamma(S_{x_i}, \mathcal{O}_{S_{x_i}})} \Gamma(S', \mathcal{O}_{S'}). $$ This is a projective $\Gamma(S', \mathcal{O}_{S'})$-module, see Algebra, Lemma \ref{algebra-lemma-ascend-properties-modules}.
To prove the lemma we may replace $(S, s)$ by any elementary \'etale neighbourhood, and we may also replace $S$ by $\Spec(\mathcal{O}_{S, s})$. Hence by Proposition \ref{proposition-finite-type-flat-at-point} we may assume that $\mathcal{F}$ is finitely presented and flat over $S$ in a neighbourhood of $x$. In this case the result follows from Proposition \ref{proposition-finite-presentation-flat-at-point} because Algebra, Theorem \ref{algebra-theorem-projective-free-over-local-ring} assures us that projective $=$ free over a local ring.
(The only difference with Lemma \ref{lemma-finite-type-flat-at-point-free} is that we do not assume $f$ is of finite presentation.) The problem is local on $X$ and $S$. Hence we may assume $X$ and $S$ are affine, say $X = \Spec(B)$ and $S = \Spec(A)$. Since $B$ is a finite type $A$-algebra we can find a surjection $A[x_1, \ldots, x_n] \to B$. In other words, we can choose a closed immersion $i : X \to \mathbf{A}^n_S$. Set $t = i(x)$ and $\mathcal{G} = i_*\mathcal{F}$. Note that $\mathcal{G}_t \cong \mathcal{F}_x$ are $\mathcal{O}_{S, s}$-modules. Hence $\mathcal{G}$ is flat over $S$ at $t$. We apply Lemma \ref{lemma-finite-type-flat-at-point-free} to the morphism $\mathbf{A}^n_S \to S$, the point $t$, and the sheaf $\mathcal{G}$. Thus we can find an elementary \'etale neighbourhood $(S', s') \to (S, s)$ and a commutative diagram of pointed schemes $$ \xymatrix{ (\mathbf{A}^n_S, t) \ar[d] & (Y, y) \ar[l]^h \ar[d] \\ (S, s) & (\Spec(\mathcal{O}_{S', s'}), s') \ar[l] } $$ such that $Y \to \mathbf{A}^n_{\mathcal{O}_{S', s'}}$ is \'etale, $\kappa(t) = \kappa(y)$, the scheme $Y$ is affine, and such that $\Gamma(Y, h^*\mathcal{G})$ is a projective $\mathcal{O}_{S', s'}$-module. Then a solution to the original problem is given by the closed subscheme $X' = Y \times_{\mathbf{A}^n_S} X$ of $Y$.
For every point $x \in X_s$ we can use Lemma \ref{lemma-finite-type-flat-at-point-free} to find an elementary \'etale neighbourhood $(S_x , s_x) \to (S, s)$ and a commutative diagram $$ \xymatrix{ (X, x) \ar[d] & (Y_x, y_x) \ar[l]^{g_x} \ar[d] \\ (S, s) & (\Spec(\mathcal{O}_{S_x, s_x}), s_x) \ar[l] } $$ such that $Y_x \to X \times_S \Spec(\mathcal{O}_{S_x, s_x})$ is \'etale, $\kappa(x) = \kappa(y_x)$, the scheme $Y_x$ is affine of finite presentation over $\mathcal{O}_{S_x, s_x}$, the sheaf $g_x^*\mathcal{F}$ is of finite presentation over $\mathcal{O}_{Y_x}$, and such that $\Gamma(Y_x, g_x^*\mathcal{F})$ is a free $\mathcal{O}_{S_x, s_x}$-module. In particular $g_x((Y_x)_{s_x})$ is an open neighbourhood of $x$ in $X_s$. Because $X_s$ is quasi-compact we can find a finite number of points $x_1, \ldots, x_n \in X_s$ such that $X_s$ is the union of the $g_{x_i}((Y_{x_i})_{s_{x_i}})$. Choose an elementary \'etale neighbourhood $(S' , s') \to (S, s)$ which dominates each of the neighbourhoods $(S_{x_i}, s_{x_i})$, see More on Morphisms, Lemma \ref{more-morphisms-lemma-elementary-etale-neighbourhoods}. Set $$ X' = \coprod Y_{x_i} \times_{\Spec(\mathcal{O}_{S_{x_i}, s_{x_i}})} \Spec(\mathcal{O}_{S', s'}) $$ and endow it with the obvious morphism $g : X' \to X$. By construction $X_s = g(X'_{s'})$ and $$ \Gamma(X', g^*\mathcal{F}) = \bigoplus \Gamma(Y_{x_i}, g_{x_i}^*\mathcal{F}) \otimes_{\mathcal{O}_{S_{x_i}, s_{x_i}}} \mathcal{O}_{S', s'}. $$ This is a free $\mathcal{O}_{S', s'}$-module as a direct sum of base changes of free modules. Some minor details omitted.
(The only difference with Lemma \ref{lemma-finite-type-flat-along-fibre-free} is that we do not assume $f$ is of finite presentation.) For every point $x \in X_s$ we can use Lemma \ref{lemma-finite-type-flat-at-point-free-variant} to find an elementary \'etale neighbourhood $(S_x , s_x) \to (S, s)$ and a commutative diagram $$ \xymatrix{ (X, x) \ar[d] & (Y_x, y_x) \ar[l]^{g_x} \ar[d] \\ (S, s) & (\Spec(\mathcal{O}_{S_x, s_x}), s_x) \ar[l] } $$ such that $Y_x \to X \times_S \Spec(\mathcal{O}_{S_x, s_x})$ is \'etale, $\kappa(x) = \kappa(y_x)$, the scheme $Y_x$ is affine, and such that $\Gamma(Y_x, g_x^*\mathcal{F})$ is a free $\mathcal{O}_{S_x, s_x}$-module. In particular $g_x((Y_x)_{s_x})$ is an open neighbourhood of $x$ in $X_s$. Because $X_s$ is quasi-compact we can find a finite number of points $x_1, \ldots, x_n \in X_s$ such that $X_s$ is the union of the $g_{x_i}((Y_{x_i})_{s_{x_i}})$. Choose an elementary \'etale neighbourhood $(S' , s') \to (S, s)$ which dominates each of the neighbourhoods $(S_{x_i}, s_{x_i})$, see More on Morphisms, Lemma \ref{more-morphisms-lemma-elementary-etale-neighbourhoods}. Set $$ X' = \coprod Y_{x_i} \times_{\Spec(\mathcal{O}_{S_{x_i}, s_{x_i}})} \Spec(\mathcal{O}_{S', s'}) $$ and endow it with the obvious morphism $g : X' \to X$. By construction $X_s = g(X'_{s'})$ and $$ \Gamma(X', g^*\mathcal{F}) = \bigoplus \Gamma(Y_{x_i}, g_{x_i}^*\mathcal{F}) \otimes_{\mathcal{O}_{S_{x_i}, s_{x_i}}} \mathcal{O}_{S', s'}. $$ This is a free $\mathcal{O}_{S', s'}$-module as a direct sum of base changes of free modules.
Namely, if $\text{Ass}_{\overline{S}}(\overline{N}) = \{\mathfrak r_1, \ldots, \mathfrak r_n\}$ (finiteness by Algebra, Lemma \ref{algebra-lemma-finite-ass}), then after renumbering we may assume that $$ \mathfrak r_1 \subset \overline{\mathfrak q}, \ldots, \mathfrak r_r \subset \overline{\mathfrak q}, \quad \mathfrak r_{r + 1} \not \subset \overline{\mathfrak q}, \ldots, \mathfrak r_n \not \subset \overline{\mathfrak q} $$ Since $\overline{\mathfrak q}$ is a prime ideal we see that the product $\mathfrak r_{r + 1} \ldots \mathfrak r_n$ is not contained in $\overline{\mathfrak q}$ and hence we can pick an element $a$ of $\overline{S}$ contained in $\mathfrak r_{r + 1}, \ldots, \mathfrak r_n$ but not in $\overline{\mathfrak q}$. If there exists $g \in S$ mapping to $a$, then $g$ works. In general we can find a nonzero element $\lambda \in \kappa(\mathfrak p)$ such that $\lambda a$ is the image of a $g \in S$.
In this paragraph we reduce to $f$ being of finite presentation. The question is local on $X$ and $S$, hence we may assume $X$ and $S$ are affine. Write $X = \Spec(B)$, $S = \Spec(A)$ and write $B = A[x_1, \ldots, x_n]/I$. In other words we obtain a closed immersion $i : X \to \mathbf{A}^n_S$ over $S$. Denote $t = i(x) \in \mathbf{A}^n_S$. Note that $i_*\mathcal{F}$ is a finite type quasi-coherent sheaf on $\mathbf{A}^n_S$ which is flat at $t$ over $S$ and note that $$ i_*(\mathcal{F} \otimes_{\mathcal{O}_X} f^*\mathcal{G}) = i_*\mathcal{F} \otimes_{\mathcal{O}_{\mathbf{A}^n_S}} p^*\mathcal{G} $$ where $p : \mathbf{A}^n_S \to S$ is the projection. Note that $t$ is a weakly associated point of $i_*(\mathcal{F} \otimes_{\mathcal{O}_X} f^*\mathcal{G})$ if and only if $x$ is a weakly associated point of $\mathcal{F} \otimes_{\mathcal{O}_X} f^*\mathcal{G}$, see Divisors, Lemma \ref{divisors-lemma-weakly-associated-finite}. Similarly $x \in \text{Ass}_{X_s}(\mathcal{F}_s)$ if and only if $t \in \text{Ass}_{\mathbf{A}^n_s}((i_*\mathcal{F})_s)$ (see Algebra, Lemma \ref{algebra-lemma-ass-quotient-ring}). Hence it suffices to prove the lemma in case $X = \mathbf{A}^n_S$. Thus we may assume that $X \to S$ is of finite presentation. \medskip\noindent In this paragraph we reduce to $\mathcal{F}$ being of finite presentation and flat over $S$. Choose an elementary \'etale neighbourhood $e : (S', s') \to (S, s)$ and an open $V \subset X \times_S \Spec(\mathcal{O}_{S', s'})$ as in Proposition \ref{proposition-finite-type-flat-at-point}. Let $x' \in X' = X \times_S S'$ be the unique point mapping to $x$ and $s'$. Then it suffices to prove the statement for $X' \to S'$, $x'$, $s'$, $(X' \to X)^*\mathcal{F}$, and $e^*\mathcal{G}$, see Lemma \ref{lemma-etale-weak-assassin-up-down}. Let $v \in V$ the unique point mapping to $x'$ and let $s' \in \Spec(\mathcal{O}_{S', s'})$ be the closed point. Then $\mathcal{O}_{V, v} = \mathcal{O}_{X', x'}$ and $\mathcal{O}_{\Spec(\mathcal{O}_{S', s'}), s'} = \mathcal{O}_{S', s'}$ and similarly for the stalks of pullbacks of $\mathcal{F}$ and $\mathcal{G}$. Also $V_{s'} \subset X'_{s'}$ is an open subscheme. Since the condition of being a weakly associated point depend only on the stalk of the sheaf, we may replace $X' \to S'$, $x'$, $s'$, $(X' \to X)^*\mathcal{F}$, and $e^*\mathcal{G}$ by $V \to \Spec(\mathcal{O}_{S', s'})$, $v$, $s'$, $(V \to X)^*\mathcal{F}$, and $(\Spec(\mathcal{O}_{S', s'}) \to S)^*\mathcal{G}$. Thus we may assume that $f$ is of finite presentation and $\mathcal{F}$ of finite presentation and flat over $S$. \medskip\noindent Assume $f$ is of finite presentation and $\mathcal{F}$ of finite presentation and flat over $S$. After shrinking $X$ and $S$ to affine neighbourhoods of $x$ and $s$, this case is handled by Lemma \ref{lemma-weak-bourbaki-pre}.
The problem is local on $X$ and $S$, hence we may assume that $X$ and $S$ are affine. Then $X \to S$ corresponds to a finite type ring map $A \to B$. Choose a surjection $A[x_1, \ldots, x_n] \to B$ and consider $B$ as an $A[x_1, \ldots, x_n]$-module. An application of Lemma \ref{lemma-finite-type-flat-algebra} finishes the proof.
Note that the hypotheses of Lemmas \ref{lemma-homothety-spectrum} and \ref{lemma-invert-universally-injective} are satisfied. We will use the conclusions of these lemmas without further mention. Let $\Sigma \subset S$ be the multiplicative set of elements which are not zerodivisors on $N/\mathfrak mN$. The map $N \to \Sigma^{-1}N$ is $R$-universally injective. Hence we see that any $\mathfrak q \subset S$ which is an associated prime of $N \otimes_R \kappa(\mathfrak p)$ is also an associated prime of $\Sigma^{-1}N \otimes_R \kappa(\mathfrak p)$. Clearly this implies that $\mathfrak q$ corresponds to a prime of $\Sigma^{-1}S$. Thus $\mathfrak q \subset \mathfrak q'$ where $\mathfrak q'$ corresponds to an associated prime of $N/\mathfrak mN$ and we win.
Let $S^\wedge$ denote the $I$-adic completion of $S$. Note that $N$ is an $S^\wedge$-module, hence also $N \otimes_R M$ is an $S^\wedge$-module. Let $z \in N \otimes_R M$ be an element such that $\mathfrak q = \text{Ann}_S(z)$. Since $z \not = 0$ we see that $\text{Ann}_{S^\wedge}(z) \not = S^\wedge$. Hence $\mathfrak q S^\wedge \not = S^\wedge$. Hence there exists a maximal ideal $\mathfrak m \subset S^\wedge$ with $\mathfrak q S^\wedge \subset \mathfrak m$. Since $IS^\wedge \subset \mathfrak m$ by Algebra, Lemma \ref{algebra-lemma-radical-completion} we win.
Write $N = \bigoplus_{i \in I} M_i$ with each $M_i$ a finite $R$-module. Let $M$ be an $R$-module and let $\mathfrak q \subset S$ be an associated prime of $N \otimes_R M$ such that $\mathfrak q + \mathfrak m S = S$. Let $z \in N \otimes_R M$ be an element with $\mathfrak q = \text{Ann}_S(z)$. After modifying the direct sum decomposition a little bit we may assume that $z \in M_1 \otimes_R M$ for some element $1 \in I$. Write $1 = f + \sum x_j g_j$ for some $f \in \mathfrak q$, $x_j \in \mathfrak m$, and $g_j \in S$. For any $g \in S$ denote $g'$ the $R$-linear map $$ M_1 \to N \xrightarrow{g} N \to M_1 $$ where the first arrow is the inclusion map, the second arrow is multiplication by $g$ and the third arrow is the projection map. Because each $x_j \in R$ we obtain the equality $$ f' + \sum x_j g'_j = \text{id}_{M_1} \in \text{End}_R(M_1) $$ By Nakayama's lemma (Algebra, Lemma \ref{algebra-lemma-NAK}) we see that $f'$ is surjective, hence by Algebra, Lemma \ref{algebra-lemma-fun} we see that $f'$ is an isomorphism. In particular the map $$ M_1 \otimes_R M \to N \otimes_R M \xrightarrow{f} N \otimes_R M \to M_1 \otimes_R M $$ is an isomorphism. This contradicts the assumption that $fz = 0$.