## 15.70 Hom complexes

Let $R$ be a ring. Let $L^\bullet$ and $M^\bullet$ be two complexes of $R$-modules. We construct a complex $\mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet )$. Namely, for each $n$ we set

$\mathop{\mathrm{Hom}}\nolimits ^ n(L^\bullet , M^\bullet ) = \prod \nolimits _{n = p + q} \mathop{\mathrm{Hom}}\nolimits _ R(L^{-q}, M^ p)$

It is a good idea to think of $\mathop{\mathrm{Hom}}\nolimits ^ n$ as the $R$-module of all $R$-linear maps from $L^\bullet$ to $M^\bullet$ (viewed as graded modules) which are homogenous of degree $n$. In this terminology, we define the differential by the rule

$\text{d}(f) = \text{d}_ M \circ f - (-1)^ n f \circ \text{d}_ L$

for $f \in \mathop{\mathrm{Hom}}\nolimits ^ n(L^\bullet , M^\bullet )$. We omit the verification that $\text{d}^2 = 0$. See Section 15.71 for sign rules. This construction is a special case of Differential Graded Algebra, Example 22.26.6. It follows immediately from the construction that we have

15.70.0.1
\begin{equation} \label{more-algebra-equation-cohomology-hom-complex} H^ n(\mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet )) = \mathop{\mathrm{Hom}}\nolimits _{K(R)}(L^\bullet , M^\bullet [n]) \end{equation}

for all $n \in \mathbf{Z}$.

Lemma 15.70.1. Let $R$ be a ring. Given complexes $K^\bullet , L^\bullet , M^\bullet$ of $R$-modules there is a canonical isomorphism

$\mathop{\mathrm{Hom}}\nolimits ^\bullet (K^\bullet , \mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet )) = \mathop{\mathrm{Hom}}\nolimits ^\bullet (\text{Tot}(K^\bullet \otimes _ R L^\bullet ), M^\bullet )$

of complexes of $R$-modules.

Proof. Let $\alpha$ be an element of degree $n$ on the left hand side. Thus

$\alpha = (\alpha ^{p, q}) \in \prod \nolimits _{p + q = n} \mathop{\mathrm{Hom}}\nolimits _ R(K^{-q}, \mathop{\mathrm{Hom}}\nolimits ^ 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} \mathop{\mathrm{Hom}}\nolimits _ R(K^{-q}, \mathop{\mathrm{Hom}}\nolimits _ R(L^{-s}, M^ r))$

If we make the identifications

15.70.1.1
\begin{equation} \label{more-algebra-equation-identification} \mathop{\mathrm{Hom}}\nolimits _ R(K^{-q}, \mathop{\mathrm{Hom}}\nolimits _ R(L^{-s}, M^ r)) = \mathop{\mathrm{Hom}}\nolimits _ 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}_{\mathop{\mathrm{Hom}}\nolimits ^\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} \mathop{\mathrm{Hom}}\nolimits _ R(K^{-q} \otimes _ R L^{-s}, M^ r)$

and by our sign rule (Homology, Definition 12.18.3) 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 (15.70.1.1) indeed is a morphism of complexes. $\square$

Lemma 15.70.2. Let $R$ be a ring. Given complexes $K^\bullet , L^\bullet , M^\bullet$ of $R$-modules there is a canonical morphism

$\text{Tot}\left( \mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet ) \otimes _ R \mathop{\mathrm{Hom}}\nolimits ^\bullet (K^\bullet , L^\bullet ) \right) \longrightarrow \mathop{\mathrm{Hom}}\nolimits ^\bullet (K^\bullet , M^\bullet )$

of complexes of $R$-modules.

Proof. An element $\alpha$ of degree $n$ of the left hand side is

$\alpha = (\alpha ^{p, q}) \in \bigoplus \nolimits _{p + q = n} \mathop{\mathrm{Hom}}\nolimits ^ p(L^\bullet , M^\bullet ) \otimes _ R \mathop{\mathrm{Hom}}\nolimits ^ q(K^\bullet , L^\bullet )$

The element $\alpha ^{p, q}$ is a finite sum $\alpha ^{p, q} = \sum \beta ^ p_ i \otimes \gamma ^ q_ i$ with

$\beta ^ p_ i = (\beta ^{r, s}_ i) \in \prod \nolimits _{r + s = p} \mathop{\mathrm{Hom}}\nolimits _ R(L^{-s}, M^ r)$

and

$\gamma ^ q_ i = (\gamma ^{u, v}_ i) \in \prod \nolimits _{u + v = q} \mathop{\mathrm{Hom}}\nolimits _ R(K^{-v}, L^ u)$

The map is given by sending $\alpha$ to $\delta = (\delta ^{r, v})$ with

