Canonical: https://knowlpedia.com/algebra-homological/horseshoe-lemma/

# Horseshoe lemma

Given a short exact sequence of modules, compatible projective (or injective) resolutions can be spliced to produce a resolution of the middle module.

Let \(R\) be a ring and
\[
0 \longrightarrow A \xrightarrow{i} B \xrightarrow{p} C \longrightarrow 0
\]
a [short exact sequence](https://knowlpedia.com/algebra-modules/short-exact-sequence/) of \(R\)-modules. Given projective resolutions \(P_\bullet^A\to A\) and \(P_\bullet^C\to C\), the **horseshoe lemma** provides a projective resolution \(P_\bullet^B\to B\) and a short exact sequence of chain complexes
\[
0\to P_\bullet^A\to P_\bullet^B\to P_\bullet^C\to 0
\]
such that \(P_n^B\cong P_n^A\oplus P_n^C\) in every degree \(n\).

## Projective construction

More explicitly, suppose
\[
\cdots \to P_1^A \to P_0^A \to A \to 0,
\qquad
\cdots \to P_1^C \to P_0^C \to C \to 0
\]
are resolutions by [projective modules](https://knowlpedia.com/algebra-modules/projective-module/). The lemma constructs
\[
\cdots \to P_1^B \to P_0^B \to B \to 0,
\]
whose augmentation maps recover the original short exact sequence. The differentials on the degreewise direct sums are chosen compatibly with the maps \(i\) and \(p\).

## Injective version

Dually, given injective resolutions of \(A\) and \(C\), one constructs an injective resolution of \(B\) with \(I^n_B\cong I^n_A\oplus I^n_C\) and a short exact sequence of cochain complexes
\[
0 \to I^\bullet_A \to I^\bullet_B \to I^\bullet_C \to 0.
\]
See [injective resolution](https://knowlpedia.com/algebra-homological/injective-resolution/) and [injective modules](https://knowlpedia.com/algebra-modules/injective-module/).

## Why it matters

The horseshoe lemma underlies functorial constructions of the long exact sequences in [Tor](https://knowlpedia.com/algebra-homological/tor/) and [Ext](https://knowlpedia.com/algebra-homological/ext/) (see [long exact sequence for Tor](https://knowlpedia.com/algebra-homological/long-exact-sequence-tor/) and [long exact sequence for Ext](https://knowlpedia.com/algebra-homological/long-exact-sequence-ext/)), and is a standard way to build resolutions needed to compute derived functors (see [derived functor](https://knowlpedia.com/algebra-homological/derived-functor/)).

## Example

In \(\mathbf{Ab}\), the sequence
\[
0 \to \mathbb Z/2 \to \mathbb Z/6 \to \mathbb Z/3 \to 0.
\]
is exact. Applying the lemma to the standard projective resolutions
\[
0\to \mathbb Z \xrightarrow{\cdot 2} \mathbb Z \to \mathbb Z/2 \to 0,\qquad
0\to \mathbb Z \xrightarrow{\cdot 3} \mathbb Z \to \mathbb Z/3 \to 0.
\]
produces a resolution of \(\mathbb Z/6\) with
\[
P_1^B\cong\mathbb Z\oplus\mathbb Z,\qquad
P_0^B\cong\mathbb Z\oplus\mathbb Z.
\]
This resolution is generally not minimal, but its compatibility with the original exact sequence is what is useful in homological arguments.
