hcju/stacksqa huggingface dataset:
Choose a resolution $F_\bullet \to M$ whose terms are free $R$-modules, see Algebra, Lemma \ref{algebra-lemma-resolution-by-finite-free}. The complex $\Hom_R(F_\bullet, N)$ computes $\Ext^i_R(M, N)$ and the complex $\Hom_R(F_\bullet, N \otimes_R L)$ computes $\Ext^i_R(M, N \otimes_R L)$. There always is a map of cochain complexes $$ \Hom_R(F_\bullet, N) \otimes_R L \longrightarrow \Hom_R(F_\bullet, N \otimes_R L) $$ which induces canonical maps $\Ext^i_R(M, N) \otimes_R L \to \Ext^i_R(M, N \otimes_R L)$ for all $i \geq 0$ (canonical for example in the sense that these maps do not depend on the choice of the resolution $F_\bullet$). If $L$ is flat, then the complex $\Hom_R(F_\bullet, N) \otimes_R L$ computes $\Ext^i_R(M, N) \otimes_R L$ since taking cohomology commutes with tensoring by $L$. \medskip\noindent Having said all of the above, if $M$ is $(-m)$-pseudo-coherent, then we may choose $F_\bullet$ such that $F_i$ is finite free for $i = 0, \ldots, m$. Then the map of cochain complexes displayed above is an isomorphism in degrees $\leq m$ and hence an isomorphism on cohomology groups in degrees $< m$. This proves (2). If $M$ is finitely presented, then $M$ is $(-1)$-pseudo-coherent by Lemma \ref{lemma-n-pseudo-module} and we get the result because $\Hom = \Ext^0$.
By Algebra, Lemma \ref{algebra-lemma-flat-base-change-ext} we have $\Ext^i_{R'}(M \otimes_R R', N \otimes_R R') = \Ext^i_R(M, N \otimes_R R')$. Combined with Lemma \ref{lemma-pseudo-coherence-and-ext} we conclude (1) and (2) holds. The final statement follows from this and Lemma \ref{lemma-Noetherian-pseudo-coherent}.
If $K$ is pseudo-coherent, then $K$ can be represented by a bounded above complex of finite free $R$-modules. Then the derived tensor products are computed by tensoring with this complex. Also, products in $D(A)$ are given by taking products of any choices of representative complexes. Hence (1) implies (2), (3), (4) by the corresponding fact for modules, see Algebra, Proposition \ref{algebra-proposition-fp-tensor}. \medskip\noindent In the same way (using the tensor product is right exact) the reader shows that (a) implies (b), (c), and (d). \medskip\noindent Assume (4) holds. To show that $K$ is pseudo-coherent it suffices to show that $K$ is $m$-pseudo-coherent for all $m$ (Lemma \ref{lemma-pseudo-coherent}). Hence to finish then proof it suffices to prove that (d) implies (a). \medskip\noindent Assume (d). Let $i$ be the largest integer such that $H^i(K)$ is nonzero. If $i < m$, then we are done. If not, then from (d) and the description of products in $D(A)$ given above we find that $H^i(K) \otimes_R R^A \to H^i(K)^A$ is surjective. Hence $H^i(K)$ is a finitely generated $R$-module by Algebra, Proposition \ref{algebra-proposition-fg-tensor}. Thus we may choose a complex $L$ consisting of a single finite free module sitting in degree $i$ and a map of complexes $L \to K$ such that $H^i(L) \to H^i(K)$ is surjective. In particular $L$ satisfies (1), (2), (3), and (4). Choose a distinguished triangle $$ L \to K \to M \to L[1] $$ Then we see that $H^j(M) = 0$ for $j \geq i$. On the other hand, $M$ still has property (d) by a small argument which we omit. By induction on $i$ we find that $M$ is $m$-pseudo-coherent. Hence $K$ is $m$-pseudo-coherent by Lemma \ref{lemma-cone-pseudo-coherent}.
(The equivalent formulation of pseudo-coherence in the statement of the lemma is Lemma \ref{lemma-Noetherian-pseudo-coherent}.) Choose $K \to M[-i]$ as in Lemma \ref{lemma-detect-cohomology-pseudo-coherent}. By Artin-Rees (Algebra, Lemma \ref{algebra-lemma-Artin-Rees}) we can find an $n$ such that $H^i(K) \cap \mathfrak m^n M \subset \mathfrak m H^i(K)$. Take $E = M/\mathfrak m^n M$.
As $K^\bullet$ is a bounded above complex of flat modules we see that $K^\bullet \otimes_R M = K^\bullet \otimes_R^{\mathbf{L}} M$. Hence for every $R$-module $M$ the sequence $$ K^{a - 2} \otimes_R M \to K^{a - 1} \otimes_R M \to K^a \otimes_R M $$ is exact in the middle. Since $K^{a - 2} \to K^{a - 1} \to K^a \to \Coker(d_K^{a - 1}) \to 0$ is a flat resolution this implies that $\text{Tor}_1^R(\Coker(d_K^{a - 1}), M) = 0$ for all $R$-modules $M$. This means that $\Coker(d_K^{a - 1})$ is flat, see Algebra, Lemma \ref{algebra-lemma-characterize-flat}.
If (2) holds, then we may compute $K^\bullet \otimes_R^\mathbf{L} M = E^\bullet \otimes_R M$ and it is clear that (1) holds. Assume that (1) holds. We may replace $K^\bullet$ by a projective resolution with $K^i = 0$ for $i > b$. See Derived Categories, Lemma \ref{derived-lemma-projective-resolutions-exist}. Set $E^\bullet = \tau_{\geq a}K^\bullet$. Everything is clear except that $E^a$ is flat which follows immediately from Lemma \ref{lemma-last-one-flat} and the definitions.
The implication (2) $\Rightarrow$ (1) is immediate. Assume (1) holds. First we choose a K-flat complex $K^\bullet$ with flat terms representing $K$, see Lemma \ref{lemma-K-flat-resolution}. For any $R$-module $M$ the cohomology of $$ K^{n - 1} \otimes_R M \to K^n \otimes_R M \to K^{n + 1} \otimes_R M $$ computes $H^n(K \otimes_R^\mathbf{L} M)$. This is always zero for $n < a$. Hence if we apply Lemma \ref{lemma-last-one-flat} to the complex $\ldots \to K^{a - 1} \to K^a \to K^{a + 1}$ we conclude that $N = \Coker(K^{a - 1} \to K^a)$ is a flat $R$-module. We set $$ E^\bullet = \tau_{\geq a}K^\bullet = (\ldots \to 0 \to N \to K^{a + 1} \to \ldots ) $$ The kernel $L^\bullet$ of $K^\bullet \to E^\bullet$ is the complex $$ L^\bullet = (\ldots \to K^{a - 1} \to I \to 0 \to \ldots) $$ where $I \subset K^a$ is the image of $K^{a - 1} \to K^a$. Since we have the short exact sequence $0 \to I \to K^a \to N \to 0$ we see that $I$ is a flat $R$-module. Thus $L^\bullet$ is a bounded above complex of flat modules, hence K-flat by Lemma \ref{lemma-derived-tor-quasi-isomorphism}. It follows that $E^\bullet$ is K-flat by Lemma \ref{lemma-K-flat-two-out-of-three-ses}.
Assume (2). Then the complex $E^\bullet$ with $E^{-i} = F_i$ is quasi-isomorphic to $M$. Hence the Tor dimension of $M$ is at most $d$ by Lemma \ref{lemma-tor-amplitude}. Conversely, assume (1). Let $P^\bullet \to M$ be a projective resolution of $M$. By Lemma \ref{lemma-last-one-flat} we see that $\tau_{\geq -d}P^\bullet$ is a flat resolution of $M$ of length $d$, i.e., (2) holds.
We may assume that $K^\bullet$ is a complex of flat $B$-modules with $K^i = 0$ for $i \not \in [a, b]$, see Lemma \ref{lemma-tor-amplitude}. Let $M$ be an $A$-module. Choose a free resolution $F^\bullet \to M$. Then $$ (K^\bullet \otimes_B^\mathbf{L} L^\bullet) \otimes_A^{\mathbf{L}} M = \text{Tot}(\text{Tot}(K^\bullet \otimes_B L^\bullet) \otimes_A F^\bullet) = \text{Tot}(K^\bullet \otimes_B \text{Tot}(L^\bullet \otimes_A F^\bullet)) $$ see Homology, Remark \ref{homology-remark-triple-complex} for the second equality. By assumption (2) the complex $\text{Tot}(L^\bullet \otimes_A F^\bullet)$ has nonzero cohomology only in degrees $[c, d]$. Hence the spectral sequence of Homology, Lemma \ref{homology-lemma-ss-double-complex} for the double complex $K^\bullet \otimes_B \text{Tot}(L^\bullet \otimes_A F^\bullet)$ proves that $(K^\bullet \otimes_B^\mathbf{L} L^\bullet) \otimes_A^{\mathbf{L}} M$ has nonzero cohomology only in degrees $[a + c, b + d]$.
This is a special case of Lemma \ref{lemma-push-tor-amplitude}, but can also be seen directly as follows. We have $K^\bullet \otimes_A^{\mathbf{L}} M = K^\bullet \otimes_B^{\mathbf{L}} (M \otimes_A B)$ since any projective resolution of $K^\bullet$ as a complex of $B$-modules is a flat resolution of $K^\bullet$ as a complex of $A$-modules and can be used to compute $K^\bullet \otimes_A^{\mathbf{L}} M$.
This is a special case of Lemma \ref{lemma-push-tor-amplitude}, but can also be seen directly as follows. Let $M$ be an $A$-module. Choose a free resolution $F^\bullet \to M$. Then $$ K^\bullet \otimes_A^{\mathbf{L}} M = \text{Tot}(K^\bullet \otimes_A F^\bullet) = \text{Tot}(K^\bullet \otimes_B (F^\bullet \otimes_A B)) = K^\bullet \otimes_B^{\mathbf{L}} (M \otimes_A^{\mathbf{L}} B). $$ By our assumption on $B$ as an $A$-module we see that $M \otimes_A^{\mathbf{L}} B$ has cohomology only in degrees $-d, -d + 1, \ldots, 0$. Because $K^\bullet$ has tor amplitude in $[a, b]$ we see from the spectral sequence in Example \ref{example-tor} that $K^\bullet \otimes_B^{\mathbf{L}} (M \otimes_A^{\mathbf{L}} B)$ has cohomology only in degrees $[-d + a, b]$ as desired.
By Lemma \ref{lemma-tor-amplitude} we can find a quasi-isomorphism $E^\bullet \to K^\bullet$ where $E^\bullet$ is a complex of flat $A$-modules with $E^i = 0$ for $i \not \in [a, b]$. Then $E^\bullet \otimes_A B$ computes $K^\bullet \otimes_A ^{\mathbf{L}} B$ by construction and each $E^i \otimes_A B$ is a flat $B$-module by Algebra, Lemma \ref{algebra-lemma-flat-base-change}. Hence we conclude by Lemma \ref{lemma-tor-amplitude}.
Assume (3) and let $M$ be an $A$-module. Then $H^i = H^i(K^\bullet \otimes_A^\mathbf{L} M)$ is a $B$-module and $(H^i)_\mathfrak m = H^i(K^\bullet_\mathfrak m \otimes_{A_\mathfrak p}^\mathbf{L} M_\mathfrak p)$. Hence $H^i = 0$ for $i \not \in [a, b]$ by Algebra, Lemma \ref{algebra-lemma-characterize-zero-local}. Thus (3) $\Rightarrow$ (1). We omit the proofs of (1) $\Rightarrow$ (2) and (2) $\Rightarrow$ (3).
This follows immediately from Lemma \ref{lemma-tor-amplitude-localization} but can also be seen directly as follows. Note that $- \otimes_R R_{f_i}$ is an exact functor and that therefore $$ H^i(K^\bullet)_{f_i} = H^i(K^\bullet) \otimes_R R_{f_i} = H^i(K^\bullet \otimes_R R_{f_i}). $$ and similarly for every $R$-module $M$ we have $$ H^i(K^\bullet \otimes_R^{\mathbf{L}} M)_{f_i} = H^i(K^\bullet \otimes_R^{\mathbf{L}} M) \otimes_R R_{f_i} = H^i(K^\bullet \otimes_R R_{f_i} \otimes_{R_{f_i}}^{\mathbf{L}} M_{f_i}). $$ Hence the result follows from the fact that an $R$-module $N$ is zero if and only if $N_{f_i}$ is zero for each $i$, see Algebra, Lemma \ref{algebra-lemma-cover}.
Assume (1). We may assume $K$ is the complex $$ \ldots \to 0 \to P^a \to P^{a + 1} \to \ldots \to P^{b - 1} \to P^b \to 0 \to \ldots $$ where $P^i$ is a projective $R$-module for all $i \in \mathbf{Z}$. In this case we can compute the ext groups by the complex $$ \ldots \to 0 \to \Hom_R(P^b, N) \to \ldots \to \Hom_R(P^a, N) \to 0 \to \ldots $$ and we obtain (2). \medskip\noindent Assume (2) holds. Choose an injection $H^n(K) \to I$ where $I$ is an injective $R$-module. Since $\Hom_R(-, I)$ is an exact functor, we see that $\Ext^{-n}(K, I) = \Hom_R(H^n(K), I)$. We conclude in particular that $H^n(K)$ is zero for $n > b$. Thus (2) implies (3). \medskip\noindent By the same argument as in (2) implies (3) gives that (3) implies (4). \medskip\noindent Assume (4). The same argument as in (2) implies (3) shows that $H^{a - 1}(K) = 0$, i.e., we have $H^i(K) = 0$ unless $i \in [a, b]$. In particular, $K$ is bounded above and we can choose a a complex $P^\bullet$ representing $K$ with $P^i$ projective (for example free) for all $i \in \mathbf{Z}$ and $P^i = 0$ for $i > b$. See Derived Categories, Lemma \ref{derived-lemma-subcategory-left-resolution}. Let $Q = \Coker(P^{a - 1} \to P^a)$. Then $K$ is quasi-isomorphic to the complex $$ \ldots \to 0 \to Q \to P^{a + 1} \to \ldots \to P^b \to 0 \to \ldots $$ as $H^i(K) = 0$ for $i < a$. Denote $K' = (P^{a + 1} \to \ldots \to P^b)$ the corresponding object of $D(R)$. We obtain a distinguished triangle $$ K' \to K \to Q[-a] \to K'[1] $$ in $D(R)$. Thus for every $R$-module $N$ an exact sequence $$ \Ext^{-a}(K', N) \to \Ext^1(Q, N) \to \Ext^{1 - a}(K, N) $$ By assumption the term on the right vanishes. By the implication (1) $\Rightarrow$ (2) the term on the left vanishes. Thus $Q$ is a projective $R$-module by Algebra, Lemma \ref{algebra-lemma-characterize-projective}. Hence (1) holds and the proof is complete.
Assume (1). We may assume $K$ is the complex $$ \ldots \to 0 \to I^a \to I^{a + 1} \to \ldots \to I^{b - 1} \to I^b \to 0 \to \ldots $$ where $I^i$ is a injective $R$-module for all $i \in \mathbf{Z}$. In this case we can compute the ext groups by the complex $$ \ldots \to 0 \to \Hom_R(N, I^a) \to \ldots \to \Hom_R(N, I^b) \to 0 \to \ldots $$ and we obtain (2). It is clear that (2) implies (3). \medskip\noindent Assume (3) holds. Choose a nonzero map $R \to H^n(K)$. Since $\Hom_R(R, -)$ is an exact functor, we see that $\Ext^n_R(R, K) = \Hom_R(R, H^n(K)) = H^n(K)$. We conclude that $H^n(K)$ is zero for $n \not \in [a, b]$. In particular, $K$ is bounded below and we can choose a quasi-isomorphism $$ K \to I^\bullet $$ with $I^i$ injective for all $i \in \mathbf{Z}$ and $I^i = 0$ for $i < a$. See Derived Categories, Lemma \ref{derived-lemma-subcategory-right-resolution}. Let $J = \Ker(I^b \to I^{b + 1})$. Then $K$ is quasi-isomorphic to the complex $$ \ldots \to 0 \to I^a \to \ldots \to I^{b - 1} \to J \to 0 \to \ldots $$ Denote $K' = (I^a \to \ldots \to I^{b - 1})$ the corresponding object of $D(R)$. We obtain a distinguished triangle $$ J[-b] \to K \to K' \to J[1 - b] $$ in $D(R)$. Thus for every ideal $I \subset R$ an exact sequence $$ \Ext^b(R/I, K') \to \Ext^1(R/I, J) \to \Ext^{1 + b}(R/I, K) $$ By assumption the term on the right vanishes. By the implication (1) $\Rightarrow$ (2) the term on the left vanishes. Thus $J$ is a injective $R$-module by Lemma \ref{lemma-characterize-injective-bis}.
The implication (1) $\Rightarrow$ (2) is immediate. Assume (2). Say $H^i(K) = 0$ for $i < a$. Then $\Ext^i(M, K) = 0$ for $i < a$ and all $R$-modules $M$. Thus it suffices to show that $\Ext^i(M, K) = 0$ for $i > b$ any finite $R$-module $M$, see Lemma \ref{lemma-injective-amplitude}. By Algebra, Lemma \ref{algebra-lemma-filter-Noetherian-module} the module $M$ has a finite filtration whose successive quotients are of the form $R/\mathfrak p$ where $\mathfrak p$ is a prime ideal. If $0 \to M_1 \to M \to M_2 \to 0$ is a short exact sequence and $\Ext^i(M_j, K) = 0$ for $i > b$ and $j = 1, 2$, then $\Ext^i(M, K) = 0$ for $i > b$. Thus we may assume $M = R/\mathfrak p$. If $I \subset \mathfrak p$, then the vanishing follows from the assumption. If not, then choose $f \in I$, $f \not \in \mathfrak p$. Consider the short exact sequence $$ 0 \to R/\mathfrak p \xrightarrow{f} R/\mathfrak p \to R/(\mathfrak p, f) \to 0 $$ The $R$-module $R/(\mathfrak p, f)$ has a filtration whose successive quotients are $R/\mathfrak q$ with $(\mathfrak p, f) \subset \mathfrak q$. Thus by Noetherian induction and the argument above we may assume the vanishing holds for $R/(\mathfrak p, f)$. On the other hand, the modules $E^i = \Ext^i(R/\mathfrak p, K)$ are finite by our assumption on $K$ (bounded below with finite cohomology modules), the spectral sequence (\ref{equation-first-ss-ext}), and Algebra, Lemma \ref{algebra-lemma-ext-noetherian}. Thus $E^i$ for $i > b$ is a finite $R$-module such that $E^i/fE^i = 0$.  We conclude by Nakayama's lemma (Algebra, Lemma \ref{algebra-lemma-NAK}) that $E^i$ is zero.
The equivalence of (1)(a) and (1)(b) follows from Algebra, Lemma \ref{algebra-lemma-characterize-projective}. If $\varphi : M \to N$ and $\varphi' : M \to N$ factor through the modules $P$ and $P'$ then $\varphi + \varphi'$ factors through $P \oplus P'$ and $\lambda \varphi$ factors through $P$ for all $\lambda \in R$. This proves (2). If $\varphi : M \to N$ factors through the module $P$ and $\psi$ and $\xi$ are as in (3), then $\xi \circ \varphi \circ \psi$ factors through $P$. This proves (3).
By Lemma \ref{lemma-ideal-factor-through-projective} we can factor $\varphi = \tau \circ \sigma$ where the target of $\sigma$ is $\bigoplus_{i \in I} R$ for some set $I$. Choose generators $x_1, \ldots, x_n$ for $M$. Write $\sigma(x_j) = (a_{ji})_{i \in I}$. For each $j$ only a finite number of $a_{ij}$ are nonzero. Hence $\sigma$ has image contained in a finite free $R$-module and we conclude.
The equivalence of (1) and (2) follows from Lemma \ref{lemma-ideal-factor-through-projective}. If (1) holds, then (3) holds because $\Ext^1_R(P, N)$ for any $N$ and any projective module $P$. Conversely, assume (3) holds. Choose a short exact sequence $0 \to N \to P \to M \to 0$ with $P$ projective (or even free). By assumption the corresponding element of $\Ext^1_R(M, N)$ is annihilated by $I$. Hence for every $a \in I$ the map $a : M \to M$ can be factored through the surjection $P \to M$ and we conclude (1) holds.
Let $\alpha$ be an element of degree $n$ on the left hand side. Thus $$ \alpha = (\alpha^{p, q}) \in \prod\nolimits_{p + q = n} \Hom_R(K^{-q}, \Hom^p(L^\bullet, M^\bullet)) $$ Each $\alpha^{p, q}$ is an element $$ \alpha^{p, q} = (\alpha^{r, s, q}) \in \prod\nolimits_{r + s + q = n} \Hom_R(K^{-q}, \Hom_R(L^{-s}, M^r)) $$ If we make the identifications \begin{equation} \label{equation-identification} \Hom_R(K^{-q}, \Hom_R(L^{-s}, M^r)) = \Hom_R(K^{-q} \otimes_R L^{-s}, M^r) \end{equation} then by our sign rules we get \begin{align*} \text{d}(\alpha^{r, s, q}) & = \text{d}_{\Hom^\bullet(L^\bullet, M^\bullet)} \circ \alpha^{r, s, q} - (-1)^n \alpha^{r, s, q} \circ \text{d}_K \\ & = \text{d}_M \circ \alpha^{r, s, q} - (-1)^{r + s} \alpha^{r, s, q} \circ \text{d}_L - (-1)^{r + s + q} \alpha^{r, s, q} \circ \text{d}_K \end{align*} On the other hand, if $\beta$ is an element of degree $n$ of the right hand side, then $$ \beta = (\beta^{r, s, q}) \in \prod\nolimits_{r + s + q = n} \Hom_R(K^{-q} \otimes_R L^{-s}, M^r) $$ and by our sign rule (Homology, Definition \ref{homology-definition-associated-simple-complex}) we get \begin{align*} \text{d}(\beta^{r, s, q}) & = \text{d}_M \circ \beta^{r, s, q} - (-1)^n \beta^{r, s, q} \circ \text{d}_{\text{Tot}(K^\bullet \otimes L^\bullet)} \\ & = \text{d}_M \circ \beta^{r, s, q} - (-1)^{r + s + q} \left( \beta^{r, s, q} \circ \text{d}_K + (-1)^{-q} \beta^{r, s, q} \circ \text{d}_L \right) \end{align*} Thus we see that the map induced by the identifications (\ref{equation-identification}) indeed is a morphism of complexes.
This is a special case of Lemma \ref{lemma-diagonal-better} but we will also construct it directly here. Let $\alpha$ be an element of degree $n$ of the right hand side. Thus $$ \alpha = (\alpha^{p, q}) \in \prod\nolimits_{p + q = n} \Hom_R(L^{-q}, \text{Tot}^p(K^\bullet \otimes_R L^\bullet)) $$ Each $\alpha^{p, q}$ is an element $$ \alpha^{p, q} = (\alpha^{r, s, q}) \in \Hom_R(L^{-q}, \bigoplus\nolimits_{r + s + q = n} K^r \otimes_R L^s) $$ where we think of $\alpha^{r, s, q}$ as a family of maps such that for every $x \in L^{-q}$ only a finite number of $\alpha^{r, s, q}(x)$ are nonzero. By our sign rules we get \begin{align*} \text{d}(\alpha^{r, s, q}) & = \text{d}_{\text{Tot}(K^\bullet \otimes_R L^\bullet)} \circ \alpha^{r, s, q} - (-1)^n \alpha^{r, s, q} \circ \text{d}_L \\ & = \text{d}_K \circ \alpha^{r, s, q} + (-1)^r \text{d}_L \circ \alpha^{r, s, q} - (-1)^n \alpha^{r, s, q} \circ \text{d}_L \end{align*} Now an element $\beta \in K^n$ we send to $\alpha$ with $\alpha^{n, -q, q} = \beta \otimes \text{id}_{L^{-q}}$ and $\alpha^{r, s, q} = 0$ if $r \not = n$. This is indeed an element as above, as for fixed $q$ there is only one nonzero $\alpha^{r, s, q}$. The description of the differential shows this is compatible with differentials.
Omitted. Hints: as unit $\mathbf{1}$ we take the complex having $R$ in degree $0$ and zero in other degrees with obvious isomorphisms $\text{Tot}(\mathbf{1} \otimes_R M^\bullet) = M^\bullet$ and $\text{Tot}(K^\bullet \otimes_R \mathbf{1}) = K^\bullet$. to prove the lemma you have to check the commutativity of various diagrams, see Categories, Definitions \ref{categories-definition-monoidal-category} and \ref{categories-definition-symmetric-monoidal-category}. The verifications are straightforward in each case.
The assumptions mean that $$ M \xrightarrow{\eta \otimes 1} M \otimes_R N \otimes_R M \xrightarrow{1 \otimes \epsilon} M \quad\text{and}\quad N \xrightarrow{1 \otimes \eta} N \otimes_R M \otimes_R N \xrightarrow{\epsilon \otimes 1} N $$ are the identity map. We can choose a finite free module $F$, an $R$-module map $F \to M$, and a lift $\tilde \eta : R \to F \otimes_R N$ of $\eta$. We obtain a commutative diagram $$ \xymatrix{ M \ar[rr]_-{\eta \otimes 1} \ar[rrd]_-{\tilde \eta \otimes 1} & & M \otimes_R N \otimes_R M \ar[r]_-{1 \otimes \epsilon} & M \\ & & F \otimes_R N \otimes_R M \ar[u] \ar[r]^-{1 \otimes \epsilon} & F \ar[u] } $$ This shows that the identity on $M$ factors through a finite free module and hence $M$ is finite projective. By symmetry we see that $N$ is finite projective. This proves part (1). Part (2) follows from Categories, Lemma \ref{categories-lemma-left-dual} and its proof. Part (3) follows from the first equality of the proof.
Since $(1 \otimes \epsilon) \circ (\eta \otimes 1) = \text{id}_{M^\bullet}$ and $(\epsilon \otimes 1) \circ (1 \otimes \eta) = \text{id}_{N^\bullet}$ by Categories, Definition \ref{categories-definition-dual} we see immediately that we have $(1 \otimes \epsilon_n) \circ (\eta_n \otimes 1) = \text{id}_{M^n}$ and $(\epsilon_n \otimes 1) \circ (1 \otimes \eta_n) = \text{id}_{N^{-n}}$ which proves (3). By Lemma \ref{lemma-left-dual-module} we have (2). Since the sum $\eta = \sum \eta_n$ is finite, we get (1). Since $\eta = \sum \eta_n$ is a map of complexes $R \to \text{Tot}(M^\bullet \otimes_R N^\bullet)$ we see that $$ (d_M^{-n - 1} \otimes 1) \circ \eta_{-n - 1}  + (-1)^n (1 \otimes d_N^{-n}) \circ \eta_{-n} = 0 $$ by our choice of signs for the differential on $\text{Tot}(M^\bullet \otimes_R N^\bullet)$. Unwinding definitions, this proves (4). To see the final statement of the lemma one reads the above backwards.
Choose a K-injective complex $I^\bullet$ representing $M$ and a K-flat complex of $R$-modules $L^\bullet$ representing $L$. For any complex of $R$-modules $K^\bullet$ we have $$ \Hom^\bullet(K^\bullet, \Hom^\bullet(L^\bullet, I^\bullet)) = \Hom^\bullet(\text{Tot}(K^\bullet \otimes_R L^\bullet), I^\bullet) $$ by Lemma \ref{lemma-compose}. The lemma follows by the definition of $R\Hom$ and because $\text{Tot}(K^\bullet \otimes_R L^\bullet)$ represents the derived tensor product.
By (\ref{equation-cohomology-hom-complex}) and Derived Categories, Lemma \ref{derived-lemma-morphisms-from-projective-complex} the cohomology groups of the complex are ``correct''. Hence if we choose a quasi-isomorphism $L^\bullet \to I^\bullet$ with $I^\bullet$ a K-injective complex of $R$-modules then the induced map $$ \Hom^\bullet(P^\bullet, L^\bullet) \longrightarrow \Hom^\bullet(P^\bullet, I^\bullet) $$ is a quasi-isomorphism. As the right hand side is our definition of $R\Hom_R(P^\bullet, L^\bullet)$ we win.
Choose a K-injective complex $I^\bullet$ representing $M$, a K-injective complex $J^\bullet$ representing $L$, and a K-flat complex $K^\bullet$ representing $K$. The map is defined using the map $$ \text{Tot}(\Hom^\bullet(J^\bullet, I^\bullet) \otimes_R K^\bullet) \longrightarrow \Hom^\bullet(\Hom^\bullet(K^\bullet, J^\bullet), I^\bullet) $$ of Lemma \ref{lemma-evaluate-and-more}. We omit the proof that this is functorial in all three objects of $D(R)$.
Choose a K-injective complex $I^\bullet$ representing $M$, a K-injective complex $J^\bullet$ representing $L$, and any complex of $R$-modules $K^\bullet$ representing $K$. By Lemma \ref{lemma-composition} there is a map of complexes $$ \text{Tot}\left( \Hom^\bullet(J^\bullet, I^\bullet) \otimes_R \Hom^\bullet(K^\bullet, J^\bullet) \right) \longrightarrow \Hom^\bullet(K^\bullet, I^\bullet) $$ The complexes of $R$-modules $\Hom^\bullet(J^\bullet, I^\bullet)$, $\Hom^\bullet(K^\bullet, J^\bullet)$, and $\Hom^\bullet(K^\bullet, I^\bullet)$ represent $R\Hom_R(L, M)$, $R\Hom_R(K, L)$, and $R\Hom_R(K, M)$. If we choose a K-flat complex $H^\bullet$ and a quasi-isomorphism $H^\bullet \to \Hom^\bullet(K^\bullet, J^\bullet)$, then there is a map $$ \text{Tot}\left( \Hom^\bullet(J^\bullet, I^\bullet) \otimes_R H^\bullet \right) \longrightarrow \text{Tot}\left( \Hom^\bullet(J^\bullet, I^\bullet) \otimes_R \Hom^\bullet(K^\bullet, J^\bullet) \right) $$ whose source represents $R\Hom_R(L, M) \otimes_R^\mathbf{L} R\Hom_R(K, L)$. Composing the two displayed arrows gives the desired map. We omit the proof that the construction is functorial.