15.71 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.72 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.71.0.1
$$\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])$$

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

Lemma 15.71.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.71.1.1
$$\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)$$

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.71.1.1) indeed is a morphism of complexes. $\square$

Remark 15.71.2. Let $R$ be a ring. The category $\text{Comp}(R)$ of complexes of $R$-modules is a symmetric monoidal category with tensor product given by $\text{Tot}(- \otimes _ R -)$, see Lemma 15.58.1. Given $L^\bullet$ and $M^\bullet$ in $\text{Comp}(R)$ an element $f \in \mathop{\mathrm{Hom}}\nolimits ^0(L^\bullet , M^\bullet )$ defines a map of complexes $f : L^\bullet \to M^\bullet$ if and only if $\text{d}(f) = 0$. Hence Lemma 15.71.1 also tells us that

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

functorially in $K^\bullet , L^\bullet , M^\bullet$ in $\text{Comp}(R)$. This means that $\mathop{\mathrm{Hom}}\nolimits ^\bullet ( - , -)$ is an internal hom for the symmetric monoidal category $\text{Comp}(R)$ as discussed in Categories, Remark 4.43.12.

Lemma 15.71.3. 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. Via the discussion in Remark 15.71.2 the existence of such a canonical map follows from Categories, Remark 4.43.12. We also give a direct construction.

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.71.4. 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. Via the discussion in Remark 15.71.2 the existence of such a canonical map follows from Categories, Remark 4.43.12. We also give a direct construction.

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.71.5. 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. Via the discussion in Remark 15.71.2 the existence of such a canonical map follows from Categories, Remark 4.43.12. We also give a direct construction.

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.71.6. 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. Via the discussion in Remark 15.71.2 the existence of such a canonical map follows from Categories, Remark 4.43.12. We also give a direct construction.

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.71.6.1
$$\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})$$

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.71.6.2
$$\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})$$

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.71.6.1) and (15.71.6.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.71.7. Let us explain why the sign used in the direct construction in the proof of Lemma 15.71.6 agrees with the sign we get from the construction using the discussion in Remark 15.71.2 and Categories, Remark 4.43.12. Denote $- \otimes - = \text{Tot}(- \otimes _ R -)$ and $hom(-, -) = \mathop{\mathrm{Hom}}\nolimits ^\bullet (-, -)$. The construction using monoidal category language tells us to use the arrow

$hom(L^\bullet , M^\bullet ) \otimes K^\bullet \longrightarrow hom(hom(K^\bullet , L^\bullet ), M^\bullet )$

in $\text{Comp}(R)$ corresponding to the arrow

$hom(L^\bullet , M^\bullet ) \otimes K^\bullet \otimes hom(K^\bullet , L^\bullet ) \longrightarrow M^\bullet$

gotten by swapping the order of the last two tensor products and then using the evaluation maps $hom(K^\bullet , L^\bullet ) \otimes K^\bullet \to L^\bullet$ and $hom(L^\bullet , K^\bullet ) \otimes L^\bullet \to M^\bullet$. Only in swapping does a sign intervene. Namely, in the isomorphism

$K^\bullet \otimes hom(K^\bullet , L^\bullet ) \to hom(K^\bullet , L^\bullet ) \otimes K^\bullet$

there is a sign $(-1)^{r(q + r')}$ on $K^ r \otimes _ R \mathop{\mathrm{Hom}}\nolimits _ R(K^{-r'}, L^ q)$, see Section 15.72 item (9). The reader can convince themselves that, because of the correspondence we are using to describe maps into an internal hom, this sign only matters if $r = r'$ and in this case we obtain $(-1)^{r(q + r)} = (-1)^{r + qr}$ as in the direct proof.

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).