|
| 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