Why the homotopy category is not enough
Homotopy theory studies spaces up to homotopy equivalence, chain complexes up to quasi-isomorphism, and many similar situations where "sameness" is weaker than isomorphism. The classical move is to pass to a homotopy category: keep the objects and replace morphisms by homotopy classes. This is useful, but it throws away essential information.
- Homotopy colimits are not colimits in the homotopy category. Gluing two discs along their boundary circle gives , the homotopy pushout of . Every map restricts to null-homotopic maps on the two discs, so in the homotopy category all maps look the same on the pieces — yet for simply connected their homotopy classes correspond to the elements of . The missing information is which homotopy glues the pieces along the circle. In fact the homotopy category of spaces does not have all pushouts.
- Constructions are not functorial. In a triangulated category the cone of a morphism is unique only up to non-unique isomorphism (see Stable ∞-categories).
- Gluing fails. Derived categories of sheaves on the pieces of an open cover cannot, in general, be glued to the derived category of the whole space at the level of triangulated categories.
The cure is to remember the homotopies, the homotopies between homotopies, and so on: an -category has objects, morphisms, 2-morphisms between morphisms, 3-morphisms, …, with all -morphisms for invertible. Concretely, between any two objects there is a space of morphisms, and composition is defined up to a contractible space of choices. This lesson builds the most widely used model, quasi-categories (Boardman and Vogt's weak Kan complexes, developed by Joyal and Lurie), which are special simplicial sets. It assumes Higher categories and Algebraic topology.
Triangles that witness composition
In a category, is a property of three morphisms. In an ∞-category it is data: a 2-dimensional cell with boundary , , , a "witness" (or homotopy) that is a composite of and . Witnesses for associativity are 3-dimensional cells, and so on. Simplices are the natural shapes for this bookkeeping: a 2-simplex is a triangle with edges , , .
This picture explains the whole definition. A Kan complex is a simplicial set in which every horn can be filled: a model for spaces, or ∞-groupoids, where every morphism is invertible up to homotopy. A quasi-category asks only for inner horns to be filled: composites always exist, but morphisms need not be invertible. Fillers are not required to be unique — only, as we shall see, unique up to a contractible space of choices.
Simplicial sets, horns and quasi-categories
Definition— simplex category and simplicial set
The simplex category has objects the finite ordinals for and morphisms the order-preserving maps. A simplicial set is a functor . We write for the set of -simplices, for the face maps (induced by the injection that skips ) and for the degeneracy maps (induced by the surjection that repeats ). A simplex is degenerate if it is in the image of some .
Definition— standard simplex, boundary and horn
The standard -simplex is the representable simplicial set . By the Yoneda lemma, maps correspond to -simplices of . The boundary is the union of the faces , and for the horn is the union of all faces except the -th. A horn is inner if and outer if or . A map is a family of -simplices with for all with . A filler is an -simplex with for .
Definition— Kan complex and quasi-category
A simplicial set is a Kan complex if every horn (, ) has a filler, and a quasi-category (or ∞-category, in Joyal and Lurie's terminology) if every inner horn () has a filler.
Definition— nerve and singular complex
The nerve of a category has the set of functors , that is, strings of composable morphisms; composes at (or drops or ), and inserts an identity. The singular complex of a topological space has the set of continuous maps from the topological -simplex.
Definition— objects, morphisms and homotopy in a quasi-category
Let be a quasi-category. Its objects are its vertices; a morphism is an edge with and ; the identity of is . Two morphisms are homotopic, , if there is a 2-simplex with , and . Given and , a composite of and is any edge where fills the inner horn .
Definition— homotopy category
The homotopy category of a quasi-category has the vertices of as objects and homotopy classes of morphisms as morphisms, with for any composite of and . A morphism of is an equivalence if its class is an isomorphism in .
Examples and non-examples
Example— Nerves: quasi-categories with unique fillers
In a horn is a composable pair , and its only filler is the string itself, whose long edge is . Theorem 1 below shows that every inner horn in a nerve has exactly one filler. Outer horns are another matter: a horn given by and fills exactly when there is with . In a groupoid take ; in the poset the horn with and has no filler, since there is no morphism .
Example— Singular complexes: Kan complexes
For any space , is a Kan complex: a horn is a continuous map from a union of faces of , and there is a retraction along which it extends. Its homotopy category is the fundamental groupoid : objects are points, and morphisms are homotopy classes of paths relative to their endpoints. is not a nerve once has a non-constant path: "concatenate at the midpoint" and "concatenate at time one third" give different edges, and both are long edges of fillers of the same inner horn.
Example— Simplicial groups
Every simplicial group (a functor ) is a Kan complex (Moore). Through the Dold–Kan correspondence, simplicial abelian groups are equivalent to chain complexes concentrated in non-negative degrees, so chain complexes give a large supply of Kan complexes whose homotopy groups are homology groups.
Example— Non-examples
- The horn itself, viewed as a simplicial set, is not a quasi-category: the identity map is an inner horn with no filler (there is no non-degenerate 2-simplex, and the long edge is missing).
- The boundary is not a quasi-category: the inner horn would need a 2-simplex of with three distinct vertices, and every 2-simplex of is degenerate. (The long edge exists but nothing witnesses that it is a composite.)
- is a quasi-category (a nerve) but not a Kan complex (an outer horn fails, as above). This is proved in Lean below.
Central theorems
Theorem— Theorem 1 (nerves and unique fillers)
A simplicial set is isomorphic to the nerve of a category if and only if every inner horn () has a unique filler. In particular, nerves are quasi-categories.
Proof
We prove that nerves have unique inner fillers, and sketch the converse.
Spines. An -simplex of is a functor , which is determined by its spine: the objects and the arrows (all other arrows are composites). So two simplices of the nerve with the same spine are equal.
Uniqueness. Let and let be a horn. Each spine edge of lies in a face with and : for , the edges and lie in and ; for there are at least two vertices outside , and one of them differs from . So determines the whole spine, and any two fillers have the same spine; hence there is at most one filler.
Existence. Let be the -simplex whose spine is the one determined by . We must show for every ; since both are simplices of the nerve, it suffices to compare spines. If or , the spine of consists of spine edges of , which agree with . If , the spine of also contains the edge , which in is the composite of the edges and . In this edge is also that composite, because the triangle lies in the horn: it is contained in a face with and (for there are at least two choices of ; for the only choice is , which is not because is inner; for the case , does not occur), and restricted to it is a 2-simplex of the nerve, that is, a commuting triangle. So and have the same spine, and are equal.
Converse (sketch). If every inner horn of has a unique filler, define a category with objects , morphisms , identities , and the long edge of the unique filler of the horn . The unit laws come from degenerate 2-simplices, and associativity from unique fillers of (or ): the four faces of the filling 3-simplex show that the two bracketings agree. Unique filling in higher dimensions then shows by induction that every simplex of is determined by its spine, which identifies with the nerve. (Details: Lurie, Higher Topos Theory, §1.1.2, or Joyal's notes.)
∎
Theorem— Theorem 2 (composites are unique up to homotopy)
Let be a quasi-category, and . If and are both composites of and , then .
Proof
Let and be 2-simplices with equal to and . Build a horn on vertices by prescribing three faces:
- on vertices , with edges , , ;
- on vertices , with edges , , ;
- on vertices , the degenerate 2-simplex with edges , , (by the simplicial identities and ).
They agree on shared edges: is in and ; is in and ; is in and . The horn is inner, so it has a filler . Its missing face , on vertices , has edges (edge ), (edge ) and (edge ): by definition it is a homotopy .
∎
Arguments of the same kind, with other horns and , show that is an equivalence relation and that composition of homotopy classes is well defined, associative and unital (Boardman and Vogt, 1973; Joyal). So is a category. For a nerve, ; for , . The functor is left adjoint to the nerve.
Theorem— Theorem 3 (Joyal; stated)
A simplicial set is a quasi-category if and only if the restriction map is a trivial Kan fibration.
Here is the simplicial set of maps . The fibre over a composable pair is the space of all pairs (composite, witnessing 2-simplex), and the theorem says it is contractible (non-empty, connected, with trivial higher homotopy). This is the precise meaning of "composition is defined up to a contractible space of choices". See Lurie, Higher Topos Theory, §2.3, where it is attributed to Joyal.
Theorem— Theorem 4 (Joyal, 2002; stated)
A quasi-category is a Kan complex if and only if its homotopy category is a groupoid.
So Kan complexes are exactly the ∞-categories in which every morphism is an equivalence: ∞-groupoids. One direction is easy to believe from the picture of outer horns: filling produces left inverses up to homotopy. The converse — that homotopy invertibility of edges forces all outer horns in all dimensions to fill — is Joyal's theorem ("Quasi-categories and Kan complexes", J. Pure Appl. Algebra 175, 2002).
Theorem— Theorem 5 (the homotopy hypothesis for Kan complexes; stated)
Geometric realisation and the singular complex form a Quillen equivalence between simplicial sets with the Kan–Quillen model structure (fibrant objects: Kan complexes) and topological spaces (Quillen, 1967). Consequently the homotopy theory of Kan complexes is equivalent to the homotopy theory of CW complexes.
This is the established, precise form of Grothendieck's homotopy hypothesis, "∞-groupoids are spaces", for one particular definition of ∞-groupoid. For other definitions (algebraic weak ∞-groupoids in the style of Batanin or Grothendieck) the corresponding statement is a guiding principle, proved in some cases and open in others.
Theorem— Theorem 6 (models of (∞,1)-categories; stated)
The following model categories are connected by chains of Quillen equivalences: quasi-categories (Joyal's model structure on simplicial sets), complete Segal spaces (Rezk, 2001), Segal categories, and simplicial categories (Bergner's model structure). The comparisons are due to Joyal and Tierney (2007), Bergner (2007) and Lurie (Higher Topos Theory, 2009), the last via the homotopy coherent nerve of Cordier.
Toën (2005) characterised the homotopy theory of -categories axiomatically, so that any model satisfying his axioms is equivalent to these. This is why results proved in one model can be used in another, and why Riehl and Verity can develop ∞-category theory "model-independently" in an ∞-cosmos.
The landscape: what is known and what is open
Established. Inside quasi-categories, Joyal and Lurie developed the main tools of category theory: joins and slices, limits and colimits, adjunctions, Kan extensions, the Yoneda lemma, presentable ∞-categories and ∞-topoi, and the straightening–unstraightening equivalence (an ∞-categorical Grothendieck construction) (Lurie, Higher Topos Theory, 2009; Cisinski, 2019; Riehl–Verity, 2022; Lurie's online Kerodon). This machinery underlies Lurie's Higher Algebra (stable ∞-categories, -algebras), derived and spectral algebraic geometry (Toën–Vezzosi; Lurie), modern algebraic K-theory, factorization homology and much of contemporary homotopy theory.
Established but subtle. The ∞-categorical Yoneda lemma and the existence of (co)limits are theorems, but their proofs in quasi-categories are long; the same statements are short in an ∞-cosmos (Riehl–Verity), at the price of building the framework first.
Open or in progress.
- -categories. There are many models (Rezk's -spaces, -fold complete Segal spaces, complicial sets, …), and Barwick and Schommer-Pries (2021) gave axioms that characterise the homotopy theory of -categories up to equivalence; comparison of all proposed models is ongoing.
- Synthetic and formal foundations. Riehl and Shulman (2017) proposed a simplicial homotopy type theory in which ∞-categories are types with a "Segal" property; developing it fully, and formalising ∞-category theory in proof assistants (Mathlib has quasi-categories, nerves and the homotopy category; a community project is formalising Riehl–Verity's ∞-cosmoi in Lean), are active, open-ended projects.
- Weak ∞-groupoids and the homotopy hypothesis for algebraic definitions of ∞-groupoid (Theorem 5 and the remark after it).
Quasi-categories in Lean and Mathlib
Mathlib defines simplicial sets (SSet), standard simplices Δ[n], horns Λ[n, i], Kan complexes (as fibrant objects of the Kan–Quillen model structure) and quasi-categories (SSet.Quasicategory, inner horn filling). It proves that Kan complexes are quasi-categories and that nerves are quasi-categories (via the strict Segal condition: simplices are determined by spines, as in Theorem 1), and it constructs the homotopy category functor, left adjoint to the nerve. In Mathlib the nerve composes diagrammatically: the 2-simplex with edges , , (an Edge.CompStruct) witnesses f ≫ g = h, which is .
The definition, unfolded, and the two basic library facts:
/-- **What a quasi-category is.** A simplicial set `S` is a quasi-category exactly when every
*inner* horn `Λ[n, i] ⟶ S` (with `0 < i < n`) extends along the inclusion `Λ[n, i] ⟶ Δ[n]`.
Mathlib's class `SSet.Quasicategory` states this for `n + 2` (inner horns only exist from
dimension 2); here it is unfolded into the form used in the lesson. -/
theorem quasicategory_iff (S : SSet) :
S.Quasicategory ↔
∀ (n : ℕ) (i : Fin (n + 1)) (σ₀ : (Λ[n, i] : SSet) ⟶ S),
0 < i → i < Fin.last n → ∃ σ : Δ[n] ⟶ S, σ₀ = Λ[n, i].ι ≫ σ := by
constructor
· intro hS n i σ₀ h0 hn
exact Quasicategory.hornFilling h0 hn σ₀
· intro h
exact ⟨fun n i σ₀ h0 hn => h (n + 2) i σ₀ h0 hn⟩/-- Every Kan complex (all horns fill, inner and outer) is a quasi-category: ∞-groupoids are
special ∞-categories. This is Mathlib's instance in `Mathlib.AlgebraicTopology.Quasicategory.Basic`. -/
theorem kan_is_quasicategory (S : SSet) [KanComplex S] : S.Quasicategory :=
inferInstance/-- **The nerve of a category is a quasi-category.** Mathlib proves this
(`CategoryTheory.Nerve.quasicategory`) by showing that nerves satisfy the strict Segal
condition: every simplex is determined by its spine of composable arrows. -/
theorem nerve_is_quasicategory (C : Type) [Category C] : (nerve C).Quasicategory :=
inferInstanceHorn filling in dimension 2, for nerves: a triangle witnesses a composite; inner horns fill uniquely; outer horns fill (uniquely) in groupoids.
/-- In the nerve of a category, a 2-simplex with edges `f : x₀ ⟶ x₁`, `g : x₁ ⟶ x₂` and
`h : x₀ ⟶ x₂` (Mathlib's `Edge.CompStruct`) exists exactly when `f ≫ g = h`: a triangle
*witnesses* a composite. This is Mathlib's `CategoryTheory.nerve.nonempty_compStruct_iff`. -/
theorem nerve_triangle_iff {C : Type} [Category C] {x₀ x₁ x₂ : C}
(f : x₀ ⟶ x₁) (g : x₁ ⟶ x₂) (h : x₀ ⟶ x₂) :
Nonempty (Edge.CompStruct (nerve.edgeMk f) (nerve.edgeMk g) (nerve.edgeMk h)) ↔
f ≫ g = h :=
nerve.nonempty_compStruct_iff f g h/-- **Inner horns in a nerve fill uniquely.** Given composable edges `f` and `g` (a horn
`Λ[2, 1]`), there is exactly one edge `h` that can be the third side of a 2-simplex, namely
`f ≫ g`. In a general quasi-category a filler exists but is unique only up to homotopy; nerves
are exactly the simplicial sets whose inner horns fill uniquely. -/
theorem nerve_composite_unique {C : Type} [Category C] {x₀ x₁ x₂ : C}
(f : x₀ ⟶ x₁) (g : x₁ ⟶ x₂) :
∃! h : x₀ ⟶ x₂,
Nonempty (Edge.CompStruct (nerve.edgeMk f) (nerve.edgeMk g) (nerve.edgeMk h)) := by
refine ⟨f ≫ g, (nerve_triangle_iff f g (f ≫ g)).2 rfl, fun h hh => ?_⟩
exact ((nerve_triangle_iff f g h).1 hh).symm/-- **Outer horns in the nerve of a groupoid fill.** Given `f : x₀ ⟶ x₁` and `h : x₀ ⟶ x₂` (a
horn `Λ[2, 0]`), there is exactly one `g : x₁ ⟶ x₂` making a 2-simplex, namely `f⁻¹ ≫ h`. This
is the dimension-2 shadow of the fact that nerves of groupoids are Kan complexes: filling outer
horns is *inverting* arrows. -/
theorem groupoid_outer_horn {G : Type} [Groupoid G] {x₀ x₁ x₂ : G}
(f : x₀ ⟶ x₁) (h : x₀ ⟶ x₂) :
∃! g : x₁ ⟶ x₂,
Nonempty (Edge.CompStruct (nerve.edgeMk f) (nerve.edgeMk g) (nerve.edgeMk h)) := by
refine ⟨Groupoid.inv f ≫ h, (nerve_triangle_iff _ _ _).2 (by simp), fun g hg => ?_⟩
have hfg : f ≫ g = h := (nerve_triangle_iff f g h).1 hg
rw [← hfg]
simp/-- The other outer horn, `Λ[2, 2]`: in the nerve of a groupoid, given `g : x₁ ⟶ x₂` and
`h : x₀ ⟶ x₂` there is exactly one `f : x₀ ⟶ x₁` making a 2-simplex, namely `h ≫ g⁻¹`. -/
theorem groupoid_outer_horn_right {G : Type} [Groupoid G] {x₀ x₁ x₂ : G}
(g : x₁ ⟶ x₂) (h : x₀ ⟶ x₂) :
∃! f : x₀ ⟶ x₁,
Nonempty (Edge.CompStruct (nerve.edgeMk f) (nerve.edgeMk g) (nerve.edgeMk h)) := by
refine ⟨h ≫ Groupoid.inv g, (nerve_triangle_iff _ _ _).2 (by simp), fun f hf => ?_⟩
have hfg : f ≫ g = h := (nerve_triangle_iff f g h).1 hf
rw [← hfg]
simpThe non-example from the examples section, proved from the definitions: the two edges of an outer horn are glued into a map Λ[2, 0] ⟶ nerve (Fin 2) (using Mathlib's description of Λ[2, 0] as a pushout of two copies of Δ[1]), the Kan property fills it, and the vertices of the filling 2-simplex force an arrow in the poset , that is, :
/-- **A quasi-category that is not a Kan complex**: the nerve of the poset `0 < 1` (the
"walking arrow" `Fin 2`). The horn `Λ[2, 0]` with edges `0 ⟶ 1` (from vertex 0 to vertex 1) and
`𝟙 0` (from vertex 0 to vertex 2) has no filler: the missing edge would be an arrow `1 ⟶ 0`, i.e.
a proof of `1 ≤ 0`. Proof: glue the two edges into a horn (`horn₂₀.isPushout`), fill it using
the Kan property, read off the vertices of the filling 2-simplex from its faces, and apply its
middle-to-last arrow. -/
theorem nerve_fin_two_not_kan : ¬ KanComplex (nerve (Fin 2)) := by
intro hK
-- The two edges of the horn: `0 ⟶ 1` and the identity of `0`.
let e₀₁ : (nerve (Fin 2)) _⦋1⦌ :=
ComposableArrows.mk₁ (homOfLE (show (0 : Fin 2) ≤ 1 by decide))
let e₀₂ : (nerve (Fin 2)) _⦋1⦌ := ComposableArrows.mk₁ (𝟙 (0 : Fin 2))
-- They share their source vertex 0, so they glue to a map `Λ[2, 0] ⟶ nerve (Fin 2)`.
have hsrc : (nerve (Fin 2)).δ 1 e₀₁ = (nerve (Fin 2)).δ 1 e₀₂ :=
ComposableArrows.ext₀ rfl
obtain ⟨σ, hσ₁, hσ₂⟩ := horn₂₀.isPushout.exists_desc (SSet.yonedaEquiv.symm e₀₁)
(SSet.yonedaEquiv.symm e₀₂)
(by rw [stdSimplex.δ_comp_yonedaEquiv_symm, stdSimplex.δ_comp_yonedaEquiv_symm, hsrc])
-- The Kan property fills the horn with a 2-simplex `s`.
obtain ⟨s, hs⟩ := KanComplex.hornFilling σ
have hs₂ : stdSimplex.δ 2 ≫ s = SSet.yonedaEquiv.symm e₀₁ := by simp [← hσ₁, hs]
have hs₁ : stdSimplex.δ 1 ≫ s = SSet.yonedaEquiv.symm e₀₂ := by simp [← hσ₂, hs]
obtain ⟨t, rfl⟩ := SSet.yonedaEquiv.symm.surjective s
rw [stdSimplex.δ_comp_yonedaEquiv_symm] at hs₂ hs₁
have ht₂ : (nerve (Fin 2)).δ 2 t = e₀₁ := SSet.yonedaEquiv.symm.injective hs₂
have ht₁ : (nerve (Fin 2)).δ 1 t = e₀₂ := SSet.yonedaEquiv.symm.injective hs₁
-- Vertex 1 of `t` is `1` (read off face 2) and vertex 2 of `t` is `0` (read off face 1).
have v₁ : t.obj 1 = 1 := congrArg (fun x : ComposableArrows (Fin 2) 1 => x.obj 1) ht₂
have v₂ : t.obj 2 = 0 := congrArg (fun x : ComposableArrows (Fin 2) 1 => x.obj 1) ht₁
-- The arrow of `t` from vertex 1 to vertex 2 would prove `1 ≤ 0`.
have hle : t.obj 1 ≤ t.obj 2 := leOfHom (t.map' 1 2)
rw [v₁, v₂] at hle
exact absurd hle (by decide)Finally, the homotopy category and the fact that the nerve loses nothing:
/-- The **homotopy category** functor `hoFunctor : SSet ⥤ Cat` is left adjoint to the nerve.
For a quasi-category `S`, `hoFunctor S` has the vertices as objects and homotopy classes of
edges as morphisms; composition is defined by filling inner 2-horns. This is Mathlib's
`CategoryTheory.nerveAdjunction`. -/
noncomputable def nerveAdjunction : hoFunctor ⊣ nerveFunctor :=
CategoryTheory.nerveAdjunction/-- The homotopy category of the nerve of a category is that category again (naturally): the
nerve loses no information, and categories sit inside ∞-categories as a full subcategory. This
is Mathlib's `CategoryTheory.nerveFunctorCompHoFunctorIso`. -/
noncomputable def hoNerveIso : nerveFunctor.{0, 0} ⋙ hoFunctor ≅ 𝟭 Cat :=
CategoryTheory.nerveFunctorCompHoFunctorIsoWhat is not formalised. Theorem 2 in a general quasi-category, Theorems 3–6, limits and colimits in quasi-categories and the ∞-categorical Yoneda lemma are not formalised here; as far as we know, Joyal's theorem (Theorem 4) and the Joyal model structure are not yet in Mathlib.
Counting horns and fillers
The experiment enumerates every horn and in the nerves of four small categories — the poset , the monoid with , the group , and the walking isomorphism — and counts fillers. Look for three patterns: inner horns always have exactly one filler (Theorem 1); outer horns fill in the two groupoids (their nerves are Kan complexes); and in the idempotent monoid an outer horn may have no filler or two fillers. Note also that outer 3-horns always fill in the poset: a poset is thin, so every triangle commutes.
"""Horn filling in nerves of small categories, by exhaustive search.
The nerve of a category C has as n-simplices the strings of n composable
arrows. A horn Lambda^n_k is a simplex with its k-th face (and interior)
missing; it is inner if 0 < k < n. We enumerate every horn of dimension 2 and
3 in the nerves of four small categories and count how many can be filled and
in how many ways:
* the poset 0 < 1 < 2,
* the "walking idempotent": one object, arrows 1 and e with e e = e,
* the group Z/3 as a one-object groupoid,
* the "walking isomorphism": objects 0, 1 and inverse arrows u, v.
The search confirms, in these cases, that inner horns in a nerve always have
exactly one filler (nerves are quasi-categories with unique inner fillers),
that outer horns fill in the two groupoids (their nerves are Kan complexes),
and that outer horns can fail to fill, or fill in several ways, otherwise.
Exact, exhaustive evidence for these finite categories and dimensions only.
"""
from itertools import product
class SmallCategory:
"""A finite category: objects, arrows with source and target, composition.
``compose(f, g)`` is "f then g" (diagrammatic order), defined when the
target of f is the source of g.
"""
def __init__(self, name, arrows, compose):
self.name = name
self.arrows = arrows # dict: arrow -> (source, target)
self.compose = compose
self.objects = sorted({s for s, _ in arrows.values()}
| {t for _, t in arrows.values()})
def hom(self, x, y):
"""All arrows from x to y."""
return [a for a, st in self.arrows.items() if st == (x, y)]
def poset_category(n):
"""The poset 0 < 1 < ... < n-1 as a category: one arrow i -> j iff i <= j."""
arrows = {(i, j): (i, j) for i in range(n) for j in range(i, n)}
return SmallCategory(f"poset [{n - 1}]", arrows,
lambda f, g: (f[0], g[1]))
def monoid_category(name, table):
"""A one-object category from a monoid's multiplication table."""
arrows = {m: (0, 0) for m in table}
return SmallCategory(name, arrows, lambda f, g: table[f][g])
def walking_isomorphism():
"""Objects 0 and 1, arrows u: 0 -> 1 and v: 1 -> 0 inverse to each other."""
arrows = {"1_0": (0, 0), "1_1": (1, 1), "u": (0, 1), "v": (1, 0)}
def compose(f, g):
table = {("u", "v"): "1_0", ("v", "u"): "1_1"}
if f.startswith("1_"):
return g
if g.startswith("1_"):
return f
return table[(f, g)]
return SmallCategory("walking iso", arrows, compose)
def edge_assignments(cat, vertices_count, edges):
"""All ways to choose objects for the vertices and arrows for ``edges``."""
for objs in product(cat.objects, repeat=vertices_count):
homs = [cat.hom(objs[a], objs[b]) for a, b in edges]
for choice in product(*homs):
yield dict(zip(edges, choice))
def triangle_commutes(cat, f, a, b, c):
"""Does the triangle on vertices a < b < c commute: f_ab ; f_bc = f_ac?"""
return cat.compose(f[(a, b)], f[(b, c)]) == f[(a, c)]
def horn_census(cat, n, k):
"""Count horns Lambda^n_k -> N(cat), fillable horns, and the largest
number of fillers of a single horn (n = 2 or 3)."""
all_edges = [(a, b) for a in range(n + 1) for b in range(a + 1, n + 1)]
if n == 2:
# The horn has the two edges through vertex k; the filler adds the third.
horn_edges = [e for e in all_edges if k in e]
horns = fillable = most = 0
for f in edge_assignments(cat, 3, horn_edges):
horns += 1
(missing,) = [e for e in all_edges if k not in e]
fillers = [x for x in cat.hom(*objects_of(cat, f, missing))
if triangle_commutes(cat, {**f, missing: x}, 0, 1, 2)]
fillable += bool(fillers)
most = max(most, len(fillers))
return horns, fillable, most
# n == 3: the horn contains all six edges and the faces other than d_k.
faces = [tuple(v for v in range(4) if v != i) for i in range(4)]
horns = fillable = 0
for f in edge_assignments(cat, 4, all_edges):
if all(triangle_commutes(cat, f, *faces[i]) for i in range(4) if i != k):
horns += 1
fillable += triangle_commutes(cat, f, *faces[k])
return horns, fillable, 1 if fillable else 0
def objects_of(cat, f, edge):
"""Source and target objects of a missing edge, read off the horn."""
a, b = edge
obj = {}
for (x, y), arrow in f.items():
obj[x], obj[y] = cat.arrows[arrow]
return obj[a], obj[b]
CATEGORIES = [
poset_category(3),
monoid_category("idempotent", {"1": {"1": "1", "e": "e"},
"e": {"1": "e", "e": "e"}}),
monoid_category("group Z/3", {i: {j: (i + j) % 3 for j in range(3)}
for i in range(3)}),
walking_isomorphism(),
]
def main():
print("Horn L(n,k): fillable horns/all horns (most fillers of one horn)")
print(f"{'category':<12}" + "".join(f"{f'L({n},{k})':>9}"
for n, k in HORNS))
for cat in CATEGORIES:
cells = []
for n, k in HORNS:
horns, ok, most = horn_census(cat, n, k)
cells.append(f"{f'{ok}/{horns}({most})':>9}")
print(f"{cat.name:<12}" + "".join(cells))
print("Inner: L(2,1), L(3,1), L(3,2). Outer: L(2,0), L(2,2), L(3,0), L(3,3).")
print()
idem = CATEGORIES[1]
for f01, f02 in [("e", "1"), ("e", "e")]:
fillers = [g for g in idem.arrows if idem.compose(f01, g) == f02]
print(f"Idempotent, outer horn L(2,0) with f01 = {f01}, f02 = {f02}: "
f"fillers {fillers}")
print()
print("Epistemic status: exact, exhaustive enumeration of all 2- and")
print("3-dimensional horns in four small categories. It illustrates, but")
print("does not prove, that nerves have unique inner fillers in every")
print("dimension and that nerves of groupoids are Kan complexes.")
HORNS = [(2, 1), (2, 0), (2, 2), (3, 1), (3, 2), (3, 0), (3, 3)]
if __name__ == "__main__":
main()Explore: witnesses and homotopies
A composite in a quasi-category is not an arrow but a triangle. Here is the 2-simplex witnessing as a composite of and , next to the 2-simplex that defines a homotopy (its third edge is an identity):
To see Theorem 2 in action, imagine the tetrahedron with vertices : its faces are , , the degenerate triangle , and the missing face — a as on the right. Filling the inner horn produces the missing face, and so the homotopy.
Try it on the experiment's output: in the idempotent monoid , the outer horn with , has two fillers and . Why does no such ambiguity ever arise for inner horns in a nerve? (Answer: the filler of an inner horn is determined by the spine, which the horn contains.)
Exercises
1. ∞-categories
Warm-upHumanWhich of these horns are inner? (Choose all that apply.)
2. ∞-categories
Warm-upHumanHow many non-degenerate simplices, of all dimensions, does the horn contain?
3. ∞-categories
CoreHumanIn the nerve , a horn consists of and . When does it have a filler?
4. ∞-categories
CoreHumanThe proof that any two composites of and are homotopic fills a 3-dimensional horn whose faces are (edges ), (edges ) and the degenerate triangle . Which horn is it, and why does the argument work in every quasi-category?
5. ∞-categories
CoreFormalWhich Lean statement says that the nerve of the poset is not an ∞-groupoid, although it is an ∞-category?
6. ∞-categories
CoreHumanWhich of the following simplicial sets are quasi-categories? (Choose all that apply.)
7. ∞-categories
CoreHumanWhat is the homotopy category of the singular complex of a space ?
8. ∞-categories
StretchHumanLet be a quasi-category in which every edge has a homotopy inverse (some with and in ). What can you conclude?
9. ∞-categories
StretchComputationalA one-object category (a monoid) is given by a list of elements and a function then(f, g) meaning 'first , then '. Write outer_fillers(elements, then, f, h) returning the list of all (in the order of elements) that fill the outer horn with edges (from vertex 0 to 1) and (from vertex 0 to 2), i.e. with then(f, g) == h.
Common misconceptions
Misconception
"An ∞-category is a category with more arrows." Its composition and coherence are homotopical: composites are not unique, only unique up to a contractible space of choices, and associativity holds up to specified higher simplices. The extra information lives in the higher simplices, not in additional 1-morphisms.
Misconception
"The homotopy hypothesis is a single theorem." It is a guiding principle ("∞-groupoids are spaces") whose precise form depends on the definition of ∞-groupoid. For Kan complexes it is Quillen's theorem (Theorem 5); for various algebraic definitions it is proved in some cases and open in others.
Misconception
"Composition in a quasi-category is a function ." There is no preferred composite: a composable pair may have many fillers, with different long edges. What is canonical is the space of fillers, which is contractible (Theorem 3), and the composite in the homotopy category .
Misconception
"Quasi-categories and Kan complexes are the same." Every Kan complex is a quasi-category, but not conversely: is a quasi-category in which the outer horn with edges and cannot be filled. By Joyal's theorem, a quasi-category is Kan exactly when all its morphisms are invertible up to homotopy.
Misconception
"An ∞-category is determined by its homotopy category." Very different ∞-categories can have equivalent homotopy categories, and homotopy limits and colimits cannot in general be computed in the homotopy category. That is the whole reason for the theory.
Many ways of seeing
Topology— Spaces are ∞-groupoids
From the topologist's side, an ∞-groupoid is a space: points are objects, paths are morphisms, homotopies are 2-morphisms, and Kan complexes are the combinatorial model (Theorem 5). The homotopy groups of a Kan complex at a vertex can be defined combinatorially, and . An ∞-category is then a "directed space": the quasi-category condition allows paths that cannot be reversed. Mapping spaces in a quasi-category are Kan complexes, so an ∞-category is a category "enriched in spaces" up to homotopy — and the simplicial-category model (Theorem 6) makes this literal. See Homotopy theory.
Algebra— Higher algebra and the Dold–Kan correspondence
The Dold–Kan correspondence (Dold, Kan, 1958) is an equivalence between simplicial abelian groups and chain complexes in non-negative degrees, under which homotopy groups become homology groups. It is the bridge by which homological algebra becomes a special case of ∞-category theory: the derived ∞-category of a ring is built from chain complexes, and its homotopy category is the classical derived category (see Derived categories). Algebraic structures that are associative or commutative only up to coherent homotopy — - and -algebras, going back to Stasheff and to Boardman–Vogt — are the algebra of ∞-categories, developed systematically in Lurie's Higher Algebra.
Geometry— Derived intersections and higher stacks
Algebraic geometers meet ∞-groupoids when moduli problems have automorphisms (stacks take values in groupoids) and when intersections are not transversal. Serre's intersection formula (1965) computes the intersection multiplicity of subvarieties at a point as ; the higher Tor terms are invisible in the ordinary scheme-theoretic intersection. In derived algebraic geometry (Toën–Vezzosi; Lurie) the intersection is a homotopy pullback in an ∞-category of derived schemes, whose structure sheaf remembers all the — Serre's formula becomes the Euler characteristic of a derived object. See Algebraic geometry.
Logic— Homotopy type theory as an internal language
In homotopy type theory, types behave like ∞-groupoids: iterated identity types form a weak ∞-groupoid (Lumsdaine; van den Berg and Garner). Shulman (2019) proved that every Grothendieck -topos — a well-behaved ∞-category of "sheaves of spaces" — models homotopy type theory with univalent universes, so type-theoretic proofs yield theorems in every ∞-topos. This is the logician's view of an ∞-topos: a universe of sets in which equality is a space of paths. See Homotopy type theory.
Category theory— One theory, many models
From the categorical point of view, quasi-categories, complete Segal spaces and simplicial categories are different presentations of one homotopy theory (Theorem 6), as different coordinate systems present one manifold. The relationship between a category and an ∞-category is like that between a set and a space: the nerve embeds categories fully faithfully into ∞-categories, with left adjoint the homotopy category, exactly as sets embed into spaces as the discrete ones with left adjoint .
Wonder Trails
History and global context
- 1950s: combinatorial homotopy theory. Daniel Kan (born in the Netherlands, working in the United States) introduced the extension condition now called the Kan condition (1957) and, in the same period, adjoint functors (1958). Albrecht Dold and Kan found the Dold–Kan correspondence (1958), and John Moore showed simplicial groups are Kan complexes.
- 1967: model categories. Daniel Quillen's Homotopical Algebra axiomatised homotopy theory and proved that simplicial sets and spaces have equivalent homotopy theories.
- 1973: weak Kan complexes. Michael Boardman and Rainer Vogt (UK and Germany) introduced simplicial sets with inner horn fillers in their study of homotopy-invariant algebraic structures.
- 1980s. William Dwyer and Daniel Kan developed simplicial localisation; Jean-Marc Cordier (France) introduced the homotopy coherent nerve (1982); Grothendieck's Pursuing Stacks (1983) set out the homotopy hypothesis.
- 2000s: the theory takes shape. André Joyal (Québec) showed that quasi-categories support a full category theory and built the Joyal model structure; Charles Rezk introduced complete Segal spaces (2001); Julia Bergner (2007) and Joyal–Tierney (2007) compared models; Bertrand Toën (2005) gave axioms; Toën and Gabriele Vezzosi (France and Italy) built homotopical algebraic geometry; Jacob Lurie's Higher Topos Theory (2009) and Higher Algebra made the theory a working tool.
- 2010s–today. Textbooks and model-independent approaches by Denis-Charles Cisinski (2019) and Emily Riehl and Dominic Verity (2022), Lurie's Kerodon, and the first formalisations in proof assistants.
Further reading
A suggested path: Groth's short course or Riehl's notes for orientation; Cisinski or Riehl–Verity for a textbook; Higher Topos Theory and Kerodon as references.
- Moritz Groth, "A short course on ∞-categories", in Handbook of Homotopy Theory (2020).
- Denis-Charles Cisinski, Higher Categories and Homotopical Algebra (2019).
- Emily Riehl and Dominic Verity, Elements of ∞-Category Theory (2022).
- Jacob Lurie, Higher Topos Theory (2009), Chapters 1–2; and Kerodon, an online textbook.
- André Joyal, "Quasi-categories and Kan complexes", J. Pure Appl. Algebra 175 (2002).
- Julia Bergner, The Homotopy Theory of (∞,1)-Categories (2018).
- J. M. Boardman and R. M. Vogt, Homotopy Invariant Algebraic Structures on Topological Spaces (Lecture Notes in Mathematics 347, 1973).
- Paul Goerss and John F. Jardine, Simplicial Homotopy Theory (1999) — for Kan complexes and the Kan–Quillen model structure.