$\delta ^{r, v} = \sum \nolimits _{i, s} \beta ^{r, s}_ i \circ \gamma ^{-s, v}_ i \in \mathop{\mathrm{Hom}}\nolimits _ R(K^{-v}, M^ r)$

For given $r + v = n$ this sum is finite as there are only finitely many nonzero $\alpha ^{p, q}$, hence only finitely many nonzero $\beta ^ p_ i$ and $\gamma ^ q_ i$. By our sign rules we have

\begin{align*} \text{d}(\alpha ^{p, q}) & = \text{d}_{\mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet )}(\alpha ^{p, q}) + (-1)^ p \text{d}_{\mathop{\mathrm{Hom}}\nolimits ^\bullet (K^\bullet , L^\bullet )}(\alpha ^{p, q}) \\ & = \sum \Big( \text{d}_ M \circ \beta ^ p_ i \circ \gamma ^ q_ i - (-1)^ p \beta ^ p_ i \circ \text{d}_ L \circ \gamma ^ q_ i \Big) \\ & \quad + (-1)^ p \sum \Big( \beta ^ p_ i \circ \text{d}_ L \circ \gamma ^ q_ i - (-1)^ q \beta ^ p_ i \circ \gamma ^ q_ i \circ \text{d}_ K \Big) \\ & = \sum \Big( \text{d}_ M \circ \beta ^ p_ i \circ \gamma ^ q_ i -(-1)^ n \beta ^ p_ i \circ \gamma ^ q_ i \circ \text{d}_ K \Big) \end{align*}

It follows that the rules $\alpha \mapsto \delta$ is compatible with differentials and the lemma is proved. $\square$

Lemma 15.70.3. Let $R$ be a ring. Given complexes $K^\bullet , L^\bullet , M^\bullet$ of $R$-modules there is a canonical morphism

$\text{Tot}(K^\bullet \otimes _ R \mathop{\mathrm{Hom}}\nolimits ^\bullet (M^\bullet , L^\bullet )) \longrightarrow \mathop{\mathrm{Hom}}\nolimits ^\bullet (M^\bullet , \text{Tot}(K^\bullet \otimes _ R L^\bullet ))$

of complexes of $R$-modules functorial in all three complexes.

Proof. Let $\alpha$ be an element of degree $n$ of the right hand side. Thus

$\alpha = (\alpha ^{p, q}) \in \prod \nolimits _{p + q = n} \mathop{\mathrm{Hom}}\nolimits _ R(M^{-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 \mathop{\mathrm{Hom}}\nolimits _ R(M^{-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 M^{-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}_ M \\ & = \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}_ M \end{align*}

On the other hand, if $\beta$ is an element of degree $n$ of the left hand side, then

$\beta = (\beta ^{p, q}) \in \bigoplus \nolimits _{p + q = n} K^ p \otimes _ R \mathop{\mathrm{Hom}}\nolimits ^ q(M^\bullet , L^\bullet )$

and we can write $\beta ^{p, q} = \sum \gamma _ i^ p \otimes \delta _ i^ q$ with $\gamma _ i^ p \in K^ p$ and

$\delta _ i^ q = (\delta _ i^{r, s}) \in \prod \nolimits _{r + s = q} \mathop{\mathrm{Hom}}\nolimits _ R(M^{-s}, L^ r)$

By our sign rules we have

\begin{align*} \text{d}(\beta ^{p, q}) & = \text{d}_ K(\beta ^{p, q}) + (-1)^ p \text{d}_{\mathop{\mathrm{Hom}}\nolimits ^\bullet (M^\bullet , L^\bullet )}(\beta ^{p, q}) \\ & = \sum \text{d}_ K(\gamma _ i^ p) \otimes \delta _ i^ q + (-1)^ p \sum \gamma _ i^ p \otimes (\text{d}_ L \circ \delta _ i^ q - (-1)^ q \delta _ i^ q \circ \text{d}_ M) \end{align*}

We send the element $\beta$ to $\alpha$ with

$\alpha ^{r, s, q} = c^{r, s, q}(\sum \gamma _ i^ r \otimes \delta _ i^{s, q})$

where $c^{r, s, q} : K^ r \otimes _ R \mathop{\mathrm{Hom}}\nolimits _ R(M^{-q}, L^ s) \to \mathop{\mathrm{Hom}}\nolimits _ R(M^{-q}, K^ r \otimes _ R L^ s)$ is the canonical map. For a given $\beta$ and $r$ there are only finitely many nonzero $\gamma _ i^ r$ hence only finitely many nonzero $\alpha ^{r, s, q}$ are nonzero (for a given $r$). Thus this family of maps satisfies the conditions above and the map is well defined. Comparing signs we see that this is compatible with differentials. $\square$

Lemma 15.70.4. Let $R$ be a ring. Given complexes $K^\bullet , L^\bullet$ of $R$-modules there is a canonical morphism

$K^\bullet \longrightarrow \mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , \text{Tot}(K^\bullet \otimes _ R L^\bullet ))$

of complexes of $R$-modules functorial in both complexes.

Proof. This is a special case of Lemma 15.70.3 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} \mathop{\mathrm{Hom}}\nolimits _ 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 \mathop{\mathrm{Hom}}\nolimits _ 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. $\square$

Lemma 15.70.5. Let $R$ be a ring. Given complexes $K^\bullet , L^\bullet , M^\bullet$ of $R$-modules there is a canonical morphism

$\text{Tot}(\mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet ) \otimes _ R K^\bullet ) \longrightarrow \mathop{\mathrm{Hom}}\nolimits ^\bullet (\mathop{\mathrm{Hom}}\nolimits ^\bullet (K^\bullet , L^\bullet ), M^\bullet )$

