@@ -12,16 +12,14 @@ public import Mathlib.Util.Superscript
1212
1313/-! # The simplex category
1414
15- We construct a skeletal model of the simplex category, with objects `ℕ` and the
16- morphisms `n ⟶ m` being the monotone maps from `Fin (n + 1)` to `Fin (m + 1)`.
15+ We construct a skeletal model of the simplex category, with an object `⦋n⦌` for each `n : ℕ`, and
16+ morphisms `⦋n⦌ ⟶ ⦋m⦌` identify to monotone maps from `Fin (n + 1)` to `Fin (m + 1)`.
1717
1818In `Mathlib/AlgebraicTopology/SimplexCategory/Basic.lean`, we show that this category
1919is equivalent to `NonemptyFinLinOrd`.
2020
2121## Remarks
2222
23- The definitions `SimplexCategory` and `SimplexCategory.Hom` are marked as irreducible.
24-
2523We provide the following functions to work with these objects:
26241. `SimplexCategory.mk` creates an object of `SimplexCategory` out of a natural number.
2725 Use the notation `⦋n⦌` in the `Simplicial` locale.
@@ -46,47 +44,29 @@ universe v
4644open CategoryTheory
4745
4846/-- The simplex category:
49- * objects are natural numbers `n : ℕ`
50- * morphisms from `n` to `m ` are monotone functions `Fin (n+1) → Fin (m+1)`
47+ * for each `n : ℕ`, there is an object `⦋n⦌`;
48+ * morphisms `⦋n⦌ ⟶ ⦋m⦌ ` are monotone functions `Fin (n+1) → Fin (m+1)`
5149 -/
52- def SimplexCategory :=
53- ℕ
50+ @[ext]
51+ structure SimplexCategory : Type where
52+ /-- Constructor `ℕ → SimplexCategory`. -/
53+ mk ::
54+ /-- The length of an object in `SimplexCategory` -/
55+ len : ℕ
5456
5557namespace SimplexCategory
5658
57- -- The definition of `SimplexCategory` is made irreducible below.
58- /-- Interpret a natural number as an object of the simplex category. -/
59- def mk (n : ℕ) : SimplexCategory :=
60- n
61-
6259/-- the `n`-dimensional simplex can be denoted `⦋n⦌` -/
6360scoped [Simplicial] notation "⦋" n "⦌" => SimplexCategory.mk n
6461
65- -- TODO: Make `len` irreducible.
66- /-- The length of an object of `SimplexCategory`. -/
67- def len (n : SimplexCategory) : ℕ :=
68- n
69-
70- @[ext]
71- theorem ext (a b : SimplexCategory) : a.len = b.len → a = b :=
72- id
73-
74- attribute [irreducible] SimplexCategory
75-
7662open Simplicial
7763
78- @[simp]
79- theorem len_mk (n : ℕ) : ⦋n⦌.len = n :=
80- rfl
64+ theorem len_mk (n : ℕ) : ⦋n⦌.len = n := rfl
8165
8266@[simp]
8367theorem mk_len (n : SimplexCategory) : ⦋n.len⦌ = n :=
8468 rfl
8569
86- /-- A recursor for `SimplexCategory`. Use it as `induction Δ using SimplexCategory.rec`. -/
87- protected def rec {F : SimplexCategory → Sort *} (h : ∀ n : ℕ, F ⦋n⦌) : ∀ X, F X := fun n =>
88- h n.len
89-
9070/-- Morphisms in the `SimplexCategory`. -/
9171protected def Hom (a b : SimplexCategory) :=
9272 Fin (a.len + 1 ) →o Fin (b.len + 1 )
@@ -106,8 +86,6 @@ theorem ext' {a b : SimplexCategory} (f g : SimplexCategory.Hom a b) :
10686 f.toOrderHom = g.toOrderHom → f = g :=
10787 id
10888
109- attribute [irreducible] SimplexCategory.Hom
110-
11189@[simp]
11290theorem mk_toOrderHom {a b : SimplexCategory} (f : SimplexCategory.Hom a b) : mk f.toOrderHom = f :=
11391 rfl
@@ -134,6 +112,8 @@ def comp {a b c : SimplexCategory} (f : SimplexCategory.Hom b c) (g : SimplexCat
134112
135113end Hom
136114
115+ attribute [irreducible] SimplexCategory.Hom
116+
137117instance smallCategory : SmallCategory.{0 } SimplexCategory where
138118 Hom n m := SimplexCategory.Hom n m
139119 id _ := SimplexCategory.Hom.id _
0 commit comments