What replaces short exact sequences?
The derived category of an abelian category is not abelian: kernels and cokernels do not exist in general, so there are no short exact sequences. Yet the most important structure survives. A short exact sequence of complexes still gives a long exact sequence in cohomology, and the connecting maps suggest that "maps to shifted by one". In that map really exists: it is a morphism , and we get a triangle
Exactly the same shape appeared, at the same time and independently, in topology. For a map of spaces there is the cofibre sequence (Puppe, 1958), and in the stable homotopy category, where suspension is invertible, these sequences behave just like triangles in . Jean-Louis Verdier (for algebra) and Dieter Puppe (for topology) extracted the common axioms around 1962–63. They are the subject of this lesson.
Triangles that roll
Think of a distinguished triangle as a short exact sequence that has been allowed to wrap around: after comes , then , , , … forever in both directions, and every three consecutive objects again form a triangle (the rotation axiom). Applying to this endless sequence gives an endless exact sequence of abelian groups. Every long exact sequence you know — in cohomology, in , in homotopy groups of a fibration — is an instance.
Two warnings come with the picture. First, the third object is determined by only up to isomorphism, and that isomorphism is not unique. Second, there are no kernels or cokernels to fall back on: everything must be done with triangles and Hom functors.
Verdier's axioms
Definition— triangle
Let be an additive category with an additive automorphism (or autoequivalence) , the shift, with . A triangle is a diagram . A morphism of triangles is a triple of maps , , making all three squares commute; the third square reads .
Definition— triangulated category
A triangulated category is such a with a class of distinguished triangles satisfying:
- TR1. (a) A triangle isomorphic to a distinguished one is distinguished. (b) For every , the triangle is distinguished. (c) Every morphism is part of a distinguished triangle ; its third vertex is called a cone of .
- TR2 (rotation). is distinguished if and only if is.
- TR3 (completion). Given distinguished triangles and and maps with , there exists such that is a morphism of triangles.
- TR4 (octahedral axiom). Given and with composite , and distinguished triangles on , , with cones , , , there are maps and such that is distinguished and the diagram below commutes.
A category satisfying TR1–TR3 is called pretriangulated.
The octahedral axiom is the triangulated form of the third isomorphism theorem : "the cone of is ". It is the axiom needed for Verdier quotients, for gluing t-structures and for most constructions; its name comes from drawing the four triangles as the faces of an octahedron.
Definition— homological functor
An additive functor to an abelian category is homological if it sends every distinguished triangle to an exact sequence . By rotation it then gives a long exact sequence .
Definition— mapping cone
For a chain map of cochain complexes, the mapping cone is the complex with and
It comes with chain maps , , and , , forming the standard triangle . One checks : since is a chain map.
Definition— t-structure (Beilinson–Bernstein–Deligne)
A t-structure on a triangulated category is a pair of strictly full subcategories ; writing and , it must satisfy
- for and ;
- and ;
- every fits into a distinguished triangle with and .
Its heart is . The standard t-structure on has and ; the triangle in (3) is , built from the truncations.
Examples and a worked long exact sequence
Example— The homotopy and derived categories
In , for any additive category , the distinguished triangles are those isomorphic to standard triangles . In they are those isomorphic to images of standard triangles; equivalently, every short exact sequence of complexes gives a distinguished triangle in — but not, in general, in .
Example— Other sources of triangulated categories
- The stable homotopy category of spectra, with cofibre sequences; homotopy groups and generalised cohomology theories are homological functors. See stable homotopy theory.
- The stable module category of a finite group in characteristic , where maps factoring through projectives are set to zero and the shift is (Happel). Its Hom groups compute Tate cohomology.
- Over a field, is equivalent to graded vector spaces, and every distinguished triangle is a direct sum of rotations of trivial triangles .
Example— The cone of 2 : ℤ → ℤ, and its long exact sequence
In the cone of is the complex in degrees , which is quasi-isomorphic to . So in there is a distinguished triangle
whose connecting map is the non-zero element of . Apply the homological functor , and use :
Exactness forces to be an isomorphism, multiplication by to be zero on (as it is), and to be an isomorphism — every arrow is determined, and every group agrees with a direct computation.
Example— Fill-ins are not unique
Over a field , take and , and the zero map . A cone is , with the inclusion and the projection. Complete the identity square by TR3. A map is a matrix, and the two commutation conditions force
arbitrary. Every gives a morphism of triangles extending the identity, and all of them are isomorphisms. So the "" of TR3 is not unique, even when and are identities — and the isomorphism between two cones of the same map is not canonical. The experiment below finds exactly fill-ins over .
First consequences of the axioms
Throughout, is pretriangulated (TR1–TR3); the octahedral axiom is not needed for any of these results.
Theorem— Proposition 1 — consecutive maps compose to zero
In a distinguished triangle we have , and .
Proof
The triangle is distinguished (TR1b), and the square with vertical maps and commutes (). By TR3 there is completing a morphism of triangles; the middle square says . The other two identities follow by applying this to the rotated triangles (TR2).
∎
Theorem— Proposition 2 — Hom functors are homological
For every object , the functor is homological: for a distinguished triangle as above, is exact. Dually is cohomological. Hence every distinguished triangle gives long exact sequences
Proof
Composites are zero by Proposition 1. Conversely let with . Rotate both the trivial triangle and our triangle once (TR2), giving distinguished triangles and . The maps and form a commutative square, since . TR3 gives with , i.e. . Since is an equivalence, for a unique , and . Rotating the triangle gives exactness at every other place.
∎
Theorem— Proposition 3 — triangulated five lemma
If is a morphism of distinguished triangles and two of are isomorphisms, so is the third. In particular, the cone of a morphism is unique up to isomorphism.
Proof
Say and are isomorphisms. For every , apply to both triangles: Proposition 2 gives two long exact sequences and a map between them, in which the maps induced by , , , are bijective. By the five lemma for abelian groups, is bijective for every , so is an isomorphism by the Yoneda lemma. The other cases follow by rotation. If and are both cones of , complete by TR3 to ; by what we just proved is an isomorphism.
∎
The isomorphism between two cones is not unique — the example above exhibits a whole line of choices. This is what is meant by saying that cones are not functorial: the axioms provide no cone functor on morphisms, and the non-uniqueness of fill-ins means there is no canonical way to choose one.
Theorem— Theorem 4 — monomorphisms and epimorphisms split
In a pretriangulated category every monomorphism is a split monomorphism and every epimorphism is a split epimorphism.
Proof
Let be a monomorphism, and complete it to a distinguished triangle (TR1c). By Proposition 1, ; and is a monomorphism because is an equivalence. Hence . Rotating backwards, is distinguished with first map . By the cohomological exactness of , the map , which kills , factors as for some .
If is an epimorphism instead, then gives . By Proposition 2, (which satisfies ) factors as .
∎
Theorem— Corollary 5 — triangulated and abelian means semisimple; D(Ab) is not abelian
If a pretriangulated category is abelian, then every morphism is von Neumann regular ( for some ) and every short exact sequence splits. In particular , and for any ring that is not semisimple are not abelian.
Proof
In an abelian category with an epimorphism onto the image and a monomorphism. By Theorem 4, and for some ; then . A short exact sequence splits because has a retraction.
In , because is fully faithful, and has no solution . So is not regular, and is not abelian; the same argument works in . More generally, if is not semisimple, some submodule is not a direct summand. Its inclusion is not regular in : from and injective we would get , splitting off . By full faithfulness of , is not regular in either, so is not abelian.
∎
Theorem— Theorem 6 — K(A) and D(A) are triangulated (proof sketched)
For an additive category , with the triangles isomorphic to standard cone triangles is triangulated. For an abelian category , is triangulated, is an exact functor, and a chain map is a quasi-isomorphism if and only if its cone is acyclic.
Proof
Sketch. TR1 is immediate: the cone of is contractible (the map is a contracting homotopy). For TR2 one writes down an explicit homotopy equivalence between for and ; the sign is forced by the sign in . For TR3, a homotopy with gives the chain map , — note that it depends on the choice of . TR4 is a direct but longer computation. Details: Weibel, An Introduction to Homological Algebra, §10.2; Kashiwara–Schapira, Categories and Sheaves, Ch. 11. The cone of sits in a short exact sequence of complexes , whose long exact cohomology sequence has connecting maps ; hence is acyclic iff all are isomorphisms. Finally, the acyclic complexes form a thick triangulated subcategory of and is the Verdier quotient by it, which inherits a triangulated structure (Verdier).
∎
Theorem— Theorem 7 — the heart of a t-structure (Beilinson–Bernstein–Deligne, 1982)
The heart of any t-structure is an abelian category, and its short exact sequences are exactly the distinguished triangles with in the heart. There is a homological functor . For the standard t-structure on , the heart consists of the complexes with cohomology only in degree and is equivalent to , with .
Proof
The general theorem is proved in BBD, Théorème 1.3.6; see also Gelfand–Manin, Ch. IV.4. For the standard t-structure: if for , the truncation maps are quasi-isomorphisms, so , and is fully faithful (previous lesson). A short exact sequence in gives a distinguished triangle , and conversely a triangle with vertices in the heart has a long exact cohomology sequence which, all objects being concentrated in degree , is a short exact sequence.
∎
Theorem— Proposition 8 — negative Ext vanishes in the heart
If lie in the heart of a t-structure, then .
Proof
, so , while . Axiom (1) gives .
∎
In this is the statement ; in general, Hom-groups between objects of the heart behave like Ext groups, but for they need not agree with the Ext groups computed inside the heart (they do for the standard t-structure on ).
The landscape: enhancements, stability, open questions
Enhancements. Cones in depend on a choice of homotopy (Theorem 6), so the triangulated structure is the shadow of something richer. Bondal and Kapranov (1990) proposed remembering the dg-category of complexes; Lurie's stable ∞-categories (2006 onwards) do the same homotopy-coherently, and in them cones are functorial (they are cofibres). Every stable ∞-category has a triangulated homotopy category (Lurie, Higher Algebra, Thm. 1.1.2.14). The converse fails: Muro, Schwede and Strickland (2007) constructed triangulated categories (for instance a triangulation of finitely generated free -modules with identity shift) that are not equivalent to a full triangulated subcategory of the homotopy category of any stable model category, hence not "algebraic" or "topological". See stable ∞-categories.
Uniqueness of enhancements. Lunts and Orlov (2010) proved that for a quasi-projective variety has a unique dg-enhancement. Rizzardo, Van den Bergh and Neeman (2019) constructed an exact functor between derived categories of smooth projective varieties that is not of Fourier–Mukai type, showing that the triangulated structure alone does not determine everything one might hope.
Brown representability and compact generation. Neeman (1996) proved Brown representability for compactly generated triangulated categories — every cohomological functor sending coproducts to products is representable — and used it to give a short proof of Grothendieck duality.
Stability conditions. Bridgeland (2007) defined a stability condition on as the heart of a bounded t-structure together with a "central charge" satisfying a Harder–Narasimhan property, and proved that the stability conditions (satisfying a support condition) form a complex manifold. These spaces are now studied in algebraic geometry, representation theory and mirror symmetry. Their topology is largely unknown: Bridgeland conjectured that a distinguished component for a K3 surface is simply connected, and Bayer and Bridgeland (2017) proved it is even contractible when the Picard rank is one.
Tensor-triangular geometry. Balmer (2005) attached to a tensor-triangulated category a topological space, its spectrum, recovering from and organising the classification of thick subcategories (Hopkins–Smith in stable homotopy, Benson–Carlson–Rickard for ).
Open questions. Whether the octahedral axiom TR4 follows from TR1–TR3 is a long-standing open question. Freyd's generating hypothesis (1966) — is the stable homotopy groups functor faithful on finite spectra? — is open. Which triangulated categories admit enhancements, and when they are unique, is understood only for special classes. Many spaces of stability conditions remain uncomputed.
Triangulated categories in Lean and Mathlib
Mathlib has pretriangulated categories (CategoryTheory.Pretriangulated: a preadditive category with an additive shift by and the axioms TR1–TR3 with rotation), the octahedral axiom (IsTriangulated), triangulated functors, the triangulated structures on HomotopyCategory and DerivedCategory, and t-structures with their hearts. We prove from the axioms the results of the previous section. Proposition 1 and Proposition 2:
/-- In a distinguished triangle `X → Y → Z → X[1]` the composite `X → Y → Z` is zero.
Proof from the axioms: the triangle `X = X → 0 → X[1]` is distinguished (TR1), and the square
`(𝟙 X, f)` from it to our triangle commutes, so TR3 gives `c : 0 → Z` with `g ∘ f = c ∘ 0 = 0`.
(Mathlib: `Pretriangulated.comp_distTriang_mor_zero₁₂`.) -/
theorem comp_zero_of_distinguished (T : Triangle C) (hT : T ∈ distTriang C) :
T.mor₁ ≫ T.mor₂ = 0 := by
have h₀ : Triangle.mk (𝟙 T.obj₁) (0 : T.obj₁ ⟶ 0) 0 ∈ distTriang C :=
contractible_distinguished T.obj₁
obtain ⟨c, hc₁, _⟩ := complete_distinguished_triangle_morphism _ T h₀ hT
(𝟙 T.obj₁) T.mor₁ (by simp)
rw [← hc₁]
exact zero_comp/-- `Hom(W, -)` is exact in the middle on a distinguished triangle `X → Y → Z → X[1]`:
a map `φ : W → Y` with `g ∘ φ = 0` factors through `f : X → Y`.
Proof: compare the distinguished triangle `W = W → 0 → W[1]` with ours using `(φ, 0)` on the
last two vertices; TR3 (in its rotated form `complete_distinguished_triangle_morphism₁`)
supplies `ψ : W → X` with `f ∘ ψ = φ ∘ 𝟙 = φ`.
(Mathlib: `Pretriangulated.Triangle.coyoneda_exact₂`.) -/
theorem hom_exact_middle (T : Triangle C) (hT : T ∈ distTriang C) {W : C}
(φ : W ⟶ T.obj₂) (hφ : φ ≫ T.mor₂ = 0) : ∃ ψ : W ⟶ T.obj₁, ψ ≫ T.mor₁ = φ := by
have h₀ : Triangle.mk (𝟙 W) (0 : W ⟶ 0) 0 ∈ distTriang C := contractible_distinguished W
obtain ⟨a, ha₁, _⟩ := complete_distinguished_triangle_morphism₁ _ T h₀ hT φ 0
(by simp [hφ])
exact ⟨a, by simpa using ha₁.symm⟩Theorem 4, in four steps — the connecting map vanishes, a retraction exists, and every monomorphism and every epimorphism splits:
/-- If `f : X → Y` in a distinguished triangle `X → Y → Z → X[1]` is a monomorphism, the
connecting map `h : Z → X[1]` is zero. Proof: `f[1] ∘ h = 0` (two consecutive maps of the
rotated triangle), and `f[1]` is again a monomorphism because `[1]` is an equivalence. -/
theorem connecting_map_eq_zero_of_mono (T : Triangle C) (hT : T ∈ distTriang C) [Mono T.mor₁] :
T.mor₃ = 0 := by
have h : T.mor₃ ≫ T.mor₁⟦(1 : ℤ)⟧' = 0 := comp_distTriang_mor_zero₃₁ T hT
rw [← cancel_mono (T.mor₁⟦(1 : ℤ)⟧'), h, zero_comp]/-- If `f : X → Y` in a distinguished triangle is a monomorphism, it has a retraction
`r : Y → X` with `r ∘ f = 𝟙`. Proof: the connecting map vanishes
(`connecting_map_eq_zero_of_mono`), so in the rotated-back triangle `Z[-1] → X → Y → Z` the
first map is zero; then `𝟙 X` kills it and, by exactness of `Hom(-, X)` (Mathlib's
`Triangle.yoneda_exact₂`), factors through `f`. -/
theorem exists_retraction_of_mono (T : Triangle C) (hT : T ∈ distTriang C) [Mono T.mor₁] :
∃ r : T.obj₂ ⟶ T.obj₁, T.mor₁ ≫ r = 𝟙 T.obj₁ := by
have h3 : T.mor₃ = 0 := connecting_map_eq_zero_of_mono T hT
obtain ⟨r, hr⟩ := Triangle.yoneda_exact₂ T.invRotate (inv_rot_of_distTriang T hT)
(𝟙 T.obj₁) (by simp [h3]; exact zero_comp)
exact ⟨r, hr.symm⟩/-- **Every monomorphism in a (pre)triangulated category is split.** Complete `f` to a
distinguished triangle (TR1) and apply `exists_retraction_of_mono`. -/
theorem isSplitMono_of_mono {X Y : C} (f : X ⟶ Y) [Mono f] : IsSplitMono f := by
obtain ⟨Z, g, h, hT⟩ := distinguished_cocone_triangle f
have : Mono (Triangle.mk f g h).mor₁ := by simpa using (inferInstance : Mono f)
obtain ⟨r, hr⟩ := exists_retraction_of_mono _ hT
exact IsSplitMono.mk' ⟨r, hr⟩/-- **Every epimorphism in a (pre)triangulated category is split.** Complete `f : X → Y` to a
distinguished triangle `X → Y → Z → X[1]`. Since `g ∘ f = 0` and `f` is epi, `g = 0`; so
`𝟙 Y` satisfies `g ∘ 𝟙 = 0` and factors through `f` by `hom_exact_middle`. -/
theorem isSplitEpi_of_epi {X Y : C} (f : X ⟶ Y) [Epi f] : IsSplitEpi f := by
obtain ⟨Z, g, h, hT⟩ := distinguished_cocone_triangle f
have hg : g = 0 := by
rw [← cancel_epi f, comp_zero]
exact comp_zero_of_distinguished _ hT
obtain ⟨s, hs⟩ := hom_exact_middle _ hT (𝟙 Y) (by simp [hg])
exact IsSplitEpi.mk' ⟨s, hs⟩Corollary 5, split into its abstract half and its arithmetic half:
/-- If `f = m ∘ e` with `e` epi and `m` mono (an image factorisation, which every morphism of an
abelian category has), then `f` is *von Neumann regular*: `f ∘ g ∘ f = f` for some `g`.
Proof: `e` has a section `s` and `m` a retraction `r`; take `g = s ∘ r`. This is the heart of
the argument that a triangulated category which is abelian must be semisimple. -/
theorem regular_of_epi_mono {X Y I : C} (f : X ⟶ Y) (e : X ⟶ I) (m : I ⟶ Y) [Epi e] [Mono m]
(hf : e ≫ m = f) : ∃ g : Y ⟶ X, f ≫ g ≫ f = f := by
obtain ⟨⟨s, hs⟩⟩ := (isSplitEpi_of_epi e).exists_splitEpi
obtain ⟨⟨r, hr⟩⟩ := (isSplitMono_of_mono m).exists_splitMono
refine ⟨r ≫ s, ?_⟩
subst hf
calc (e ≫ m) ≫ (r ≫ s) ≫ e ≫ m = e ≫ (m ≫ r) ≫ (s ≫ e) ≫ m := by
simp only [Category.assoc]
_ = e ≫ m := by rw [hr, hs]; simp/-- Multiplication by `2` on `ℤ` is not von Neumann regular: there is no integer `g` with
`2 · g · 2 = 2`. Combined with `regular_of_epi_mono`, and the fact that `Hom_{D(Ab)}(ℤ, ℤ) = ℤ`,
this shows that `D(Ab)` is not an abelian category. -/
theorem two_not_regular : ¬ ∃ g : ℤ, 2 * g * 2 = 2 := by
rintro ⟨g, hg⟩
omegaThe five lemma and the uniqueness of cones are applied from Mathlib (their proofs there follow Proposition 3):
/-- The triangulated five lemma: in a morphism of distinguished triangles, if the first and
third components are isomorphisms, so is the second. This applies Mathlib's
`Pretriangulated.isIso₂_of_isIso₁₃`. -/
theorem five_lemma {T T' : Triangle C} (φ : T ⟶ T') (hT : T ∈ distTriang C)
(hT' : T' ∈ distTriang C) (h₁ : IsIso φ.hom₁) (h₃ : IsIso φ.hom₃) : IsIso φ.hom₂ :=
isIso₂_of_isIso₁₃ φ hT hT' h₁ h₃/-- Two distinguished triangles on isomorphic morphisms are isomorphic, compatibly with the
given isomorphism of arrows: the cone is unique up to isomorphism. The isomorphism of third
vertices is *not* unique — the source of the non-functoriality of cones. This applies Mathlib's
`Pretriangulated.exists_iso_of_arrow_iso` (proved with TR3 and the five lemma). -/
theorem cone_unique_up_to_iso (T₁ T₂ : Triangle C) (hT₁ : T₁ ∈ distTriang C)
(hT₂ : T₂ ∈ distTriang C) (e : Arrow.mk T₁.mor₁ ≅ Arrow.mk T₂.mor₁) :
∃ e' : T₁ ≅ T₂, e'.hom.hom₁ = e.hom.left ∧ e'.hom.hom₂ = e.hom.right :=
exists_iso_of_arrow_iso T₁ T₂ hT₁ hT₂ eProposition 8, from the t-structure axioms as Mathlib states them:
/-- For a t-structure `t` and objects `A`, `B` of its heart, every map `A → B[-1]` is zero:
"negative Ext groups vanish in the heart". Proof: `B` is `≥ 0`, so `B[-1]` is `≥ 1` (shift
axiom), while `A` is `≤ 0`; the orthogonality axiom `Hom(D^{≤0}, D^{≥1}) = 0` finishes. -/
theorem heart_hom_neg_shift_eq_zero (t : Triangulated.TStructure C) {A B : C}
(hA : t.heart A) (hB : t.heart B) (f : A ⟶ B⟦(-1 : ℤ)⟧) : f = 0 := by
rw [Triangulated.TStructure.mem_heart_iff] at hA hB
have hB' : t.ge 1 (B⟦(-1 : ℤ)⟧) := t.ge_shift 0 (-1) 1 (by norm_num) B hB.2.ge
exact t.zero' f hA.1.le hB'And the triangulated structures of Theorem 6, which are substantial theorems in Mathlib (the octahedral axiom for is verified with explicit homotopy equivalences of mapping cones):
/-- The homotopy category `K(A)` of cochain complexes in an additive category is triangulated:
distinguished triangles are those isomorphic to mapping-cone triangles, and the octahedral
axiom holds. This is Mathlib's instance for `HomotopyCategory C (ComplexShape.up ℤ)`. -/
theorem homotopy_category_triangulated (A : Type u) [Category.{v} A] [Preadditive A]
[HasZeroObject A] [HasBinaryBiproducts A] :
IsTriangulated (HomotopyCategory A (ComplexShape.up ℤ)) :=
inferInstance/-- The derived category `D(A)` of an abelian category is triangulated. Mathlib deduces this
from the triangulated structure on `K(A)` by Verdier localisation at the acyclic complexes. -/
theorem derived_category_triangulated (A : Type u) [Category.{v} A] [Abelian A]
[HasDerivedCategory A] : IsTriangulated (DerivedCategory A) :=
inferInstanceNot formalised here: the full long exact Hom sequence as a single statement (Mathlib has it via Pretriangulated.Triangle.coyoneda_exact₁, ₂, ₃), the octahedral axiom's consequences, and the theorem that the heart is abelian, which at this Mathlib version is listed as future work in Mathlib/CategoryTheory/Triangulated/TStructure/Heart.lean. The identification of the standard heart with is likewise not yet in Mathlib.
Cones over a finite field
The experiment builds random cochain complexes and chain maps over , forms mapping cones with the formula above, and checks three things exactly: ; the dimension formula
which is equivalent to the exactness of the long exact cohomology sequence of the cone; and that is a quasi-isomorphism exactly when is acyclic. Then it counts, by brute force over all matrices, the fill-ins of the worked example: there are of them over .
"""Mapping cones over a finite field: the long exact sequence, checked exactly.
In the homotopy category K(k) every chain map f : X -> Y sits in a
distinguished triangle X -> Y -> C(f) -> X[1], where the mapping cone has
C(f)^n = X^(n+1) + Y^n and d(x, y) = (-dx, f(x) + dy). Applying cohomology
gives a long exact sequence, which is equivalent to the dimension formula
dim H^n(C) = (dim H^n(Y) - rank H^n(f)) + (dim H^(n+1)(X) - rank H^(n+1)(f)).
We build random complexes and random chain maps over F_101 (exact modular
arithmetic), check that d_C o d_C = 0, check the formula in every degree, and
check that f is a quasi-isomorphism exactly when C(f) is acyclic. Then we count
by brute force the morphisms of triangles that complete the identity square
for the triangle X --0--> Y -> Y + X[1] -> X[1] in D(F_p): there are p of them,
so the third map in TR3 is not unique. Exact computations on random examples
and a finite count: evidence for the theorems proved in the lesson.
"""
import random
from itertools import product
P = 101
def rank(rows, p=P):
"""Rank of a matrix (list of rows) over F_p by Gaussian elimination."""
m = [[v % p for v in r] for r in rows if r]
if not m:
return 0
r, cols = 0, len(m[0])
for c in range(cols):
piv = next((i for i in range(r, len(m)) if m[i][c]), None)
if piv is None:
continue
m[r], m[piv] = m[piv], m[r]
inv = pow(m[r][c], p - 2, p)
m[r] = [v * inv % p for v in m[r]]
for i in range(len(m)):
if i != r and m[i][c]:
t = m[i][c]
m[i] = [(a - t * b) % p for a, b in zip(m[i], m[r])]
r += 1
return r
def nullspace(rows, ncols, p=P):
"""A basis of {v : rows v = 0} over F_p."""
m = [[v % p for v in r] for r in rows]
pivots, r = [], 0
for c in range(ncols):
piv = next((i for i in range(r, len(m)) if m[i][c]), None)
if piv is None:
continue
m[r], m[piv] = m[piv], m[r]
inv = pow(m[r][c], p - 2, p)
m[r] = [v * inv % p for v in m[r]]
for i in range(len(m)):
if i != r and m[i][c]:
t = m[i][c]
m[i] = [(a - t * b) % p for a, b in zip(m[i], m[r])]
pivots.append(c)
r += 1
basis = []
for free in (c for c in range(ncols) if c not in pivots):
v = [0] * ncols
v[free] = 1
for i, c in enumerate(pivots):
v[c] = -m[i][free] % p
basis.append(v)
return basis
def matmul(a, b, p=P):
"""Product of matrices given as lists of rows (handles empty shapes)."""
if not a or not b:
return [[0] * (len(b[0]) if b else 0) for _ in a]
return [[sum(x * y for x, y in zip(row, col)) % p for col in zip(*b)]
for row in a]
def zeros(r, c):
"""The r x c zero matrix."""
return [[0] * c for _ in range(r)]
def random_complex(rng, length=4, max_dim=3):
"""A random complex: dims[n] and differentials d[n] : X^n -> X^(n+1).
Built as a sum of pieces k (in one degree) and k --1--> k, then hidden by
random changes of basis, so that d o d = 0 holds by construction.
"""
pieces = []
for n in range(length):
pieces += [("H", n)] * rng.randint(0, max_dim - 1)
if n + 1 < length:
pieces += [("A", n)] * rng.randint(0, 1)
dims = [0] * length
where = []
for kind, n in pieces:
where.append((kind, n, dims[n], dims[n + 1] if kind == "A" else None))
dims[n] += 1
if kind == "A":
dims[n + 1] += 1
d = [zeros(dims[n + 1], dims[n]) for n in range(length - 1)]
for kind, n, i, j in where:
if kind == "A":
d[n][j][i] = 1
g = [random_invertible(rng, k) for k in dims]
ginv = [inverse(m) for m in g]
return dims, [matmul(matmul(g[n + 1], d[n]), ginv[n])
for n in range(length - 1)]
def random_invertible(rng, k):
"""A uniformly random invertible k x k matrix over F_p."""
while True:
m = [[rng.randrange(P) for _ in range(k)] for _ in range(k)]
if rank(m) == k:
return m
def inverse(m):
"""Inverse of an invertible matrix over F_p (Gauss-Jordan)."""
k = len(m)
aug = [row[:] + [int(i == j) for j in range(k)] for i, row in enumerate(m)]
for c in range(k):
piv = next(i for i in range(c, k) if aug[i][c] % P)
aug[c], aug[piv] = aug[piv], aug[c]
inv = pow(aug[c][c], P - 2, P)
aug[c] = [v * inv % P for v in aug[c]]
for i in range(k):
if i != c and aug[i][c]:
t = aug[i][c]
aug[i] = [(a - t * b) % P for a, b in zip(aug[i], aug[c])]
return [row[k:] for row in aug]
def random_chain_map(rng, x, y):
"""A random solution f of d_Y f^n = f^(n+1) d_X (all degrees)."""
(dx, ddx), (dy, ddy) = x, y
length = len(dx)
offs, tot = [], 0
for n in range(length):
offs.append(tot)
tot += dy[n] * dx[n]
eqs = []
for n in range(length - 1):
for i in range(dy[n + 1]):
for j in range(dx[n]):
row = [0] * tot
for k in range(dy[n]): # (d_Y f^n)[i][j]
row[offs[n] + k * dx[n] + j] += ddy[n][i][k]
for k in range(dx[n + 1]): # (f^(n+1) d_X)[i][j]
row[offs[n + 1] + i * dx[n + 1] + k] -= ddx[n][k][j]
eqs.append(row)
basis = nullspace(eqs, tot) if eqs else [
[int(i == j) for j in range(tot)] for i in range(tot)]
v = [0] * tot
for b in basis:
c = rng.randrange(P)
v = [(a + c * bb) % P for a, bb in zip(v, b)]
return [[[v[offs[n] + i * dx[n] + j] for j in range(dx[n])]
for i in range(dy[n])] for n in range(length)]
def cone(x, y, f):
"""Mapping cone, with C^n = X^(n+1) + Y^n, as (dims, differentials).
Degrees run from -1 (where C^-1 = X^0) to length - 1.
"""
(dx, ddx), (dy, ddy) = x, y
length = len(dx)
xd = lambda n: dx[n] if 0 <= n < length else 0
yd = lambda n: dy[n] if 0 <= n < length else 0
dims = [xd(n + 1) + yd(n) for n in range(-1, length)]
diffs = []
for n in range(-1, length - 1):
m = zeros(xd(n + 2) + yd(n + 1), xd(n + 1) + yd(n))
for i in range(xd(n + 2)):
for j in range(xd(n + 1)):
m[i][j] = -ddx[n + 1][i][j] % P
for i in range(yd(n + 1)):
for j in range(xd(n + 1)):
m[xd(n + 2) + i][j] = f[n + 1][i][j]
for j in range(yd(n)):
m[xd(n + 2) + i][xd(n + 1) + j] = ddy[n][i][j]
diffs.append(m)
return dims, diffs
def cohomology(c):
"""dim H^n for a complex (dims, diffs) indexed from its first term."""
dims, d = c
out = []
for n in range(len(dims)):
rk_out = rank(d[n]) if n < len(d) else 0
rk_in = rank(d[n - 1]) if n > 0 else 0
out.append(dims[n] - rk_out - rk_in)
return out
def cycles(c, n):
"""A basis of Z^n = ker d^n (as vectors)."""
dims, d = c
if n >= len(d):
return [[int(i == j) for j in range(dims[n])] for i in range(dims[n])]
return nullspace(d[n], dims[n])
def rank_on_cohomology(x, y, f, n):
"""rank of H^n(f) = dim(f(Z^n X) + B^n Y) - dim B^n Y."""
image = [[sum(f[n][i][j] * z[j] for j in range(len(z))) % P
for i in range(y[0][n])] for z in cycles(x, n)]
bound = [list(col) for col in zip(*y[1][n - 1])] if n > 0 else []
return rank(image + bound) - rank(bound)
def fill_in_count(p):
"""Morphisms c : Z -> Z completing (id, id) on X --0--> Y -> Z -> X[1].
Model in D(F_p) = graded vector spaces with X = F_p, Y = F_p[1], so that
Z = Y + X[1] has both summands in degree -1, g = inclusion of Y and
h = projection to X[1]; conditions: c g = g and h c = h.
"""
g = [[1], [0]]
h = [[0, 1]]
count = 0
for a, b, c, d in product(range(p), repeat=4):
m = [[a, b], [c, d]]
if matmul(m, g, p) == g and matmul(h, m, p) == h:
count += 1
return count
def identity_map(x):
"""The identity chain map of a complex x."""
return [[[int(i == j) for j in range(k)] for i in range(k)] for k in x[0]]
def main():
rng = random.Random(2024)
trials, d2_ok, les_ok, qis_ok, quasi = 200, 0, 0, 0, 0
for t in range(trials):
x = random_complex(rng)
if t % 4 == 0: # every fourth example: the identity, a quasi-iso
y, f = x, identity_map(x)
else:
y = random_complex(rng)
f = random_chain_map(rng, x, y)
c = cone(x, y, f)
d2_ok += all(not any(map(any, matmul(c[1][n + 1], c[1][n])))
for n in range(len(c[1]) - 1))
hx, hy, hc = cohomology(x), cohomology(y), cohomology(c)
length = len(hx)
rk = [rank_on_cohomology(x, y, f, n) for n in range(length)] + [0]
hx_ = hx + [0]
les_ok += all(hc[n + 1] == hy[n] - rk[n] + hx_[n + 1] - rk[n + 1]
for n in range(length))
is_qis = hx == hy and all(rk[n] == hx[n] for n in range(length))
quasi += is_qis
qis_ok += is_qis == (sum(hc) == 0)
print(f"Chain maps of random complexes over F_{P}, degrees 0..3: {trials}")
print(f" cones with d o d = 0: {d2_ok}/{trials}")
print(f" dimension formula (long exact sequence): {les_ok}/{trials}")
print(f" 'quasi-iso <=> acyclic cone' consistent: {qis_ok}/{trials}"
f" ({quasi} quasi-isos)")
print()
print("Fill-ins c completing (id, id) for X --0--> Y -> Y + X[1] -> X[1]")
print("in D(F_p), X = F_p, Y = F_p[1] (c = [[1, t], [0, 1]], t free):")
print(" " + ", ".join(f"p = {p}: {fill_in_count(p)}" for p in (2, 3, 5)))
print()
print("Epistemic status: exact arithmetic mod 101 on 200 pseudo-random")
print("examples (seeded), plus an exhaustive count over 2 x 2 matrices.")
print("This is evidence that the cone construction behaves as the lesson")
print("proves (exactness, cones detect quasi-isomorphisms, non-unique")
print("fill-ins); random examples over one field do not prove it.")
if __name__ == "__main__":
main()The random checks are exact computations on finitely many examples over one field — evidence, not proof. The count of fill-ins is exhaustive for the primes shown.
Exercises
1. Triangulated categories
Warm-upHumanSuppose is distinguished. Which triangle is distinguished by the rotation axiom TR2?
2. Triangulated categories
Warm-upHumanOver a field , let be a linear map of rank , viewed as a morphism in between complexes concentrated in degree . What is for its cone?
3. Triangulated categories
CoreHumanIn the proof that every monomorphism in a triangulated category splits, we deduce from . Which fact justifies cancelling ?
4. Triangulated categories
CoreHumanApply to the distinguished triangle in . What is the induced map ?
5. Triangulated categories
CoreComputationalIn take , and the zero map , with cone as in the lesson. How many morphisms make a morphism of triangles?
6. Triangulated categories
StretchHumanWhich of these triangulated categories are also abelian? (Choose all that apply.)
7. Triangulated categories
CoreHumanFor the standard t-structure on , which subcategory is the heart?
8. Triangulated categories
CoreFormalWhich Lean statement formalises “in a pretriangulated category, every monomorphism is split”? (C carries the instances of a pretriangulated category.)
9. Triangulated categories
StretchComputationalA linear map , viewed in in degree , has cone in degrees . Write cone_cohomology(matrix, n) that returns [dim H^-1, dim H^0], where matrix is the list of the rows of (each of length n; it may be empty if ). Use exact rational arithmetic (fractions.Fraction) to compute the rank.
Common misconceptions
Misconception
"The cone construction is functorial." TR3 asserts that a fill-in exists; it is not unique (the worked example has a whole line of them), and the axioms give no cone functor on the category of morphisms. Even in , the map of cones induced by a square commuting up to homotopy depends on the chosen homotopy. Functorial cones are recovered only in enhancements (dg-categories, stable ∞-categories).
Misconception
"Every triangulated category is the homotopy category of a stable ∞-category (or a stable model category, or a dg-category)." Muro, Schwede and Strickland (2007) found triangulated categories without such models. The triangulated axioms are strictly weaker than having an enhancement.
Misconception
"Distinguished triangles are just short exact sequences." A short exact sequence in gives a triangle in , but triangles are far more general: need not be a monomorphism (in fact non-split monomorphisms do not exist in ), and the connecting map is part of the data — two triangles with the same three objects can be non-isomorphic.
Misconception
"The octahedral axiom follows from the others." No proof is known: whether TR4 follows from TR1–TR3 is a long-standing open question, so it is assumed as an axiom. (It holds in every triangulated category that comes from an enhancement.) Most structural results — Verdier quotients, gluing of t-structures — use it.
Misconception
"A triangulated category is a special kind of abelian category." The two notions are nearly disjoint: by Corollary 5 a triangulated category that is abelian is semisimple. Abelian categories sit inside triangulated ones as hearts of t-structures.
Viewpoints
Topology— Cofibre sequences and stable homotopy
For a map of pointed spaces , the mapping cone gives the Puppe sequence , and for every space the sets form an exact sequence, as do . In the stable homotopy category, where is inverted, these become distinguished triangles, and a cohomology theory is exactly a cohomological functor commuting with the shift. Brown representability — every such theory is represented by a spectrum — has a triangulated generalisation (Neeman). The octahedral axiom is the homotopical third isomorphism theorem . Historically, the stable homotopy category is the second birthplace of triangulated categories.
Geometry— Perverse sheaves and stability conditions
For a complex algebraic variety , the derived category of constructible sheaves carries, besides the standard t-structure, the perverse t-structure of Beilinson–Bernstein–Deligne–Gabber, whose heart is the abelian category of perverse sheaves. Its simple objects are the intersection cohomology complexes, which carry Poincaré duality on singular spaces; the decomposition theorem of BBD is formulated in this heart. Changing the t-structure changes which abelian category one sees inside the same triangulated category — a phenomenon geometers now study systematically through Bridgeland stability conditions, whose hearts vary continuously over a complex manifold. See algebraic geometry and sheaves.
Algebra— Stable module categories and tilting
For a self-injective algebra (for example a group algebra ), the stable module category is triangulated, with as shift; Happel proved that for a finite-dimensional algebra of finite global dimension is equivalent to the stable module category of its repetitive algebra. A derived equivalence , such as one given by tilting, exhibits as a second heart inside the triangulated category of : the same triangulated category, seen through a different t-structure. For a Dynkin quiver , Happel described completely by the mesh category of (see quiver representations).
Physics— Branes and their bound states (heuristic)
In Douglas's proposal for D-branes on Calabi–Yau manifolds, branes are objects of a triangulated category and a distinguished triangle describes as a bound state of and an anti-brane of , formed or decaying as moduli vary ("Π-stability"). Bridgeland's stability conditions are the mathematical formalisation of this idea. The physics is a heuristic guide, not a proof: the mathematical theory stands on its own axioms.
Category theory— Localisation and the axioms' weak spot
Categorically, a triangulated category is an additive category with a suspension and a class of "exact triangles"; Verdier quotients by thick subcategories are localisations, and this is how is built. The axioms' weak spot — non-unique fill-ins, hence no functorial cones and no homotopy (co)limits — is the reason for enhancements: in a stable ∞-category, cones are colimits and are unique up to a contractible space of choices.
History and global context
- 1950s. Dieter Puppe (Germany) introduces cofibre sequences (1958). Grothendieck's programme in algebraic geometry needs a home for complexes of sheaves.
- 1962–63. Puppe, for stable homotopy theory, and Jean-Louis Verdier, in his thesis supervised by Grothendieck (notes 1963, defence 1967, publication 1996), independently axiomatise triangulated categories; Verdier adds the octahedral axiom and constructs quotients.
- 1960s–70s. J. Michael Boardman constructs the stable homotopy category; Freyd poses the generating hypothesis (1966).
- 1982. Alexander Beilinson, Joseph Bernstein, Pierre Deligne and Ofer Gabber introduce t-structures and perverse sheaves (Faisceaux pervers), connecting with the Riemann–Hilbert correspondence of Kashiwara and Mebkhout and the intersection cohomology of Goresky and MacPherson.
- 1987–88. Dieter Happel (Germany) develops triangulated categories in the representation theory of finite-dimensional algebras.
- 1990s–2000s. Amnon Neeman (Israel/Australia) proves Brown representability for compactly generated categories (1996) and writes the standard monograph (2001). Tom Bridgeland (UK) introduces stability conditions (2007); Paul Balmer (Switzerland/USA) introduces tensor-triangular geometry (2005); Fernando Muro, Stefan Schwede, Neil Strickland exhibit triangulated categories without models (2007).
Further reading
- Amnon Neeman, Triangulated Categories (Annals of Mathematics Studies 148, 2001) — the standard monograph, with Brown representability.
- Sergei I. Gelfand and Yuri I. Manin, Methods of Homological Algebra (1996; 2nd ed. 2003), Chapters IV–V, including t-structures.
- Charles A. Weibel, An Introduction to Homological Algebra (1994), §10.2–10.4.
- Alexander Beilinson, Joseph Bernstein, Pierre Deligne, "Faisceaux pervers", Astérisque 100 (1982) — t-structures and the heart theorem.
- Thorsten Holm, Peter Jørgensen and Raphaël Rouquier (eds.), Triangulated Categories (LMS Lecture Note Series 375, 2010) — surveys of current directions.
- Tom Bridgeland, "Stability conditions on triangulated categories", Annals of Mathematics 166 (2007).
- Fernando Muro, Stefan Schwede and Neil Strickland, "Triangulated categories without models", Inventiones Mathematicae 170 (2007).
A reading path: Weibel §10.2 for the cone calculus → Gelfand–Manin IV for the axioms and t-structures → Neeman's book or the Holm–Jørgensen–Rouquier volume, depending on whether you want foundations or current research.