hcju/stacksqa huggingface dataset:
Via the identifications $\NL_{X/S} = \tau_{\geq -1}L_{X/S}$ (Lemma \ref{lemma-compare-cotangent-complex-with-naive-ringed-spaces}) and $H^0(L_{X/S}) = \Omega_{X/S}$ (Lemma \ref{lemma-H0-L-morphism-ringed-spaces}) we have seen parts (2) and (3) in Deformation Theory, Lemmas \ref{defos-lemma-huge-diagram-ringed-spaces} and \ref{defos-lemma-choices-ringed-spaces}. \medskip\noindent Proof of (1). We will use the results of Deformation Theory, Lemma \ref{defos-lemma-extensions-of-ringed-spaces} without further mention. Let $\alpha \in \Ext^1_{\mathcal{O}_S}(\NL_{S/\mathbf{Z}}, \mathcal{J})$ be the element corresponding to the isomorphism class of $S'$. The existence of $X'$ corresponds to an element $\beta \in \Ext_{\mathcal{O}_X}^1(\NL_{X/\mathbf{Z}}, \mathcal{G})$ which maps to the image of $\alpha$ in $\Ext^1_{\mathcal{O}_X}(Lf^*\NL_{S/\mathbf{Z}}, \mathcal{G})$. Note that $$ \Ext^1_{\mathcal{O}_X}(Lf^*\NL_{S/\mathbf{Z}}, \mathcal{G}) = \Ext^1_{\mathcal{O}_X}(Lf^*L_{S/\mathbf{Z}}, \mathcal{G}) $$ and $$ \Ext^1_{\mathcal{O}_X}(\NL_{X/\mathbf{Z}}, \mathcal{G}) = \Ext^1_{\mathcal{O}_X}(L_{X/\mathbf{Z}}, \mathcal{G}) $$ by Lemma \ref{lemma-compare-cotangent-complex-with-naive-ringed-spaces}. The distinguished triangle of Lemma \ref{lemma-triangle-ringed-spaces} for $X \to S \to (*, \mathbf{Z})$ gives rise to a long exact sequence $$ \ldots \to \Ext^1_{\mathcal{O}_X}(L_{X/\mathbf{Z}}, \mathcal{G}) \to \Ext^1_{\mathcal{O}_X}(Lf^*L_{S/\mathbf{Z}}, \mathcal{G}) \to \Ext^2_{\mathcal{O}_X}(L_{X/S}, \mathcal{G}) \to \ldots $$ We obtain the result with $\xi$ the image of $\alpha$.
Set $h = g \circ f$ so that $h^{-1}\mathcal{O}_3 = f^{-1}g^{-1}\mathcal{O}_3$. By Lemma \ref{lemma-pullback-cotangent-morphism-topoi} we have $f^{-1}L_g = L_{f^{-1}\mathcal{O}_2/h^{-1}\mathcal{O}_3}$ and this is a complex of flat $f^{-1}\mathcal{O}_2$-modules. Hence the distinguished triangle above is an example of the distinguished triangle of Lemma \ref{lemma-triangle-sheaves-rings} with $\mathcal{A} = h^{-1}\mathcal{O}_3$, $\mathcal{B} = f^{-1}\mathcal{O}_2$, and $\mathcal{C} = \mathcal{O}_1$.
Via the identifications $\NL_f = \tau_{\geq -1}L_f$ (Lemma \ref{lemma-compare-cotangent-complex-with-naive-ringed-topoi}) and $H^0(L_{X/S}) = \Omega_{X/S}$ (Lemma \ref{lemma-H0-L-morphism-ringed-topoi}) we have seen parts (2) and (3) in Deformation Theory, Lemmas \ref{defos-lemma-huge-diagram-ringed-topoi} and \ref{defos-lemma-choices-ringed-topoi}. \medskip\noindent Proof of (1). We will use the results of Deformation Theory, Lemma \ref{defos-lemma-extensions-of-ringed-topoi} without further mention. Denote $$ p : (\Sh(\mathcal{C}), \mathcal{O}) \to (\Sh(*), \mathbf{Z}) \quad\text{and}\quad q : (\Sh(\mathcal{B}), \mathcal{O}_\mathcal{B}) \to (\Sh(*), \mathbf{Z}). $$ Let $\alpha \in \Ext^1_{\mathcal{O}_\mathcal{B}}(\NL_q, \mathcal{J})$ be the element corresponding to the isomorphism class of $\mathcal{O}_{\mathcal{B}'}$. The existence of $\mathcal{O}'$ corresponds to an element $\beta \in \Ext_\mathcal{O}^1(\NL_p, \mathcal{G})$ which maps to the image of $\alpha$ in $\Ext^1_{\mathcal{O}_X}(Lf^*\NL_q, \mathcal{G})$. Note that $$ \Ext^1_{\mathcal{O}_X}(Lf^*\NL_q, \mathcal{G}) = \Ext^1_{\mathcal{O}_X}(Lf^*L_q, \mathcal{G}) $$ and $$ \Ext^1_{\mathcal{O}_X}(\NL_p, \mathcal{G}) = \Ext^1_{\mathcal{O}_X}(L_p, \mathcal{G}) $$ by Lemma \ref{lemma-compare-cotangent-complex-with-naive-ringed-topoi}. The distinguished triangle of Lemma \ref{lemma-triangle-ringed-topoi} for $p = q \circ f$ gives rise to a long exact sequence $$ \ldots \to \Ext^1_{\mathcal{O}_X}(L_p, \mathcal{G}) \to \Ext^1_{\mathcal{O}_X}(Lf^*L_q, \mathcal{G}) \to \Ext^2_{\mathcal{O}_X}(L_f, \mathcal{G}) \to \ldots $$ We obtain the result with $\xi$ the image of $\alpha$.
By Remark \ref{remark-map-sections-over-U} there is a canonical map of complexes $L_{\mathcal{O}_X(U)/f^{-1}\mathcal{O}_Y(U)} \to L_{X/Y}(U)$ of $B = \mathcal{O}_X(U)$-modules, which is compatible with further restrictions. Using the canonical map $A \to f^{-1}\mathcal{O}_Y(U)$ we obtain a canonical map $L_{B/A} \to L_{\mathcal{O}_X(U)/f^{-1}\mathcal{O}_Y(U)}$ of complexes of $B$-modules. Using the universal property of the $\widetilde{\ }$ functor (see Schemes, Lemma \ref{schemes-lemma-compare-constructions}) we obtain a map as in the statement of the lemma. We may check this map is an isomorphism on cohomology sheaves by checking it induces isomorphisms on stalks. This follows immediately from Lemmas \ref{lemma-stalk-cotangent-complex} and \ref{lemma-localize} (and the description of the stalks of $\mathcal{O}_X$ and $f^{-1}\mathcal{O}_Y$ at a point $\mathfrak p \in \Spec(B)$ as $B_\mathfrak p$ and $A_\mathfrak q$ where $\mathfrak q = A \cap \mathfrak p$; references used are Schemes, Lemma \ref{schemes-lemma-spec-sheaves} and Sheaves, Lemma \ref{sheaves-lemma-stalk-pullback}).
Let $p : X \to \Spec(\Lambda)$ be the structure morphism. Let $q : \Spec(\Lambda) \to (*, \Lambda)$ be the obvious morphism. By the distinguished triangle of Lemma \ref{lemma-triangle-ringed-spaces} it suffices to show that $L_q = 0$. To see this it suffices to show for $\mathfrak p \in \Spec(\Lambda)$ that $$ (L_q)_\mathfrak p = L_{\mathcal{O}_{\Spec(\Lambda), \mathfrak p}/\Lambda} = L_{\Lambda_\mathfrak p/\Lambda} $$ (Lemma \ref{lemma-stalk-cotangent-complex}) is zero which follows from Lemma \ref{lemma-when-zero}.
We first observe that for any object $(U \to \mathbf{A})$ of $\mathcal{C}_{X/\Lambda}$ the value of the sheaf $\mathcal{O}$ is a polynomial algebra over $\Lambda$. Hence $\Omega_{\mathcal{O}/\underline{\Lambda}}$ is a flat $\mathcal{O}$-module and we conclude the second and third equalities of the statement of the lemma hold. \medskip\noindent By Remark \ref{remark-compute-L-pi-shriek} the object $L\pi_!(\Omega_{\mathcal{O}/\underline{\Lambda}} \otimes_\mathcal{O} \underline{\mathcal{O}}_X)$ is computed as the sheafification of the complex of presheaves $$ U \mapsto \left(\Omega_{\mathcal{O}/\underline{\Lambda}} \otimes_\mathcal{O} \underline{\mathcal{O}}_X\right)(\mathbf{A}_{\bullet, U}) = \Omega_{P_{\bullet, U}/\Lambda} \otimes_{P_{\bullet, U}} \mathcal{O}_X(U) = L_{\mathcal{O}_X(U)/\Lambda} $$ using notation as in Remark \ref{remark-compute-L-pi-shriek}. Now Remark \ref{remark-map-sections-over-U} shows that $L\pi_!(\Omega_{\mathcal{O}/\underline{\Lambda}} \otimes_\mathcal{O} \underline{\mathcal{O}}_X)$ computes the cotangent complex of the map of rings $\underline{\Lambda} \to \mathcal{O}_X$ on $X$. This is what we want by Lemma \ref{lemma-scheme-over-ring}.
Formation of the cotangent complex commutes with pullback (Lemma \ref{lemma-pullback-cotangent-morphism-topoi}) and we have $p_{small}^{-1}\mathcal{O}_X = \mathcal{O}_U$ and $g_{small}^{-1}\mathcal{O}_{V_\etale} = p_{small}^{-1}f_{small}^{-1}\mathcal{O}_{Y_\etale}$ because $q_{small}^{-1}\mathcal{O}_{Y_\etale} = \mathcal{O}_{V_\etale}$ (Properties of Spaces, Lemma \ref{spaces-properties-lemma-etale-exact-pullback}). Tracing through the definitions we conclude that $L_{X/Y}|_{U_\etale} = L_{U/V}$.
Let $f_0 : X_0 \to Y_0$ be the morphism of schemes corresponding to $f$. There is a canonical map $\epsilon^{-1}f_0^{-1}\mathcal{O}_{Y_0} \to f_{small}^{-1}\mathcal{O}_Y$ compatible with $\epsilon^\sharp : \epsilon^{-1}\mathcal{O}_{X_0} \to \mathcal{O}_X$ because there is a commutative diagram $$ \xymatrix{ X_{0, Zar} \ar[d]_{f_0} & X_\etale \ar[l]^\epsilon \ar[d]^f \\ Y_{0, Zar} & Y_\etale \ar[l]_\epsilon } $$ see Derived Categories of Spaces, Remark \ref{spaces-perfect-remark-match-total-direct-images}. Thus we obtain a canonical map $$ \epsilon^{-1}L_{X_0/Y_0} = \epsilon^{-1}L_{\mathcal{O}_{X_0}/f_0^{-1}\mathcal{O}_{Y_0}} = L_{\epsilon^{-1}\mathcal{O}_{X_0}/\epsilon^{-1}f_0^{-1}\mathcal{O}_{Y_0}} \longrightarrow L_{\mathcal{O}_X/f^{-1}_{small}\mathcal{O}_Y} = L_{X/Y} $$ by the functoriality discussed in Section \ref{section-cotangent-complex} and Lemma \ref{lemma-pullback-cotangent-morphism-topoi}. To see that the induced map $\epsilon^*L_{X_0/Y_0} \to L_{X/Y}$ is an isomorphism we may check on stalks at geometric points (Properties of Spaces, Theorem \ref{spaces-properties-theorem-exactness-stalks}). We will use Lemma \ref{lemma-stalk-cotangent-complex} to compute the stalks. Let $\overline{x} : \Spec(k) \to X_0$ be a geometric point lying over $x \in X_0$, with $\overline{y} = f \circ \overline{x}$ lying over $y \in Y_0$. Then $$ L_{X/Y, \overline{x}} = L_{\mathcal{O}_{X, \overline{x}}/\mathcal{O}_{Y, \overline{y}}} $$ and $$ (\epsilon^*L_{X_0/Y_0})_{\overline{x}} = L_{X_0/Y_0, x} \otimes_{\mathcal{O}_{X_0, x}} \mathcal{O}_{X, \overline{x}} = L_{\mathcal{O}_{X_0, x}/\mathcal{O}_{Y_0, y}} \otimes_{\mathcal{O}_{X_0, x}} \mathcal{O}_{X, \overline{x}} $$ Some details omitted (hint: use that the stalk of a pullback is the stalk at the image point, see Sites, Lemma \ref{sites-lemma-point-morphism-sites}, as well as the corresponding result for modules, see Modules on Sites, Lemma \ref{sites-modules-lemma-pullback-stalk}). Observe that $\mathcal{O}_{X, \overline{x}}$ is the strict henselization of $\mathcal{O}_{X_0, x}$ and similarly for $\mathcal{O}_{Y, \overline{y}}$ (Properties of Spaces, Lemma \ref{spaces-properties-lemma-describe-etale-local-ring}). Thus the result follows from Lemma \ref{lemma-cotangent-complex-henselization}.
Let $p : X \to \Spec(\Lambda)$ be the structure morphism. Let $q : \Spec(\Lambda)_\etale \to (*, \Lambda)$ be the obvious morphism. By the distinguished triangle of Lemma \ref{lemma-triangle-ringed-topoi} it suffices to show that $L_q = 0$. To see this it suffices to show (Properties of Spaces, Theorem \ref{spaces-properties-theorem-exactness-stalks}) for a geometric point $\overline{t} : \Spec(k) \to \Spec(\Lambda)$ that $$ (L_q)_{\overline{t}} = L_{\mathcal{O}_{\Spec(\Lambda)_\etale, \overline{t}}/\Lambda} $$ (Lemma \ref{lemma-stalk-cotangent-complex}) is zero. Since $\mathcal{O}_{\Spec(\Lambda)_\etale, \overline{t}}$ is a strict henselization of a local ring of $\Lambda$ (Properties of Spaces, Lemma \ref{spaces-properties-lemma-describe-etale-local-ring}) this follows from Lemma \ref{lemma-when-zero}.
We first observe that for any object $(U \to \mathbf{A})$ of $\mathcal{C}_{X/\Lambda}$ the value of the sheaf $\mathcal{O}$ is a polynomial algebra over $\Lambda$. Hence $\Omega_{\mathcal{O}/\underline{\Lambda}}$ is a flat $\mathcal{O}$-module and we conclude the second and third equalities of the statement of the lemma hold. \medskip\noindent By Remark \ref{remark-compute-L-pi-shriek-spaces} the object $L\pi_!(\Omega_{\mathcal{O}/\underline{\Lambda}} \otimes_\mathcal{O} \underline{\mathcal{O}}_X)$ is computed as the sheafification of the complex of presheaves $$ U \mapsto \left(\Omega_{\mathcal{O}/\underline{\Lambda}} \otimes_\mathcal{O} \underline{\mathcal{O}}_X\right)(\mathbf{A}_{\bullet, U}) = \Omega_{P_{\bullet, U}/\Lambda} \otimes_{P_{\bullet, U}} \mathcal{O}_X(U) = L_{\mathcal{O}_X(U)/\Lambda} $$ using notation as in Remark \ref{remark-compute-L-pi-shriek-spaces}. Now Remark \ref{remark-map-sections-over-U} shows that $L\pi_!(\Omega_{\mathcal{O}/\underline{\Lambda}} \otimes_\mathcal{O} \underline{\mathcal{O}}_X)$ computes the cotangent complex of the map of rings $\underline{\Lambda} \to \mathcal{O}_X$ on $X_\etale$. This is what we want by Lemma \ref{lemma-space-over-ring}.
Choose a scheme $W$ and a surjective \'etale morphism $W \to B$. Choose a scheme $U$ and a surjective \'etale morphism $U \to X \times_B W$. Choose a scheme $V$ and a surjective \'etale morphism $V \to Y \times_B W$. Then $U \times_W V \to X \times_B Y$ is surjective \'etale too. Hence it suffices to prove that the restriction of $E$ to $U \times_W V$ is zero. By Lemma \ref{lemma-compare-spaces-schemes} and Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-tor-independent} this reduces us to the case of schemes. Taking suitable affine opens we reduce to the case of affine schemes. Using  Lemma \ref{lemma-morphism-affine-schemes} we reduce to the case of a tensor product of rings, i.e., to Lemma \ref{lemma-tensor-product-tor-independent}.
The formation of the cotangent complex commutes with taking stalks and pullbacks, see Lemmas \ref{lemma-stalk-cotangent-complex} and \ref{lemma-pullback-cotangent-morphism-topoi}. Note that $C$ is a henselization of $A \otimes_R B$. $L_{C/R} = L_{A \otimes_R B/R} \otimes_{A \otimes_R B} C$ by the results of Section \ref{section-localization}. Thus the stalk of $E$ at our geometric point is the cone of the map $L_{A/R} \otimes C \to L_{A \otimes_R B/R} \otimes C$. Therefore the results of the lemma follow from the case of rings, i.e., Lemma \ref{lemma-tensor-product}.
Consider the short exact sequence of sheaves of Lemma \ref{lemma-triangle-ses} and apply the derived functor $L\pi_!$ to obtain a distinguished triangle $$ L\pi_!(g_1^{-1}\Omega_1 \otimes_{\underline{B}} \underline{C}) \to L\pi_!(g_2^{-1}\Omega_2) \to L\pi_!(g_3^{-1}\Omega_3) \to L\pi_!(g_1^{-1}\Omega_1 \otimes_{\underline{B}} \underline{C})[1] $$ in $D(C)$. Using Lemmas \ref{lemma-triangle-compute-lower-shriek} and \ref{lemma-compute-cotangent-complex} we see that the second and third terms agree with $L_{C/A}$ and $L_{C/B}$ and the first one equals $$ L\pi_{1, !}(\Omega_1 \otimes_{\underline{B}} \underline{C}) = L\pi_{1, !}(\Omega_1) \otimes_B^\mathbf{L} C = L_{B/A} \otimes_B^\mathbf{L} C $$ The first equality by Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-change-of-rings} (and flatness of $\Omega_1$ as a sheaf of modules over $\underline{B}$) and the second by Lemma \ref{lemma-compute-cotangent-complex}.
Choose a surjection $P = A[x_1, \ldots, x_n] \to B$ with kernel $J$. By Lemma \ref{lemma-relation-with-naive-cotangent-complex} we see that $J/J^2 \to \bigoplus B\text{d}x_i$ is quasi-isomorphic to $\tau_{\geq -1}L_{B/A}$. Note that $J/J^2$ is finite projective (More on Algebra, Lemma \ref{more-algebra-lemma-quasi-regular-ideal-finite-projective}), hence $\tau_{\geq -1}L_{B/A}$ is a perfect complex with tor amplitude in $[-1, 0]$. Thus it suffices to show that $H^i(L_{B/A}) = 0$ for $i \not \in [-1, 0]$. This follows from (\ref{equation-triangle}) $$ L_{P/A} \otimes_P^\mathbf{L} B \to L_{B/A} \to L_{B/P} \to L_{P/A} \otimes_P^\mathbf{L} B[1] $$ and Lemma \ref{lemma-mod-Koszul-regular-ideal} to see that $H^i(L_{B/P})$ is zero unless $i \in \{-1, 0\}$. (We also use Lemma \ref{lemma-cotangent-complex-polynomial-algebra} for the term on the left.)
In fact, this follows immediately from Lemma \ref{lemma-ML-cohomology-powers-ideal}. We spell out the details. Set $M = H^p(X, \mathcal{F})$ and $M_n = H^p(X, \mathcal{F}/I^n\mathcal{F})$. Denote $N_n = \Im(M \to M_n)$. By the description of the limit in Homology, Section \ref{homology-section-inverse-systems} we have $$ \lim_n M_n = \{(x_n) \in \prod M_n \mid \varphi_i(x_n) = x_{n - 1}, \ n = 2, 3, \ldots\} $$ Pick an element $x = (x_n) \in \lim_n M_n$. By Lemma \ref{lemma-ML-cohomology-powers-ideal} part (3) we have $x_n \in N_n$ for all $n$ since by definition $x_n$ is the image of some $x_{n + m} \in M_{n + m}$ for all $m$. By Lemma \ref{lemma-ML-cohomology-powers-ideal} part (1) we see that there exists a factorization $$ M \to N_n \to M/I^{n - c_1}M $$ of the reduction map. Denote $y_n \in M/I^{n - c_1}M$ the image of $x_n$ for $n \geq c_1$. Since for $n' \geq n$ the composition $M \to M_{n'} \to M_n$ is the given map $M \to M_n$ we see that $y_{n'}$ maps to $y_n$ under the canonical map $M/I^{n' - c_1}M \to M/I^{n - c_1}M$. Hence $y = (y_{n + c_1})$ defines an element of $\lim_n M/I^nM$. We omit the verification that $y$ maps to $x$ under the map $$ M^\wedge = \lim_n M/I^nM \longrightarrow \lim_n M_n $$ of the lemma. We also omit the verification on topologies.
Since formation of $Rf_*$ commutes with \'etale localization (Properties of Spaces, Lemma \ref{spaces-properties-lemma-pushforward-etale-base-change-modules}) we may replace $Y$ by $V$ and assume $Y = V$ is affine. Consider the Leray spectral sequence $E_2^{p, q} = H^p(Y, R^qf_*\mathcal{F})$ converging to $H^{p + q}(X, \mathcal{F})$, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-Leray}. By Lemma \ref{lemma-higher-direct-image} we see that the sheaves $R^qf_*\mathcal{F}$ are quasi-coherent. By Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherent-affine-cohomology-zero} we see that $E_2^{p, q} = 0$ when $p > 0$. Hence the spectral sequence degenerates at $E_2$ and we win.
By Properties of Spaces, Lemma \ref{spaces-properties-lemma-pushforward-etale-base-change} we may compute the higher direct images on an \'etale cover of $Y$. Hence we may assume $Y$ is a scheme. This implies that $X$ is a scheme (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-integral-local}). In this case we may apply \'Etale Cohomology, Lemma \ref{etale-cohomology-lemma-what-integral}. For the finite case the reader may wish to consult the less technical \'Etale Cohomology, Proposition \ref{etale-cohomology-proposition-finite-higher-direct-image-zero}.
Choose an \'etale neighbourhood $(V, \overline{v})$ of $\overline{y}$. Then the stalk $(f_*\mathcal{F})_{\overline{y}}$ is the stalk of $f_*\mathcal{F}|_V$ at $\overline{v}$. By Properties of Spaces, Lemma \ref{spaces-properties-lemma-pushforward-etale-base-change} we may replace $Y$ by $V$ and $X$ by $X \times_Y V$. Then $Z \to X$ is a finite morphism of schemes and the result is \'Etale Cohomology, Proposition \ref{etale-cohomology-proposition-finite-higher-direct-image-zero}.
The map is the map adjoint to the map $$ f^*\mathcal{G} \otimes_\mathcal{A} f^* f_*\mathcal{F} = f^*(\mathcal{G} \otimes_\mathcal{B} f_*\mathcal{F}) \longrightarrow f^*\mathcal{G} \otimes_\mathcal{A} \mathcal{F} $$ coming from $\text{id} : f^*\mathcal{G} \to f^*\mathcal{G}$ and the adjunction map $f^* f_*\mathcal{F} \to \mathcal{F}$. To see this map is an isomorphism, we may check on stalks (Properties of Spaces, Theorem \ref{spaces-properties-theorem-exactness-stalks}). Let $\overline{y}$ be a geometric point of $Y$ and let $\overline{x}_1, \ldots, \overline{x}_n$ be the geometric points of $X$ lying over $\overline{y}$. Working out what our maps does on stalks, we see that we have to show $$ \mathcal{G}_{\overline{y}} \otimes_{\mathcal{B}_{\overline{y}}} \left( \bigoplus\nolimits_{i = 1, \ldots, n} \mathcal{F}_{\overline{x}_i} \right) = \bigoplus\nolimits_{i = 1, \ldots, n} (\mathcal{G}_{\overline{y}} \otimes_{\mathcal{B}_{\overline{x}}} \mathcal{A}_{\overline{x}_i}) \otimes_{\mathcal{A}_{\overline{x}_i}} \mathcal{F}_{\overline{x}_i} $$ which holds true. Here we have used that taking tensor products commutes with taking stalks, the behaviour of stalks under pullback Properties of Spaces, Lemma \ref{spaces-properties-lemma-stalk-pullback}, and the behaviour of stalks under pushforward along a closed immersion Lemma \ref{lemma-stalk-push-finite}.
Since $f_*$ is exact (Lemma \ref{lemma-finite-higher-direct-image-zero}) the functor $Rf_*$ is computed by applying $f_*$ to any representative complex. Choose a complex $\mathcal{K}^\bullet$ of $\mathcal{B}$-modules representing $K$ which is K-flat with flat terms, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-K-flat-resolution}. Then $f^*\mathcal{K}^\bullet$ is K-flat with flat terms, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-pullback-K-flat}. Choose any complex $\mathcal{M}^\bullet$ of $\mathcal{A}$-modules representing $M$. Then we have to show $$ \text{Tot}(\mathcal{K}^\bullet \otimes_\mathcal{B} f_*\mathcal{M}^\bullet) = f_*\text{Tot}(f^*\mathcal{K}^\bullet \otimes_\mathcal{A} \mathcal{M}^\bullet) $$ because by our choices these complexes represent the right and left hand side of the formula in the lemma. Since $f_*$ commutes with direct sums (for example by the description of the stalks in Lemma \ref{lemma-stalk-push-finite}), this reduces to the equalities $$ \mathcal{K}^n \otimes_\mathcal{B} f_*\mathcal{M}^m = f_*(f^*\mathcal{K}^n \otimes_\mathcal{A} \mathcal{M}^m) $$ which are true by Lemma \ref{lemma-finite-rings}.
This follows from Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-colim-works-over-collection}. Namely, let $\mathcal{B} \subset \Ob(X_{spaces, \etale})$ be the set of quasi-compact and quasi-separated spaces \'etale over $X$. Note that if $U \in \mathcal{B}$ then, because $U$ is quasi-compact, the collection of finite coverings $\{U_i \to U\}$ with $U_i \in \mathcal{B}$ is cofinal in the set of coverings of $U$ in $X_{spaces, \etale}$. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-quasi-separated-permanence} the set $\mathcal{B}$ satisfies all the assumptions of Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-colim-works-over-collection}. Since $X \in \mathcal{B}$ we win.
Recall that $R^pf_*\mathcal{F}$ is the sheaf on $Y_{spaces, \etale}$ associated to $V \mapsto H^p(V \times_Y X, \mathcal{F})$, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-higher-direct-images} and Properties of Spaces, Lemma \ref{spaces-properties-lemma-functoriality-etale-site}. Recall that the colimit is the sheaf associated to the presheaf colimit. Hence we can apply Lemma \ref{lemma-colimits} to $H^p(V \times_Y X, -)$ where $V$ is affine to conclude (because when $V$ is affine, then $V \times_Y X$ is quasi-compact and quasi-separated). Strictly speaking this also uses Properties of Spaces, Lemma \ref{spaces-properties-lemma-alternative} to see that there exist enough affine objects.
Choose an affine scheme $U$ and a surjective \'etale morphism $U \to X$. Set $R = U \times_X U$. Note that $R$ is a quasi-compact (as $X$ is quasi-separated and $U$ quasi-compact) and separated (as $U$ is separated) scheme. Hence we have $$ \colim_i \Hom_U(\mathcal{G}|_U, \mathcal{F}_i|_U) = \Hom_U(\mathcal{G}|_U, \colim_i \mathcal{F}_i|_U). $$ by Modules, Lemma \ref{modules-lemma-finite-presentation-quasi-compact-colimit} (and the material on restriction to schemes \'etale over $X$, see Properties of Spaces, Sections \ref{spaces-properties-section-quasi-coherent} and \ref{spaces-properties-section-properties-modules}). Similarly for $R$. Since $\QCoh(\mathcal{O}_X) = \QCoh(U, R, s, t, c)$ (see Properties of Spaces, Proposition \ref{spaces-properties-proposition-quasi-coherent}) the result follows formally.
Recall that we have the quasi-isomorphism $K^\bullet \to \underline{\mathbf{Z}}[0]$, see (\ref{equation-quasi-isomorphism}). Choose an injective resolution $\mathcal{F} \to \mathcal{I}^\bullet$ in $\textit{Ab}(X_\etale)$. Consider the double complex $\Hom(K^\bullet, \mathcal{I}^\bullet)$ with terms $\Hom(K^p, \mathcal{I}^q)$. The differential $d_1^{p, q} : A^{p, q} \to A^{p + 1, q}$ is the one coming from the differential $K^{p + 1} \to K^p$ and the differential $d_2^{p, q} : A^{p, q} \to A^{p, q + 1}$ is the one coming from the differential $\mathcal{I}^q \to \mathcal{I}^{q + 1}$. Denote $\text{Tot}(\Hom(K^\bullet, \mathcal{I}^\bullet))$ the associated total complex, see Homology, Section \ref{homology-section-double-complexes}. We will use the two spectral sequences $({}'E_r, {}'d_r)$ and $({}''E_r, {}''d_r)$ associated to this double complex, see Homology, Section \ref{homology-section-double-complex}. \medskip\noindent Because $K^\bullet$ is a resolution of $\underline{\mathbf{Z}}$ we see that the complexes $$ \Hom(K^\bullet, \mathcal{I}^q) : \Hom(K^0, \mathcal{I}^q) \to \Hom(K^1, \mathcal{I}^q) \to \Hom(K^2, \mathcal{I}^q) \to \ldots $$ are acyclic in positive degrees and have $H^0$ equal to $\Gamma(X, \mathcal{I}^q)$. Hence by Homology, Lemma \ref{homology-lemma-double-complex-gives-resolution} the natural map $$ \mathcal{I}^\bullet(X) \longrightarrow \text{Tot}(\Hom(K^\bullet, \mathcal{I}^\bullet)) $$ is a quasi-isomorphism of complexes of abelian groups. In particular we conclude that $H^n(\text{Tot}(\Hom(K^\bullet, \mathcal{I}^\bullet))) = H^n(X, \mathcal{F})$. \medskip\noindent The map $\check{\mathcal{C}}^\bullet_{alt}(f, \mathcal{F}) \to R\Gamma(X, \mathcal{F})$ of the lemma is the composition of $\check{\mathcal{C}}^\bullet_{alt}(f, \mathcal{F}) \to \text{Tot}(\Hom(K^\bullet, \mathcal{I}^\bullet))$ with the inverse of the displayed quasi-isomorphism. \medskip\noindent Finally, consider the spectral sequence $({}'E_r, {}'d_r)$. We have $$ E_1^{p, q} = q\text{th cohomology of } \Hom(K^p, \mathcal{I}^0) \to \Hom(K^p, \mathcal{I}^1) \to \Hom(K^p, \mathcal{I}^2) \to \ldots $$ This proves the lemma.