hcju/stacksqa huggingface dataset:
Our functor has a left adjoint given by $R\Hom(N, -)$ by Lemma \ref{lemma-tensor-hom-adjoint}. By Categories, Lemma \ref{categories-lemma-adjoint-fully-faithful} it suffices to show that for a differential graded $A$-module $M$ the map $$ M \longrightarrow R\Hom(N, M \otimes_A^\mathbf{L} N) $$ is an isomorphism in $D(A, \text{d})$. For this it suffices to show that $$ H^n(M) \longrightarrow \text{Ext}^n_{D(B, \text{d})}(N, M \otimes_A^\mathbf{L} N) $$ is an isomorphism, see Lemma \ref{lemma-derived-restriction-exts}. Since $N$ is a compact object the right hand side commutes with direct sums. Thus by Remark \ref{remark-P-resolution} it suffices to prove this map is an isomorphism for $M = A[k]$. Since $(A[k] \otimes_A^\mathbf{L} N) = N[k]$ by Remark \ref{remark-shift-tensor-no-sign}, assumption (2) on $N$ is that the result holds for these.
For any differential graded $A$-module $M$ there is a canonical map $$ c_M : M \otimes_R R' \longrightarrow M \otimes_A A' $$ Let $P$ be a differential graded $A$-module with property (P). We claim that $c_P$ is an isomorphism and that $P$ is K-flat as a complex of $R$-modules. This will prove all the results stated in the lemma by formal arguments using the definition of derived tensor product in Lemma \ref{lemma-derived-bc} and More on Algebra, Section \ref{more-algebra-section-derived-tensor-product}. \medskip\noindent Let $F_\bullet$ be the filtration on $P$ showing that $P$ has property (P). Note that $c_A$ is an isomorphism and $A$ is K-flat as a complex of $R$-modules by assumption. Hence the same is true for direct sums of shifts of $A$ (you can use More on Algebra, Lemma \ref{more-algebra-lemma-colimit-K-flat} to deal with direct sums if you like). Hence this holds for the complexes $F_{p + 1}P/F_pP$. Since the short exact sequences $$ 0 \to F_pP \to F_{p + 1}P \to F_{p + 1}P/F_pP \to 0 $$ are split exact as sequences of graded modules, we can argue by induction that $c_{F_pP}$ is an isomorphism for all $p$ and that $F_pP$ is K-flat as a complex of $R$-modules (use More on Algebra, Lemma \ref{more-algebra-lemma-K-flat-two-out-of-three}). Finally, using that $P = \colim F_pP$ we conclude that $c_P$ is an isomorphism and that $P$ is K-flat as a complex of $R$-modules (use More on Algebra, Lemma \ref{more-algebra-lemma-colimit-K-flat}).
Write $\mathcal{B} = \text{Mod}^{dg}_{(B, \text{d})}$. The right $A$-module structure on $S$ comes from the map $A \to \Hom_\mathcal{B}(T, T)$ and the composition $\Hom_\mathcal{B}(T, B) \otimes \Hom_\mathcal{B}(T, T) \to \Hom_\mathcal{B}(T, B)$ defined in Example \ref{example-dgm-dg-cat}. Using this multiplication a second time there is a map $$ c_N : N \otimes_B S = \Hom_\mathcal{B}(B, N) \otimes_B \Hom_\mathcal{B}(T, B) \longrightarrow \Hom_\mathcal{B}(T, N) $$ functorial in $N$. Given $N$ we can choose quasi-isomorphisms $P \to N \to I$ where $P$, resp.\ $I$ is a differential graded $B$-module with property (P), resp.\ (I). Then using $c_N$ we obtain a map $P \otimes_B S \to \Hom_\mathcal{B}(T, I)$ between the objects representing $S \otimes_B^\mathbf{L} N$ and $R\Hom(T, N)$. Clearly this defines a transformation of functors $c$ as in the lemma. \medskip\noindent To prove that $c$ is an isomorphism of functors, we may assume $N$ is a differential graded $B$-module which has property (P). Since $T$ defines a compact object in $D(B, \text{d})$ and since both sides of the arrow define exact functors of triangulated categories, we reduce using Lemma \ref{lemma-property-P-sequence} to the case where $N$ has a finite filtration whose graded pieces are direct sums of $B[k]$. Using again that both sides of the arrow are exact functors of triangulated categories and compactness of $T$ we reduce to the case $N = B[k]$. Assumption (2) is exactly the assumption that $c$ is an isomorphism in this case.
Let us define a transformation of functors $$ (- \otimes_A^\mathbf{L} N) \otimes_B^\mathbf{L} N' \longrightarrow - \otimes_A^\mathbf{L} N'' $$ To do this, let $M$ be a differential graded $A$-module with property (P). According to the construction of the functor $- \otimes_A^\mathbf{L} N''$ of the proof of Lemma \ref{lemma-derived-bc} the plain tensor product $M \otimes_A N''$ represents $M \otimes_A^\mathbf{L} N''$ in $D(C, \text{d})$. Then we write $$ M \otimes_A N'' = M \otimes_A (N \otimes_B N') = (M \otimes_A N) \otimes_B N' $$ The module $M \otimes_A N$ represents $M \otimes_A^\mathbf{L} N$ in $D(B, \text{d})$. Choose a quasi-isomorphism $Q \to M \otimes_A N$ where $Q$ is a differential graded $B$-module with property (P). Then $Q \otimes_B N'$ represents $(M \otimes_A^\mathbf{L} N) \otimes_B^\mathbf{L} N'$ in $D(C, \text{d})$. Thus we can define our map via $$ (M \otimes_A^\mathbf{L} N) \otimes_B^\mathbf{L} N' = Q \otimes_B N' \to M \otimes_A N \otimes_B N' = M \otimes_A^\mathbf{L} N'' $$ The construction of this map is functorial in $M$ and compatible with distinguished triangles and direct sums; we omit the details. Consider the property $T$ of objects $M$ of $D(A, \text{d})$  expressing that this map is an isomorphism. Then \begin{enumerate} \item if $T$ holds for $M_i$ then $T$ holds for $\bigoplus M_i$, \item if $T$ holds for $2$-out-of-$3$ in a distinguished triangle, then it holds for the third, and \item $T$ holds for $A[k]$ because here we obtain a shift of the map (\ref{equation-plain-versus-derived}) which we have assumed is an isomorphism. \end{enumerate} Thus by Remark \ref{remark-P-resolution} property $T$ always holds and the proof is complete.
Choose a quasi-isomorphism $P \to (A \otimes_R B)_B$ of differential graded $B$-modules, where $P$ has property (P). Then we have to show that $$ P \otimes_B (B \otimes_R C) \longrightarrow (A \otimes_R B) \otimes_B (B \otimes_R C) $$ is a quasi-isomorphism. Equivalently we are looking at $$ P \otimes_R C \longrightarrow A \otimes_R B \otimes_R C $$ This is a quasi-isomorphism if $C$ is K-flat as a complex of $R$-modules by More on Algebra, Lemma \ref{more-algebra-lemma-K-flat-quasi-isomorphism}.
Let $M$ be a differential graded $E$-module. For every object $U$ of $\mathcal{C}$ the complex $K^\bullet(U)$ is a left differential graded $E$-module as well as a right $\mathcal{O}(U)$-module. The actions commute, so we have a bimodule. Thus, by the constructions in Sections \ref{section-tensor-product} and \ref{section-bimodules} we can form the tensor product $$ M \otimes_E K^\bullet(U) $$ which is a differential graded $\mathcal{O}(U)$-module, i.e., a complex of $\mathcal{O}(U)$-modules. This construction is functorial with respect to $U$, hence we can sheafify to get a complex of $\mathcal{O}$-modules which we denote $$ M \otimes_E K^\bullet $$ Moreover, for each $U$ the construction determines a functor $\text{Mod}^{dg}_{(E, \text{d})} \to \text{Comp}^{dg}(\mathcal{O}(U))$ of differential graded categories by Lemma \ref{lemma-tensor}. It is therefore clear that we obtain a functor as stated in the lemma.
The functor induces a functor between homotopy categories by Lemma \ref{lemma-functorial}. We have to show that $- \otimes_E K^\bullet$ transforms distinguished triangles into distinguished triangles. Suppose that $0 \to K \to L \to M \to 0$ is an admissible short exact sequence of differential graded $E$-modules. Let $s : M \to L$ be a graded $E$-module homomorphism which is left inverse to $L \to M$. Then $s$ defines a map $M \otimes_E K^\bullet \to L \otimes_E K^\bullet$ of graded $\mathcal{O}$-modules (i.e., respecting $\mathcal{O}$-module structure and grading, but not differentials) which is left inverse to $L \otimes_E K^\bullet \to M \otimes_E K^\bullet$. Thus we see that $$ 0 \to K \otimes_E K^\bullet \to L \otimes_E K^\bullet \to M \otimes_E K^\bullet \to 0 $$ is a termwise split short exact sequences of complexes, i.e., a defines a distinguished triangle in $K(\mathcal{O})$.
The right hand side of the arrow is the global derived hom introduced in Cohomology on Sites, Section \ref{sites-cohomology-section-global-RHom} which has the correct cohomology modules. For the left hand side we think of $M$ as a $(R, A)$-bimodule and we have the derived $\Hom$ introduced in Section \ref{section-restriction} which also has the correct cohomology modules. To prove the lemma we may assume $M$ and $N$ are differential graded $E$-modules with property (P); this does not change the left hand side of the arrow by Lemma \ref{lemma-functoriality-derived-restriction}. By Lemma \ref{lemma-compute-derived-restriction} this means that the left hand side of the arrow becomes $\Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(M, N)$. In Lemmas \ref{lemma-tensor-with-complex}, \ref{lemma-tensor-with-complex-homotopy}, and \ref{lemma-tensor-with-complex-derived} we have constructed a functor $$ - \otimes_E K^\bullet : \text{Mod}^{dg}_{(E, \text{d})} \longrightarrow \text{Comp}^{dg}(\mathcal{O}) $$ of differential graded categories and we have shown that $- \otimes_E^\mathbf{L} K^\bullet$ is computed by evaluating this functor on differential graded $E$-modules with property (P). Hence we obtain a map of complexes of $R$-modules $$ \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(M, N) \longrightarrow \Hom_{\text{Comp}^{dg}(\mathcal{O})} (M \otimes_E K^\bullet, N \otimes_E K^\bullet) $$ For any complexes of $\mathcal{O}$-modules $\mathcal{F}^\bullet$, $\mathcal{G}^\bullet$ there is a canonical map $$ \Hom_{\text{Comp}^{dg}(\mathcal{O})} (\mathcal{F}^\bullet, \mathcal{G}^\bullet) = \Gamma(\mathcal{C}, \SheafHom^\bullet(\mathcal{F}^\bullet, \mathcal{G}^\bullet)) \longrightarrow R\Hom_\mathcal{O}(\mathcal{F}^\bullet, \mathcal{G}^\bullet). $$ Combining these maps we obtain the desired map of the lemma.
The statement means that we have $$ \Hom_{D(E, \text{d})}(M, R\Hom(K^\bullet, L^\bullet)) = \Hom_{D(\mathcal{O})}(M \otimes^\mathbf{L}_E K^\bullet, L^\bullet) $$ bifunctorially in $M$ and $L^\bullet$. To see this we may replace $M$ by a differential graded $E$-module $P$ with property (P). We also may replace $L^\bullet$ by a K-injective complex of $\mathcal{O}$-modules $I^\bullet$. The computation of the derived functors given in the lemmas referenced in the statement combined with Lemma \ref{lemma-hom-derived} translates the above into $$ \Hom_{K(\text{Mod}_{(E, \text{d})})} (P, \Hom_\mathcal{B}(K^\bullet, I^\bullet)) = \Hom_{K(\mathcal{O})}(P \otimes_E K^\bullet, I^\bullet) $$ where $\mathcal{B} = \text{Comp}^{dg}(\mathcal{O})$.  There is an evaluation map from right to left functorial in $P$ and $I^\bullet$ (details omitted). Choose a filtration $F_\bullet$ on $P$ as in the definition of property (P). By Lemma \ref{lemma-property-P-sequence} and the fact that both sides of the equation are homological functors in $P$ on $K(\text{Mod}_{(E, \text{d})})$ we reduce to the case where $P$ is replaced by the differential graded $E$-module $\bigoplus F_iP$. Since both sides turn direct sums in the variable $P$ into direct products we reduce to the case where $P$ is one of the differential graded $E$-modules $F_iP$. Since each $F_iP$ has a finite filtration (given by admissible monomorphisms) whose graded pieces are graded projective $E$-modules we reduce to the case where $P$ is a graded projective $E$-module. In this case we clearly have $$ \Hom_{\text{Mod}^{dg}_{(E, \text{d})}} (P, \Hom_\mathcal{B}(K^\bullet, I^\bullet)) = \Hom_{\text{Comp}^{dg}(\mathcal{O})}(P \otimes_E K^\bullet, I^\bullet) $$ as graded $\mathbf{Z}$-modules (because this statement reduces to the case $P = E[k]$ where it is obvious). As the isomorphism is compatible with differentials we conclude.
Because our functor has a left adjoint given by $R\Hom(K^\bullet, -)$ by Lemma \ref{lemma-tensor-with-complex-hom-adjoint} it suffices to show for a differential graded $E$-module $M$ that the map $$ H^0(M) \longrightarrow \Hom_{D(\mathcal{O})}(K^\bullet, M \otimes_E^\mathbf{L} K^\bullet) $$ is an isomorphism. We may assume that $M = P$ is a differential graded $E$-module which has property (P). Since $K^\bullet$ defines a compact object, we reduce using Lemma \ref{lemma-property-P-sequence} to the case where $P$ has a finite filtration whose graded pieces are direct sums of $E[k]$. Again using compactness we reduce to the case $P = E[k]$. The assumption on $K^\bullet$ is that the result holds for these.
Observe that the collection of objects of $D(A, \text{d})$ for which such a pair of integers exists is a saturated, strictly full triangulated subcategory of $D(A, \text{d})$. Thus by Proposition \ref{proposition-compact} it suffices to prove this when $E$ is represented by a differential graded module $P$ which has a finite filtration $F_\bullet$ by differential graded submodules such that $F_iP/F_{i - 1}P$ are finite direct sums of shifts of $A$. Using the compatibility with triangles, we see that it suffices to prove it for $P = A$. In this case $\Hom_{D(A, \text{d})}(A, M) = H^0(M)$ and the result holds with $a = b = 0$.
By Lemma \ref{lemma-tensor-with-compact-fully-faithful} the functor $M \longmapsto M \otimes_A^\mathbf{L} B$ is fully faithful. By Lemma \ref{lemma-tensor-hom-adjoint} the functor $N \longmapsto R\Hom(B, N) = N_A$ is a right adjoint, see Example \ref{example-map-hom-tensor}. It is clear that the kernel of $R\Hom(B, -)$ is zero. Hence the result follows from Derived Categories, Lemma \ref{derived-lemma-fully-faithful-adjoint-kernel-zero}.
By Lemma \ref{lemma-tensor-with-compact-fully-faithful} the functor $M \longmapsto M \otimes_A^\mathbf{L} N$ is fully faithful. By Lemma \ref{lemma-tensor-hom-adjoint} the functor $N' \longmapsto R\Hom(N, N')$ is a right adjoint. By assumption (3) the kernel of $R\Hom(N, -)$ is zero. Hence the result follows from Derived Categories, Lemma \ref{derived-lemma-fully-faithful-adjoint-kernel-zero}.
Let $F : D(A, \text{d}) \to D(B, \text{d})$ be an equivalence. Then $F$ maps compact objects to compact objects. Hence $P = F(A)$ is compact, i.e., (2)(a) holds. Conditions (2)(b) and (2)(c) are immediate from the fact that $F$ is an equivalence. \medskip\noindent Let $P$ be an object as in (2). Represent $P$ by a differential graded module with property (P). Set $$ (E, \text{d}) = \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(P, P) $$ Then $H^0(E) = A$ and $H^k(E) = 0$ for $k \not = 0$ by Lemma \ref{lemma-hom-derived} and assumption (2)(c). Viewing $P$ as a $(E, B)$-bimodule and using Lemma \ref{lemma-tilting-equivalence} and assumption (2)(b) we obtain an equivalence $$ D(E, \text{d}) \to D(B, \text{d}) $$ sending $E$ to $P$. Let $E' \subset E$ be the differential graded $R$-subalgebra with $$ (E')^i = \left\{ \begin{matrix} E^i & \text{if }i < 0 \\ \Ker(E^0 \to E^1) & \text{if }i = 0 \\ 0 & \text{if }i > 0 \end{matrix} \right. $$ Then there are quasi-isomorphisms of differential graded algebras $(A, \text{d}) \leftarrow (E', \text{d}) \rightarrow (E, \text{d})$. Thus we obtain equivalences $$ D(A, \text{d}) \leftarrow D(E', \text{d}) \rightarrow D(E, \text{d}) \rightarrow D(B, \text{d}) $$ by Lemma \ref{lemma-qis-equivalence}.
First we claim we can find $(A_0, \text{d}) \to (B, \text{d})$ having (1) and (2) inducing a surjection on cohomology. Namely, take a graded set $S$ and for each $s \in S$ a homogeneous element $b_s \in \Ker(d : B \to B)$ of degree $\deg(s)$ such that the classes $\overline{b}_s$ in $H^*(B)$ generate $H^*(B)$ as an $R$-module. Then we can set $A_0 = R\langle S \rangle$ with zero differential and $A_0 \to B$ given by mapping $s$ to $b_s$. \medskip\noindent Given $A_0 \to B$ inducing a surjection on cohomology we construct a sequence $$ A_0 \to A_1 \to A_2 \to \ldots B $$ by induction. Given $A_n \to B$ we set $S_n$ be a graded set and for each $s \in S_n$ we let $a_s \in \Ker(A_n \to A_n)$ be a homogeneous element of degree $\deg(s) + 1$ mapping to a class $\overline{a}_s$ in $H^*(A_n)$ which maps to zero in $H^*(B)$. We choose $S_n$ large enough so that the elements $\overline{a}_s$ generate $\Ker(H^*(A_n) \to H^*(B))$ as an $R$-module. Then we set $$ A_{n + 1} = A_n\langle S_n \rangle $$ with differential given by $\text{d}(s) = a_s$ see discussion above. Then each $(A_n, \text{d})$ satisfies (1) and (2), we omit the details. The map $H^*(A_n) \to H^*(B)$ is surjective as this was true for $n = 0$. \medskip\noindent It is clear that $A = \colim A_n$ is a free graded $R$-algebra. It is K-flat by More on Algebra, Lemma \ref{more-algebra-lemma-colimit-K-flat}. The map $H^*(A) \to H^*(B)$ is an isomorphism as it is surjective and injective: every element of $H^*(A)$ comes from an element of $H^*(A_n)$ for some $n$ and if it dies in $H^*(B)$, then it dies in $H^*(A_{n + 1})$ hence in $H^*(A)$.
Using Lemma \ref{lemma-K-flat-resolution} we choose a quasi-isomorphism $(B', \text{d}) \to (B, \text{d})$ with $B'$ K-flat as a complex of $R$-modules. By Lemma \ref{lemma-qis-equivalence} the functor $-\otimes^\mathbf{L}_{B'} B : D(B', \text{d}) \to D(B, \text{d})$ is an equivalence with quasi-inverse given by restriction. Note that restriction is canonically isomorphic to the functor $- \otimes^\mathbf{L}_B B : D(B, \text{d}) \to D(B', \text{d})$ where $B$ is viewed as a $(B, B')$-bimodule. Thus it suffices to prove the lemma for the compositions $$ D(A) \to D(B) \to D(B'),\quad D(B') \to D(B) \to D(C),\quad D(A) \to D(B') \to D(C). $$ The first one is Lemma \ref{lemma-compose-tensor-functors} because $B'$ is K-flat as a complex of $R$-modules. The second one is true because $B \otimes_B^\mathbf{L} N' = N' = B \otimes_B N'$ and hence Lemma \ref{lemma-compose-tensor-functors-general} applies. Thus we reduce to the case where $B$ is K-flat as a complex of $R$-modules. \medskip\noindent Assume $B$ is K-flat as a complex of $R$-modules. It suffices to show that (\ref{equation-plain-versus-derived-algebras}) is an isomorphism, see Lemma \ref{lemma-compose-tensor-functors-general-algebra}. Choose a quasi-isomorphism $L \to A$ where $L$ is a differential graded $R$-module which has property (P). Then it is clear that $P = L \otimes_R B$ has property (P) as a differential graded $B$-module. Hence we have to show that $P \to A \otimes_R B$ induces a quasi-isomorphism $$ P \otimes_B (B \otimes_R C) \longrightarrow (A \otimes_R B) \otimes_B (B \otimes_R C) $$ We can rewrite this as $$ P \otimes_R B \otimes_R C \longrightarrow A \otimes_R B \otimes_R C $$ Since $B$ is K-flat as a complex of $R$-modules, it follows from More on Algebra, Lemma \ref{more-algebra-lemma-K-flat-quasi-isomorphism} that it is enough to show that $$ P \otimes_R C \to A \otimes_R C $$ is a quasi-isomorphism, which is exactly our assumption.
We know that $K(\text{Mod}_{(A, \text{d})})$ is a pre-triangulated category. Hence it suffices to prove TR4 and to prove it we can use Derived Categories, Lemma \ref{derived-lemma-easier-axiom-four}. Let $K \to L$ and $L \to M$ be composable morphisms of $K(\text{Mod}_{(A, \text{d})})$. By Lemma \ref{lemma-sequence-maps-split} we may assume that $K \to L$ and $L \to M$ are admissible monomorphisms. In this case the result follows from Lemma \ref{lemma-two-split-injections}.
By Lemma \ref{lemma-analogue-homotopy-category-pre-triangulated} we know that $K(\mathcal{A})$ is pre-triangulated. Combining Lemmas \ref{lemma-analogue-sequence-maps-split} and \ref{lemma-dgc-analogue-tr4} with Derived Categories, Lemma \ref{derived-lemma-easier-axiom-four}, we conclude that $K(\mathcal{A})$ is a triangulated category.
Assume $E$ is compact. By Lemma \ref{lemma-resolve} we may assume that $E$ is represented by a differential graded $A$-module $P$ with property (P). Consider the distinguished triangle $$ \bigoplus F_iP \to \bigoplus F_iP \to P \xrightarrow{\delta} \bigoplus F_iP[1] $$ coming from the admissible short exact sequence of Lemma \ref{lemma-property-P-sequence}. Since $E$ is compact we have $\delta = \sum_{i = 1, \ldots, n} \delta_i$ for some $\delta_i : P \to F_iP[1]$. Since the composition of $\delta$ with the map $\bigoplus F_iP[1] \to \bigoplus F_iP[1]$ is zero (Derived Categories, Lemma \ref{derived-lemma-composition-zero}) it follows that $\delta = 0$ (follows as $\bigoplus F_iP \to \bigoplus F_iP$ maps the summand $F_iP$ via the difference of $\text{id}$ and the inclusion map into $F_{i - 1}P$). Thus we see that the identity on $E$ factors through $\bigoplus F_iP$ in $D(A, \text{d})$ (by Derived Categories, Lemma \ref{derived-lemma-split}). Next, we use that $P$ is compact again to see that the map $E \to \bigoplus F_iP$ factors through $\bigoplus_{i = 1, \ldots, n} F_iP$ for some $n$. In other words, the identity on $E$ factors through $\bigoplus_{i = 1, \ldots, n} F_iP$. By Lemma \ref{lemma-factor-through-nicer} we see that the identity of $E$ factors as $E \to P \to E$ where $P$ is as in part (2) of the statement of the lemma. In other words, we have proven that (1) implies (2). \medskip\noindent Assume (2). By Derived Categories, Lemma \ref{derived-lemma-compact-objects-subcategory} it suffices to show that $P$ gives a compact object. Observe that $P$ has property (P), hence we have $$ \Hom_{D(A, \text{d})}(P, M) = \Hom_{K(A, \text{d})}(P, M) $$ for any differential graded module $M$ by Lemma \ref{lemma-hom-derived}. As direct sums in $D(A, \text{d})$ are given by direct sums of graded modules (Lemma \ref{lemma-derived-products}) we reduce to showing that $\Hom_{K(A, \text{d})}(P, M)$ commutes with direct sums. Using that $K(A, \text{d})$ is a triangulated category, that $\Hom$ is a cohomological functor in the first variable, and the filtration on $P$, we reduce to the case that $P$ is a finite direct sum of shifts of $A$. Thus we reduce to the case $P = A[k]$ which is clear.
As in Remark \ref{remark-lift-equivalence-to-dga} above, we set $N = F(A)$ in $D(B, \text{d})$. We may assume that $N$ is a differential graded $B$-module with property (P). Set $$ (E, \text{d}) = \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(N, N) $$ Then $H^0(E) = A$ and $H^k(E) = 0$ for $k \not = 0$ by Lemma \ref{lemma-hom-derived}. Moreover, by the discussion in Remark \ref{remark-lift-equivalence-to-dga} and by Lemma \ref{lemma-tilting-equivalence} we see that $N$ as a $(E, B)$-bimodule induces an equivalence $- \otimes_E^\mathbf{L} N : D(E, \text{d}) \to D(B, \text{d})$. Let $E' \subset E$ be the differential graded $R$-subalgebra with $$ (E')^i = \left\{ \begin{matrix} E^i & \text{if }i < 0 \\ \Ker(E^0 \to E^1) & \text{if }i = 0 \\ 0 & \text{if }i > 0 \end{matrix} \right. $$ Then there are quasi-isomorphisms of differential graded algebras $(A, \text{d}) \leftarrow (E', \text{d}) \rightarrow (E, \text{d})$. Thus we obtain equivalences $$ D(A, \text{d}) \leftarrow D(E', \text{d}) \rightarrow D(E, \text{d}) \rightarrow D(B, \text{d}) $$ by Lemma \ref{lemma-qis-equivalence}. Note that the quasi-inverse $D(A, \text{d}) \to D(E', \text{d})$ of the left vertical arrow is given by $M \mapsto M \otimes_A^\mathbf{L} A$ where $A$ is viewed as a $(A, E')$-bimodule, see Example \ref{example-map-hom-tensor}. On the other hand the functor $D(E', \text{d}) \to D(B, \text{d})$ is given by $M \mapsto M \otimes_{E'}^\mathbf{L} N$ where $N$ is as above. We conclude by Lemma \ref{lemma-compose-tensor-functors}.
To describe a local homomorphism from $C$ to another henselian local ring it is enough to say what happens to elements of the form $b_1 \otimes b_2$ by Algebra, Lemma \ref{algebra-lemma-henselian-functorial} for example. Keeping this in mind we have the two canonical maps $$ e_2 : C \to B,\ b_1 \otimes b_2 \mapsto b_1s(e(b_2)),\quad e_1 : C \to B,\ b_1 \otimes b_2 \mapsto t(e(b_1))b_2 $$ corresponding to the embeddings $R \to R \times_{s, U, t} R$ given by $r \mapsto (r, e(s(r)))$ and $r \mapsto (e(t(r)), r)$. These maps define maps $J/J^2 \to I/I^2$ which jointly give an inverse to the map $I/I^2 \oplus I/I^2 \to J/J^2$ of the lemma. Thus to prove statement we only have to show that $e_1 \circ c : B \to B$ and $e_2 \circ c : B \to B$ are the identity maps. This follows from the fact that both compositions $R \to R \times_{s, U, t} R \to R$ are identities. \medskip\noindent The statement on $i$ follows from the statement on $c$ and the fact that $c \circ (1, i) = e \circ t$. Some details omitted.