hcju/stacksqa huggingface dataset:
Let $\mathcal{K} = \Ker(u)$ and denote $v : \mathcal{K} \to \mathcal{F}$ the inclusion. By Lemma \ref{lemma-relate-zero-iso} we see that $F_{u, iso} = F_{v, zero}$. By Lemma \ref{lemma-F-zero-closed-proper} applied to $v$ we see that $F_{u, iso} = F_{v, zero}$ is representable by a closed subspace of $B$. Note that $\mathcal{K}$ is of finite type if $\mathcal{G}$ is of finite presentation, see Modules on Sites, Lemma \ref{sites-modules-lemma-kernel-surjection-finite-onto-finite-presentation}. Hence we also obtain the final statement of the lemma.
Consider $\Coker(u)$. Observe that $\Coker(u_T) = \Coker(u)_T$ for any $T/B$. Note that formation of the support of a finite type quasi-coherent module commutes with pullback (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-support-covering}). Hence $F_{surj}$ is representable by the open subspace of $B$ corresponding to the open set $$ |B| \setminus |f|(\text{Supp}(\Coker(u))) $$ see Properties of Spaces, Lemma \ref{spaces-properties-lemma-open-subspaces}. This is an open because $|f|$ is closed on $\text{Supp}(\mathcal{G})$ and $\text{Supp}(\Coker(u))$ is a closed subset of $\text{Supp}(\mathcal{G})$.
Choose a scheme $U$ and an \'etale morphism $\varphi : U \to X$. Let $E' \subset |U_s|$ be the inverse image of $E$. If $E' \to E$ is surjective, then condition (1) is equivalent to: $(\varphi^*\mathcal{F})_T$ is flat over $T$ at all points of $|U_t|$ which map to a point of $E' \subset |U_t|$. Choosing $\varphi$ to be surjective, we reduced to the case of schemes which is More on Flatness, Lemma \ref{flat-lemma-freebie}. If $E$ is closed and quasi-compact, then we may choose $U$ to be affine such that $E' \to E$ is surjective. Then $E'$ is closed and quasi-compact and the final statement follows from the final statement of More on Flatness, Lemma \ref{flat-lemma-freebie}.
Suppose that we have a diagram as in (1). Then the equivalence of the conditions in More on Flatness, Lemma \ref{flat-lemma-pre-flat-dimension-n} shows that (1) and (3) are equivalent. But condition (3) is inherited by $\varphi^*\mathcal{F}$ for any $U \to V$ as in (2). Whence we see that (3) implies (2) by the result for schemes again. The result for schemes also implies the statement on base change.
Proof of (1). Suppose that $\{T_i \to T\}$ is an fpqc covering of a scheme $T$ over $Y$. We have to show that if $F_n(T_i)$ is nonempty for all $i$, then $F_n(T)$ is nonempty. Choose a diagram as in part (1) of Lemma \ref{lemma-pre-flat-dimension-n}. Denote $F'_n$ the corresponding functor for $\varphi^*\mathcal{F}$ and the morphism $U \to V$. By More on Flatness, Lemma \ref{flat-lemma-flat-dimension-n} we have the sheaf property for $F'_n$. Thus we get the sheaf property for $F_n$ because for $T \to Y$ we have $F_n(T) = F'_n(V \times_Y T)$ by Lemma \ref{lemma-pre-flat-dimension-n} and because $\{V \times_Y T_i \to V \times_Y T\}$ is an fpqc covering. \medskip\noindent Proof of (2). Suppose that $T = \lim_{i \in I} T_i$ is a filtered limit of affine schemes $T_i$ over $Y$ and assume that $F_n(T)$ is nonempty. We have to show that $F_n(T_i)$ is nonempty for some $i$. Choose a diagram as in part (1) of Lemma \ref{lemma-pre-flat-dimension-n}. Fix $i \in I$ and choose an affine open $W_i \subset V \times_Y T_i$ mapping surjectively onto $T_i$. For $i' \geq i$ let $W_{i'}$ be the inverse image of $W_i$ in $V \times_Y T_{i'}$ and let $W \subset V \times_Y T$ be the inverse image of $W_i$. Then $W = \lim_{i' \geq i} W_i$ is a filtered limit of affine schemes over $V$. By Lemma \ref{lemma-pre-flat-dimension-n} again it suffices to show that $F'_n(W_{i'})$ is nonempty for some $i' \geq i$. But we know that $F'_n(W)$ is nonempty because of our assumption that $F_n(T) = F'_n(V \times_Y T)$ is nonempty. Thus we can apply More on Flatness, Lemma \ref{flat-lemma-flat-dimension-n} to conclude.
Choose $U \to X$, $V \to Y$, $U \to V$ as in part (1) of Lemma \ref{lemma-pre-flat-dimension-n}. Choose a surjective \'etale morphism $U' \to U \times_X X'$ where $U'$ is a scheme. Then we have the lemma for the two functors $F_{U, n}$ and $F_{U', n}$ determined by $U' \to U$ and $\mathcal{F}|_U$ over $V$, see More on Flatness, Lemma \ref{flat-lemma-localize-flat-dimension-n}. On the other hand, Lemma \ref{lemma-pre-flat-dimension-n} tells us that given $T \to Y$ we have $F_n(T) = F_{U, n}(V \times_Y T)$ and $F'_n(T) = F_{U', n}(V \times_Y T)$. This proves the lemma.
Proof of (2). Write $E_n = E|_{X_n}$ and $N_n = R\Hom_{X_n}(E_n, \mathcal{F}_n)$. Recall that $R\Hom_{X_n}(-, -)$ is equal to $R\Gamma(X_n, R\SheafHom(-, -))$, see Cohomology on Sites, Section \ref{sites-cohomology-section-global-RHom}. Hence by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-base-change-RHom-perfect} we see that $N_n$ is a perfect object of $D(A_n)$ whose formation commutes with base change. Thus the maps $N_n \otimes_{A_n}^\mathbf{L} A_{n - 1} \to N_{n - 1}$ coming from $\varphi_n$ are isomorphisms. By More on Algebra, Lemma \ref{more-algebra-lemma-Rlim-perfect-gives-perfect} we find that $R\lim N_n$ is perfect and that its base change back to $A_n$ recovers $N_n$. On the other hand, the exact functor $R\Hom_X(E, -) : D_\QCoh(\mathcal{O}_X) \to D(A)$ of triangulated categories commutes with products and hence with derived limits, whence $$ R\Hom_X(E, K) = R\lim R\Hom_X(E, \mathcal{F}_n) = R\lim R\Hom_X(E_n, \mathcal{F}_n) = R\lim N_n $$ This proves (2). To see that (1) holds, translate it into (2) using Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}.
Combinging Lemma \ref{lemma-compute-against-perfect} and Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-perfect-enough} we see that $R\Gamma(X, K \otimes^\mathbf{L} E)$ is pseudo-coherent in $D(A)$ for all pseudo-coherent $E$ in $D(\mathcal{O}_X)$. Thus the lemma follows from More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-characterize-pseudo-coherent}.
Fix $n$. By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-computing-sections-as-colim} there exists a system of perfect complexes $E_m$ on $X$ such that $R\Gamma(U, K) = \text{hocolim} R\Gamma(X, K \otimes^\mathbf{L} E_m)$. In fact, this formula holds not just for $K$ but for every object of $D_\QCoh(\mathcal{O}_X)$. Applying this to $\mathcal{F}_n$ we obtain \begin{align*} R\Gamma(U_n, \mathcal{F}_n) & = R\Gamma(U, \mathcal{F}_n) \\ & = \text{hocolim}_m R\Gamma(X, \mathcal{F}_n \otimes^\mathbf{L} E_m) \\ & = \text{hocolim}_m R\Gamma(X_n, \mathcal{F}_n \otimes^\mathbf{L} E_m|_{X_n}) \end{align*} Using Lemma \ref{lemma-compute-against-perfect} and the fact that $- \otimes_A^\mathbf{L} A_n$ commutes with homotopy colimits we obtain the result.
Fix $n \geq 1$. By construction there is a canonical map $K \to \mathcal{F}_n$ in $D_\QCoh(\mathcal{O}_X)$ and hence a canonical map $H^0(K) \to \mathcal{F}_n$ of quasi-coherent sheaves. This explains the meaning of part (3). \medskip\noindent Let $x \in X_0$ be a point. We will find an open neighbourhood $W$ of $x$ such that (1), (2), and (3) are true. Since $X_0$ is quasi-compact this will prove the lemma. Let $U \to X$ be an \'etale morphism with $U$ affine and $u \in U$ a point mapping to $x$. Since $|U| \to |X|$ is open it suffices to find an open neighbourhood of $u$ in $U$ where (1), (2), and (3) are true. Say $U = \Spec(B)$. Choose a surjection $P \to B$ with $P$ smooth over $A$. By Lemma \ref{lemma-relative-pseudo-coherence} and the definition of relative pseudo-coherence there exists a bounded above complex $F^\bullet$ of finite free $P$-modules representing $Ri_*K$ where $i : U \to \Spec(P)$ is the closed immersion induced by the presentation. Let $M_n$ be the $B$-module corresponding to $\mathcal{F}_n|_U$. By Lemma \ref{lemma-compute-over-affine} $$ H^i(F^\bullet \otimes_A A_n) = \left\{ \begin{matrix} 0 & \text{if} & i \not = 0 \\ M_n & \text{if} & i = 0 \end{matrix} \right. $$ Let $i$ be the maximal index such that $F^i$ is nonzero. If $i \leq 0$, then (1), (2), and (3) are true. If not, then $i > 0$ and we see that the rank of the map $$ F^{i - 1} \to F^i $$ in the point $u$ is maximal. Hence in an open neighbourhood of $u$ inside $\Spec(P)$ the rank is maximal. Thus after replacing $P$ by a principal localization we may assume that the displayed map is surjective. Since $F^i$ is finite free we may choose a splitting $F^{i - 1} = F' \oplus F^i$. Then we may replace $F^\bullet$ by the complex $$ \ldots \to F^{i - 2} \to F' \to 0 \to \ldots $$ and we win by induction on $i$.
Fix $n \geq 1$. Let $I_n = \Ker(A \to A_n)$. By More on Algebra, Lemma \ref{more-algebra-lemma-limit-henselian} the pair $(A, I_n)$ is henselian. Let $Z \subset W$ be the scheme theoretic support of $\mathcal{F}$. This is a closed subspace as $\mathcal{F}$ is of finite presentation. By part (3) of Lemma \ref{lemma-finitely-presented} we see that $Z \times_{\Spec(A)} \Spec(A_n)$ is equal to the support of $\mathcal{F}_n$ and hence proper over $\Spec(A/I)$. By More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-split-off-proper-part-henselian} we can write $Z = Z_1 \amalg Z_2$ with $Z_1, Z_2$ open and closed in $Z$, with $Z_1$ proper over $A$, and with $Z_1 \times_{\Spec(A)} \Spec(A/I_n)$ equal to the support of $\mathcal{F}_n$. In other words, $|Z_2|$ does not meet $X_0$. Hence after replacing $W$ by $W \setminus Z_2$ we obtain the lemma.
The functor $DQ_X$ exists because $X$ is quasi-compact and quasi-separated, see Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-better-coherator}. Since $DQ_X$ is a right adjoint it commutes with products and therefore with derived limits. Hence the equality in the statement of the lemma. \medskip\noindent By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-boundedness-better-coherator} the functor $DQ_X$ has bounded cohomological dimension. Hence it suffices to show that $R\lim K_n \in D^-(\mathcal{O}_X)$. To see this, let $U \to X$ be \'etale with $U$ affine. Then there is a canonical exact sequence $$ 0 \to R^1\lim H^{m - 1}(U, K_n) \to H^m(U, R\lim K_n) \to \lim H^m(U, K_n) \to 0 $$ by Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-RGamma-commutes-with-Rlim}. Since $U$ is affine and $K_n$ is pseudo-coherent (and hence has quasi-coherent cohomology sheaves by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-pseudo-coherent}) we see that $H^m(U, K_n) = H^m(K_n)(U)$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-compare-bounded}. Thus we conclude that it suffices to show that $K_n$ is bounded above independent of $n$. \medskip\noindent Since $K_n$ is pseudo-coherent we have $K_n \in D^-(\mathcal{O}_{X_n})$. Suppose that $a_n$ is maximal such that $H^{a_n}(K_n)$ is nonzero. Of course $a_1 \leq a_2 \leq a_3 \leq \ldots$. Note that $H^{a_n}(K_n)$ is an $\mathcal{O}_{X_n}$-module of finite presentation (Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-finite-cohomology}). We have $H^{a_n}(K_{n - 1}) = H^{a_n}(K_n) \otimes_{\mathcal{O}_{X_n}} \mathcal{O}_{X_{n - 1}}$. Since $X_{n - 1} \to X_n$ is a thickening, it follows from Nakayama's lemma (Algebra, Lemma \ref{algebra-lemma-NAK}) that if $H^{a_n}(K_n) \otimes_{\mathcal{O}_{X_n}} \mathcal{O}_{X_{n - 1}}$ is zero, then $H^{a_n}(K_n)$ is zero too (argue by checking on stalks for example; small detail omitted). Thus $a_{n - 1} = a_n$ for all $n$ and we conclude.
Write $E_n = E|_{X_n}$ and $M_n = R\Gamma(X_n, K_n \otimes^\mathbf{L} E|_{X_n})$. By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-flat-proper-pseudo-coherent-direct-image-general} we see that $M_n$ is a pseudo-coherent object of $D(A_n)$ whose formation commutes with base change. Thus the maps $M_n \otimes_{A_n}^\mathbf{L} A_{n - 1} \to M_{n - 1}$ coming from $\varphi_n$ are isomorphisms. By More on Algebra, Lemma \ref{more-algebra-lemma-Rlim-pseudo-coherent-gives-pseudo-coherent} we find that $R\lim M_n$ is pseudo-coherent and that its base change back to $A_n$ recovers $M_n$. On the other hand, the exact functor $R\Gamma(X, -) : D_\QCoh(\mathcal{O}_X) \to D(A)$ of triangulated categories commutes with products and hence with derived limits, whence $$ R\Gamma(X, E \otimes^\mathbf{L} K) = R\lim R\Gamma(X,  E \otimes^\mathbf{L} K_n) = R\lim R\Gamma(X_n, E_n \otimes^\mathbf{L} K_n) = R\lim M_n $$ as desired.
Combinging Lemma \ref{lemma-compute-against-perfect-derived} and Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-perfect-enough} we see that $R\Gamma(X, K \otimes^\mathbf{L} E)$ is pseudo-coherent in $D(A)$ for all pseudo-coherent $E$ in $D(\mathcal{O}_X)$. Thus it follows from More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-characterize-pseudo-coherent} that $K$ is pseudo-coherent relative to $A$. Since $X$ is of flat and of finite presentation over $A$, this is the same as being pseudo-coherent on $X$, see More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-relative-pseudo-coherent-is-moot}.
Fix $n$. By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-computing-sections-as-colim} there exists a system of perfect complexes $E_m$ on $X$ such that $R\Gamma(U, K) = \text{hocolim} R\Gamma(X, K \otimes^\mathbf{L} E_m)$. In fact, this formula holds not just for $K$ but for every object of $D_\QCoh(\mathcal{O}_X)$. Applying this to $K_n$ we obtain \begin{align*} R\Gamma(U_n, K_n) & = R\Gamma(U, K_n) \\ & = \text{hocolim}_m R\Gamma(X, K_n \otimes^\mathbf{L} E_m) \\ & = \text{hocolim}_m R\Gamma(X_n, K_n \otimes^\mathbf{L} E_m|_{X_n}) \end{align*} Using Lemma \ref{lemma-compute-against-perfect-derived} and the fact that $- \otimes_A^\mathbf{L} A_n$ commutes with homotopy colimits we obtain the result.
Let $X$, $Z$, $\xi$ be as in the lemma. Since $X$ is locally of finite type over $B$ we see that $X$ is Jacobson, see Decent Spaces, Lemma \ref{decent-spaces-lemma-Jacobson-universally-Jacobson}. Hence $X_{\text{ft-pts}} \subset |X|$ is the set of closed points by Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-Jacobson-ft-pts}. Given a chain $T_0 \supset \ldots \supset T_e$ of irreducible closed subsets of $|Z|$ we have $T_e \cap X_{\text{ft-pts}}$ nonempty by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-enough-finite-type-points}. Thus we can always assume such a chain ends with $T_e = \{z\}$ for some $z \in |Z|$ closed. It follows that $\dim(Z) = \sup_z \text{codim}(\{z\}, |Z|)$ where $z$ runs over the closed points of $|Z|$. We have $\text{codim}(\{z\}, Z) = \delta(\xi) - \delta(z)$ by Topology, Lemma \ref{topology-lemma-dimension-function-catenary}. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-type-points-morphism} the image of $z$ is a finite type point of $B$, i.e., a closed point of $|B|$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-jacobson-finite-type-points} the transcendence degree of $z/b$ is $0$. We conclude that $\delta(z) = \delta(b) = 0$ by assumption. Thus we obtain equality $$ \dim(|Z|) = \text{codim}(\{z\}, Z) = \delta(\xi) $$ for all $z \in |Z|$ closed. Finally, we have that $\text{codim}(\{z\}, Z)$ is equal to the dimension of the local ring of $Z$ at $z$ by Decent Spaces, Lemma \ref{decent-spaces-lemma-codimension-local-ring} which in turn is equal to $\dim(\mathcal{O}_{Z, \overline{z}})$ by Properties of Spaces, Lemma \ref{spaces-properties-lemma-dimension-local-ring}.
Let $U \to X$ and $u \in U$ be as in (2) or (3). Then we know that $\mathcal{O}_{X, \overline{x}}$ is the strict henselization of $\mathcal{O}_{U, u}$ and that $$ \mathcal{F}_{\overline{x}} = (\mathcal{F}|_U)_u \otimes_{\mathcal{O}_{U, u}} \mathcal{O}_{X, \overline{x}} $$ See Properties of Spaces, Lemmas \ref{spaces-properties-lemma-describe-etale-local-ring} and \ref{spaces-properties-lemma-stalk-quasi-coherent}. Thus the equality of the lengths follows from Algebra, Lemma \ref{algebra-lemma-pullback-module} the fact that $\mathcal{O}_{U, u} \to \mathcal{O}_{X, \overline{x}}$ is flat and the fact that $\mathcal{O}_{X, \overline{x}}/\mathfrak m_u\mathcal{O}_{X, \overline{x}}$ is equal to the residue field of $\mathcal{O}_{X, \overline{x}}$. These facts about strict henselizations can be found in More on Algebra, Lemma \ref{more-algebra-lemma-dumb-properties-henselization}.
Choose an \'etale morphism $f : U \to X$ with $U$ a scheme and $u \in U$ mapping to $x$. Set $V = Y \times_X U$. Denote $g : V \to Y$ and $j : V \to U$ the projections. Then $j : V \to U$ is a closed immersion and there is a unique point $v \in V$ mapping to $y \in |Y|$ and $u \in U$ (use Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian} and Spaces, Lemma \ref{spaces-lemma-base-change-immersions}). We have $j_*(\mathcal{G}|_V) = (i_*\mathcal{G})|_U$ as modules on the scheme $V$ and $j_*$ the ``usual'' pushforward of modules for the morphism of schemes $j$, see discussion surrounding Cohomology of Spaces, Equation (\ref{spaces-cohomology-equation-representable-higher-direct-image}). In this way we reduce to the case of schemes: if $i : Y \to X$ is a closed immersion of schemes, then $$ (i_*\mathcal{G})_x = \mathcal{G}_y $$ as modules over $\mathcal{O}_{X, x}$ where the module structure on the right hand side is given by the surjection $i_y^\sharp : \mathcal{O}_{X, x} \to \mathcal{O}_{Y, y}$. Thus equality by Algebra, Lemma \ref{algebra-lemma-length-independent}.
Assume $f : U \to X$ is an \'etale morphism with $U$ a scheme and $u \in U$ maps to $x$. Then $\mathcal{F}|_U = f^*\mathcal{F}$ is a coherent $\mathcal{O}_U$-module on the locally Noetherian scheme $U$ and in particular $(\mathcal{F}|_U)_u$ is a finite $\mathcal{O}_{U, u}$-module, see Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-coherent-Noetherian} and Cohomology of Schemes, Lemma \ref{coherent-lemma-coherent-Noetherian}. Recall that the support of $\mathcal{F}|_U$ is a closed subset of $U$ (Morphisms, Lemma \ref{morphisms-lemma-support-finite-type}) and that the support of $(\mathcal{F}|_U)_u$ is the pullback of the support of $\mathcal{F}|_U$ by the morphism $\Spec(\mathcal{O}_{U, u}) \to U$. Thus $u$ is a generic point of an irreducible component of $\text{Supp}(\mathcal{F}|_U)$ if and only if the support of $(\mathcal{F}|_U)_u$ is equal to the maximal ideal of $\mathcal{O}_{U, u}$. Now the equivalence of (1), (2), (3) follows from by Algebra, Lemma \ref{algebra-lemma-support-point}. \medskip\noindent If $X$ is decent we choose an \'etale morphism $f : U \to X$ and a point $u \in U$ mapping to $x$. The support of $\mathcal{F}$ pulls back to the support of $\mathcal{F}|_U$, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-support-finite-type}. Also, specializations $x' \leadsto x$ in $|X|$ lift to specializations $u' \leadsto u$ in $U$ and any nontrivial specialization $u' \leadsto u$ in $U$ maps to a nontrivial specialization $f(u') \leadsto f(u)$ in $|X|$, see Decent Spaces, Lemmas \ref{decent-spaces-lemma-decent-specialization} and \ref{decent-spaces-lemma-decent-no-specializations-map-to-same-point}. Using that $|X|$ and $U$ are sober topological spaces (Decent Spaces, Proposition \ref{decent-spaces-proposition-reasonable-sober} and Schemes, Lemma \ref{schemes-lemma-scheme-sober}) we conclude $x$ is a generic point of the support of $\mathcal{F}$ if and only if $u$ is a generic point of the support of $\mathcal{F}|_U$. We conclude (4) is equivalent to (1). \medskip\noindent The parenthetical statement follows from Decent Spaces, Lemma \ref{decent-spaces-lemma-locally-Noetherian-decent-quasi-separated}.
Observe that $|Z|$ is an irreducible component of $\text{Supp}(\mathcal{F})$ if and only if $\xi \in \text{Supp}(\mathcal{F})$, see Lemma \ref{lemma-point-of-max-dimension}. Moreover, the length of $\mathcal{F}$ at $\xi$ is zero if $\xi \not \in \text{Supp}(\mathcal{F})$. Combining this with Definition \ref{definition-cycle-associated-to-coherent-sheaf} we conclude.
Let $Z$ be an integral closed subspace of $X$ with $\dim_\delta(Z) = k$. If $Z \not \subset Y$ the $Z$ has coefficient zero in both $[Y]_k$ and $[i_*\mathcal{O}_Y]_k$. If $Z \subset Y$, then the generic point of $Z$ may be viewed as a point $y \in |Y|$ whose image $x \in |X|$. Then the coefficient of $Z$ in $[Y]_k$ is the length of $\mathcal{O}_Y$ at $y$ and the coefficient of $Z$ in $[i_*\mathcal{O}_Y]_k$ is the length of $i_*\mathcal{O}_Y$ at $x$. Thus the equality of the coefficients follows from Lemma \ref{lemma-length-closed-immersion}.
Let $Z$ be an integral closed subspace of $X$ with $\dim_\delta(Z) = k$. It suffices to show that the coefficients of $Z$ in $[\mathcal{G}]_k$, $[\mathcal{F}]_k$, and $[\mathcal{H}]_k$ satisfy the corresponding additivity. By Lemma \ref{lemma-reformulate-coeff-coherent} it suffices to show $$ \text{the length of }\mathcal{G}\text{ at }x = \text{the length of }\mathcal{F}\text{ at }x + \text{the length of }\mathcal{H}\text{ at }x $$ for any $x \in |X|$. Looking at Definition \ref{definition-length-at-x} this follows immediately from additivity of lengths, see Algebra, Lemma \ref{algebra-lemma-length-additive}.
Let $\xi \in |Z|$ be the generic point. Let $Z' \subset Y$ be the integral closed subspace whose generic point is $\xi' = f(\xi)$, see Remark \ref{remark-integral}. Since $\xi \in |f^{-1}(Z')| = |f|^{-1}(|Z'|)$ by Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian} and since $Z$ is the reduced with $|Z| = \overline{\{\xi\}}$ we see that $Z \subset f^{-1}(Z')$ as closed subspaces of $X$ (see Properties of Spaces, Lemma \ref{spaces-properties-lemma-map-into-reduction}). Thus we obtain our morphism $Z \to Z'$. This morphism is dominant as the generic point of $Z$ maps to the generic point of $Z'$. Uniqueness of $Z'$ is clear. If $f$ is proper, then $Z \to Y$ is proper as a composition of proper morphisms (Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-base-change-proper} and \ref{spaces-morphisms-lemma-closed-immersion-proper}). Then we conclude that $Z \to Z'$ is proper by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-universally-closed-permanence}. Surjectivity then follows as the image of a proper morphism is closed.
By Lemma \ref{lemma-proper-image} there is a unique integral closed subspace $Z \subset Y$ such that $f$ factors through a dominant morphism $X \to Z$. Then $Z = Y$ if and only if $\dim_\delta(Z) = \dim_\delta(Y)$. On the other hand, by our construction of dimension functions (see Situation \ref{situation-setup}) we have $\dim_\delta(X) = \dim_\delta(Z) + r$ where $r$ the transcendence degree of the extension $R(X)/R(Z)$. Combining this with Spaces over Fields, Lemma \ref{spaces-over-fields-lemma-finite-degree} the lemma follows.
Let $V \subset |Y|$ be a quasi-compact open subset. Then $|f|^{-1}(V) \subset |X|$ is quasi-compact by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-is-quasi-compact}. Hence the set $\{i \in I : T_i \cap |f|^{-1}(V) \not = \emptyset \}$ is finite by a simple topological argument which we omit. Since this is the same as the set $$ \{i \in I : |f|(T_i) \cap V \not = \emptyset \} = \{i \in I : \overline{|f|(T_i)} \cap V \not = \emptyset \} $$ the lemma is proved.
Let $W \subset X$ be an integral closed subspace of dimension $k$. Consider the integral closed subspaces $W' \subset Y$ and $W'' \subset Z$ we get by applying Lemma \ref{lemma-proper-image} to $f$ and $W$ and then to $g$ and $W'$. Then $W \to W'$ and $W' \to W''$ are surjective and proper. We have to show that $g_*(f_*[W]) = (f \circ g)_*[W]$. If $\dim_\delta(W'') < k$, then both sides are zero. If $\dim_\delta(W'') = k$, then we see $W \to W'$ and $W' \to W''$ both satisfy the hypotheses of Lemma \ref{lemma-equal-dimension}. Hence $$ g_*(f_*[W]) = \deg(W/W')\deg(W'/W'')[W''], \quad (f \circ g)_*[W] = \deg(W/W'')[W'']. $$ Then we can apply Spaces over Fields, Lemma \ref{spaces-over-fields-lemma-degree-composition} to conclude.