of complexes of $R$-modules functorial in all three complexes.

Proof. Consider an element $\beta$ of degree $n$ of the right hand side. Then

$\beta = (\beta ^{p, s}) \in \prod \nolimits _{p + s = n} \mathop{\mathrm{Hom}}\nolimits _ R(\mathop{\mathrm{Hom}}\nolimits ^{-s}(K^\bullet , L^\bullet ), M^ p)$

Our sign rules tell us that

\begin{align*} \text{d}(\beta ^{p, s}) & = \text{d}_ M \circ \beta ^{p, s} - (-1)^ n \beta ^{p, s} \circ \text{d}_{\mathop{\mathrm{Hom}}\nolimits ^\bullet (K^\bullet , L^\bullet )} \end{align*}

We can describe the last term as follows

$(\beta ^{p, s} \circ \text{d}_{\mathop{\mathrm{Hom}}\nolimits ^\bullet (K^\bullet , L^\bullet )})(f) = \beta ^{p, s}(\text{d}_ L \circ f - (-1)^{s + 1} f \circ \text{d}_ K)$

if $f \in \mathop{\mathrm{Hom}}\nolimits ^{-s - 1}(K^\bullet , L^\bullet )$. We conclude that in some unspecified sense $\text{d}(\beta ^{p, s})$ is a sum of three terms with signs as follows

15.70.5.1
\begin{equation} \label{more-algebra-equation-beta} \text{d}(\beta ^{p, s}) = \text{d}_ M(\beta ^{p, s}) -(-1)^ n\text{d}_ L(\beta ^{p, s}) + (-1)^{p + 1}\text{d}_ K(\beta ^{p, s}) \end{equation}

Next, we consider an element $\alpha$ of degree $n$ of the left hand side. We can write it like so

$\alpha = (\alpha ^{t, r}) \in \bigoplus \nolimits _{t + r = n} \mathop{\mathrm{Hom}}\nolimits ^ t(L^\bullet , M^\bullet ) \otimes K^ r$

Each $\alpha ^{t, r}$ maps to an element

$\alpha ^{t, r} \mapsto (\alpha ^{p, q, r}) \in \prod \nolimits _{p + q = t} \mathop{\mathrm{Hom}}\nolimits _ R(L^{-q}, M^ p) \otimes _ R K^ r$

Our sign rules tell us that

\begin{align*} \text{d}(\alpha ^{p, q, r}) & = \text{d}_{\mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet )}(\alpha ^{p, q, r}) + (-1)^{p + q} \text{d}_ K(\alpha ^{p, q, r}) \end{align*}

where if we further write $\alpha ^{p, q, r} = \sum g_ i^{p, q} \otimes k_ i^ r$ then we have

$\text{d}_{\mathop{\mathrm{Hom}}\nolimits ^\bullet (L^\bullet , M^\bullet )}(\alpha ^{p, q, r}) = \sum (\text{d}_ M \circ g_ i^{p, q}) \otimes k_ i^ r - (-1)^{p + q} \sum (g_ i^{p, q} \circ \text{d}_ L) \otimes k_ i^ r$

We conclude that in some unspecified sense $\text{d}(\alpha ^{p, q, r})$ is a sum of three terms with signs as follows

15.70.5.2
\begin{equation} \label{more-algebra-equation-alpha} \text{d}(\alpha ^{p, q, r}) = \text{d}_ M(\alpha ^{p, q, r}) -(-1)^{p + q}\text{d}_ L(\alpha ^{p, q, r}) + (-1)^{p + q}\text{d}_ K(\alpha ^{p, q, r}) \end{equation}

To define our map we will use the canonical maps

$c_{p, q, r} : \mathop{\mathrm{Hom}}\nolimits _ R(L^{-q}, M^ p) \otimes _ R K^ r \longrightarrow \mathop{\mathrm{Hom}}\nolimits _ R(\mathop{\mathrm{Hom}}\nolimits _ R(K^ r, L^{-q}), M^ p)$

