/
simplicial_object.lean
182 lines (135 loc) · 6.2 KB
/
simplicial_object.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/-
Copyright (c) 2021 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Scott Morrison, Adam Topaz
-/
import algebraic_topology.simplex_category
import category_theory.category.ulift
import category_theory.limits.functor_category
import category_theory.opposites
import category_theory.adjunction.limits
import category_theory.limits.shapes.finite_limits
/-!
# Simplicial objects in a category.
A simplicial object in a category `C` is a `C`-valued presheaf on `simplex_category`.
Use the notation `X _[n]` in the `simplicial` locale to obtain the `n`-th term of a
simplicial object `X`, where `n` is a natural number.
-/
open opposite
open category_theory
open category_theory.limits
universes v u
namespace category_theory
variables (C : Type u) [category.{v} C]
/-- The category of simplicial objects valued in a category `C`.
This is the category of contravariant functors from `simplex_category` to `C`. -/
@[derive category, nolint has_inhabited_instance]
def simplicial_object := simplex_category.{v}ᵒᵖ ⥤ C
namespace simplicial_object
localized
"notation X `_[`:1000 n `]` :=
(X : simplicial_object _).obj (opposite.op (simplex_category.mk n))"
in simplicial
instance {J : Type v} [small_category J] [has_limits_of_shape J C] :
has_limits_of_shape J (simplicial_object C) := by {dsimp [simplicial_object], apply_instance}
instance [has_limits C] : has_limits (simplicial_object C) := ⟨infer_instance⟩
instance {J : Type v} [small_category J] [has_colimits_of_shape J C] :
has_colimits_of_shape J (simplicial_object C) := by {dsimp [simplicial_object], apply_instance}
instance [has_colimits C] : has_colimits (simplicial_object C) := ⟨infer_instance⟩
variables {C} (X : simplicial_object C)
/-- Face maps for a simplicial object. -/
def δ {n} (i : fin (n+2)) : X _[n+1] ⟶ X _[n] :=
X.map (simplex_category.δ i).op
/-- Degeneracy maps for a simplicial object. -/
def σ {n} (i : fin (n+1)) : X _[n] ⟶ X _[n+1] :=
X.map (simplex_category.σ i).op
/-- Isomorphisms from identities in ℕ. -/
def eq_to_iso {n m : ℕ} (h : n = m) : X _[n] ≅ X _[m] :=
X.map_iso (eq_to_iso (by rw h))
@[simp] lemma eq_to_iso_refl {n : ℕ} (h : n = n) : X.eq_to_iso h = iso.refl _ :=
by { ext, simp [eq_to_iso], }
/-- The generic case of the first simplicial identity -/
lemma δ_comp_δ {n} {i j : fin (n+2)} (H : i ≤ j) :
X.δ j.succ ≫ X.δ i = X.δ i.cast_succ ≫ X.δ j :=
by { dsimp [δ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_δ H] }
/-- The special case of the first simplicial identity -/
lemma δ_comp_δ_self {n} {i : fin (n+2)} : X.δ i.cast_succ ≫ X.δ i = X.δ i.succ ≫ X.δ i :=
by { dsimp [δ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_δ_self] }
/-- The second simplicial identity -/
lemma δ_comp_σ_of_le {n} {i : fin (n+2)} {j : fin (n+1)} (H : i ≤ j.cast_succ) :
X.σ j.succ ≫ X.δ i.cast_succ = X.δ i ≫ X.σ j :=
by { dsimp [δ, σ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_of_le H] }
/-- The first part of the third simplicial identity -/
lemma δ_comp_σ_self {n} {i : fin (n+1)} :
X.σ i ≫ X.δ i.cast_succ = 𝟙 _ :=
begin
dsimp [δ, σ],
simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_self, op_id, X.map_id],
end
/-- The second part of the third simplicial identity -/
lemma δ_comp_σ_succ {n} {i : fin (n+1)} :
X.σ i ≫ X.δ i.succ = 𝟙 _ :=
begin
dsimp [δ, σ],
simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_succ, op_id, X.map_id],
end
/-- The fourth simplicial identity -/
lemma δ_comp_σ_of_gt {n} {i : fin (n+2)} {j : fin (n+1)} (H : j.cast_succ < i) :
X.σ j.cast_succ ≫ X.δ i.succ = X.δ i ≫ X.σ j :=
by { dsimp [δ, σ], simp only [←X.map_comp, ←op_comp, simplex_category.δ_comp_σ_of_gt H] }
/-- The fifth simplicial identity -/
lemma σ_comp_σ {n} {i j : fin (n+1)} (H : i ≤ j) :
X.σ j ≫ X.σ i.cast_succ = X.σ i ≫ X.σ j.succ :=
by { dsimp [δ, σ], simp only [←X.map_comp, ←op_comp, simplex_category.σ_comp_σ H] }
variable (C)
/-- Truncated simplicial objects. -/
@[derive category, nolint has_inhabited_instance]
def truncated (n : ℕ) := (simplex_category.truncated.{v} n)ᵒᵖ ⥤ C
variable {C}
namespace truncated
instance {n} {J : Type v} [small_category J] [has_limits_of_shape J C] :
has_limits_of_shape J (simplicial_object.truncated C n) := by {dsimp [truncated], apply_instance}
instance {n} [has_limits C] : has_limits (simplicial_object.truncated C n) := ⟨infer_instance⟩
instance {n} {J : Type v} [small_category J] [has_colimits_of_shape J C] :
has_colimits_of_shape J (simplicial_object.truncated C n) :=
by {dsimp [truncated], apply_instance}
instance {n} [has_colimits C] : has_colimits (simplicial_object.truncated C n) := ⟨infer_instance⟩
end truncated
section skeleton
/-- The skeleton functor from simplicial objects to truncated simplicial objects. -/
def sk (n : ℕ) : simplicial_object C ⥤ simplicial_object.truncated C n :=
(whiskering_left _ _ _).obj (simplex_category.truncated.inclusion).op
end skeleton
section coskeleton
@[simps]
def cosk_diagram {n} (a : simplex_category.{v}) : truncated C n ⥤ (a.trunc n)ᵒᵖ ⥤ C :=
(whiskering_left _ _ _).obj simplex_category.trunc.forget.op
@[simps]
def map {n} {a b : simplex_category} (f : b ⟶ a) (D : (a.trunc n)ᵒᵖ ⥤ C) :
(b.trunc n)ᵒᵖ ⥤ C := (simplex_category.trunc.map f).op ⋙ D
@[simps]
def map_cone {n} {a b : simplex_category} {D : (a.trunc n)ᵒᵖ ⥤ C} (f : b ⟶ a)
(E : cone D) : cone (map f D) := E.whisker _
@[simps]
noncomputable
def cosk {n} [has_finite_limits C] : truncated C n ⥤ simplicial_object C :=
{ obj := λ T,
{ obj := λ a, limit $ (cosk_diagram a.unop).obj T,
map := λ a b f, limit.lift _ (map_cone f.unop _),
map_id' := begin
tidy,
congr,
have : j = op (j.unop), by simp,
nth_rewrite 1 this,
congr,
simp [simplex_category.trunc.map],
-- ⊢ ⟨(over.map (simplex_category.hom.mk preorder_hom.id)).obj (unop j).to_over, _⟩ = unop j
sorry
end,
map_comp' := _ },
map := _,
map_id' := _,
map_comp' := _ }
end coskeleton
end simplicial_object
end category_theory