@@ -25,7 +25,8 @@ namespace category_theory
25
25
26
26
variables (C : Type u) [category.{v} C]
27
27
28
- variables [has_zero_morphisms C] [has_shift C]
28
+ -- TODO: generaize to `has_shift C A` for an arbitrary `[add_monoid A]` `[has_one A]`.
29
+ variables [has_zero_morphisms C] [has_shift C ℤ]
29
30
30
31
/--
31
32
A differential object in a category with zero morphisms and a shift is
@@ -126,7 +127,7 @@ from an isomorphism of the underlying objects that commutes with the differentia
126
127
(f : X.X ≅ Y.X) (hf : X.d ≫ f.hom⟦1 ⟧' = f.hom ≫ Y.d) : X ≅ Y :=
127
128
{ hom := ⟨f.hom, hf⟩,
128
129
inv := ⟨f.inv, by { dsimp, rw [← functor.map_iso_inv, iso.comp_inv_eq, category.assoc,
129
- iso.eq_inv_comp, functor.map_iso_hom, ← hf], congr }⟩,
130
+ iso.eq_inv_comp, functor.map_iso_hom, hf] }⟩,
130
131
hom_inv_id' := by { ext1, dsimp, exact f.hom_inv_id },
131
132
inv_hom_id' := by { ext1, dsimp, exact f.inv_hom_id } }
132
133
@@ -136,20 +137,21 @@ namespace functor
136
137
137
138
universes v' u'
138
139
variables (D : Type u') [category.{v'} D]
139
- variables [has_zero_morphisms D] [has_shift D]
140
+ variables [has_zero_morphisms D] [has_shift D ℤ ]
140
141
141
142
/--
142
143
A functor `F : C ⥤ D` which commutes with shift functors on `C` and `D` and preserves zero morphisms
143
144
can be lifted to a functor `differential_object C ⥤ differential_object D`.
144
145
-/
145
146
@[simps]
146
- def map_differential_object (F : C ⥤ D) (η : (shift C).functor.comp F ⟶ F.comp (shift D).functor)
147
+ def map_differential_object (F : C ⥤ D)
148
+ (η : (shift_functor C (1 :ℤ)).comp F ⟶ F.comp (shift_functor D (1 :ℤ)))
147
149
(hF : ∀ c c', F.map (0 : c ⟶ c') = 0 ) :
148
150
differential_object C ⥤ differential_object D :=
149
151
{ obj := λ X, { X := F.obj X.X,
150
152
d := F.map X.d ≫ η.app X.X,
151
153
d_squared' := begin
152
- dsimp, rw [functor.map_comp, ← functor.comp_map F (shift D).functor ],
154
+ rw [functor.map_comp, ← functor.comp_map F (shift_functor D ( 1 :ℤ)) ],
153
155
slice_lhs 2 3 { rw [← η.naturality X.d] },
154
156
rw [functor.comp_map],
155
157
slice_lhs 1 2 { rw [← F.map_comp, X.d_squared, hF] },
@@ -158,7 +160,7 @@ def map_differential_object (F : C ⥤ D) (η : (shift C).functor.comp F ⟶ F.c
158
160
map := λ X Y f, { f := F.map f.f,
159
161
comm' := begin
160
162
dsimp,
161
- slice_lhs 2 3 { rw [← functor.comp_map F (shift D).functor , ← η.naturality f.f] },
163
+ slice_lhs 2 3 { rw [← functor.comp_map F (shift_functor D ( 1 :ℤ)) , ← η.naturality f.f] },
162
164
slice_lhs 1 2 { rw [functor.comp_map, ← F.map_comp, f.comm, F.map_comp] },
163
165
rw [category.assoc]
164
166
end },
@@ -175,7 +177,7 @@ namespace differential_object
175
177
176
178
variables (C : Type u) [category.{v} C]
177
179
178
- variables [has_zero_object C] [has_zero_morphisms C] [has_shift C]
180
+ variables [has_zero_object C] [has_zero_morphisms C] [has_shift C ℤ ]
179
181
180
182
open_locale zero_object
181
183
@@ -191,7 +193,7 @@ end differential_object
191
193
namespace differential_object
192
194
193
195
variables (C : Type (u+1 )) [large_category C] [concrete_category C]
194
- [has_zero_morphisms C] [has_shift C]
196
+ [has_zero_morphisms C] [has_shift C ℤ ]
195
197
196
198
instance concrete_category_of_differential_objects :
197
199
concrete_category (differential_object C) :=
@@ -206,132 +208,54 @@ end differential_object
206
208
namespace differential_object
207
209
208
210
variables (C : Type u) [category.{v} C]
209
- variables [has_zero_morphisms C] [has_shift C]
211
+ variables [has_zero_morphisms C] [has_shift C ℤ]
212
+
213
+ noncomputable theory
210
214
211
215
/-- The shift functor on `differential_object C`. -/
212
216
@[simps]
213
- def shift_functor : differential_object C ⥤ differential_object C :=
217
+ def shift_functor (n : ℤ) : differential_object C ⥤ differential_object C :=
214
218
{ obj := λ X,
215
- { X := X.X⟦1 ⟧,
216
- d := X.d⟦1 ⟧',
217
- d_squared' := begin
218
- dsimp,
219
- rw [←functor.map_comp, X.d_squared, is_equivalence_preserves_zero_morphisms],
220
- end },
221
- map := λ X Y f,
222
- { f := f.f⟦1 ⟧',
223
- comm' := begin dsimp, rw [←functor.map_comp, f.comm, ←functor.map_comp], end , }, }
224
-
225
- /-- The inverse shift functor on `differential C`, at the level of objects. -/
226
- @[simps]
227
- def shift_inverse_obj : differential_object C → differential_object C :=
228
- λ X,
229
- { X := X.X⟦-1 ⟧,
230
- d := X.d⟦-1 ⟧' ≫ (shift C).unit_inv.app X.X ≫ (shift C).counit_inv.app X.X,
231
- d_squared' := begin
232
- dsimp,
233
- rw functor.map_comp,
234
- slice_lhs 3 4 { erw ←(shift C).counit_inv.naturality, },
235
- slice_lhs 2 3 { erw ←(shift C).unit_inv.naturality, },
236
- slice_lhs 1 2 { erw [←functor.map_comp, X.d_squared], },
237
- simp,
238
- end , }
239
-
240
- /-- The inverse shift functor on `differential C`. -/
241
- @[simps]
242
- def shift_inverse : differential_object C ⥤ differential_object C :=
243
- { obj := shift_inverse_obj C,
219
+ { X := X.X⟦n⟧,
220
+ d := X.d⟦n⟧' ≫ (shift_comm _ _ _).hom,
221
+ d_squared' := by rw [functor.map_comp, category.assoc, shift_comm_hom_comp_assoc,
222
+ ←functor.map_comp_assoc, X.d_squared, is_equivalence_preserves_zero_morphisms, zero_comp] },
244
223
map := λ X Y f,
245
- { f := f.f⟦- 1 ⟧',
246
- comm' := begin
247
- dsimp ,
248
- slice_lhs 3 4 { erw ←(shift C).counit_inv.naturality, },
249
- slice_lhs 2 3 { erw ←(shift C).unit_inv.naturality, },
250
- slice_lhs 1 2 { erw [←functor.map_comp, f.comm, functor.map_comp], },
251
- rw [category.assoc, category.assoc],
252
- end , }, }.
253
-
254
- /-- The unit for the shift functor on `differential_object C`. -/
255
- @[simps]
256
- def shift_unit : 𝟭 (differential_object C) ⟶ shift_functor C ⋙ shift_inverse C :=
257
- { app := λ X,
258
- { f := (shift C).unit.app X.X,
259
- comm' := begin
260
- dsimp ,
261
- slice_rhs 1 2 { erw ←(shift C).unit.naturality, } ,
262
- simp only [category.comp_id, functor.id_map, iso.hom_inv_id_app ,
263
- category.assoc, equivalence.counit_inv_app_functor],
264
- end , }, }
265
-
266
- /-- The inverse of the unit for the shift functor on `differential_object C` . -/
224
+ { f := f.f⟦n ⟧',
225
+ comm' := by { dsimp, rw [category.assoc, shift_comm_hom_comp, ← functor.map_comp_assoc,
226
+ f.comm, functor.map_comp_assoc], }, } ,
227
+ map_id' := by { intros X, ext1, dsimp, rw functor.map_id },
228
+ map_comp' := by { intros X Y Z f g, ext1, dsimp, rw functor.map_comp } }
229
+
230
+ local attribute [instance] endofunctor_monoidal_category discrete.add_monoidal
231
+ local attribute [reducible] endofunctor_monoidal_category discrete.add_monoidal shift_comm
232
+
233
+ /-- The shift functor on `differential_object C` is additive . -/
234
+ @[simps] def shift_functor_add (m n : ℤ) :
235
+ shift_functor C (m + n) ≅ shift_functor C m ⋙ shift_functor C n :=
236
+ begin
237
+ refine nat_iso.of_components (λ X, mk_iso (shift_add X.X _ _) _) _ ,
238
+ { dsimp,
239
+ simp only [obj_μ_app, μ_naturality_assoc, μ_naturalityₗ_assoc, μ_inv_hom_app_assoc ,
240
+ category.assoc, obj_μ_inv_app, functor.map_comp, μ_inv_naturalityᵣ_assoc] ,
241
+ simp [opaque_eq_to_iso] } ,
242
+ { intros X Y f, ext, dsimp, exact nat_trans.naturality _ _ }
243
+ end
244
+
245
+ /-- The shift by zero is naturally isomorphic to the identity . -/
267
246
@[simps]
268
- def shift_unit_inv : shift_functor C ⋙ shift_inverse C ⟶ 𝟭 (differential_object C) :=
269
- { app := λ X,
270
- { f := (shift C).unit_inv.app X.X,
271
- comm' := begin
272
- dsimp,
273
- slice_rhs 1 2 { erw ←(shift C).unit_inv.naturality, },
274
- rw [equivalence.counit_inv_app_functor],
275
- slice_lhs 3 4 { rw ←functor.map_comp, },
276
- simp only [iso.hom_inv_id_app, functor.comp_map, iso.hom_inv_id_app_assoc,
277
- nat_iso.cancel_nat_iso_inv_left, equivalence.inv_fun_map, category.assoc],
278
- dsimp,
279
- rw category_theory.functor.map_id,
280
- end , }, }.
281
-
282
- /-- The unit isomorphism for the shift functor on `differential_object C`. -/
283
- @[simps]
284
- def shift_unit_iso : 𝟭 (differential_object C) ≅ shift_functor C ⋙ shift_inverse C :=
285
- { hom := shift_unit C,
286
- inv := shift_unit_inv C, }.
287
-
288
- /-- The counit for the shift functor on `differential_object C`. -/
289
- @[simps]
290
- def shift_counit : shift_inverse C ⋙ shift_functor C ⟶ 𝟭 (differential_object C) :=
291
- { app := λ X,
292
- { f := (shift C).counit.app X.X,
293
- comm' :=
294
- begin
295
- dsimp,
296
- slice_rhs 1 2 { erw ←(shift C).counit.naturality, },
297
- rw [(shift C).functor.map_comp, (shift C).functor.map_comp],
298
- slice_lhs 3 4 { erw [←functor.map_comp, iso.inv_hom_id_app, functor.map_id], },
299
- erw equivalence.counit_app_functor,
300
- rw category.comp_id,
301
- refl,
302
- end , }, }
303
-
304
- /-- The inverse of the counit for the shift functor on `differential_object C`. -/
305
- @[simps]
306
- def shift_counit_inv : 𝟭 (differential_object C) ⟶ shift_inverse C ⋙ shift_functor C :=
307
- { app := λ X,
308
- { f := (shift C).counit_inv.app X.X,
309
- comm' :=
310
- begin
311
- dsimp,
312
- rw [(shift C).functor.map_comp, (shift C).functor.map_comp],
313
- slice_rhs 1 2 { erw ←(shift C).counit_inv.naturality, },
314
- rw ←equivalence.counit_app_functor,
315
- slice_rhs 2 3 { rw iso.inv_hom_id_app, },
316
- rw category.id_comp,
317
- refl,
318
- end , }, }
319
-
320
- /-- The counit isomorphism for the shift functor on `differential_object C`. -/
321
- @[simps]
322
- def shift_counit_iso : shift_inverse C ⋙ shift_functor C ≅ 𝟭 (differential_object C) :=
323
- { hom := shift_counit C,
324
- inv := shift_counit_inv C, }
325
-
326
- /--
327
- The category of differential objects in `C` itself has a shift functor.
328
- -/
329
- instance : has_shift (differential_object C) :=
330
- { shift :=
331
- { functor := shift_functor C,
332
- inverse := shift_inverse C,
333
- unit_iso := shift_unit_iso C,
334
- counit_iso := shift_counit_iso C, } }
247
+ def shift_ε : 𝟭 (differential_object C) ≅ shift_functor C 0 :=
248
+ begin
249
+ refine nat_iso.of_components (λ X, mk_iso ((shift_monoidal_functor C ℤ).ε_iso.app X.X) _) _,
250
+ { dsimp, simp, dsimp, simp },
251
+ { introv, ext, dsimp, simp }
252
+ end
253
+
254
+ instance : has_shift (differential_object C) ℤ :=
255
+ has_shift_mk _ _
256
+ { F := shift_functor C,
257
+ ε := shift_ε C,
258
+ μ := λ m n, (shift_functor_add C m n).symm }
335
259
336
260
end differential_object
337
261
0 commit comments