hcju/stacksqa huggingface dataset:
Observe that $\mathcal{V}$ is a directed set, so the colimits are as in Categories, Section \ref{categories-section-directed-colimits}. The rest of the argument is almost exactly the same as the argument in the proof of Lemma \ref{lemma-completion-fully-faithful}; we urge the reader to skip it. \medskip\noindent Proof of (3) $\Rightarrow$ (4). If $\mathcal{F}$ and $\mathcal{G}$ are finite locally free on $V \in \mathcal{V}$, then considering $\mathcal{H} = \SheafHom_{\mathcal{O}_V}(\mathcal{G}, \mathcal{F})$ and using Cohomology of Schemes, Lemma \ref{coherent-lemma-completion-internal-hom} we see that (3) implies (4). \medskip\noindent Proof of (2) $\Rightarrow$ (3). Let $\mathcal{L}$ be ample on $X$ and suppose that $\mathcal{E}$ is a finite locally free $\mathcal{O}_V$-module for some $V \in \mathcal{V}$. We claim we can find a universally exact sequence $$ 0 \to \mathcal{E} \to (\mathcal{L}^{\otimes p})^{\oplus r}|_{V} \to (\mathcal{L}^{\otimes q})^{\oplus s}|_{V} $$ for some $r, s \geq 0$ and $0 \ll p \ll q$. If this is true, then the isomorphism in (2) will imply the isomorphism in (3). To prove the claim, recall that $\mathcal{L}|_V$ is ample, see Properties, Lemma \ref{properties-lemma-ample-on-locally-closed}. Consider the dual locally free module $\SheafHom_{\mathcal{O}_V}(\mathcal{E}, \mathcal{O}_V)$ and apply Properties, Proposition \ref{properties-proposition-characterize-ample} to find a surjection $$ (\mathcal{L}^{\otimes -p})^{\oplus r}|_V \longrightarrow \SheafHom_{\mathcal{O}_V}(\mathcal{E}, \mathcal{O}_V) $$ (it is universally injective because being a surjection is universal). Taking duals we obtain the first map in the exact sequence. Repeat with the cokernel to get the second. Some details omitted. \medskip\noindent Proof of (1) $\Rightarrow$ (2). This is true because if $X$ is quasi-affine then $\mathcal{O}_X$ is an ample invertible module, see Properties, Lemma \ref{properties-lemma-quasi-affine-O-ample}. \medskip\noindent We omit the proof of (4) $\Rightarrow$ (3).
We will show that Lemma \ref{lemma-fully-faithful} applies. Assumption (1) of Lemma \ref{lemma-fully-faithful} holds. Observe that $\text{cd}(A, (f)) \leq 1$, see Local Cohomology, Lemma \ref{local-cohomology-lemma-bound-cd}. Since $A_f$ is $(S_2)$ we see that every associated prime $\mathfrak p \subset A$, $f \not \in \mathfrak p$ is a minimal prime. Thus we get assumption (2) of Lemma \ref{lemma-fully-faithful}. If $\mathfrak p \subset A$, $f \not \in \mathfrak p$ satisfies $V(\mathfrak p) \cap V(I) \subset V(\mathfrak a)$ and if $\mathfrak q \in V(\mathfrak p) \cap V(f)$ is a generic point, then $\dim((A/\mathfrak p)_\mathfrak q) = 1$. Then we obtain $\dim(A_\mathfrak p) \geq 2$ by looking at the minimal primes $\mathfrak p_0 \subset \mathfrak p$ and using that $\dim((A/\mathfrak p_0)_\mathfrak q) \geq 3$ by assumption. Thus $\text{depth}(A_\mathfrak p) \geq 2$ by the $(S_2)$ assumption. This verifies assumption (3) of Lemma \ref{lemma-fully-faithful} and the proof is complete.
By Lemma \ref{lemma-completion-fully-faithful-general} it suffices to show that $$ \colim_\mathcal{V} \Gamma(V, \mathcal{O}_V) = \lim \Gamma(U, \mathcal{O}_U/I^n\mathcal{O}_U) $$ This follows immediately from Proposition \ref{proposition-application-H0}.
By Lemma \ref{lemma-completion-fully-faithful-general} it suffices to show that $$ \colim_\mathcal{V} \Gamma(V, \mathcal{O}_V) = \lim \Gamma(U, \mathcal{O}_U/I^n\mathcal{O}_U) $$ This follows immediately from Lemma \ref{lemma-alternative-colim-H0}.
We may choose coherent $\mathcal{O}_U$-modules $\mathcal{F}'$ and $\mathcal{G}'$ whose restriction to $V$ is $\mathcal{F}$ and $\mathcal{G}$, see Properties, Lemma \ref{properties-lemma-lift-finite-presentation}. We may modify our choice of $\mathcal{F}'$ to ensure that $\text{Ass}(\mathcal{F}') \subset V$, see for example Local Cohomology, Lemma \ref{local-cohomology-lemma-get-depth-1-along-Z}. Thus we may and do replace $V$ by $U$ and $\mathcal{F}$ and $\mathcal{G}$ by $\mathcal{F}'$ and $\mathcal{G}'$. Set $\mathcal{H} = \SheafHom_{\mathcal{O}_U}(\mathcal{G}, \mathcal{F})$. This is a coherent $\mathcal{O}_U$-module. We have $$ \Hom_V(\mathcal{G}|_V, \mathcal{F}|_V) = H^0(V, \mathcal{H}) \quad\text{and}\quad \lim H^0(U, \mathcal{H}/\mathcal{I}^n\mathcal{H}) = \Mor_{\textit{Coh}(U, I\mathcal{O}_U)} (\mathcal{G}^\wedge, \mathcal{F}^\wedge) $$ See Cohomology of Schemes, Lemma \ref{coherent-lemma-completion-internal-hom}. Thus if we can show that the assumptions of Proposition \ref{proposition-application-H0} hold for $\mathcal{H}$, then the proof is complete. This holds because $\text{Ass}(\mathcal{H}) \subset \text{Ass}(\mathcal{F})$. See Cohomology of Schemes, Lemma \ref{coherent-lemma-hom-into-depth}.
We omit the verification that $(\widetilde{M}_n|_U)$ is in $\textit{Coh}(U, I\mathcal{O}_U)$. Let $(\mathcal{F}_n)$ be an object of $\textit{Coh}(U, I\mathcal{O}_U)$. By Local Cohomology, Lemma \ref{local-cohomology-lemma-finiteness-pushforwards-and-H1-local} we see that $\mathcal{F}_n = \widetilde{M_n}$ for some finite $A/I^n$-module $M_n$. After dividing $M_n$ by $H^0_\mathfrak a(M_n)$ we may assume $M_n \subset H^0(U, \mathcal{F}_n)$, see Dualizing Complexes, Lemma \ref{dualizing-lemma-divide-by-torsion} and the already referenced lemma. After replacing inductively $M_{n + 1}$ by the inverse image of $M_n$ under the map $M_{n + 1} \to H^0(U, \mathcal{F}_{n + 1}) \to H^0(U, \mathcal{F}_n)$, we may assume $M_{n + 1}$ maps into $M_n$. This gives a inverse system $(M_n)$ satisfying (1) and (2) such that $\mathcal{F}_n = \widetilde{M_n}$. To see that (3) holds, use that $M_{n + 1}/I^nM_{n + 1} \to M_n$ is a map of finite $A$-modules which induces an isomorphism after applying $\widetilde{\ }$ and restriction to $U$ (here we use the first referenced lemma one more time).
Parts (1) and (2) are equivalent, because the completion of a coherent $\mathcal{O}_U$-module $\mathcal{F}$ is by definition the image of $\mathcal{F}$ under the functor (\ref{equation-completion}). If $V \subset U$ is an open subscheme containing $U \cap Y$, then we have $$ \textit{Coh}(V, I\mathcal{O}_V) = \textit{Coh}(U, I\mathcal{O}_U) $$ since the category of coherent $\mathcal{O}_V$-modules supported on $V \cap Y$ is the same as the category of coherent $\mathcal{O}_U$-modules supported on $U \cap Y$. Thus the completion of a coherent $\mathcal{O}_V$-module is an object of $\textit{Coh}(U, I\mathcal{O}_U)$. Having said this the equivalence of (2), (3), (4), and (5) holds because the functors $\textit{Coh}(\mathcal{O}_X) \to \textit{Coh}(\mathcal{O}_U) \to \textit{Coh}(\mathcal{O}_V)$ are essentially surjective. See Properties, Lemma \ref{properties-lemma-lift-finite-presentation}. \medskip\noindent It is always the case that (5) implies (6). Assume $A$ is $I$-adically complete. Then any object of $\textit{Coh}(X, I\mathcal{O}_X)$ corresponds to a finite $A$-module by Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-affine}. Thus we see that (6) implies (5) in this case.
Recall that $A \to A'$ is a flat ring map which induces an isomorphism $A/I \to A'/I'$. See Algebra, Lemmas \ref{algebra-lemma-completion-flat} and \ref{algebra-lemma-completion-complete}. Thus $X' \to X$ is a flat morphism inducing an isomorphism $Y' \to Y$. Thus $U' \to U$ is a flat morphism which induces an isomorphism $U' \cap Y' \to U \cap Y$. This implies that in the commutative diagram $$ \xymatrix{ \textit{Coh}(X', I\mathcal{O}_{X'}) \ar[r] & \textit{Coh}(U', I\mathcal{O}_{U'}) \\ \textit{Coh}(X, I\mathcal{O}_X) \ar[u] \ar[r] & \textit{Coh}(U, I\mathcal{O}_U) \ar[u] } $$ the vertical functors are equivalences. See Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-pullback-equivalence}. The lemma follows formally from this and the results of Lemma \ref{lemma-essential-image-completion}.
The existence of $(\mathcal{G}_n)$ in (1) follows from Definition \ref{definition-canonically-algebraizable}. The uniqueness of $(\mathcal{G}_n)$ in (1) follows from Lemma \ref{lemma-recognize-formal-coherent-modules}. Write $\mathcal{G}_n = \widetilde{M_n}$. Then $\{M_n\}$ is an inverse system of finite $A$-modules with $M_n = M_{n + 1}/I^n M_{n + 1}$. By Definition \ref{definition-canonically-algebraizable} the inverse system $\{H^0(U, \mathcal{F}_n)\}$ is pro-isomorphic to $\{M_n\}$. Hence we see that the inverse system $\{H^0(U, \mathcal{F}_n)\}$ satisfies the Mittag-Leffler condition and that $M = \lim M_n$ (as topological modules). Thus the properties of $M$ in (4) follow from Algebra, Lemmas \ref{algebra-lemma-limit-complete}, \ref{algebra-lemma-finite-over-complete-ring}, and \ref{algebra-lemma-hathat-finitely-generated}. Since $U$ is quasi-affine the canonical maps $$ \widetilde{H^0(U, \mathcal{F}_n)}|_U \to \mathcal{F}_n $$ are isomorphisms (Properties, Lemma \ref{properties-lemma-quasi-coherent-quasi-affine}). We conclude that $(\mathcal{G}_n|_U)$ and $(\mathcal{F}_n)$ are pro-isomorphic and hence isomorphic by Lemma \ref{lemma-recognize-formal-coherent-modules}.
Let $f : X' \to X$ be the induced morphism. We have $H^0(U', \mathcal{F}'_n) = H^0(U, \mathcal{F}_n) \otimes_A A'$ by flat base change, see Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}. Thus if $(\mathcal{G}_n)$ in $\textit{Coh}(X, I\mathcal{O}_X)$ is pro-isomorphic to $(\widetilde{H^0(U, \mathcal{F}_n)})$, then $(f^*\mathcal{G}_n)$ is pro-isomorphic to $$ (f^*\widetilde{H^0(U, \mathcal{F}_n)}) = (\widetilde{H^0(U, \mathcal{F}_n) \otimes_A A'}) = (\widetilde{H^0(U', \mathcal{F}'_n)}) $$ This finishes the proof.
Since $H^0(U, \mathcal{F}_n)$ has the Mittag-Leffler condition and since the limit topology on $M$ is the $I$-adic topology we see that $\{M/I^nM\}$ and $\{H^0(U, \mathcal{F}_n)\}$ are pro-isomorphic inverse systems of $A$-modules. Thus if we set $$ \mathcal{G}_n = \widetilde{M/I^n M} $$ then we see that to verify the condition in Definition \ref{definition-canonically-algebraizable} it suffices to show that $M$ is a finite module over the $I$-adic completion of $A$. This follows from the fact that $M/I^n M$ is finite by condition (c) and the above and Algebra, Lemma \ref{algebra-lemma-finite-over-complete-ring}.
We will prove this by verifying hypotheses (a), (b), and (c) of Lemma \ref{lemma-when-done}. \medskip\noindent Since $\mathcal{F}_n$ is locally free over $\mathcal{O}_U/f^n\mathcal{O}_U$ we see that we have short exact sequences $0 \to \mathcal{F}_n \to \mathcal{F}_{n + 1} \to \mathcal{F}_1 \to 0$ for all $n$. Thus condition (b) holds by Lemma \ref{lemma-topology-I-adic-f}. \medskip\noindent As $f$ is a nonzerodivisor we obtain short exact sequences $$ 0 \to A/f^nA \xrightarrow{f} A/f^{n + 1}A \to A/fA \to 0 $$ and we have corresponding short exact sequences $0 \to \mathcal{F}_n \to \mathcal{F}_{n + 1} \to \mathcal{F}_1 \to 0$. We will use Local Cohomology, Lemma \ref{local-cohomology-lemma-finiteness-pushforwards-and-H1-local} without further mention. Our assumptions imply that $H^0(U, \mathcal{O}_U/f\mathcal{O}_U)$ and $H^1(U, \mathcal{O}_U/f\mathcal{O}_U)$ are finite $A$-modules. Hence the same thing is true for $\mathcal{F}_1$, see Local Cohomology, Lemma \ref{local-cohomology-lemma-finiteness-for-finite-locally-free}. Using induction and the short exact sequences we find that $H^0(U, \mathcal{F}_n)$ are finite $A$-modules for all $n$. In this way we see hypothesis (c) is satisfied. \medskip\noindent Finally, as $H^1(U, \mathcal{F}_1)$ is a finite $A$-module we can apply Lemma \ref{lemma-ML} to see hypothesis (a) holds.
Surjectivity may be checked on the stalk at some point $y \in Y \setminus Z$. If $y$ corresponds to the prime $\mathfrak q \subset A$, then we can choose $f \in \mathfrak a$, $f \not \in \mathfrak q$. Then it suffices to show $$ M_f \longrightarrow H^0(U, \mathcal{F}_n)_f = H^0(D(f), \mathcal{F}_n) $$ is surjective as $D(f)$ is affine (equality holds by Properties, Lemma \ref{properties-lemma-invert-f-sections}). Since we have the Mittag-Leffler property, we find that $$ \Im(M \to H^0(U, \mathcal{F}_n)) = \Im(H^0(U, \mathcal{F}_m) \to H^0(U, \mathcal{F}_n)) $$ for some $m \geq n$. Using the long exact sequence of cohomology we see that $$ \Coker(H^0(U, \mathcal{F}_m) \to H^0(U, \mathcal{F}_n)) \subset H^1(U, \Ker(\mathcal{F}_m \to \mathcal{F}_n)) $$ Since $U = X \setminus V(\mathfrak a)$ this $H^1$ is $\mathfrak a$-power torsion. Hence after inverting $f$ the cokernel becomes zero.
Observe that $\mathcal{G}_n$ is a quasi-coherent $\mathcal{O}_X$-module annihilated by $I^n$ and that $\mathcal{G}_{n + 1}/I^n\mathcal{G}_{n + 1} = \mathcal{G}_n$. Consider $$ M_n = \Im(M \longrightarrow H^0(U, \mathcal{F}_n)) $$ The assumption says that the inverse systems $(M_n)$ and $(M/I^nM)$ are isomorphic as pro-objects of $\text{Mod}_A$. Pick $f \in \mathfrak a$ so $D(f) \subset U$ is an affine open. Then we have $$ (M_n)_f \subset H^0(U, \mathcal{F}_n)_f = H^0(D(f), \mathcal{F}_n) $$ Equality holds by Properties, Lemma \ref{properties-lemma-invert-f-sections}. Thus $\widetilde{M_n}|_U \to \mathcal{F}_n$ is injective. It follows that $\widetilde{M_n}|_U$ is a coherent module (Cohomology of Schemes, Lemma \ref{coherent-lemma-coherent-Noetherian-quasi-coherent-sub-quotient}). Since $M \to M/I^nM$ is surjective and factors as $M_{n'} \to M/I^nM$ for some $n' \geq n$ we find that $\mathcal{G}_n|_U$ is coherent as the quotient of a coherent module. Combined with the initical remarks of the proof we conclude that $(\mathcal{G}_n|_U)$ indeed forms an object of $\textit{Coh}(U, I\mathcal{O}_U)$. Finally, to show the injectivity of the map it suffices to show that $$ \lim (M/I^nM)_f = \lim H^0(D(f), \mathcal{G}_n) \to \lim H^0(D(f), \mathcal{F}_n) $$ is injective, see Cohomology of Schemes, Lemmas \ref{coherent-lemma-inverse-systems-abelian} and \ref{coherent-lemma-inverse-systems-affine}. The injectivity of $\lim (M_n)_f \to \lim H^0(D(f), \mathcal{F}_n)$ is clear (see above) and by our remark on pro-systems we have $\lim (M_n)_f = \lim (M/I^nM)_f$. This finishes the proof.
If $\delta_{Z'}(y') = \infty$, then there is nothing to prove. If $\delta_{Z'}(y') < \infty$, then we choose a system of integral closed subschemes $$ V'_0 \subset W'_0 \supset V'_1 \subset W'_1 \supset \ldots \subset W'_k $$ of $Y'$ with $V'_0 \subset Z'$ and $y'$ the generic point of $W'_k$ such that $\delta_{Z'}(y') = \delta(V'_0, W'_0, \ldots, W'_k)$. Denote $$ V_0 \subset W_0 \supset V_1 \subset W_1 \supset \ldots \subset W_k $$ the scheme theoretic images of the above schemes in $Y$. Observe that $y$ is the generic point of $W_k$ and that $V_0 \subset Z$. For each $i$ we look at the diagram $$ \xymatrix{ V'_i \ar[r] \ar[d] & W'_i \ar[d] & V'_{i + 1} \ar[l] \ar[d] \\ V_i \ar[r] & W_i & V_{i + 1} \ar[l] } $$ Denote $n_i$ the relative dimension of $V'_i/V_i$ and $m_i$ the relative dimension of $W'_i/W_i$; more precisely these are the transcendence degrees of the corresponding extensions of the function fields. Set $c_i = \text{codim}(V_i, W_i)$, $c'_i = \text{codim}(V'_i, W'_i)$, $b_i = \text{codim}(V_{i + 1}, W_i)$, and $b'_i = \text{codim}(V'_{i + 1}, W'_i)$. By the dimension formula we have $$ c_i = c'_i + n_i - m_i \quad\text{and}\quad b_i = b'_i + n_{i + 1} - m_i $$ See Morphisms, Lemma \ref{morphisms-lemma-dimension-formula}. Hence $c_i - b_i = c'_i - b'_i + n_i - n_{i + 1}$. Thus we see that \begin{align*} & c_i + c_{i + 1} + \ldots + c_k - b_i - b_{i + 1} - \ldots - b_{k - 1} \\ & = c'_i + c'_{i + 1} + \ldots + c'_k - b'_i - b'_{i + 1} - \ldots - b'_{k - 1} + n_i - n_k + c_k - c'_k \\ & = c'_i + c'_{i + 1} + \ldots + c'_k - b'_i - b'_{i + 1} - \ldots - b'_{k - 1} + n_i - m_k \end{align*} Thus we see that \begin{align*} \max_{i = 0, \ldots, k} & (c_i + c_{i + 1} + \ldots + c_k - b_i - b_{i + 1} - \ldots - b_{k - 1}) \\ & = \max_{i = 0, \ldots, k} (c'_i + c'_{i + 1} + \ldots + c'_k - b'_i - b'_{i + 1} - \ldots - b'_{k - 1} + n_i - m_k) \\ & = \max_{i = 0, \ldots, k} (c'_i + c'_{i + 1} + \ldots + c'_k - b'_i - b'_{i + 1} - \ldots - b'_{k - 1} + n_i) - m_k \\ & \leq \max_{i = 0, \ldots, k} (c'_i + c'_{i + 1} + \ldots + c'_k - b'_i - b'_{i + 1} - \ldots - b'_{k - 1}) + e - m_k \end{align*} Since $m_k = \text{trdeg}_{\kappa(y)}(\kappa(y'))$ we conclude that $$ \delta(V_0, W_0, \ldots, W_k) \leq \delta(V'_0, W'_0, \ldots, W'_k) + e - \text{trdeg}_{\kappa(y)}(\kappa(y')) $$ as desired.
Observe that for a prime $\mathfrak p \subset \mathcal{O}_{X, y}^\wedge$, $\mathfrak p \not \in V(I\mathcal{O}_{X, y}^\wedge)$ we have $V(\mathfrak p) \cap V(I\mathcal{O}_{X, y}^\wedge) = \{\mathfrak m_y^\wedge\} \Leftrightarrow \dim(\mathcal{O}_{X, y}^\wedge/\mathfrak p) = 1$ as $\text{cd}(A, I) = 1$. See Local Cohomology, Lemmas \ref{local-cohomology-lemma-cd-change-rings} and \ref{local-cohomology-lemma-cd-bound-dim-local}. OK, consider the three numbers $\alpha = \text{depth}((\mathcal{F}^\wedge_y)_\mathfrak p) \geq 0$, $\beta = \dim(\mathcal{O}_{X, y}^\wedge/\mathfrak p) \geq 1$, and $\gamma = \delta^Y_Z(y) \geq 1$. Then we see Definition \ref{definition-s-d-inequalities} requires \begin{enumerate} \item if $\beta > 1$, then $\alpha + \gamma \geq 2$ or $\alpha + \beta + \gamma > 3$, and \item if $\beta = 1$, then $\alpha + \gamma > 2$. \end{enumerate} It is trivial to see that this is equivalent to $\alpha + \beta + \gamma > 3$.
Let $W \cap Y = W_1 \cup \ldots \cup W_n$ be the decomposition into irreducible components. By assumption, after renumbering, we can find $0 < m < n$ such that $W_1, \ldots, W_m  \subset Z$ and $W_{m + 1}, \ldots, W_n \not \subset Z$. We conclude that $$ W \cap Y \setminus \left((W_1 \cup \ldots \cup W_m) \cap (W_{m + 1} \cup \ldots \cup W_n)\right) $$ is disconnected. By Lemma \ref{lemma-connected} we can find $1 \leq i \leq m < j \leq n$ and $z \in W_i \cap W_j$ such that $\dim(\mathcal{O}_{W, z}) \leq d + 1$. Choose an immediate specialization $y \leadsto z$ with $y \in W_j$, $y \not \in Z$; existence of $y$ follows from Properties, Lemma \ref{properties-lemma-complement-closed-point-Jacobson}. Observe that $\delta^Y_Z(y) = 1$ and $\dim(\mathcal{O}_{W, y}) \leq d$. Let $\mathfrak p \subset \mathcal{O}_{X, y}$ be the prime corresponding to $x$. Let $\mathfrak p' \subset \mathcal{O}_{X, y}^\wedge$ be a minimal prime over $\mathfrak p\mathcal{O}_{X, y}^\wedge$. Then we have $$ \text{depth}(\mathcal{F}_x) = \text{depth}((\mathcal{F}^\wedge_y)_{\mathfrak p'}) \quad\text{and}\quad \dim(\mathcal{O}_{W, y}) = \dim(\mathcal{O}_{X, y}^\wedge/\mathfrak p') $$ See Algebra, Lemma \ref{algebra-lemma-apply-grothendieck-module} and Local Cohomology, Lemma \ref{local-cohomology-lemma-change-completion}. Now we read off the conclusion from the inequalities given to us.
We will prove this by showing that Lemma \ref{lemma-application-H0} applies. Thus we let $x \in \text{Ass}(\mathcal{F})$ with $x \not \in Y$. Set $W = \overline{\{x\}}$. By condition (3) we see that $W \cap Y \not \subset Z$. By Lemma \ref{lemma-sanity} we see that no irreducible component of $W \cap Y$ is contained in $Z$. Thus if $z \in W \cap Z$, then there is an immediate specialization $y \leadsto z$, $y \in W \cap Y$, $y \not \in Z$. For existence of $y$ use Properties, Lemma \ref{properties-lemma-complement-closed-point-Jacobson}. Then $\delta^Y_Z(y) = 1$ and the assumption implies that $\dim(\mathcal{O}_{W, y}) > d$. Hence $\dim(\mathcal{O}_{W, z}) > 1 + d$ and we win.
Set $\mathcal{H} = \SheafHom_{\mathcal{O}_U}(\mathcal{G}, \mathcal{F})$. Using Cohomology of Schemes, Lemma \ref{coherent-lemma-hom-into-depth} or More on Algebra, Lemma \ref{more-algebra-lemma-hom-into-depth} we see that the completion of $\mathcal{H}$ satisfies the strict $(1, 1 + d)$-inequalities and that for $x \in U$ with $\overline{\{x\}} \cap Y \subset Z$ we have $\text{depth}(\mathcal{H}_x) \geq 2$. Details omitted. Thus by Lemma \ref{lemma-recover} we have $$ \Hom_U(\mathcal{G}, \mathcal{F}) = H^0(U, \mathcal{H}) = \lim H^0(U, \mathcal{H}/\mathcal{I}^n\mathcal{H}) = \Mor_{\textit{Coh}(U, I\mathcal{O}_U)} (\mathcal{G}^\wedge, \mathcal{F}^\wedge) $$ See Cohomology of Schemes, Lemma \ref{coherent-lemma-completion-internal-hom} for the final equality.
Choose a coherent $\mathcal{O}_U$-module $\mathcal{F}$ whose completion is $(\mathcal{F}_n)$. Let $T = \{x \in U \mid \overline{\{x\}} \cap Y \subset Z\}$. We will construct $\mathcal{F}$ by applying Local Cohomology, Lemma \ref{local-cohomology-lemma-make-S2-along-T-simple} with $\mathcal{F}$ and $T$. Then uniqueness will follow from the mapping property of Lemma \ref{lemma-fully-faithful-inequalities}. \medskip\noindent Since $T$ is stable under specialization in $U$ the only thing to check is the following. If $x' \leadsto x$ is an immediate specialization of points of $U$ with $x \in T$ and $x' \not \in T$, then $\text{depth}(\mathcal{F}_{x'}) \geq 1$. Set $W = \overline{\{x\}}$ and $W' = \overline{\{x'\}}$. Since $x' \not \in T$ we see that $W' \cap Y$ is not contained in $Z$. If $W' \cap Y$ contains an irreducible component contained in $Z$, then we are done by Lemma \ref{lemma-sanity}. If not, we choose an irreducible component $W_1$ of $W \cap Y$ and an irreducible component $W'_1$ of $W' \cap Y$ with $W_1 \subset W'_1$. Let $z \in W_1$ be the generic point. Let $y \leadsto z$, $y \in W'_1$ be an immediate specialization with $y \not \in Z$; existence of $y$ follows from $W'_1 \not \subset Z$ (see above) and Properties, Lemma \ref{properties-lemma-complement-closed-point-Jacobson}. Then we have the following $z \in Z$, $x \leadsto z$, $x' \leadsto y \leadsto z$, $y \in Y \setminus Z$, and $\delta^Y_Z(y) = 1$. By Local Cohomology, Lemma \ref{local-cohomology-lemma-cd-bound-dim-local} and the fact that $z$ is a generic point of $W \cap Y$ we have $\dim(\mathcal{O}_{W, z}) \leq d$. Since $x' \leadsto x$ is an immediate specialization we have $\dim(\mathcal{O}_{W', z}) \leq d + 1$. Since $y \not = z$ we conclude $\dim(\mathcal{O}_{W', y}) \leq d$. If $\text{depth}(\mathcal{F}_{x'}) = 0$ then we would get a contradiction with assumption (3); details about passage from $\mathcal{O}_{X, y}$ to its completion omitted. This finishes the proof.
We will use Lemma \ref{lemma-explain-2-3-cd-1} without further mention. In particular, we see the condition is necessary. Conversely, suppose the condition is true. Note that $\delta^Y_Z(y) = \dim(\overline{\{y\}})$ by Lemma \ref{lemma-discussion}. Let us write $\delta$ for this function. Let $y \in U \cap Y$. If $\delta(y) > 2$, then the inequality of Lemma \ref{lemma-explain-2-3-cd-1} holds. Finally, suppose $\delta(y) = 2$. We have to show that $$ \text{depth}((\mathcal{F}_y^\wedge)_\mathfrak p) + \dim(\mathcal{O}_{X, y}^\wedge/\mathfrak p) > 1 $$ Choose a specialization $y \leadsto y'$ with $\delta(y') = 1$. Then there is a ring map $\mathcal{O}_{X, y'}^\wedge \to \mathcal{O}_{X, y}^\wedge$ which identifies the target with the completion of the localization of $\mathcal{O}_{X, y'}^\wedge$ at a prime $\mathfrak q$ with $\dim(\mathcal{O}_{X, y'}^\wedge/\mathfrak q) = 1$. Moreover, we then obtain $$ \mathcal{F}_y^\wedge = \mathcal{F}_{y'}^\wedge \otimes_{\mathcal{O}_{X, y'}^\wedge} \mathcal{O}_{X, y}^\wedge $$ Let $\mathfrak p' \subset \mathcal{O}_{X, y'}^\wedge$ be the image of $\mathfrak p$. By Local Cohomology, Lemma \ref{local-cohomology-lemma-change-completion} we have \begin{align*} \text{depth}((\mathcal{F}_y^\wedge)_\mathfrak p) + \dim(\mathcal{O}_{X, y}^\wedge/\mathfrak p) & = \text{depth}((\mathcal{F}_{y'}^\wedge)_{\mathfrak p'}) + \dim((\mathcal{O}_{X, y}^\wedge/\mathfrak p)_{\mathfrak p'}) \\ & = \text{depth}((\mathcal{F}_{y'}^\wedge)_{\mathfrak p'}) + \dim(\mathcal{O}_{X, y}^\wedge/\mathfrak p') - 1 \end{align*} the last equality because the specialization is immediate. Thus the lemma is prove by the assumed inequality for $y', \mathfrak p'$.