Skip to content

Commit d641c68

Browse files
committed
feat(AlgebraicTopology): definition of Kan complex and quasicategory (#9357)
1 parent 3286bea commit d641c68

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,10 @@ import Mathlib.AlgebraicTopology.FundamentalGroupoid.InducedMaps
547547
import Mathlib.AlgebraicTopology.FundamentalGroupoid.PUnit
548548
import Mathlib.AlgebraicTopology.FundamentalGroupoid.Product
549549
import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected
550+
import Mathlib.AlgebraicTopology.KanComplex
550551
import Mathlib.AlgebraicTopology.MooreComplex
551552
import Mathlib.AlgebraicTopology.Nerve
553+
import Mathlib.AlgebraicTopology.Quasicategory
552554
import Mathlib.AlgebraicTopology.SimplexCategory
553555
import Mathlib.AlgebraicTopology.SimplicialObject
554556
import Mathlib.AlgebraicTopology.SimplicialSet
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/-
2+
Copyright (c) 2023 Johan Commelin. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johan Commelin
5+
-/
6+
7+
import Mathlib.AlgebraicTopology.SimplicialSet
8+
9+
/-!
10+
# Kan complexes
11+
12+
In this file we give the definition of Kan complexes.
13+
In `Mathlib/AlgebraicTopology/Quasicategory.lean`
14+
we show that every Kan complex is a quasicategory.
15+
16+
## TODO
17+
18+
- Show that the singular simplicial set of a topological space is a Kan complex.
19+
- Generalize the definition to higher universes.
20+
Since `Λ[n, i]` is an object of `SSet.{0}`,
21+
the current definition of a Kan complex `S`
22+
requires `S : SSet.{0}`.
23+
24+
-/
25+
26+
namespace SSet
27+
28+
open CategoryTheory Simplicial
29+
30+
/-- A simplicial set `S` is a *Kan complex* if it satisfies the following horn-filling condition:
31+
for every `n : ℕ` and `0 ≤ i ≤ n`,
32+
every map of simplicial sets `σ₀ : Λ[n, i] → S` can be extended to a map `σ : Δ[n] → S`. -/
33+
class KanComplex (S : SSet) : Prop where
34+
hornFilling : ∀ ⦃n : ℕ⦄ ⦃i : Fin (n+1)⦄ (σ₀ : Λ[n, i] ⟶ S),
35+
∃ σ : Δ[n] ⟶ S, σ₀ = hornInclusion n i ≫ σ
36+
37+
end SSet
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/-
2+
Copyright (c) 2023 Johan Commelin. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johan Commelin
5+
-/
6+
7+
import Mathlib.AlgebraicTopology.KanComplex
8+
9+
/-!
10+
# Quasicategories
11+
12+
In this file we define quasicategories,
13+
a common model of infinity categories.
14+
We show that every Kan complex is a quasicategory.
15+
16+
In `Mathlib/AlgebraicTopology/Nerve.lean`
17+
we show (TODO) that the nerve of a category is a quasicategory.
18+
19+
## TODO
20+
21+
- Generalize the definition to higher universes.
22+
See the corresponding TODO in `Mathlib/AlgebraicTopology/KanComplex.lean`.
23+
24+
-/
25+
26+
namespace SSet
27+
28+
open CategoryTheory Simplicial
29+
30+
/-- A simplicial set `S` is a *quasicategory* if it satisfies the following horn-filling condition:
31+
for every `n : ℕ` and `0 < i < n`,
32+
every map of simplicial sets `σ₀ : Λ[n, i] → S` can be extended to a map `σ : Δ[n] → S`.
33+
34+
[Kerodon, 003A] -/
35+
class Quasicategory (S : SSet) : Prop where
36+
hornFilling' : ∀ ⦃n : ℕ⦄ ⦃i : Fin (n+3)⦄ (σ₀ : Λ[n+2, i] ⟶ S)
37+
(_h0 : 0 < i) (_hn : i < Fin.last (n+2)),
38+
∃ σ : Δ[n+2] ⟶ S, σ₀ = hornInclusion (n+2) i ≫ σ
39+
40+
lemma Quasicategory.hornFilling {S : SSet} [Quasicategory S] ⦃n : ℕ⦄ ⦃i : Fin (n+1)⦄
41+
(h0 : 0 < i) (hn : i < Fin.last n)
42+
(σ₀ : Λ[n, i] ⟶ S) : ∃ σ : Δ[n] ⟶ S, σ₀ = hornInclusion n i ≫ σ := by
43+
cases n using Nat.casesAuxOn with
44+
| zero => simp [Fin.lt_iff_val_lt_val] at hn
45+
| succ n =>
46+
cases n using Nat.casesAuxOn with
47+
| zero =>
48+
simp only [Fin.lt_iff_val_lt_val, Fin.val_zero, Fin.val_last, zero_add, Nat.lt_one_iff] at h0 hn
49+
simp [hn] at h0
50+
| succ n => exact Quasicategory.hornFilling' σ₀ h0 hn
51+
52+
/-- Every Kan complex is a quasicategory.
53+
54+
[Kerodon, 003C] -/
55+
instance (S : SSet) [KanComplex S] : Quasicategory S where
56+
hornFilling' _ _ σ₀ _ _ := KanComplex.hornFilling σ₀
57+
58+
end SSet

0 commit comments

Comments
 (0)