The snake lemma #
The snake lemma is a standard tool in homological algebra. The basic situation
is when we have a diagram as follows in an abelian category C
, with exact rows:
L₁.X₁ ⟶ L₁.X₂ ⟶ L₁.X₃ ⟶ 0
| | |
|v₁₂.τ₁ |v₁₂.τ₂ |v₁₂.τ₃
v v v
0 ⟶ L₂.X₁ ⟶ L₂.X₂ ⟶ L₂.X₃
We shall think of this diagram as the datum of a morphism v₁₂ : L₁ ⟶ L₂
in the
category ShortComplex C
such that both L₁
and L₂
are exact, and L₁.g
is epi
and L₂.f
is a mono (which is equivalent to saying that L₁.X₃
is the cokernel
of L₁.f
and L₂.X₁
is the kernel of L₂.g
). Then, we may introduce the kernels
and cokernels of the vertical maps. In other words, we may introduce short complexes
L₀
and L₃
that are respectively the kernel and the cokernel of v₁₂
. All these
data constitute a SnakeInput C
.
Given such a S : SnakeInput C
, we define a connecting homomorphism
S.δ : L₀.X₃ ⟶ L₃.X₁
and show that it is part of an exact sequence
L₀.X₁ ⟶ L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁ ⟶ L₃.X₂ ⟶ L₃.X₃
. Each of the four exactness
statement is first stated separately as lemmas L₀_exact
, L₁'_exact
,
L₂'_exact
and L₃_exact
and the full 6-term exact sequence is stated
as snake_lemma
. This sequence can even be extended with an extra 0
on the left (see mono_L₀_f
) if L₁.X₁ ⟶ L₁.X₂
is a mono (i.e. L₁
is short exact),
and similarly an extra 0
can be added on the right (epi_L₃_g
)
if L₂.X₂ ⟶ L₂.X₃
is an epi (i.e. L₂
is short exact).
These results were also obtained in the Liquid Tensor Experiment. The code and the proof
here are slightly easier because of the use of the category ShortComplex C
,
the use of duality (which allows to construct only half of the sequence, and deducing
the other half by arguing in the opposite category), and the use of "refinements"
(see CategoryTheory.Abelian.Refinements
) instead of a weak form of pseudo-elements.
A snake input in an abelian category C
consists of morphisms
of short complexes L₀ ⟶ L₁ ⟶ L₂ ⟶ L₃
(which should be visualized vertically) such
that L₀
and L₃
are respectively the kernel and the cokernel of L₁ ⟶ L₂
,
L₁
and L₂
are exact, L₁.g
is epi and L₂.f
is mono.
- L₀ : CategoryTheory.ShortComplex C
the zeroth row
- L₁ : CategoryTheory.ShortComplex C
the first row
- L₂ : CategoryTheory.ShortComplex C
the second row
- L₃ : CategoryTheory.ShortComplex C
the third row
- v₀₁ : self.L₀ ⟶ self.L₁
the morphism from the zeroth row to the first row
- v₁₂ : self.L₁ ⟶ self.L₂
the morphism from the first row to the second row
- v₂₃ : self.L₂ ⟶ self.L₃
the morphism from the second row to the third row
- w₀₂ : CategoryTheory.CategoryStruct.comp self.v₀₁ self.v₁₂ = 0
- w₁₃ : CategoryTheory.CategoryStruct.comp self.v₁₂ self.v₂₃ = 0
- h₀ : CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.KernelFork.ofι self.v₀₁ ⋯)
- h₃ : CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.CokernelCofork.ofπ self.v₂₃ ⋯)
- L₁_exact : CategoryTheory.ShortComplex.Exact self.L₁
- epi_L₁_g : CategoryTheory.Epi self.L₁.g
- L₂_exact : CategoryTheory.ShortComplex.Exact self.L₂
- mono_L₂_f : CategoryTheory.Mono self.L₂.f
Instances For
The snake input in the opposite category that is deduced from a snake input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
L₀.X₁
is the kernel of v₁₂.τ₁ : L₁.X₁ ⟶ L₂.X₁
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.h₀τ₁ S = CategoryTheory.Limits.isLimitForkMapOfIsLimit' CategoryTheory.ShortComplex.π₁ ⋯ S.h₀
Instances For
L₀.X₂
is the kernel of v₁₂.τ₂ : L₁.X₂ ⟶ L₂.X₂
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.h₀τ₂ S = CategoryTheory.Limits.isLimitForkMapOfIsLimit' CategoryTheory.ShortComplex.π₂ ⋯ S.h₀
Instances For
L₀.X₃
is the kernel of v₁₂.τ₃ : L₁.X₃ ⟶ L₂.X₃
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.h₀τ₃ S = CategoryTheory.Limits.isLimitForkMapOfIsLimit' CategoryTheory.ShortComplex.π₃ ⋯ S.h₀
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
The upper part of the first column of the snake diagram is exact.
The upper part of the second column of the snake diagram is exact.
The upper part of the third column of the snake diagram is exact.
Equations
- ⋯ = ⋯
L₃.X₁
is the cokernel of v₁₂.τ₁ : L₁.X₁ ⟶ L₂.X₁
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.h₃τ₁ S = CategoryTheory.Limits.isColimitCoforkMapOfIsColimit' CategoryTheory.ShortComplex.π₁ ⋯ S.h₃
Instances For
L₃.X₂
is the cokernel of v₁₂.τ₂ : L₁.X₂ ⟶ L₂.X₂
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.h₃τ₂ S = CategoryTheory.Limits.isColimitCoforkMapOfIsColimit' CategoryTheory.ShortComplex.π₂ ⋯ S.h₃
Instances For
L₃.X₃
is the cokernel of v₁₂.τ₃ : L₁.X₃ ⟶ L₂.X₃
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.h₃τ₃ S = CategoryTheory.Limits.isColimitCoforkMapOfIsColimit' CategoryTheory.ShortComplex.π₃ ⋯ S.h₃
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
The lower part of the first column of the snake diagram is exact.
The lower part of the second column of the snake diagram is exact.
The lower part of the third column of the snake diagram is exact.
Equations
- ⋯ = ⋯
The fiber product of L₁.X₂
and L₀.X₃
over L₁.X₃
. This is an auxiliary
object in the construction of the morphism δ : L₀.X₃ ⟶ L₃.X₁
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.P S = CategoryTheory.Limits.pullback S.L₁.g S.v₀₁.τ₃
Instances For
The canonical map P ⟶ L₂.X₂
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.φ₂ S = CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.pullback.fst S.v₁₂.τ₂
Instances For
The canonical map P ⟶ L₂.X₁
.
Equations
Instances For
The short complex that is part of an exact sequence L₁.X₁ ⟶ P ⟶ L₀.X₃ ⟶ 0
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.L₀' S = CategoryTheory.ShortComplex.mk (CategoryTheory.Limits.pullback.lift S.L₁.f 0 ⋯) CategoryTheory.Limits.pullback.snd ⋯
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
The connecting homomorphism δ : L₀.X₃ ⟶ L₃.X₁
.
Equations
Instances For
The pushout of L₂.X₂
and L₃.X₁
along L₂.X₁
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.P' S = CategoryTheory.Limits.pushout S.L₂.f S.v₂₃.τ₁
Instances For
The canonical morphism L₀.X₂ ⟶ P
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.L₀X₂ToP S = CategoryTheory.Limits.pullback.lift S.v₀₁.τ₂ S.L₀.g ⋯
Instances For
The short complex L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁
.
Equations
Instances For
The short complex L₀.X₃ ⟶ L₃.X₁ ⟶ L₃.X₂
.
Equations
Instances For
Exactness of L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁
.
The duality isomorphism S.P ≅ Opposite.unop S.op.P'
.
Equations
Instances For
The duality isomorphism S.P' ≅ Opposite.unop S.op.P
.
Equations
Instances For
The duality isomorphism S.L₂'.op ≅ S.op.L₁'
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exactness of L₀.X₃ ⟶ L₃.X₁ ⟶ L₃.X₂
.
The diagram S.L₀.X₁ ⟶ S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁ ⟶ S.L₃.X₂ ⟶ S.L₃.X₃
for any
S : SnakeInput C
.
Equations
- CategoryTheory.ShortComplex.SnakeInput.composableArrows S = CategoryTheory.ComposableArrows.mk₅ S.L₀.f S.L₀.g (CategoryTheory.ShortComplex.SnakeInput.δ S) S.L₃.f S.L₃.g
Instances For
The diagram S.L₀.X₁ ⟶ S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁ ⟶ S.L₃.X₂ ⟶ S.L₃.X₃
is exact
for any S : SnakeInput C
.
A morphism of snake inputs involve four morphisms of short complexes which make the obvious diagram commute.
- f₀ : S₁.L₀ ⟶ S₂.L₀
a morphism between the zeroth lines
- f₁ : S₁.L₁ ⟶ S₂.L₁
a morphism between the first lines
- f₂ : S₁.L₂ ⟶ S₂.L₂
a morphism between the second lines
- f₃ : S₁.L₃ ⟶ S₂.L₃
a morphism between the third lines
- comm₀₁ : CategoryTheory.CategoryStruct.comp self.f₀ S₂.v₀₁ = CategoryTheory.CategoryStruct.comp S₁.v₀₁ self.f₁
- comm₁₂ : CategoryTheory.CategoryStruct.comp self.f₁ S₂.v₁₂ = CategoryTheory.CategoryStruct.comp S₁.v₁₂ self.f₂
- comm₂₃ : CategoryTheory.CategoryStruct.comp self.f₂ S₂.v₂₃ = CategoryTheory.CategoryStruct.comp S₁.v₂₃ self.f₃
Instances For
The identity morphism of a snake input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The composition of morphisms of snake inputs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CategoryTheory.ShortComplex.SnakeInput.instCategorySnakeInput = CategoryTheory.Category.mk ⋯ ⋯ ⋯
The functor which sends S : SnakeInput C
to its zeroth line S.L₀
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor which sends S : SnakeInput C
to its zeroth line S.L₁
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor which sends S : SnakeInput C
to its second line S.L₂
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor which sends S : SnakeInput C
to its third line S.L₃
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor which sends S : SnakeInput C
to the auxiliary object S.P
,
which is pullback S.L₁.g S.v₀₁.τ₃
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor which sends S : SnakeInput C
to S.L₁'
which is
S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor which sends S : SnakeInput C
to S.L₂'
which is
S.L₀.X₃ ⟶ S.L₃.X₁ ⟶ S.L₃.X₂
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor which maps S : SnakeInput C
to the diagram
S.L₀.X₁ ⟶ S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁ ⟶ S.L₃.X₂ ⟶ S.L₃.X₃
.
Equations
- One or more equations did not get rendered due to their size.