hcju/stacksqa huggingface dataset:
Let $s \in \Gamma(X, \mathcal{F})$ be a section which restricts to zero on $U$. Let $\mathcal{F}' \subset \mathcal{F}$ be the image of the map $\mathcal{O}_X \to \mathcal{F}$ defined by $s$. Then $\text{Supp}(\mathcal{F}') \cap U = \emptyset$. On the other hand, $\text{Ass}(\mathcal{F}') \subset \text{Ass}(\mathcal{F})$ by Lemma \ref{lemma-ses-ass}. Since also $\text{Ass}(\mathcal{F}') \subset \text{Supp}(\mathcal{F}')$ (Lemma \ref{lemma-ass-support}) we conclude $\text{Ass}(\mathcal{F}') = \emptyset$. Hence $\mathcal{F}' = 0$ by Lemma \ref{lemma-ass-zero}.
Since $x \in \text{Supp}(\mathcal{F})$ the module $\mathcal{F}_x$ is not zero. Hence $\text{Ass}(\mathcal{F}_x) \subset \Spec(\mathcal{O}_{X, x})$ is nonempty by Algebra, Lemma \ref{algebra-lemma-ass-zero}. On the other hand, by assumption $\text{Supp}(\mathcal{F}_x) = \{\mathfrak m_x\}$. Since $\text{Ass}(\mathcal{F}_x) \subset \text{Supp}(\mathcal{F}_x)$ (Algebra, Lemma \ref{algebra-lemma-ass-support}) we see that $\mathfrak m_x$ is associated to $\mathcal{F}_x$ and we win.
Let $x \in X$ and let $s = f(x) \in S$. Set $B = \mathcal{O}_{X, x}$, $A = \mathcal{O}_{S, s}$, $N = \mathcal{F}_x$, and $M = \mathcal{G}_s$. Note that the stalk of $\mathcal{F} \otimes_{\mathcal{O}_X} f^*\mathcal{G}$ at $x$ is equal to the $B$-module $M \otimes_A N$. Hence $x \in \text{Ass}_X(\mathcal{F} \otimes_{\mathcal{O}_X} f^*\mathcal{G})$ if and only if $\mathfrak m_B$ is in $\text{Ass}_B(M \otimes_A N)$. Similarly $s \in \text{Ass}_S(\mathcal{G})$ and $x \in \text{Ass}_{X_s}(\mathcal{F}_s)$ if and only if $\mathfrak m_A \in \text{Ass}_A(M)$ and $\mathfrak m_B/\mathfrak m_A B \in \text{Ass}_{B \otimes \kappa(\mathfrak m_A)}(N \otimes \kappa(\mathfrak m_A))$. Thus the lemma follows from Algebra, Lemma \ref{algebra-lemma-bourbaki-fibres}.
Recall that in this case $Z = \text{Supp}(\mathcal{F})$ is closed, see Morphisms, Lemma \ref{morphisms-lemma-support-finite-type} and that the generic points of irreducible components of $Z$ are associated points of $\mathcal{F}$, see Lemma \ref{lemma-minimal-support-in-ass}. Finally, we have $\text{Ass}(\mathcal{F}) \subset Z$, by Lemma \ref{lemma-ass-support}. These results, combined with the fact that $Z$ is a sober topological space and hence every point of $Z$ is a specialization of a generic point of $Z$, imply (1) and (2).
The question is local on $X$, hence we may assume that $X = \Spec(A)$ where $A$ is a Noetherian ring. Then $U$ is quasi-compact (Properties, Lemma \ref{properties-lemma-immersion-into-noetherian}) hence $U = D(f_1) \cup \ldots \cup D(f_n)$ (Algebra, Lemma \ref{algebra-lemma-qc-open}). In this situation $U$ is scheme theoretically dense in $X$ if and only if $A \to A_{f_1} \times \ldots \times A_{f_n}$ is injective, see Morphisms, Example \ref{morphisms-example-scheme-theoretic-closure}. Condition (2) translated into algebra means that for every associated prime $\mathfrak p$ of $A$ there exists an $i$ with $f_i \not \in \mathfrak p$. \medskip\noindent Assume (1), i.e., $A \to A_{f_1} \times \ldots \times A_{f_n}$ is injective. If $x \in A$ has annihilator a prime $\mathfrak p$, then $x$ maps to a nonzero element of $A_{f_i}$ for some $i$ and hence $f_i \not \in \mathfrak p$. Thus (2) holds. Assume (2), i.e., every associated prime $\mathfrak p$ of $A$ corresponds to a prime of $A_{f_i}$ for some $i$. Then $A \to A_{f_1} \times \ldots \times A_{f_n}$ is injective because $A \to \prod_{\mathfrak p \in \text{Ass}(A)} A_\mathfrak p$ is injective by Algebra, Lemma \ref{algebra-lemma-zero-at-ass-zero}.
For every point $x \in X$ the sequence of stalks $0 \to \mathcal{F}_{1, x} \to \mathcal{F}_{2, x} \to \mathcal{F}_{3, x} \to 0$ is a short exact sequence of $\mathcal{O}_{X, x}$-modules. Hence the lemma follows from Algebra, Lemma \ref{algebra-lemma-weakly-ass}.
Let $s \in \Gamma(X, \mathcal{F})$ be a section which restricts to zero on $U$. Let $\mathcal{F}' \subset \mathcal{F}$ be the image of the map $\mathcal{O}_X \to \mathcal{F}$ defined by $s$. Then $\text{Supp}(\mathcal{F}') \cap U = \emptyset$. On the other hand, $\text{WeakAss}(\mathcal{F}') \subset \text{WeakAss}(\mathcal{F})$ by Lemma \ref{lemma-ses-weakly-ass}. Since also $\text{WeakAss}(\mathcal{F}') \subset \text{Supp}(\mathcal{F}')$ (Lemma \ref{lemma-weakly-ass-support}) we conclude $\text{WeakAss}(\mathcal{F}') = \emptyset$. Hence $\mathcal{F}' = 0$ by Lemma \ref{lemma-weakly-ass-zero}.
Since $x \in \text{Supp}(\mathcal{F})$ the module $\mathcal{F}_x$ is not zero. Hence $\text{WeakAss}(\mathcal{F}_x) \subset \Spec(\mathcal{O}_{X, x})$ is nonempty by Algebra, Lemma \ref{algebra-lemma-weakly-ass-zero}. On the other hand, by assumption $\text{Supp}(\mathcal{F}_x) = \{\mathfrak m_x\}$. Since $\text{WeakAss}(\mathcal{F}_x) \subset \text{Supp}(\mathcal{F}_x)$ (Algebra, Lemma \ref{algebra-lemma-weakly-ass-support}) we see that $\mathfrak m_x$ is weakly associated to $\mathcal{F}_x$ and we win.
Consider the base change $f' : X' \to \Spec(\mathcal{O}_{S, s})$ of $f$ by the morphism $g : \Spec(\mathcal{O}_{S, s}) \to S$ and denote $g' : X' \to X$ the other projection. Then $$ (f_*\mathcal{F})_s = (g^*f_*\mathcal{F})_s = (f'_*(g')^*\mathcal{F})_s $$ The first equality because $g$ induces an isomorphism on local rings at $s$ and the second by flat base change (Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}). Of course $s \in \Spec(\mathcal{O}_{S, s})$ is not in the image of $f'$. Thus we may assume $S$ is the spectrum of a local ring $(A, \mathfrak m)$ and $s$ corresponds to $\mathfrak m$. By Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent} the sheaf $f_*\mathcal{F}$ is quasi-coherent, say corresponding to the $A$-module $M$. As $s$ is not in the image of $f$ we see that $X = \bigcup_{a \in \mathfrak m} f^{-1}D(a)$ is an open covering. Since $X$ is quasi-compact we can find $a_1, \ldots, a_n \in \mathfrak m$ such that $X = f^{-1}D(a_1) \cup \ldots \cup f^{-1}D(a_n)$. It follows that $$ M \to M_{a_1} \oplus \ldots \oplus M_{a_r} $$ is injective. Hence for any nonzero element $m$ of the stalk $M_\mathfrak p$ there exists an $i$ such that $a_i^n m$ is nonzero for all $n \geq 0$. Thus $\mathfrak m$ is not weakly associated to $M$.
We claim Lemma \ref{lemma-check-isomorphism-via-depth-and-ass} applies to the map displayed in the lemma. Let $x \in X$. If $x \in U$, then the map is an isomorphism on stalks as $j_*(\mathcal{F}|_U)|_U = \mathcal{F}|_U$. If $x \in X \setminus U$, then $x \not \in \text{Ass}(j_*(\mathcal{F}|_U))$ (Lemmas \ref{lemma-weakass-pushforward} and \ref{lemma-weakly-ass-support}). Since we've assumed $\text{depth}(\mathcal{F}_x) \geq 2$ this finishes the proof.
We may assume $X$ and $S$ affine, so $X \to S$ comes from a ring map $A \to B$. Then $\mathcal{F} = \widetilde M$ for some $B$-module $M$. By Lemma \ref{lemma-weakly-associated-affine-open} the weakly associated points of $\mathcal{F}$ correspond exactly to the weakly associated primes of $M$. Similarly, the weakly associated points of $f_*\mathcal{F}$ correspond exactly to the weakly associated primes of $M$ as an $A$-module. Hence the lemma follows from Algebra, Lemma \ref{algebra-lemma-weakly-ass-reverse-functorial}.
We may assume $X$ and $S$ affine, so $X \to S$ comes from a ring map $A \to B$. As $X$ is locally Noetherian the ring $B$ is Noetherian, see Properties, Lemma \ref{properties-lemma-locally-Noetherian}. Write $\mathcal{F} = \widetilde M$ for some $B$-module $M$. By Lemma \ref{lemma-associated-affine-open} the associated points of $\mathcal{F}$ correspond exactly to the associated primes of $M$, and any associated prime of $M$ as an $A$-module is an associated points of $f_*\mathcal{F}$. Hence the inclusion $$ f(\text{Ass}_X(\mathcal{F})) \subset \text{Ass}_S(f_*\mathcal{F}) $$ follows from Algebra, Lemma \ref{algebra-lemma-ass-functorial-Noetherian}. We have the inclusion $$ \text{Ass}_S(f_*\mathcal{F}) \subset \text{WeakAss}_S(f_*\mathcal{F}) $$ by Lemma \ref{lemma-weakly-ass-support}. We have the inclusion $$ \text{WeakAss}_S(f_*\mathcal{F}) \subset f(\text{WeakAss}_X(\mathcal{F})) $$ by Lemma \ref{lemma-weakly-ass-reverse-functorial}. The outer sets are equal by Lemma \ref{lemma-ass-weakly-ass} hence we have equality everywhere.
We may assume $X$ and $S$ affine, so $X \to S$ comes from a finite ring map $A \to B$. Write $\mathcal{F} = \widetilde M$ for some $B$-module $M$. By Lemma \ref{lemma-weakly-associated-affine-open} the weakly associated points of $\mathcal{F}$ correspond exactly to the weakly associated primes of $M$. Similarly, the weakly associated points of $f_*\mathcal{F}$ correspond exactly to the weakly associated primes of $M$ as an $A$-module. Hence the lemma follows from Algebra, Lemma \ref{algebra-lemma-weakly-ass-finite-ring-map}.
Let $A = \mathcal{O}_{S, s}$, $B = \mathcal{O}_{X, x}$, and $M = \mathcal{G}_s$. Let $m \in M$ be an element whose annihilator $I = \{a \in A \mid am = 0\}$ has radical $\mathfrak m_A$. Then $m \otimes 1$ has annihilator $I B$ as $A \to B$ is faithfully flat. Thus it suffices to see that $\sqrt{I B} = \mathfrak m_B$. This follows from the fact that the maximal ideal of $B/\mathfrak m_AB$ is locally nilpotent (see Algebra, Lemma \ref{algebra-lemma-minimal-prime-reduced-ring}) and the assumption that $\sqrt{I} = \mathfrak m_A$. Some details omitted.
Part (1) is Lemma \ref{lemma-weakass-pushforward}. Part (2) follows from (1) and Lemma \ref{lemma-ass-weakly-ass}. \medskip\noindent Proof of part (3). To show the depth is $\geq 2$ it suffices to show that $\Hom_{\mathcal{O}_{S, s}}(\kappa(s), (f_*\mathcal{F})_s) = 0$ and $\Ext^1_{\mathcal{O}_{S, s}}(\kappa(s), (f_*\mathcal{F})_s) = 0$, see Algebra, Lemma \ref{algebra-lemma-depth-ext}. Using the exact sequence $0 \to \mathfrak m_s \to \mathcal{O}_{S, s} \to \kappa(s) \to 0$ it suffices to prove that the map $$ \Hom_{\mathcal{O}_{S, s}}(\mathcal{O}_{S, s}, (f_*\mathcal{F})_s) \to \Hom_{\mathcal{O}_{S, s}}(\mathfrak m_s, (f_*\mathcal{F})_s) $$ is an isomorphism. By flat base change (Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}) we may replace $S$ by $\Spec(\mathcal{O}_{S, s})$ and $X$ by $\Spec(\mathcal{O}_{S, s}) \times_S X$. Denote $\mathfrak m \subset \mathcal{O}_S$ the ideal sheaf of $s$. Then we see that $$ \Hom_{\mathcal{O}_{S, s}}(\mathfrak m_s, (f_*\mathcal{F})_s) = \Hom_{\mathcal{O}_S}(\mathfrak m, f_*\mathcal{F}) = \Hom_{\mathcal{O}_X}(f^*\mathfrak m, \mathcal{F}) $$ the first equality because $S$ is local with closed point $s$ and the second equality by adjunction for $f^*, f_*$ on quasi-coherent modules. However, since $s \not \in f(X)$ we see that $f^*\mathfrak m = \mathcal{O}_X$. Working backwards through the arguments we get the desired equality. \medskip\noindent For the proof of (4), (5), and (6) we use flat base change (Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}) to reduce to the case where $S$ is the spectrum of $\mathcal{O}_{S, s}$. Then a nonzerodivisor $a \in \mathcal{O}_{S, s}$ deterimines a short exact sequence $$ 0 \to \mathcal{O}_S \xrightarrow{a} \mathcal{O}_S \to \mathcal{O}_S/a \mathcal{O}_S \to 0 $$ Since $\mathcal{F}$ is flat over $S$, we obtain an exact sequence $$ 0 \to \mathcal{F} \xrightarrow{a} \mathcal{F} \to \mathcal{F}/a\mathcal{F} \to 0 $$ Pushing forward we obtain an exact sequence $$ 0 \to f_*\mathcal{F} \xrightarrow{a} f_*\mathcal{F} \to f_*(\mathcal{F}/a\mathcal{F}) $$ This proves (4) and it shows that $f_*\mathcal{F}/ af_*\mathcal{F} \subset f_*(\mathcal{F}/a\mathcal{F})$. If $b$ is a nonzerodivisor on $\mathcal{O}_{S, s}/a\mathcal{O}_{S, s}$, then the exact same argument shows $b : \mathcal{F}/a\mathcal{F} \to \mathcal{F}/a\mathcal{F}$ is injective. Pushing forward we conclude $$ b : f_*(\mathcal{F}/a\mathcal{F}) \to f_*(\mathcal{F}/a\mathcal{F}) $$ is injective and hence also $b : f_*\mathcal{F}/ af_*\mathcal{F} \to f_*\mathcal{F}/ af_*\mathcal{F}$ is injective. This proves (5). Part (6) follows from (4) and (5) and the definitions.
The set $\text{Ass}_{A/R}(M)$ is defined in Algebra, Definition \ref{algebra-definition-relative-assassin}. Choose a pair $(\mathfrak p, x)$. Let $s = f(x)$. Let $\mathfrak r \subset R$ be the prime lying under $\mathfrak p$, i.e., the prime corresponding to $s$. Let $\mathfrak p' \subset A \otimes_R \kappa(\mathfrak r)$ be the prime whose inverse image is $\mathfrak p$, i.e., the prime corresponding to $x$ viewed as a point of its fibre $X_s$. Then $\mathfrak p \in \text{Ass}_{A/R}(M)$ if and only if $\mathfrak p'$ is an associated prime of $M \otimes_R \kappa(\mathfrak r)$, see Algebra, Lemma \ref{algebra-lemma-compare-relative-assassins}. Note that the ring $A \otimes_R \kappa(\mathfrak r)$ corresponds to $U_s$ and the module $M \otimes_R \kappa(\mathfrak r)$ corresponds to the quasi-coherent sheaf $\mathcal{F}_s|_{U_s}$. Hence $x$ is an associated point of $\mathcal{F}_s$ by Lemma \ref{lemma-associated-affine-open}. The reverse implication holds if $\mathfrak p'$ is finitely generated which is how the last sentence is seen to be true.
Consider the morphism $X'_{s'} \to X_s$ of fibres. As $X_{s'} = X_s \times_{\Spec(\kappa(s))} \Spec(\kappa(s'))$ this is a flat morphism. Moreover $\mathcal{F}'_{s'}$ is the pullback of $\mathcal{F}_s$ via this morphism. As $X_s$ is locally of finite type over the Noetherian scheme $\Spec(\kappa(s))$ we have that $X_s$ is locally Noetherian, see Morphisms, Lemma \ref{morphisms-lemma-finite-type-noetherian}. Thus we may apply Lemma \ref{lemma-bourbaki} and we see that $$ \text{Ass}_{X'_{s'}}(\mathcal{F}'_{s'}) = \bigcup\nolimits_{x \in \text{Ass}(\mathcal{F}_s)} \text{Ass}((X'_{s'})_x). $$ Thus to prove the lemma it suffices to show that the associated points of the fibre $(X'_{s'})_x$ of the morphism $X'_{s'} \to X_s$ over $x$ are its generic points. Note that $(X'_{s'})_x = \Spec(\kappa(s') \otimes_{\kappa(s)} \kappa(x))$ as schemes. By Algebra, Lemma \ref{algebra-lemma-tensor-fields-CM} the ring $\kappa(s') \otimes_{\kappa(s)} \kappa(x)$ is a Noetherian Cohen-Macaulay ring. Hence its associated primes are its minimal primes, see Algebra, Proposition \ref{algebra-proposition-minimal-primes-associated-primes} (minimal primes are associated) and Algebra, Lemma \ref{algebra-lemma-criterion-no-embedded-primes} (no embedded primes).
Let $i_s : Z_s \to X_s$ be the induced morphism between fibres. Then $(i_*\mathcal{F})_s = i_{s, *}(\mathcal{F}_s)$ by Cohomology of Schemes, Lemma \ref{coherent-lemma-affine-base-change} and the fact that $i$ is affine. Hence we may apply Lemma \ref{lemma-weakly-associated-finite} to conclude.
Recall that $Z$ is locally cut out by the annihilator of $\mathcal{F}$, see Morphisms, Definition \ref{morphisms-definition-scheme-theoretic-support} (which uses Morphisms, Lemma \ref{morphisms-lemma-scheme-theoretic-support} to define $Z$). Hence we see that $Z \subset Z_0$ scheme theoretically by More on Algebra, Lemma \ref{more-algebra-lemma-fitting-ideal-basics} part (6). On the other hand we have $Z = \text{Supp}(\mathcal{F})$ set theoretically by Morphisms, Lemma \ref{morphisms-lemma-scheme-theoretic-support} and we have $Z_0 = Z$ set theoretically by More on Algebra, Lemma \ref{more-algebra-lemma-fitting-ideal-basics} part (7). Finally, to get $\mathcal{G}_0$ as in part (3) we can either use that we have $\mathcal{G}$ on $Z$ as in Morphisms, Lemma \ref{morphisms-lemma-scheme-theoretic-support} and set $\mathcal{G}_0 = (Z \to Z_0)_*\mathcal{G}$ or we can use Morphisms, Lemma \ref{morphisms-lemma-i-star-equivalence} and the fact that $\text{Fit}_0(\mathcal{F})$ annihilates $\mathcal{F}$ by More on Algebra, Lemma \ref{more-algebra-lemma-fitting-ideal-basics} part (6).
Part (1) is true because over every affine open $U$ there is an integer $n$ such that $\text{Fit}_n(\mathcal{F})|_U = \mathcal{O}_U$. Namely, we can take $n$ to be the number of generators of $\mathcal{F}$ over $U$, see More on Algebra, Section \ref{more-algebra-section-fitting-ideals}. \medskip\noindent For any morphism $g : T \to S$ we see from Lemmas \ref{lemma-base-change-fitting-ideal} and \ref{lemma-fitting-ideal-generate-locally} that $\mathcal{F}_T$ is locally generated by $\leq r$ sections if and only if $\text{Fit}_r(\mathcal{F}) \cdot \mathcal{O}_T = \mathcal{O}_T$. This proves (2). \medskip\noindent For any morphism $g : T \to S$ we see from Lemmas \ref{lemma-base-change-fitting-ideal} and \ref{lemma-fitting-ideal-finite-locally-free} that $\mathcal{F}_T$ is free of rank $r$ if and only if $\text{Fit}_r(\mathcal{F}) \cdot \mathcal{O}_T = \mathcal{O}_T$ and $\text{Fit}_{r - 1}(\mathcal{F}) \cdot \mathcal{O}_T = 0$. This proves (3). \medskip\noindent Part (4) follows from the fact that if $\mathcal{F}$ is of finite presentation, then each of the morphisms $Z_r \to S$ is of finite presentation as $\text{Fit}_r(\mathcal{F})$ is of finite type (Lemma \ref{lemma-fitting-ideal-of-finitely-presented} and Morphisms, Lemma \ref{morphisms-lemma-closed-immersion-finite-presentation}). This implies that $Z_{r - 1} \setminus Z_r$ is a retrocompact open in $Z_r$ (Properties, Lemma \ref{properties-lemma-quasi-coherent-finite-type-ideals}) and hence the morphism $Z_{r - 1} \setminus Z_r \to Z_r$ is of finite presentation as well.
Suppose that $g : T \to S$ is a morphism of schemes such that the pullback $\mathcal{F}_T = g^*\mathcal{F}$ is flat. Then $\mathcal{F}_T$ is a flat $\mathcal{O}_T$-module of finite presentation. Hence $\mathcal{F}_T$ is finite locally free, see Properties, Lemma \ref{properties-lemma-finite-locally-free}. Thus $T = \coprod_{r \geq 0} T_r$, where $\mathcal{F}_T|_{T_r}$ is locally free of rank $r$. This implies that $$ F_{flat} = \coprod\nolimits_{r \geq 0} F_r $$ in the category of Zariski sheaves on $\Sch/S$ where $F_r$ is as in Lemma \ref{lemma-locally-free-rank-r-pullback}. It follows that $F_{flat}$ is represented by $\coprod_{r \geq 0} (Z_{r - 1} \setminus Z_r)$ where $Z_r$ is as in Lemma \ref{lemma-locally-free-rank-r-pullback}. The other statements also follow from the lemma.
Observe that $\Omega_{X/S}$ is a finite type quasi-coherent $\mathcal{O}_X$-module (Morphisms, Lemma \ref{morphisms-lemma-finite-type-differentials}) hence the fitting ideals are defined. If $f' : X' \to S'$ is the base change of $f$ by $g : S' \to S$, then $\Omega_{X'/S'} = (g')^*\Omega_{X/S}$ where $g' : X' \to X$ is the projection (Morphisms, Lemma \ref{morphisms-lemma-base-change-differentials}). Hence $(g')^{-1}\text{Fit}_i(\Omega_{X/S}) \cdot \mathcal{O}_{X'} = \text{Fit}_i(\Omega_{X'/S'})$. This means that $$ Z'_i = (g')^{-1}(Z_i) = Z_i \times_X X' $$ scheme theoretically and this is the meaning of the statement of the lemma.
The algebraic analogue is this: let $A$ be a domain with fraction field $K$ and let $B$ be a flat $A$-algebra such that $B \otimes_A K$ is a domain. Then $B$ is a domain. This is true because $B$ is torsion free by More on Algebra, Lemma \ref{more-algebra-lemma-flat-torsion-free} and hence $B \subset B \otimes_A K$.
It is clear that a finite locally free module is torsion free. For the converse, we will show that if $\mathcal{F}$ is torsion free, then $\mathcal{F}_x$ is a free $\mathcal{O}_{X, x}$-module for all $x \in X$. This is enough by Algebra, Lemma \ref{algebra-lemma-finite-projective} and the fact that $\mathcal{F}$ is coherent. If $\dim(\mathcal{O}_{X, x}) = 0$, then $\mathcal{O}_{X, x}$ is a field and the statement is clear. If $\dim(\mathcal{O}_{X, x}) = 1$, then $\mathcal{O}_{X, x}$ is a discrete valuation ring (Algebra, Lemma \ref{algebra-lemma-characterize-dvr}) and $\mathcal{F}_x$ is torsion free. Hence $\mathcal{F}_x$ is free by More on Algebra, Lemma \ref{more-algebra-lemma-dedekind-torsion-free-flat}.
The statement makes sense because $\SheafHom_{\mathcal{O}_X}(\mathcal{F}, \mathcal{G})$ is quasi-coherent by Schemes, Section \ref{schemes-section-quasi-coherent}. To see the statement is true, see More on Algebra, Lemma \ref{more-algebra-lemma-hom-into-torsion-free}. Some details omitted.
The statement makes sense because $\SheafHom_{\mathcal{O}_X}(\mathcal{F}, \mathcal{G})$ is coherent by Cohomology of Schemes, Lemma \ref{coherent-lemma-tensor-hom-coherent}. To see the statement is true, see More on Algebra, Lemma \ref{more-algebra-lemma-dual-reflexive}. Some details omitted.
Let $\mathcal{F}$ be a coherent reflexive $\mathcal{O}_X$-module. For $z \in Z$ the stalk $\mathcal{F}_z$ has depth $\geq 2$ by Lemma \ref{lemma-reflexive-S2}. Thus $\mathcal{F} \to j_*j^*\mathcal{F}$ is an isomorphism by Lemma \ref{lemma-depth-2-hartog}. Conversely, let $\mathcal{G}$ be a coherent reflexive $\mathcal{O}_U$-module. It suffices to show that $j_*\mathcal{G}$ is a coherent reflexive $\mathcal{O}_X$-module. To prove this we may assume $X$ is affine. By Properties, Lemma \ref{properties-lemma-lift-finite-presentation} there exists a coherent $\mathcal{O}_X$-module $\mathcal{F}$ with $\mathcal{G} = j^*\mathcal{F}$. After replacing $\mathcal{F}$ by its reflexive hull, we may assume $\mathcal{F}$ is reflexive (see discussion above and in particular Lemma \ref{lemma-dual-reflexive}). By the above $j_*\mathcal{G} = j_*j^*\mathcal{F} = \mathcal{F}$ as desired.
Using Lemma \ref{lemma-check-reflexive-on-affines} the equivalence of (1) and (2) follows from More on Algebra, Lemma \ref{more-algebra-lemma-reflexive-over-normal}. Let $U \subset X$ be as in (3). By Properties, Lemma \ref{properties-lemma-criterion-normal} we see that $\text{depth}(\mathcal{O}_{X, x}) \geq 2$ for $x \not \in U$. Since a finite locally free module is reflexive, we conclude (3) implies (1) by Lemma \ref{lemma-reflexive-S2-extend}. \medskip\noindent Assume (1). Let $U \subset X$ be the maximal open subscheme such that $j^*\mathcal{F} = \mathcal{F}|_U$ is finite locally free. So (3)(b) holds. Let $x \in X$ be a point. If $\mathcal{F}_x$ is a free $\mathcal{O}_{X, x}$-module, then $x \in U$, see Modules, Lemma \ref{modules-lemma-finite-presentation-stalk-free}. If $\dim(\mathcal{O}_{X, x}) \leq 1$, then $\mathcal{O}_{X, x}$ is either a field or a discrete valuation ring (Properties, Lemma \ref{properties-lemma-criterion-normal}) and hence $\mathcal{F}_x$ is free (More on Algebra, Lemma \ref{more-algebra-lemma-dedekind-torsion-free-flat}). Thus $x \not \in U \Rightarrow \dim(\mathcal{O}_{X, x}) \geq 2$. Then Properties, Lemma \ref{properties-lemma-codimension-local-ring} shows (3)(a) holds. By the already used Properties, Lemma \ref{properties-lemma-criterion-normal} we also see that $\text{depth}(\mathcal{O}_{X, x}) \geq 2$ for $x \not \in U$ and hence (3)(c) follows from Lemma \ref{lemma-reflexive-S2-extend}.
Because $\mathcal{F}^{**}$ is torsion free and $\mathcal{F}_\eta = \mathcal{F}^{**}_\eta$ an extension, if it exists, is unique. Thus it suffices to prove the lemma over the members of an open covering of $X$, i.e., we may assume $X$ is affine. In this case we are asking the following algebra question: Let $R$ be a Noetherian normal domain with fraction field $K$, let $M$, $N$ be finite $R$-modules, let $T : M \otimes_R K \to N \otimes_R K$ be a $K$-linear map. When does $T$ extend to a map $N \to M^{**}$? By More on Algebra, Lemma \ref{more-algebra-lemma-describe-reflexive-hull} this happens if and only if $N_\mathfrak p$ maps into $(M/M_{tors})_\mathfrak p$ for every height $1$ prime $\mathfrak p$ of $R$. This is exactly condition $(*)$ of the lemma.
It is clear that a finite locally free module is reflexive. For the converse, we will show that if $\mathcal{F}$ is reflexive, then $\mathcal{F}_x$ is a free $\mathcal{O}_{X, x}$-module for all $x \in X$. This is enough by Algebra, Lemma \ref{algebra-lemma-finite-projective} and the fact that $\mathcal{F}$ is coherent. If $\dim(\mathcal{O}_{X, x}) = 0$, then $\mathcal{O}_{X, x}$ is a field and the statement is clear. If $\dim(\mathcal{O}_{X, x}) = 1$, then $\mathcal{O}_{X, x}$ is a discrete valuation ring (Algebra, Lemma \ref{algebra-lemma-characterize-dvr}) and $\mathcal{F}_x$ is torsion free. Hence $\mathcal{F}_x$ is free by More on Algebra, Lemma \ref{more-algebra-lemma-dedekind-torsion-free-flat}. If $\dim(\mathcal{O}_{X, x}) = 2$, then $\mathcal{O}_{X, x}$ is a regular local ring of dimension $2$. By More on Algebra, Lemma \ref{more-algebra-lemma-reflexive-over-normal} we see that $\mathcal{F}_x$ has depth $\geq 2$. Hence $\mathcal{F}$ is free by Algebra, Lemma \ref{algebra-lemma-regular-mcm-free}.