hcju/stacksqa huggingface dataset:
Let $P \to M$ be as in (1). Since $P \to M$ is a quasi-isomorphism we see that $$ \Hom_{D(A, \text{d})}(P, N) = \Hom_{D(A, \text{d})}(M, N) $$ by definition of the derived category. A morphism $f : P \to N$ in $D(A, \text{d})$ is equal to $s^{-1}f'$ where $f' : P \to N'$ is a morphism and $s : N \to N'$ is a quasi-isomorphism. Choose a distinguished triangle $$ N \to N' \to Q \to N[1] $$ As $s$ is a quasi-isomorphism, we see that $Q$ is acyclic. Thus $\Hom_{K(\text{Mod}_{(A, \text{d})})}(P, Q[k]) = 0$ for all $k$ by Lemma \ref{lemma-property-P-K-projective}. Since $\Hom_{K(\text{Mod}_{(A, \text{d})})}(P, -)$ is cohomological, we conclude that we can lift $f' : P \to N'$ uniquely to a morphism $f : P \to N$. This finishes the proof. \medskip\noindent The proof of (2) is dual to that of (1) using Lemma \ref{lemma-property-I-K-injective} in stead of Lemma \ref{lemma-property-P-K-projective}.
We will use that $\text{Mod}_{(A, \text{d})}$ is an abelian category with arbitrary direct sums and products, and that these give rise to direct sums and products in $K(\text{Mod}_{(A, \text{d})})$. See Lemmas \ref{lemma-dgm-abelian} and \ref{lemma-homotopy-direct-sums}. \medskip\noindent Let $M_j$ be a family of differential graded $A$-modules. Consider the graded direct sum $M = \bigoplus M_j$ which is a differential graded $A$-module with the obvious. For a differential graded $A$-module $N$ choose a quasi-isomorphism $N \to I$ where $I$ is a differential graded $A$-module with property (I). See Lemma \ref{lemma-right-resolution}. Using Lemma \ref{lemma-hom-derived} we have \begin{align*} \Hom_{D(A, \text{d})}(M, N) & = \Hom_{K(A, \text{d})}(M, I) \\ & = \prod \Hom_{K(A, \text{d})}(M_j, I) \\ & = \prod \Hom_{D(A, \text{d})}(M_j, N) \end{align*} whence the existence of direct sums in $D(A, \text{d})$ as given in part (2) of the lemma. \medskip\noindent Let $M_j$ be a family of differential graded $A$-modules. Consider the product $M = \prod M_j$ of differential graded $A$-modules. For a differential graded $A$-module $N$ choose a quasi-isomorphism $P \to N$ where $P$ is a differential graded $A$-module with property (P). See Lemma \ref{lemma-resolve}. Using Lemma \ref{lemma-hom-derived} we have \begin{align*} \Hom_{D(A, \text{d})}(N, M) & = \Hom_{K(A, \text{d})}(P, M) \\ & = \prod \Hom_{K(A, \text{d})}(P, M_j) \\ & = \prod \Hom_{D(A, \text{d})}(N, M_j) \end{align*} whence the existence of direct sums in $D(A, \text{d})$ as given in part (3) of the lemma.
We have already seen that this choice leads to a distinguished triangle whenever given a short exact sequence of complexes. We have to show functoriality of this construction, see Derived Categories, Definition \ref{derived-definition-delta-functor}. This follows from Lemma \ref{lemma-functorial-cone} with a bit of work. Compare with Derived Categories, Lemma \ref{derived-lemma-derived-canonical-delta-functor}.
Set $M = \colim M_n$. We have an exact sequence of differential graded modules $$ 0 \to \bigoplus M_n \to \bigoplus M_n \to M \to 0 $$ by Derived Categories, Lemma \ref{derived-lemma-compute-colimit} (applied the underlying complexes of abelian groups). The direct sums are direct sums in $D(\mathcal{A})$ by Lemma \ref{lemma-derived-products}. Thus the result follows from the definition of derived colimits in Derived Categories, Definition \ref{derived-definition-derived-colimit} and the fact that a short exact sequence of complexes gives a distinguished triangle (Lemma \ref{lemma-derived-canonical-delta-functor}).
The assumption means there exists a morphism $h : x_1 \to y_2$ of degree $-1$ such that $\text{d}(h) = b f_1 - f_2 a$. Choose isomorphisms $c(f_i) = y_i \oplus x_i[1]$ of graded objects compatible with the morphisms $y_i \to c(f_i) \to x_i[1]$. Let's denote $a_i : y_i \to c(f_i)$, $b_i : c(f_i) \to x_i[1]$, $s_i : x_i[1] \to c(f_i)$, and $\pi_i : c(f_i) \to y_i$ the given morphisms. Recall that $x_i[1] \to y_i[1]$ is given by $\pi_i \text{d}(s_i)$. By axiom (C) this means that $$ f_i = \pi_i \text{d}(s_i) = - \text{d}(\pi_i) s_i $$ (we identify $\Hom(x_i, y_i)$ with $\Hom(x_i[1], y_i[1])$ using the shift functor $[1]$). Set $c = a_2 b \pi_1 + s_2 a b_1 + a_2hb$. Then, using the equalities found in the proof of Lemma \ref{lemma-get-triangle} we obtain \begin{align*} \text{d}(c) & = a_2 b \text{d}(\pi_1) + \text{d}(s_2) a b_1 + a_2 \text{d}(h) b_1 \\ & = - a_2 b f_1 b_1 + a_2 f_2 a b_1 + a_2 (b f_1 - f_2 a) b_1 \\ & = 0 \end{align*} (where we have used in particular that $\text{d}(\pi_1) = \text{d}(\pi_1) s_1 b_1 = f_1 b_1$ and $\text{d}(s_2) = a_2 \pi_2 \text{d}(s_2) = a_2 f_2$). Thus $c$ is a degree $0$ morphism $c : c(f_1) \to c(f_2)$ of $\mathcal{A}$ compatible with the given morphisms $y_i \to c(f_i) \to x_i[1]$.
Consider the admissible short exact sequence given by axiom (C). $$ \xymatrix{ x \ar@<0.5ex>[r]^a  & C(1_x) \ar@<0.5ex>[l]^{\pi} \ar@<0.5ex>[r]^b & x[1]\ar@<0.5ex>[l]^s } $$ Then by Lemma \ref{lemma-get-triangle}, identifying hom-sets under shifting, we have $1_x=\pi d(s)=-d(\pi)s$ where $s$ is regarded as a morphism in $\Hom_{\mathcal{A}}^{-1}(x,C(1_x))$. Therefore $a=a\pi d(s)=d(s)$ using formula (5) of Lemma \ref{lemma-get-triangle}, and $b=-d(\pi)sb=-d(\pi)$ by formula (6) of Lemma \ref{lemma-get-triangle}. Hence $$ 1_{C(1_x)} = a\pi + sb = d(s)\pi - sd(\pi) = d(s\pi) $$ since $s$ is of degree $-1$.
By axiom (A), we may let $\tilde{y}$ be the differential graded direct sum of $y$ and $C(1_x)$, i.e., there exists a diagram $$ \xymatrix@C=3pc{ y \ar@<0.5ex>[r]^s  & y\oplus C(1_x) \ar@<0.5ex>[l]^{\pi} \ar@<0.5ex>[r]^{p} & C(1_x)\ar@<0.5ex>[l]^t } $$ where all morphisms are of degree zero, and in $\text{Comp}(\mathcal{A})$. Let $\tilde{y} = y \oplus C(1_x)$. Then $1_{\tilde{y}} = s\pi + tp$. Consider now the diagram $$ \xymatrix{ x \ar[r]^{\tilde{\alpha}}  & \tilde{y} \ar@<0.5ex>[r]^{\pi} & y\ar@<0.5ex>[l]^s } $$ where $\tilde{\alpha}$ is induced by the morphism $x\xrightarrow{\alpha}y$ and the natural morphism $x\to C(1_x)$ fitting in the admissible short exact sequence $$ \xymatrix{ x \ar@<0.5ex>[r]  & C(1_x) \ar@<0.5ex>[l] \ar@<0.5ex>[r] & x[1]\ar@<0.5ex>[l] } $$ So the morphism $C(1_x)\to x$ of degree 0 in this diagram, together with the zero morphism $y\to x$, induces a degree-0 morphism $\beta : \tilde{y} \to x$. Then $\tilde{\alpha}$ is an admissible monomorphism since it fits into the admissible short exact sequence $$ \xymatrix{ x\ar[r]^{\tilde{\alpha}} & \tilde{y} \ar[r] & x[1] } $$ Furthermore, $\pi\tilde{\alpha} = \alpha$ by the construction of $\tilde{\alpha}$, and $\pi s = 1_y$ by the first diagram. It remains to show that $s\pi$ is homotopic to $1_{\tilde{y}}$. Write $1_x$ as $d(h)$ for some degree $-1$ map. Then, our last statement follows from \begin{align*} 1_{\tilde{y}} - s\pi = & tp \\ = & t(dh)p\quad\text{(by Lemma \ref{lemma-id-cone-null})} \\ = & d(thp) \end{align*} since $dt = dp = 0$, and $t$ is of degree zero.
The case for $n=1$ is trivial: one simply takes $y_1 = x_1$ and the identity morphism on $x_1$ is in particular a homotopy equivalence. The case $n = 2$ is given by Lemma \ref{lemma-factor}. Suppose we have constructed the diagram up to $x_{n - 1}$. We apply Lemma \ref{lemma-factor} to the composition $y_{n - 1} \to x_{n-1} \to x_n$ to obtain $y_n$. Then $y_{n - 1} \to y_n$ will be an admissible monomorphism, and $y_n \to x_n$ a homotopy equivalence.
By Lemma \ref{lemma-homo-change}, we can replace $b$ and $b'$ by homotopic maps $\tilde{b}$ and $\tilde{b}'$, such that the right square of the left diagram commutes and the left square of the right diagram commutes. Say $b = \tilde{b} + d(h)$ and $b'=\tilde{b}'+d(h')$ for degree $-1$ morphisms $h$ and $h'$ in $\mathcal{A}$. Hence $$ b'b = \tilde{b}'\tilde{b} + d(\tilde{b}'h + h'\tilde{b} + h'd(h)) $$ since $d(\tilde{b})=d(\tilde{b}')=0$, i.e. $b'b$ is homotopic to $\tilde{b}'\tilde{b}$. We now want to show that $\tilde{b}'\tilde{b}=0$. Because $x_2\xrightarrow{f} y_2\xrightarrow{g} z_2$ is an admissible short exact sequence, there exist degree $0$ morphisms $\pi : y_2 \to x_2$ and $s : z_2 \to y_2$ such that $\text{id}_{y_2} = f\pi + sg$. Therefore $$ \tilde{b}'\tilde{b} = \tilde{b}'(f\pi + sg)\tilde{b} = 0 $$ since $g\tilde{b} = 0$ and $\tilde{b}'f = 0$ as consequences of the two commuting squares.
Suppose $\delta$ is defined by the splitting $$ \xymatrix{ x \ar@<0.5ex>[r]^{a} & y \ar@<0.5ex>[r]^b\ar@<0.5ex>[l]^{\pi} & z \ar@<0.5ex>[l]^s } $$ and $\delta'$ is defined by the splitting with $\pi',s'$ in place of $\pi,s$. Then $$ s'-s = (a\pi + sb)(s'-s) = a\pi s' $$ since $bs' = bs = 1_z$ and $\pi s = 0$. Similarly, $$ \pi' - \pi = (\pi' - \pi)(a\pi + sb) = \pi'sb $$ Since $\delta = \pi d(s)$ and $\delta' = \pi'd(s')$ as constructed in Lemma \ref{lemma-get-triangle}, we may compute $$ \delta' = \pi'd(s') = (\pi + \pi'sb)d(s + a\pi s') = \delta + d(\pi s') $$ using $\pi a = 1_x$, $ba = 0$, and $\pi'sbd(s') = \pi'sba\pi d(s') = 0$ by formula (5) in Lemma \ref{lemma-get-triangle}.
We have a diagram of the form $$ \xymatrix{ z[-1]\ar[r]^{\delta[-1]}\ar[d]^1 & x\ar@<0.5ex>[r]^{\alpha}\ar[d]^1 & y\ar@<0.5ex>[r]^{\beta}\ar@{.>}[d]\ar@<0.5ex>[l]^{\tilde{\alpha}} & z\ar[d]^1\ar@<0.5ex>[l]^{\tilde\beta} \\ z[-1] \ar[r]^{\delta[-1]} & x\ar@<0.5ex>[r]^i & c(\delta[-1]) \ar@<0.5ex>[r]^p\ar@<0.5ex>[l]^{\tilde i} & z\ar@<0.5ex>[l]^{\tilde p} } $$ with splittings to $\alpha, \beta, i$, and $p$ given by $\tilde{\alpha}, \tilde{\beta}, \tilde{i},$ and $\tilde{p}$ respectively. Define a morphism $y \to c(\delta[-1])$ by $i\tilde{\alpha} + \tilde{p}\beta$ and a morphism $c(\delta[-1]) \to y$ by $\alpha \tilde{i} + \tilde{\beta} p$. Let us first check that these define morphisms in $\text{Comp}(\mathcal{A})$. We remark that by identities from Lemma \ref{lemma-get-triangle}, we have the relation $\delta[-1] = \tilde{\alpha}d(\tilde{\beta}) = -d(\tilde{\alpha})\tilde{\beta}$ and the relation $\delta[-1] = \tilde{i}d(\tilde{p})$. Then \begin{align*} d(\tilde{\alpha}) & = d(\tilde{\alpha})\tilde{\beta}\beta \\ & = -\delta[-1]\beta \end{align*} where we have used equation (6) of Lemma \ref{lemma-get-triangle} for the first equality and the preceeding remark for the second. Similarly, we obtain $d(\tilde{p}) = i\delta[-1]$. Hence \begin{align*} d(i\tilde{\alpha} + \tilde{p}\beta) & = d(i)\tilde{\alpha} + id(\tilde{\alpha}) + d(\tilde{p})\beta + \tilde{p}d(\beta) \\ & = id(\tilde{\alpha}) + d(\tilde{p})\beta \\ & = -i\delta[-1]\beta + i\delta[-1]\beta \\ & = 0 \end{align*} so $i\tilde{\alpha} + \tilde{p}\beta$ is indeed a morphism of $\text{Comp}(\mathcal{A})$. By a similar calculation, $\alpha \tilde{i} + \tilde{\beta} p$ is also a morphism of $\text{Comp}(\mathcal{A})$. It is immediate that these morphisms fit in the commutative diagram. We compute: \begin{align*} (i\tilde{\alpha} + \tilde{p}\beta)(\alpha \tilde{i} + \tilde{\beta} p) & = i\tilde{\alpha}\alpha\tilde{i} + i\tilde{\alpha}\tilde{\beta}p + \tilde{p}\beta\alpha\tilde{i} + \tilde{p}\beta\tilde{\beta}p \\ & = i\tilde{i} + \tilde{p}p \\ & = 1_{c(\delta[-1])} \end{align*} where we have freely used the identities of Lemma \ref{lemma-get-triangle}. Similarly, we compute $(\alpha \tilde{i} + \tilde{\beta} p)(i\tilde{\alpha} + \tilde{p}\beta) = 1_y$, so we conclude $y \cong c(\delta[-1])$. Hence, the two triangles in question are isomorphic.
Since $a$ and $b$ are homotopy equivalences, they are invertible in $K(\mathcal{A})$ so let $a^{-1}$ and $b^{-1}$ denote their inverses in $K(\mathcal{A})$, giving us a commutative diagram  $$ \xymatrix{ x_2\ar[d]^{a^{-1}}\ar[r]^{f_2} & y_2\ar[d]^{b^{-1}}\ar[r]^{i_2} & c(f_2)\ar[d]^{c'} \\ x_1\ar[r]^{f_1} & y_1 \ar[r]^{i_1} & c(f_1) } $$ where the map $c'$ is defined via Lemma \ref{lemma-cone} applied to the left commutative box of the above diagram. Since the diagram commutes in $K(\mathcal{A})$, it suffices by Lemma \ref{lemma-triseq} to prove the following: given a morphism of triangle $(1,1,c): (x,y,c(f),f,i,p)\to (x,y,c(f),f,i,p)$ in $K(\mathcal{A})$, the map $c$ is an isomorphism in $K(\mathcal{A})$. We have the commutative diagrams in $K(\mathcal{A})$: $$ \vcenter{ \xymatrix{ y\ar[d]^{1}\ar[r] & c(f)\ar[d]^{c}\ar[r] & x[1]\ar[d]^{1} \\ y\ar[r] & c(f) \ar[r] & x[1] } } \quad\Rightarrow\quad \vcenter{ \xymatrix{ y\ar[d]^{0}\ar[r] & c(f)\ar[d]^{c-1}\ar[r] & x[1]\ar[d]^{0} \\ y\ar[r] & c(f) \ar[r] & x[1] } } $$ Since the rows are admissible short exact sequences, we obtain the identity $(c-1)^2 = 0$ by Lemma \ref{lemma-triseq}, from which we conclude that $2-c$ is inverse to $c$ in $K(\mathcal{A})$ so that $c$ is an isomorphism.
We will verify each of TR1, TR2, and TR3.  \medskip\noindent Proof of TR1. By definition every triangle isomorphic to a distinguished one is distinguished. Since $$ \xymatrix{x\ar[r]^{1_x} & x\ar[r] & 0} $$ is an admissible short exact sequence, $(x, x, 0, 1_x, 0, 0)$ is a distinguished triangle. Moreover, given a morphism $\alpha : x \to y$ in $\text{Comp}(\mathcal{A})$, the triangle given by $(x, y, c(\alpha), \alpha, i, -p)$ is distinguished by Lemma \ref{lemma-cone-homotopy}. \medskip\noindent Proof of TR2. Let $(x,y,z,\alpha,\beta,\gamma)$ be a triangle and suppose $(y,z,x[1],\beta,\gamma,-\alpha[1])$ is distinguished. Then there exists an admissible short exact sequence $0 \to x' \to y' \to z' \to 0$ such that the associated triangle $(x',y',z',\alpha',\beta',\gamma')$ is isomorphic to $(y,z,x[1],\beta,\gamma,-\alpha[1])$. After rotating, we conclude that $(x,y,z,\alpha,\beta,\gamma)$ is isomorphic to $(z'[-1],x',y', \gamma'[-1], \alpha',\beta')$. By Lemma \ref{lemma-cone-rotate-isom}, we deduce that $(z'[-1],x',y', \gamma'[-1], \alpha',\beta')$ is isomorphic to $(z'[-1],x',c(\gamma'[-1]), \gamma'[-1], i, p)$. Composing the two isomorphisms with sign changes as indicated in the following diagram: $$ \xymatrix@C=3pc{ x\ar[r]^{\alpha}\ar[d] & y\ar[r]^{\beta}\ar[d] & z\ar[r]^{\gamma}\ar[d] & x[1]\ar[d] \\ z'[-1]\ar[r]^{-\gamma'[-1]}\ar[d]_{-1_{z'[-1]}} & x \ar[r]^{\alpha'}\ar@{=}[d] & y' \ar[r]^{\beta'} \ar[d] & z'\ar[d]^{-1_{z'}} \\ z'[-1]\ar[r]^{\gamma'[-1]} & x \ar[r]^{\alpha'} & c(\gamma'[-1]) \ar[r]^{-p} & z' } $$ We conclude that $(x,y,z,\alpha,\beta,\gamma)$ is distinguished by Lemma \ref{lemma-cone-homotopy} (2). Conversely, suppose that $(x,y,z,\alpha,\beta,\gamma)$ is distinguished, so that by Lemma \ref{lemma-cone-homotopy} (1), it is isomorphic to a triangle of the form $(x',y', c(\alpha'), \alpha', i, -p)$ for some morphism $\alpha': x' \to y'$ in $\text{Comp}(\mathcal{A})$. The rotated triangle $(y,z,x[1],\beta,\gamma, -\alpha[1])$ is isomorphic to the triangle $(y',c(\alpha'), x'[1], i, -p, -\alpha[1])$ which is isomorphic to $(y',c(\alpha'), x'[1], i, p, \alpha[1])$. By Lemma \ref{lemma-restate-axiom-c}, this triangle is distinguished, from which it follows that $(y,z,x[1], \beta,\gamma, -\alpha[1])$ is distinguished. \medskip\noindent Proof of TR3: Suppose $(x,y,z, \alpha,\beta,\gamma)$ and $(x',y',z',\alpha',\beta',\gamma')$ are distinguished triangles of $\text{Comp}(\mathcal{A})$ and let $f: x \to x'$ and $g: y \to y'$ be morphisms such that $\alpha' \circ f = g \circ \alpha$. By Lemma \ref{lemma-cone-homotopy}, we may assume that $(x,y,z,\alpha,\beta,\gamma)= (x,y,c(\alpha),\alpha, i, -p)$ and $(x',y',z', \alpha',\beta',\gamma')= (x',y',c(\alpha'), \alpha',i',-p')$. Now apply Lemma \ref{lemma-cone} and we are done.
Namely, if $x \to y \to z$ is an admissible short exact sequence in $\text{Comp}(\mathcal{A})$, then $F(x) \to F(y) \to F(z)$ is an admissible short exact sequence in $\text{Comp}(\mathcal{B})$. Moreover, the ``boundary'' morphism $\delta = \pi\text{d}(s) : z \to x[1]$ constructed in Lemma \ref{lemma-get-triangle} produces the morphism $F(\delta) : F(z) \to F(x[1]) = F(x)[1]$ which is equal to the boundary map $F(\pi) \text{d}(F(s))$ for the admissible short exact sequence $F(x) \to F(y) \to F(z)$.
Let $\mu : A \times M \to M$ define a left differential graded $A$-module structure on the underlying complex of $R$-modules $M^\bullet$ of $M$. By Lemma \ref{lemma-left-module-structure} the structure $\mu$ corresponds to a map $\gamma : A \to \Hom^\bullet(M^\bullet, M^\bullet)$ of differential graded $R$-algebras. The assertion of the lemma is simply that $\mu$ commutes with the $B$-action, if and only if $\gamma$ ends up inside $$ \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(M, M) \subset \Hom^\bullet(M^\bullet, M^\bullet) $$ We omit the detailed calculation.
Omitted. Hint: in the ungraded case interpret both sides as $A$-bilinear maps $\psi : M \times N \to N'$ which are $B$-linear on the right. In the (differential) graded case, use the isomorphism of More on Algebra, Lemma \ref{more-algebra-lemma-compose} and check it is compatible with the module structures. Alternatively, use the isomorphism of Lemma \ref{lemma-characterize-hom} and show that it is compatible with the $B$-module structures.
We will use Derived Categories, Lemma \ref{derived-lemma-find-existence-computes} to prove this. As our collection $\mathcal{I}$ of objects we will use the objects with property (I). Property (1) was shown in Lemma \ref{lemma-right-resolution}. Property (2) holds because if $s : I \to I'$ is a quasi-isomorphism of modules with property (I), then $s$ is a homotopy equivalence by Lemma \ref{lemma-hom-derived}.
Write $\mathcal{B} = \text{Mod}^{dg}_{(B, \text{d})}$ the differential graded category of differential graded $B$-modules, see Example \ref{example-dgm-dg-cat}. Let $I$ be a differential graded $B$-module with property (I). Then $f \circ - : \Hom_\mathcal{B}(N', I) \to \Hom_\mathcal{B}(N, I)$ is a map of differential graded $A$-modules. Moreover, this is functorial with respect to $I$. Since the functors $ R\Hom(N', -)$ and $R\Hom(N, -)$ are computed by applying $\Hom_\mathcal{B}$ into objects with property (I) (Lemma \ref{lemma-derived-restriction}) we obtain a transformation of functors as indicated. \medskip\noindent Assume that $f$ is a quasi-isomorphism. Let $F_\bullet$ be the given filtration on $I$. Since $I = \lim I/F_pI$ we see that $\Hom_\mathcal{B}(N', I) = \lim \Hom_\mathcal{B}(N', I/F_pI)$ and $\Hom_\mathcal{B}(N, I) = \lim \Hom_\mathcal{B}(N, I/F_pI)$. Since the transition maps in the system $I/F_pI$ are split as graded modules, we see that the transition maps in the systems $\Hom_\mathcal{B}(N', I/F_pI)$ and $\Hom_\mathcal{B}(N, I/F_pI)$ are surjective. Hence $\Hom_\mathcal{B}(N', I)$, resp. $\Hom_\mathcal{B}(N, I)$ viewed as a complex of abelian groups computes $R\lim$ of the system of complexes $\Hom_\mathcal{B}(N', I/F_pI)$, resp. $\Hom_\mathcal{B}(N, I/F_pI)$. See More on Algebra, Lemma \ref{more-algebra-lemma-compute-Rlim}. Thus it suffices to prove each $$ \Hom_\mathcal{B}(N', I/F_pI) \to \Hom_\mathcal{B}(N, I/F_pI) $$ is a quasi-isomorphism. Since the surjections $I/F_{p + 1}I \to I/F_pI$ are split as maps of graded $B$-modules we see that $$ 0 \to \Hom_\mathcal{B}(N', F_pI/F_{p + 1}I) \to \Hom_\mathcal{B}(N', I/F_{p + 1}I) \to \Hom_\mathcal{B}(N', I/F_pI) \to 0 $$ is a short exact sequence of differential graded $A$-modules. There is a similar sequence for $N$ and $f$ induces a map of short exact sequences. Hence by induction on $p$ (starting with $p = 0$ when $I/F_0I = 0$) we conclude that it suffices to show that the map $\Hom_\mathcal{B}(N', F_pI/F_{p + 1}I) \to \Hom_\mathcal{B}(N, F_pI/F_{p + 1}I)$ is a quasi-isomorphism. Since $F_pI/F_{p + 1}I$ is a product of shifts of $A^\vee$ it suffice to prove $\Hom_\mathcal{B}(N', B^\vee[k]) \to \Hom_\mathcal{B}(N, B^\vee[k])$ is a quasi-isomorphism. By Lemma \ref{lemma-hom-into-shift-dual-free} it suffices to show $(N')^\vee \to N^\vee$ is a quasi-isomorphism. This is true because $f$ is a quasi-isomorphism and $(\ )^\vee$ is an exact functor.
In the proof of Lemma \ref{lemma-derived-restriction} we have seen $$ R\Hom(N, M) =  \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(N, I) $$ as a differential graded $A$-module where $M \to I$ is a quasi-isomorphism of $M$ into a differential graded $B$-module with property (I). Hence this complex has the correct cohomology modules by Lemma \ref{lemma-hom-derived}. We omit a discussion of the functorial nature of these identifications.
By construction (Lemma \ref{lemma-derived-restriction}) to find $R\Hom(N, M)$ we choose a quasi-isomorphism $M \to I$ where $I$ is a differential graded $B$-module with property (I) and we set $R\Hom(N, M) = \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(N, I)$. By assumption the map $$ \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(N, M) \longrightarrow \Hom_{\text{Mod}^{dg}_{(B, \text{d})}}(N, I) $$ induced by $M \to I$ is a quasi-isomorphism, see discussion in Example \ref{example-dgm-dg-cat}. This proves the lemma. If $N$ has property (P) as a $B$-module, then we see that the assumption is satisfied by Lemma \ref{lemma-hom-derived}.
Note that we have an associated functor $K(\mathcal{A}) \to K(\text{Mod}_{(E, \text{d})})$ by Lemma \ref{lemma-construction}. We claim this functor is an exact functor of triangulated categories. Namely, let $f : A^\bullet \to B^\bullet$ be a map of complexes of $\mathcal{A}$. Then a computation shows that $$ \Hom_{\text{Comp}^{dg}(\mathcal{A})}(K^\bullet, C(f)^\bullet) = C\left( \Hom_{\text{Comp}^{dg}(\mathcal{A})}(K^\bullet, A^\bullet) \to \Hom_{\text{Comp}^{dg}(\mathcal{A})}(K^\bullet, B^\bullet) \right) $$ where the right hand side is the cone in $\text{Mod}_{(E, \text{d})}$ defined earlier in this chapter. This shows that our functor is compatible with cones, hence with distinguished triangles. Let $X^\bullet$ be an object of $K(\mathcal{A})$. Consider the category of quasi-isomorphisms $s : X^\bullet \to Y^\bullet$. We are given that the functor $(s : X^\bullet \to Y^\bullet) \mapsto \Hom_\mathcal{A}(K^\bullet, Y^\bullet)$ is essentially constant when viewed in $D(\textit{Ab})$. But since the forgetful functor $D(E, \text{d}) \to D(\textit{Ab})$ is compatible with taking cohomology, the same thing is true in $D(E, \text{d})$. This proves the lemma.
We will use Derived Categories, Lemma \ref{derived-lemma-find-existence-computes} to prove this. As our collection $\mathcal{P}$ of objects we will use the objects with property (P). Property (1) was shown in Lemma \ref{lemma-resolve}. Property (2) holds because if $s : P \to P'$ is a quasi-isomorphism of modules with property (P), then $s$ is a homotopy equivalence by Lemma \ref{lemma-hom-derived}.
Let $M$ be a differential graded $A$-module with property (P). Then $1 \otimes f : M \otimes_A N \to M \otimes_A N'$ is a map of differential graded $B$-modules. Moreover, this is functorial with respect to $M$. Since the functors $- \otimes_A^\mathbf{L} N$ and $- \otimes_A^\mathbf{L} N'$ are computed by tensoring on objects with property (P) (Lemma \ref{lemma-derived-bc}) we obtain a transformation of functors as indicated. \medskip\noindent Assume that $f$ is a quasi-isomorphism. Let $F_\bullet$ be the given filtration on $M$. Observe that $M \otimes_A N = \colim F_i(M) \otimes_A N$ and $M \otimes_A N' = \colim F_i(M) \otimes_A N'$. Hence it suffices to show that $F_n(M) \otimes_A N \to F_n(M) \otimes_A N'$ is a quasi-isomorphism (filtered colimits are exact, see Algebra, Lemma \ref{algebra-lemma-directed-colimit-exact}). Since the inclusions $F_n(M) \to F_{n + 1}(M)$ are split as maps of graded $A$-modules we see that $$ 0 \to F_n(M) \otimes_A N \to F_{n + 1}(M) \otimes_A N \to F_{n + 1}(M)/F_n(M) \otimes_A N \to 0 $$ is a short exact sequence of differential graded $B$-modules. There is a similar sequence for $N'$ and $f$ induces a map of short exact sequences. Hence by induction on $n$ (starting with $n = -1$ when $F_{-1}(M) = 0$) we conclude that it suffices to show that the map $F_{n + 1}(M)/F_n(M) \otimes_A N \to F_{n + 1}(M)/F_n(M) \otimes_A N'$ is a quasi-isomorphism. This is true because $F_{n + 1}(M)/F_n(M)$ is a direct sum of shifts of $A$ and the result is true for $A[k]$ as $f : N \to N'$ is a quasi-isomorphism.