hcju/stacksqa huggingface dataset:
Write $C = B[E]$ for some set $E$. Choose a resolution $P_\bullet \to B$ of $B$ over $A$. For every $n$ consider the object $U_n = (P_n \to B, P_n[E] \to C)$ of $\mathcal{C}_{C/B/A}$. Then $U_\bullet$ is a cosimplicial object of $\mathcal{C}_{C/B/A}$. Note that $u_3(U_\bullet)$ is the constant cosimplicial object of $\mathcal{C}_{C/B}$ with value $(C \to C)$. We will prove that the object $U_\bullet$ of $\mathcal{C}_{C/B/A}$ satisfies the hypotheses of Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-compute-by-cosimplicial-resolution}. This implies the lemma as it shows that $L\pi_!(g_3^{-1}\mathcal{F})$ is computed by the constant simplicial abelian group $\mathcal{F}(C \to C)$ which is the value of $L\pi_{3, !}\mathcal{F} = \pi_{3, !}\mathcal{F}$ by Lemma \ref{lemma-pi-lower-shriek-polynomial-algebra}. \medskip\noindent Let $U = (\beta : P \to B, \gamma : Q \to C)$ be an object of $\mathcal{C}_{C/B/A}$. We may write $P = A[S]$ and $Q = A[S \amalg T]$ by the definition of our category $\mathcal{C}_{C/B/A}$. We have to show that $$ \Mor_{\mathcal{C}_{C/B/A}}(U_\bullet, U) $$ is homotopy equivalent to a singleton simplicial set $*$. Observe that this simplicial set is the product $$ \prod\nolimits_{s \in S} F_s \times \prod\nolimits_{t \in T} F'_t $$ where $F_s$ is the corresponding simplicial set for $U_s = (A[\{s\}] \to B, A[\{s\}] \to C)$ and $F'_t$ is the corresponding simplicial set for $U_t = (A \to B, A[\{t\}] \to C)$. Namely, the object $U$ is the product $\prod U_s \times \prod U_t$ in $\mathcal{C}_{C/B/A}$. It suffices each $F_s$ and $F'_t$ is homotopy equivalent to $*$, see Simplicial, Lemma \ref{simplicial-lemma-products-homotopy}. The case of $F_s$ follows as $P_\bullet \to B$ is a trivial Kan fibration (as a resolution) and $F_s$ is the fibre of this map over $\beta(s)$. (Use Simplicial, Lemmas \ref{simplicial-lemma-trivial-kan-base-change} and \ref{simplicial-lemma-trivial-kan-homotopy}). The case of $F'_t$ is more interesting. Here we are saying that the fibre of $$ P_\bullet[E] \longrightarrow C = B[E] $$ over $\gamma(t) \in C$ is homotopy equivalent to a point. In fact we will show this map is a trivial Kan fibration. Namely, $P_\bullet \to B$ is a trivial can fibration. For any ring $R$ we have $$ R[E] = \colim_{\Sigma \subset \text{Map}(E, \mathbf{Z}_{\geq 0})\text{ finite}} \prod\nolimits_{I \in \Sigma} R $$ (filtered colimit). Thus the displayed map of simplicial sets is a filtered colimit of trivial Kan fibrations, whence a trivial Kan fibration by Simplicial, Lemma \ref{simplicial-lemma-filtered-colimit-trivial-kan}.
According to the discussion above (i.e., using Lemma \ref{lemma-flat-base-change}) and Lemma \ref{lemma-compute-cotangent-complex} we have to show that the sheaf given by the rule $(P \to B) \mapsto \Omega_{P/A} \otimes_P B$ on $\mathcal{C}_{B/A}$ is the pullback of the sheaf given by the rule $(P \to B) \mapsto \Omega_{P/A'} \otimes_P B$. The pullback functor $g^{-1}$ is given by precomposing with the functor $u : \mathcal{C}_{B/A} \to \mathcal{C}_{B/A'}$, $(P \to B) \mapsto (P \otimes_A A' \to B)$. Thus we have to show that $$ \Omega_{P/A} \otimes_P B = \Omega_{P \otimes_A A'/A'} \otimes_{(P \otimes_A A')} B $$ By Algebra, Lemma \ref{algebra-lemma-differentials-base-change} the right hand side is equal to $$ (\Omega_{P/A} \otimes_A A') \otimes_{(P \otimes_A A')} B $$ Since $P$ is a polynomial algebra over $A$ the module $\Omega_{P/A}$ is free and the equality is obvious.
By Lemma \ref{lemma-flat-base-change-cotangent-complex} we see that $L_{B/A} \otimes_B^\mathbf{L} (B \otimes_A B) = L_{B \otimes_A B/B}$. Now we use the distinguished triangle (\ref{equation-triangle}) $$ L_{B \otimes_A B/B} \otimes^\mathbf{L}_{(B \otimes_A B)} B \to L_{B/B} \to L_{B/B \otimes_A B} \to L_{B \otimes_A B/B} \otimes^\mathbf{L}_{(B \otimes_A B)} B[1] $$ associated to the ring maps $B \to B \otimes_A B \to B$ and the vanishing of $L_{B/B}$ (Lemma \ref{lemma-cotangent-complex-polynomial-algebra}) and $L_{B/B \otimes_A B}$ (assumed) to see that $$ 0 = L_{B \otimes_A B/B} \otimes^\mathbf{L}_{(B \otimes_A B)} B = L_{B/A} \otimes_B^\mathbf{L} (B \otimes_A B) \otimes^\mathbf{L}_{(B \otimes_A B)} B = L_{B/A} $$ as desired.
In case (1) we may apply Lemma \ref{lemma-derived-diagonal} to the surjective flat ring map $B \otimes_A B \to B$ to conclude that $L_{B/B \otimes_A B} = 0$ and then we use Lemma \ref{lemma-bootstrap} to conclude. The cases (2) -- (5) are each special cases of (1). Part (6) follows from Lemma \ref{lemma-colimit-cotangent-complex}. Parts (7) and (8) follows from the fact that (strict) henselizations are filtered colimits of \'etale ring extensions of $A$, see Algebra, Lemmas \ref{algebra-lemma-henselization-different} and \ref{algebra-lemma-strict-henselization-different}.
Lemma \ref{lemma-localize-on-top} shows that $L_{T^{-1}B/A} = L_{B/A} \otimes_B T^{-1}B$ and Lemma \ref{lemma-localize-at-bottom} shows that $L_{T^{-1}B/A} = L_{T^{-1}B/S^{-1}A}$.
The complexes $L_{A^h/A}$, $L_{A^{sh}/A}$, $L_{B^h/B}$, and $L_{B^{sh}/B}$ are all zero by Lemma \ref{lemma-when-zero}. Using the fundamental distinguished triangle (\ref{equation-triangle}) for $A \to B \to B^h$ we obtain $L_{B^h/A} = L_{B/A} \otimes_B^\mathbf{L} B^h$. Using the fundamental triangle for $A \to A^h \to B^h$ we obtain $L_{B^h/A^h} = L_{B^h/A}$. Similarly for strict henselizations.
We have the agreement in cohomological degree $0$ by Lemma \ref{lemma-identify-H0}. Thus it suffices to prove the other cohomology groups are zero. It suffices to prove this locally on $\Spec(B)$ as $L_{B_g/A} = (L_{B/A})_g$ for $g \in B$ by Lemma \ref{lemma-localize-on-top}. Thus we may assume that $A \to B$ is standard smooth (Algebra, Lemma \ref{algebra-lemma-smooth-syntomic}), i.e., that we can factor $A \to B$ as $A \to A[x_1, \ldots, x_n] \to B$ with $A[x_1, \ldots, x_n] \to B$ \'etale. In this case Lemmas \ref{lemma-when-zero} and Lemma \ref{lemma-localize-on-top} show that $L_{B/A} = L_{A[x_1, \ldots, x_n]/A} \otimes B$ whence the conclusion by Lemma \ref{lemma-cotangent-complex-polynomial-algebra}.
Let $\mathcal{A}$ be the category of $\mathbf{F}_p$-algebra maps $A \to B$. Let $\mathcal{S}$ be the category of pairs $(A, E)$ where $A$ is an $\mathbf{F}_p$-algebra and $E$ is a set. Consider the adjoint functors $$ V : \mathcal{A} \to \mathcal{S}, \quad (A \to B) \mapsto (A, B) $$ and $$ U : \mathcal{S} \to \mathcal{A}, \quad (A, E) \mapsto (A \to A[E]) $$ Let $X$ be the simplicial object in  in the category of functors from $\mathcal{A}$ to $\mathcal{A}$ constructed in Simplicial, Section \ref{simplicial-section-standard}. It is clear that $P_\bullet = X(A \to B)$ because if we fix $A$ then. \medskip\noindent Set $Y = U \circ V$. Recall that $X$ is constructed from $Y$ and certain maps and has terms $X_n = Y \circ \ldots \circ Y$ with $n + 1$ terms; the construction is given in Simplicial, Example \ref{simplicial-example-godement} and please see proof of Simplicial, Lemma \ref{simplicial-lemma-standard-simplicial} for details. \medskip\noindent Let $f : \text{id}_\mathcal{A} \to \text{id}_\mathcal{A}$ be the Frobenius endomorphism of the identity functor. In other words, we set $f_{A \to B} = (F_A, F_B) : (A \to B) \to (A \to B)$. Then our two maps on $X(A \to B)$ are given by the natural transformations $f \star 1_X$ and $1_X \star f$. Details omitted. Thus we conclude by Simplicial, Lemma \ref{simplicial-lemma-godement-before-after}.
Let $P_\bullet$ be the standard resolution of $B$ over $A$. By Lemma \ref{lemma-frobenius-homotopy} the map $P_\bullet \to P_\bullet$ induced by $F_A$ and $F_B$ is homotopic to the map $F_{P_\bullet} : P_\bullet \to P_\bullet$ given by Frobenius on each term. Hence we obtain what we want as clearly $F_{P_\bullet}$ induces the zero zero map $\Omega_{P_n/A} \to \Omega_{P_n/A}$ (since the derivative of a $p$th power is zero).
We will show below (using the surjectivity of $A \to B$) that there exists a short exact sequence $$ 0 \to \pi^{-1}(I/I^2) \to \mathcal{J}/\mathcal{J}^2 \to \Omega \to 0 $$ of sheaves on $\mathcal{C}_{B/A}$. Taking $L\pi_!$ and the associated long exact sequence of homology, and using the vanishing of $H_1(\mathcal{C}_{B/A}, \mathcal{J}/\mathcal{J}^2)$ and $H_0(\mathcal{C}_{B/A}, \mathcal{J}/\mathcal{J}^2)$ shown in Remark \ref{remark-make-map} we obtain what we want using Lemma \ref{lemma-pi-lower-shriek-constant-sheaf}. \medskip\noindent What is left is to verify the local statement mentioned above. For every object $U = (P \to B)$ of $\mathcal{C}_{B/A}$ we can choose an isomorphism $P = A[E]$ such that the map $P \to B$ maps each $e \in E$ to zero. Then $J = \mathcal{J}(U) \subset P = \mathcal{O}(U)$ is equal to $J = IP + (e; e \in E)$. The value on $U$ of the short sequence of sheaves above is the sequence $$ 0 \to I/I^2 \to J/J^2 \to \Omega_{P/A} \otimes_P B \to 0 $$ Verification omitted (hint: the only tricky point is that $IP \cap J^2 = IJ$; which follows for example from More on Algebra, Lemma \ref{more-algebra-lemma-conormal-sequence-H1-regular}).
Consider $P = A[B] \to B$ with kernel $I$. The naive cotangent complex $\NL_{B/A}$ of $B$ over $A$ is the complex $I/I^2 \to \Omega_{P/A} \otimes_P B$, see Algebra, Definition \ref{algebra-definition-naive-cotangent-complex}. Observe that in (\ref{equation-comparison-map}) we have already constructed a canonical map $$ c : \NL_{B/A} \longrightarrow \tau_{\geq -1}L_{B/A} $$ Consider the distinguished triangle (\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] $$ associated to the ring maps $A \to A[B] \to B$. We know that $L_{P/A} = \Omega_{P/A}[0] = \NL_{P/A}$ in $D(P)$ (Lemma \ref{lemma-cotangent-complex-polynomial-algebra} and Algebra, Lemma \ref{algebra-lemma-NL-polynomial-algebra}) and that $\tau_{\geq -1}L_{B/P} = I/I^2[1] = \NL_{B/P}$ in $D(B)$ (Lemma \ref{lemma-surjection} and Algebra, Lemma \ref{algebra-lemma-NL-surjection}). To show $c$ is a quasi-isomorphism it suffices by Algebra, Lemma \ref{algebra-lemma-exact-sequence-NL} and the long exact cohomology sequence associated to the distinguished triangle to show that the maps $L_{P/A} \to L_{B/A} \to L_{B/P}$ are compatible on cohomology groups with the corresponding maps $\NL_{P/A} \to \NL_{B/A} \to \NL_{B/P}$ of the naive cotangent complex. We omit the verification.
We drop the subscript ${}_{\underline{B}}$ from tensor products, wedge powers, and symmetric powers. We will prove the lemma by induction on $k$. The cases $k = 0, 1$ follow from the assumptions. If $k > 1$ consider the exact complex $$ \ldots \to \wedge^2\mathcal{F} \otimes \text{Sym}^{k - 2}\mathcal{F} \to \mathcal{F} \otimes \text{Sym}^{k - 1}\mathcal{F} \to \text{Sym}^k\mathcal{F} \to 0 $$ with differentials as in the Koszul complex. If we think of this as a resolution of $\text{Sym}^k\mathcal{F}$, then this gives a first quadrant spectral sequence $$ E_1^{p, q} = H_p(\mathcal{C}, \wedge^{q + 1}\mathcal{F} \otimes \text{Sym}^{k - q - 1}\mathcal{F}) \Rightarrow H_{p + q}(\mathcal{C}, \text{Sym}^k(\mathcal{F})) $$ By Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-eilenberg-zilber} we have $$ L\pi_!(\wedge^{q + 1}\mathcal{F} \otimes \text{Sym}^{k - q - 1}\mathcal{F}) = L\pi_!(\wedge^{q + 1}\mathcal{F}) \otimes_B^\mathbf{L} L\pi_!(\text{Sym}^{k - q - 1}\mathcal{F})) $$ It follows (from the construction of derived tensor products) that the induction hypothesis combined with the vanishing of $H_0(\mathcal{C}, \wedge^{q + 1}(\mathcal{F})) = 0$ will prove what we want. This is true because $\wedge^{q + 1}(\mathcal{F})$ is a quotient of $\mathcal{F}^{\otimes q + 1}$ and $H_0(\mathcal{C}, \mathcal{F}^{\otimes q + 1})$ is a quotient of $H_0(\mathcal{C}, \mathcal{F})^{\otimes q + 1}$ which is zero.
There are several ways to prove this. For example one can explicitly construct a resolution of $B$ over $A$ and compute. We will use (\ref{equation-triangle}). Namely, consider the distinguished triangle $$ L_{\mathbf{Z}[x_1, \ldots, x_n]/\mathbf{Z}} \otimes_{\mathbf{Z}[x_1, \ldots, x_n]} \mathbf{Z} \to L_{\mathbf{Z}/\mathbf{Z}} \to L_{\mathbf{Z}/\mathbf{Z}[x_1, \ldots, x_n]}\to L_{\mathbf{Z}[x_1, \ldots, x_n]/\mathbf{Z}} \otimes_{\mathbf{Z}[x_1, \ldots, x_n]} \mathbf{Z}[1] $$ The complex $L_{\mathbf{Z}[x_1, \ldots, x_n]/\mathbf{Z}}$ is quasi-isomorphic to $\Omega_{\mathbf{Z}[x_1, \ldots, x_n]/\mathbf{Z}}$ by Lemma \ref{lemma-cotangent-complex-polynomial-algebra}. The complex $L_{\mathbf{Z}/\mathbf{Z}}$ is zero in $D(\mathbf{Z})$ by Lemma \ref{lemma-when-zero}. Thus we see that $L_{B/A}$ has only one nonzero cohomology group which is as described in the lemma by Lemma \ref{lemma-surjection}.
Let $f_1, \ldots, f_r \in I$ be a Koszul regular sequence generating $I$. Consider the ring map $\mathbf{Z}[x_1, \ldots, x_r] \to A$ sending $x_i$ to $f_i$. Since $x_1, \ldots, x_r$ is a regular sequence in $\mathbf{Z}[x_1, \ldots, x_r]$ we see that the Koszul complex on $x_1, \ldots, x_r$ is a free resolution of $\mathbf{Z} = \mathbf{Z}[x_1, \ldots, x_r]/(x_1, \ldots, x_r)$ over $\mathbf{Z}[x_1, \ldots, x_r]$ (see More on Algebra, Lemma \ref{more-algebra-lemma-regular-koszul-regular}). Thus the assumption that $f_1, \ldots, f_r$ is Koszul regular exactly means that $B = A \otimes_{\mathbf{Z}[x_1, \ldots, x_r]}^\mathbf{L} \mathbf{Z}$. Hence $L_{B/A} = L_{\mathbf{Z}/\mathbf{Z}[x_1, \ldots, x_r]} \otimes_\mathbf{Z}^\mathbf{L} B$ by Lemmas \ref{lemma-flat-base-change-cotangent-complex} and \ref{lemma-special-case}.
The first two statements are immediate from Lemma \ref{lemma-flat-base-change-cotangent-complex}. The last statement follows as $L_{A/R}$ is a complex of free $A$-modules, hence $L_{A/R} \otimes_A^\mathbf{L} (A \otimes_R B)$ is represented by $L_{A/R} \otimes_A (A \otimes_R B) = L_{A/R} \otimes_R B$
We use the description of $E$ as the cone on $L_{B/R} \otimes_B^\mathbf{L} (A \otimes_R B) \to L_{A \otimes_R B/A}$. By Lemma \ref{lemma-compare-higher} the canonical truncations $\tau_{\geq -2}L_{B/R}$ and $\tau_{\geq -2}L_{A \otimes_R B/A}$ are computed by the Lichtenbaum-Schlessinger complex (\ref{equation-lichtenbaum-schlessinger}). These isomorphisms are compatible with functoriality (Remark \ref{remark-functoriality-lichtenbaum-schlessinger}). Thus in this proof we work with the Lichtenbaum-Schlessinger complexes. \medskip\noindent Choose a polynomial algebra $P$ over $R$ and a surjection $P \to B$. Choose generators $f_t \in P$, $t \in T$ of the kernel of this surjection. Let $Rel \subset F = \bigoplus_{t \in T} P$ be the kernel of the map $F \to P$ which maps the basis vector corresponding to $t$ to $f_t$. Set $P_A = A \otimes_R P$ and $F_A = A \otimes_R F = P_A \otimes_P F$. Let $Rel_A$ be the kernel of the map $F_A \to P_A$. Using the exact sequence $$ 0 \to Rel \to F \to P \to B \to 0 $$ and standard short exact sequences for Tor we obtain an exact sequence $$ A \otimes_R Rel \to Rel_A \to \text{Tor}_1^R(A, B) \to 0 $$ Note that $P_A \to A \otimes_R B$ is a surjection whose kernel is generated by the elements $1 \otimes f_t$ in $P_A$. Denote $TrivRel_A \subset Rel_A$ the $P_A$-submodule generated by the elements $(\ldots, 1 \otimes f_{t'}, 0, \ldots, 0, - 1 \otimes f_t \otimes 1, 0, \ldots)$. Since $TrivRel \otimes_R A \to TrivRel_A$ is surjective, we find a canonical exact sequence $$ A \otimes_R (Rel/TrivRel) \to Rel_A/TrivRel_A \to \text{Tor}_1^R(A, B) \to 0 $$ The map of Lichtenbaum-Schlessinger complexes is given by the diagram $$ \xymatrix{ Rel_A/TrivRel_A \ar[r] & F_A \otimes_{P_A} (A \otimes_R B) \ar[r] & \Omega_{P_A/A \otimes_R B} \otimes_{P_A} (A \otimes_R B) \\ Rel/TrivRel \ar[r] \ar[u]_{-2} & F \otimes_P B \ar[r] \ar[u]_{-1} & \Omega_{P/A} \otimes_P B \ar[u]_0 } $$ Note that vertical maps $-1$ and $-0$ induce an isomorphism after applying the functor $A \otimes_R - = P_A \otimes_P -$ to the source and the vertical map $-2$ gives exactly the map whose cokernel is the desired Tor module as we saw above.
Via the identifications $\NL_{B/A} = \tau_{\geq -1}L_{B/A}$ (Lemma \ref{lemma-relation-with-naive-cotangent-complex}) and $H^0(L_{B/A}) = \Omega_{B/A}$ (Lemma \ref{lemma-identify-H0}) we have seen parts (2) and (3) in Deformation Theory, Lemmas \ref{defos-lemma-huge-diagram} and \ref{defos-lemma-choices}. \medskip\noindent Proof of (1). We will use the results of Deformation Theory, Lemma \ref{defos-lemma-extensions-of-rings} without further mention. Let $\alpha \in \Ext^1_A(\NL_{A/\mathbf{Z}}, I)$ be the element corresponding to the isomorphism class of $A'$. The existence of $B'$ corresponds to an element $\beta \in \Ext_B^1(\NL_{B/\mathbf{Z}}, N)$ which maps to the image of $\alpha$ in $\Ext^1_A(\NL_{A/\mathbf{Z}}, N)$. Note that $$ \Ext^1_A(\NL_{A/\mathbf{Z}}, N) = \Ext^1_A(L_{A/\mathbf{Z}}, N) = \Ext^1_B(L_{A/\mathbf{Z}} \otimes_A^\mathbf{L} B, N) $$ and $$ \Ext^1_B(\NL_{B/\mathbf{Z}}, N) = \Ext^1_B(L_{B/\mathbf{Z}}, N) $$ by Lemma \ref{lemma-relation-with-naive-cotangent-complex}. Since the distinguished triangle (\ref{equation-triangle}) for $\mathbf{Z} \to A \to B$ gives rise to a long exact sequence $$ \ldots \to \Ext^1_B(L_{B/\mathbf{Z}}, N) \to \Ext^1_B(L_{A/\mathbf{Z}} \otimes_A^\mathbf{L} B, N) \to \Ext^2_B(L_{B/A}, N) \to \ldots $$ we obtain the result with $\xi$ the image of $\alpha$.
Let $\mathcal{C}'$ be the site we get by endowing $\mathcal{C}$ with the chaotic topology (presheaves are sheaves). There is a morphism of topoi $f : \Sh(\mathcal{C}) \to \Sh(\mathcal{C}')$ where $f_*$ is the inclusion of sheaves into presheaves and $f^{-1}$ is sheafification. By Lemma \ref{lemma-pullback-cotangent-morphism-topoi} it suffices to prove the result for $\mathcal{C}'$, i.e., in case $\mathcal{C}$ has the chaotic topology. \medskip\noindent If $\mathcal{C}$ carries the chaotic topology, then $L_{\mathcal{B}/\mathcal{A}}(U)$ is equal to $L_{\mathcal{B}(U)/\mathcal{A}(U)}$ because $$ \xymatrix{ \mathcal{A}\textit{-Alg} \ar[d]_{\text{sections over }U} \ar[r] & \Sh(\mathcal{C}) \ar@<1ex>[l] \ar[d]^{\text{sections over }U} \\ \mathcal{A}(U)\textit{-Alg} \ar[r] & \textit{Sets} \ar@<1ex>[l] } $$ commutes.
We will use the method described in Remarks \ref{remark-triangle} and \ref{remark-explicit-map} to construct the triangle; we will freely use the results mentioned there. As in those remarks we first construct the triangle in case $\mathcal{B} \to \mathcal{C}$ is an injective map of sheaves of rings. In this case we set \begin{enumerate} \item $\mathcal{P}_\bullet$ is the standard resolution of $\mathcal{B}$ over $\mathcal{A}$, \item $\mathcal{Q}_\bullet$ is the standard resolution of $\mathcal{C}$ over $\mathcal{A}$, \item $\mathcal{R}_\bullet$ is the standard resolution of $\mathcal{C}$ over $\mathcal{B}$, \item $\mathcal{S}_\bullet$ is the standard resolution of $\mathcal{B}$ over $\mathcal{B}$, \item $\overline{\mathcal{Q}}_\bullet = \mathcal{Q}_\bullet \otimes_{\mathcal{P}_\bullet} \mathcal{B}$, and \item $\overline{\mathcal{R}}_\bullet = \mathcal{R}_\bullet \otimes_{\mathcal{S}_\bullet} \mathcal{B}$. \end{enumerate} The distinguished triangle is the distinguished triangle associated to the short exact sequence of simplicial $\mathcal{C}$-modules $$ 0 \to \Omega_{\mathcal{P}_\bullet/\mathcal{A}} \otimes_{\mathcal{P}_\bullet} \mathcal{C} \to \Omega_{\mathcal{Q}_\bullet/\mathcal{A}} \otimes_{\mathcal{Q}_\bullet} \mathcal{C} \to \Omega_{\overline{\mathcal{Q}}_\bullet/\mathcal{B}} \otimes_{\overline{\mathcal{Q}}_\bullet} \mathcal{C} \to 0 $$ The first two terms are equal to the first two terms of the triangle of the statement of the lemma. The identification of the last term with $L_{\mathcal{C}/\mathcal{B}}$ uses the quasi-isomorphisms of complexes $$ L_{\mathcal{C}/\mathcal{B}} = \Omega_{\mathcal{R}_\bullet/\mathcal{B}} \otimes_{\mathcal{R}_\bullet} \mathcal{C} \longrightarrow \Omega_{\overline{\mathcal{R}}_\bullet/\mathcal{B}} \otimes_{\overline{\mathcal{R}}_\bullet} \mathcal{C} \longleftarrow \Omega_{\overline{\mathcal{Q}}_\bullet/\mathcal{B}} \otimes_{\overline{\mathcal{Q}}_\bullet} \mathcal{C} $$ All the constructions used above can first be done on the level of presheaves and then sheafified. Hence to prove sequences are exact, or that map are quasi-isomorphisms it suffices to prove the corresponding statement for the ring maps $\mathcal{A}(U) \to \mathcal{B}(U) \to \mathcal{C}(U)$ which are known. This finishes the proof in the case that $\mathcal{B} \to \mathcal{C}$ is injective. \medskip\noindent In general, we reduce to the case where $\mathcal{B} \to \mathcal{C}$ is injective by replacing $\mathcal{C}$ by $\mathcal{B} \times \mathcal{C}$ if necessary. This is possible by the argument given in Remark \ref{remark-triangle} by Lemma \ref{lemma-compute-L-product-sheaves-rings}.
Let $\mathcal{P}_\bullet$ be the standard resolution of $\mathcal{B}$ over $\mathcal{A}$. Let $\mathcal{I} = \Ker(\mathcal{A}[\mathcal{B}] \to \mathcal{B})$. Recall that $\mathcal{P}_0 = \mathcal{A}[\mathcal{B}]$. The map of the lemma is given by the commutative diagram $$ \xymatrix{ L_{\mathcal{B}/\mathcal{A}} \ar[d] & \ldots \ar[r] & \Omega_{\mathcal{P}_2/\mathcal{A}} \otimes_{\mathcal{P}_2} \mathcal{B} \ar[r] \ar[d] & \Omega_{\mathcal{P}_1/\mathcal{A}} \otimes_{\mathcal{P}_1} \mathcal{B} \ar[r] \ar[d] & \Omega_{\mathcal{P}_0/\mathcal{A}} \otimes_{\mathcal{P}_0} \mathcal{B} \ar[d] \\ \NL_{\mathcal{B}/\mathcal{A}} & \ldots \ar[r] & 0 \ar[r] &  \mathcal{I}/\mathcal{I}^2 \ar[r] & \Omega_{\mathcal{P}_0/\mathcal{A}} \otimes_{\mathcal{P}_0} \mathcal{B} } $$ We construct the downward arrow with target $\mathcal{I}/\mathcal{I}^2$ by sending a local section $\text{d}f \otimes b$ to the class of $(d_0(f) - d_1(f))b$ in $\mathcal{I}/\mathcal{I}^2$. Here $d_i : \mathcal{P}_1 \to \mathcal{P}_0$, $i = 0, 1$ are the two face maps of the simplicial structure. This makes sense as $d_0 - d_1$ maps $\mathcal{P}_1$ into $\mathcal{I} = \Ker(\mathcal{P}_0 \to \mathcal{B})$. We omit the verification that this rule is well defined. Our map is compatible with the differential $\Omega_{\mathcal{P}_1/\mathcal{A}} \otimes_{\mathcal{P}_1} \mathcal{B} \to \Omega_{\mathcal{P}_0/\mathcal{A}} \otimes_{\mathcal{P}_0} \mathcal{B}$ as this differential maps a local section $\text{d}f \otimes b$ to $\text{d}(d_0(f) - d_1(f)) \otimes b$. Moreover, the differential $\Omega_{\mathcal{P}_2/\mathcal{A}} \otimes_{\mathcal{P}_2} \mathcal{B} \to \Omega_{\mathcal{P}_1/\mathcal{A}} \otimes_{\mathcal{P}_1} \mathcal{B}$ maps a local section $\text{d}f \otimes b$ to $\text{d}(d_0(f) - d_1(f) + d_2(f)) \otimes b$ which are annihilated by our downward arrow. Hence a map of complexes. \medskip\noindent To see that our map induces an isomorphism on the cohomology sheaves $H^0$ and $H^{-1}$ we argue as follows. Let $\mathcal{C}'$ be the site with the same underlying category as $\mathcal{C}$ but endowed with the chaotic topology. Let $f : \Sh(\mathcal{C}) \to \Sh(\mathcal{C}')$ be the morphism of topoi whose pullback functor is sheafification. Let $\mathcal{A}' \to \mathcal{B}'$ be the given map, but thought of as a map of sheaves of rings on $\mathcal{C}'$. The construction above gives a map $L_{\mathcal{B}'/\mathcal{A}'} \to \NL_{\mathcal{B}'/\mathcal{A}'}$ on $\mathcal{C}'$ whose value over any object $U$ of $\mathcal{C}'$ is just the map $$ L_{\mathcal{B}(U)/\mathcal{A}(U)} \to \NL_{\mathcal{B}(U)/\mathcal{A}(U)} $$ of Remark \ref{remark-explicit-comparison-map} which induces an isomorphism on $H^0$ and $H^{-1}$. Since $f^{-1}L_{\mathcal{B}'/\mathcal{A}'} = L_{\mathcal{B}/\mathcal{A}}$ (Lemma \ref{lemma-pullback-cotangent-morphism-topoi}) and $f^{-1}\NL_{\mathcal{B}'/\mathcal{A}'} = \NL_{\mathcal{B}/\mathcal{A}}$ (Modules on Sites, Lemma \ref{sites-modules-lemma-pullback-NL}) the lemma is proved.
Set $h = g \circ f$ so that $h^{-1}\mathcal{O}_Z = f^{-1}g^{-1}\mathcal{O}_Z$. By Lemma \ref{lemma-pullback-cotangent-morphism-topoi} we have $f^{-1}L_{Y/Z} = L_{f^{-1}\mathcal{O}_Y/h^{-1}\mathcal{O}_Z}$ and this is a complex of flat $f^{-1}\mathcal{O}_Y$-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}_Z$, $\mathcal{B} = f^{-1}\mathcal{O}_Y$, and $\mathcal{C} = \mathcal{O}_X$.