Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 841aef2

Browse files
committed
feat(algebraic_topology): the nerve of a category (#14304)
1 parent bae0229 commit 841aef2

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

src/algebraic_topology/nerve.lean

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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

src/algebraic_topology/simplex_category.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,4 +728,12 @@ end
728728

729729
end epi_mono
730730

731+
/-- This functor `simplex_category ⥤ Cat` sends `[n]` (for `n : ℕ`)
732+
to the category attached to the ordered set `{0, 1, ..., n}` -/
733+
@[simps obj map]
734+
def to_Cat : simplex_category ⥤ Cat.{0} :=
735+
simplex_category.skeletal_functor ⋙ forget₂ NonemptyFinLinOrd LinearOrder ⋙
736+
forget₂ LinearOrder Lattice ⋙ forget₂ Lattice PartialOrder ⋙
737+
forget₂ PartialOrder Preorder ⋙ Preorder_to_Cat
738+
731739
end simplex_category

0 commit comments

Comments
 (0)