|
| 1 | +/- |
| 2 | +Copyright (c) 2022 Joël Riou. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Joël Riou |
| 5 | +-/ |
| 6 | + |
| 7 | +import algebraic_topology.simplicial_set |
| 8 | + |
| 9 | +/-! |
| 10 | +
|
| 11 | +# The nerve of a category |
| 12 | +
|
| 13 | +This file provides the definition of the nerve of a category `C`, |
| 14 | +which is a simplicial set `nerve C` (see [goerss-jardine-2009], Example I.1.4). |
| 15 | +
|
| 16 | +## References |
| 17 | +* [Paul G. Goerss, John F. Jardine, *Simplical Homotopy Theory*][goerss-jardine-2009] |
| 18 | +
|
| 19 | +-/ |
| 20 | + |
| 21 | +open category_theory.category |
| 22 | + |
| 23 | +universes v u |
| 24 | + |
| 25 | +namespace category_theory |
| 26 | + |
| 27 | +/-- The nerve of a category -/ |
| 28 | +@[simps] |
| 29 | +def nerve (C : Type u) [category.{v} C] : sSet.{max u v} := |
| 30 | +{ obj := λ Δ, (simplex_category.to_Cat.obj Δ.unop) ⥤ C, |
| 31 | + map := λ Δ₁ Δ₂ f x, simplex_category.to_Cat.map f.unop ⋙ x, |
| 32 | + map_id' := λ Δ, begin |
| 33 | + rw [unop_id, functor.map_id], |
| 34 | + ext x, |
| 35 | + apply functor.id_comp, |
| 36 | + end, } |
| 37 | + |
| 38 | +instance {C : Type*} [category C] {Δ : simplex_categoryᵒᵖ} : category ((nerve C).obj Δ) := |
| 39 | +(infer_instance : category ((simplex_category.to_Cat.obj Δ.unop) ⥤ C)) |
| 40 | + |
| 41 | +/-- The nerve of a category, as a functor `Cat ⥤ sSet` -/ |
| 42 | +@[simps] |
| 43 | +def nerve_functor : Cat ⥤ sSet := |
| 44 | +{ obj := λ C, nerve C, |
| 45 | + map := λ C C' F, |
| 46 | + { app := λ Δ x, x ⋙ F, }, |
| 47 | + map_id' := λ C, begin |
| 48 | + ext Δ x, |
| 49 | + apply functor.comp_id, |
| 50 | + end, } |
| 51 | + |
| 52 | +end category_theory |
0 commit comments