which sends $\varphi \otimes k$ to the map $\psi \mapsto \varphi (\psi (k))$. This is functorial in all three variables. With $s = q + r$ there is an inclusion

$\mathop{\mathrm{Hom}}\nolimits _ R(\mathop{\mathrm{Hom}}\nolimits _ R(K^ r, L^{-q}), M^ p) \subset \mathop{\mathrm{Hom}}\nolimits _ R(\mathop{\mathrm{Hom}}\nolimits ^{-s}(K^\bullet , L^\bullet ), M^ p)$

coming from the projection $\mathop{\mathrm{Hom}}\nolimits ^{-s}(K^\bullet , L^\bullet ) \to \mathop{\mathrm{Hom}}\nolimits _ R(K^ r, L^{-q})$. Since $\alpha ^{p, q, r}$ is nonzero only for a finite number of $r$ we see that for a given $s$ there is only a finite number of $q, r$ with $q + r = s$. Thus we can send $\alpha$ to the element $\beta$ with

$\beta ^{p, s} = \sum \nolimits _{q + r = s} \epsilon _{p, q, r} c_{p, q, r}(\alpha ^{p, q, r})$

where where the sum uses the inclusions given above and where $\epsilon _{p, q, r} \in \{ \pm 1\}$. Comparing signs in the equations (15.70.5.1) and (15.70.5.2) we see that

1. $\epsilon _{p, q, r} = \epsilon _{p + 1, q, r}$

2. $-(-1)^ n\epsilon _{p, q, r} = -(-1)^{p + q}\epsilon _{p, q - 1, r}$ or equivalently $\epsilon _{p, q, r} = (-1)^ r\epsilon _{p, q - 1, r}$

3. $(-1)^{p + 1}\epsilon _{p, q, r} = (-1)^{p + q}\epsilon _{p, q, r + 1}$ or equivalently $(-1)^{q + 1}\epsilon _{p, q, r} = \epsilon _{p, q, r + 1}$.

A good solution is to take

$\epsilon _{p, r, s} = (-1)^{r + qr}$

The choice of this sign is explained in the remark following the proof. $\square$

Remark 15.70.6. In the yoga of super vector spaces the sign used in the proof of Lemma 15.70.5 above can be explained as follows. A super vector space is just a finite dimensional vector space $V$ which comes with a direct sum decomposition $V = V^+ \oplus V^-$. Here we think of the elements of $V^+$ as the even elements and the elements of $V^-$ as the odd ones. Given two super vector spaces $V$ and $W$ we set

$(V \otimes W)^+ = (V^+ \otimes W^+) \oplus (V^- \otimes W^-)$

and similarly for the odd part. In the category of super vector spaces the isomorphism

$\psi : V \otimes W \longrightarrow W \otimes V$

is defined to be the usual one, except that on the summand $V^- \otimes W^-$ we use the negative of the usual identification. In this way we obtain a symmetric monoidal category, see Categories, Section 4.42. An object $V$ of the category of super vector spaces has a left dual which we denote $V^\vee$ which comes equipped with an identity $\eta : \mathbf{1} \to V \otimes V^\vee$ and an evaluation map $\epsilon : V^\vee \otimes V \to \mathbf{1}$ which induce canonical isomorphisms $\mathop{\mathrm{Hom}}\nolimits (V, W) = W \otimes V^\vee$ and $\mathop{\mathrm{Hom}}\nolimits (V^\vee , U) = V \otimes U$, see Categories, Lemma 4.42.6. Given three super vector spaces $U$, $V$, $W$ we can try to construct the analogue

$c : \mathop{\mathrm{Hom}}\nolimits (V, W) \otimes U \longrightarrow \mathop{\mathrm{Hom}}\nolimits (\mathop{\mathrm{Hom}}\nolimits (U, V), W)$

of the maps $c_{p, r, s}$ which occur in the lemma above. Using the formulae given above (which do not involve signs) this becomes a map

$W \otimes V^\vee \otimes U \longrightarrow W \otimes (V \otimes U^\vee )^\vee = W \otimes (U^\vee )^\vee \otimes V^\vee$

To find this arrow in a canonical fashion we need to do two things:

1. we need to use the commutativity constraint $\psi : V^\vee \otimes U \to U \otimes V^\vee$ which introduces a sign on $(V^\vee )^- \otimes U^-$, and

2. we need to use the canonical isomorphism $U \to (U^\vee )^\vee$ which comes from the identification of $U^\vee$ as the right dual of $U$ using $\psi$ as in Categories, Lemma 4.42.10. This differs from the usual identification by $-1$ on the odd part of $U$.

Part (1) explains the sign $(-1)^{qr}$ in the proof of the lemma and part (2) explains the sign $(-1)^ r$ in the proof of the lemma.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).