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 : self.L₁.Exact
- epi_L₁_g : CategoryTheory.Epi self.L₁.g
- L₂_exact : self.L₂.Exact
- 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
- S.h₀τ₁ = CategoryTheory.Limits.isLimitForkMapOfIsLimit' CategoryTheory.ShortComplex.π₁ ⋯ S.h₀
Instances For
L₀.X₂
is the kernel of v₁₂.τ₂ : L₁.X₂ ⟶ L₂.X₂
.
Equations
- S.h₀τ₂ = CategoryTheory.Limits.isLimitForkMapOfIsLimit' CategoryTheory.ShortComplex.π₂ ⋯ S.h₀
Instances For
L₀.X₃
is the kernel of v₁₂.τ₃ : L₁.X₃ ⟶ L₂.X₃
.
Equations
- S.h₀τ₃ = CategoryTheory.Limits.isLimitForkMapOfIsLimit' CategoryTheory.ShortComplex.π₃ ⋯ S.h₀
Instances For
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.
L₃.X₁
is the cokernel of v₁₂.τ₁ : L₁.X₁ ⟶ L₂.X₁
.
Equations
- S.h₃τ₁ = CategoryTheory.Limits.isColimitCoforkMapOfIsColimit' CategoryTheory.ShortComplex.π₁ ⋯ S.h₃
Instances For
L₃.X₂
is the cokernel of v₁₂.τ₂ : L₁.X₂ ⟶ L₂.X₂
.
Equations
- S.h₃τ₂ = CategoryTheory.Limits.isColimitCoforkMapOfIsColimit' CategoryTheory.ShortComplex.π₂ ⋯ S.h₃
Instances For
L₃.X₃
is the cokernel of v₁₂.τ₃ : L₁.X₃ ⟶ L₂.X₃
.
Equations
- S.h₃τ₃ = CategoryTheory.Limits.isColimitCoforkMapOfIsColimit' CategoryTheory.ShortComplex.π₃ ⋯ S.h₃
Instances For
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.
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
- S.P = CategoryTheory.Limits.pullback S.L₁.g S.v₀₁.τ₃
Instances For
The canonical map P ⟶ L₂.X₂
.
Equations
- S.φ₂ = CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.fst S.L₁.g S.v₀₁.τ₃) S.v₁₂.τ₂
Instances For
The canonical map P ⟶ L₂.X₁
.
Equations
- S.φ₁ = ⋯.lift S.φ₂ ⋯
Instances For
The short complex that is part of an exact sequence L₁.X₁ ⟶ P ⟶ L₀.X₃ ⟶ 0
.
Equations
- S.L₀' = CategoryTheory.ShortComplex.mk (CategoryTheory.Limits.pullback.lift S.L₁.f 0 ⋯) (CategoryTheory.Limits.pullback.snd S.L₁.g S.v₀₁.τ₃) ⋯
Instances For
The connecting homomorphism δ : L₀.X₃ ⟶ L₃.X₁
.
Equations
- S.δ = ⋯.desc (CategoryTheory.CategoryStruct.comp S.φ₁ S.v₂₃.τ₁) ⋯
Instances For
The pushout of L₂.X₂
and L₃.X₁
along L₂.X₁
.
Equations
- S.P' = CategoryTheory.Limits.pushout S.L₂.f S.v₂₃.τ₁
Instances For
The canonical morphism L₀.X₂ ⟶ P
.
Equations
- S.L₀X₂ToP = CategoryTheory.Limits.pullback.lift S.v₀₁.τ₂ S.L₀.g ⋯
Instances For
The short complex L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁
.
Equations
- S.L₁' = CategoryTheory.ShortComplex.mk S.L₀.g S.δ ⋯
Instances For
The short complex L₀.X₃ ⟶ L₃.X₁ ⟶ L₃.X₂
.
Equations
- S.L₂' = CategoryTheory.ShortComplex.mk S.δ S.L₃.f ⋯
Instances For
Exactness of L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁
.
The duality isomorphism S.P ≅ Opposite.unop S.op.P'
.
Equations
- S.PIsoUnopOpP' = CategoryTheory.Limits.pullbackIsoUnopPushout S.L₁.g S.v₀₁.τ₃
Instances For
The duality isomorphism S.P' ≅ Opposite.unop S.op.P
.
Equations
- S.P'IsoUnopOpP = CategoryTheory.Limits.pushoutIsoUnopPullback S.L₂.f S.v₂₃.τ₁
Instances For
The duality isomorphism S.L₂'.op ≅ S.op.L₁'
.
Equations
- S.L₂'OpIso = CategoryTheory.ShortComplex.isoMk (CategoryTheory.Iso.refl S.L₂'.op.X₁) (CategoryTheory.Iso.refl S.L₂'.op.X₂) (CategoryTheory.Iso.refl S.L₂'.op.X₃) ⋯ ⋯
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
- S.composableArrows = CategoryTheory.ComposableArrows.mk₅ S.L₀.f S.L₀.g 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.instCategory = 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.