@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Scott Morrison
5
5
-/
6
6
import data.int.basic
7
- import category_theory.shift
7
+ import category_theory.shift.basic
8
8
import category_theory.concrete_category.basic
9
9
10
10
/-!
@@ -220,52 +220,67 @@ def shift_functor (n : ℤ) : differential_object C ⥤ differential_object C :=
220
220
←functor.map_comp_assoc, X.d_squared, functor.map_zero, zero_comp] },
221
221
map := λ X Y f,
222
222
{ f := f.f⟦n⟧',
223
- comm' := by { dsimp, rw [category.assoc, shift_comm_hom_comp, ← functor.map_comp_assoc,
224
- f.comm, functor.map_comp_assoc], }, },
223
+ comm' := begin
224
+ dsimp,
225
+ erw [category.assoc, shift_comm_hom_comp, ← functor.map_comp_assoc, f.comm,
226
+ functor.map_comp_assoc],
227
+ refl,
228
+ end , },
225
229
map_id' := by { intros X, ext1, dsimp, rw functor.map_id },
226
230
map_comp' := by { intros X Y Z f g, ext1, dsimp, rw functor.map_comp } }
227
231
228
- local attribute [simp] eq_to_hom_map
229
- local attribute [reducible] discrete.add_monoidal shift_comm
230
-
231
232
/-- The shift functor on `differential_object C` is additive. -/
232
233
@[simps] def shift_functor_add (m n : ℤ) :
233
234
shift_functor C (m + n) ≅ shift_functor C m ⋙ shift_functor C n :=
234
235
begin
235
236
refine nat_iso.of_components (λ X, mk_iso (shift_add X.X _ _) _) _,
236
237
{ dsimp,
237
- -- This is just `simp, simp [eq_to_hom_map]`.
238
- simp_rw [category.assoc, obj_μ_inv_app, μ_inv_hom_app_assoc, functor.map_comp, obj_μ_app,
239
- category.assoc, μ_naturality_assoc, μ_inv_hom_app_assoc, obj_μ_inv_app, category.assoc,
240
- μ_naturalityₗ_assoc, μ_inv_hom_app_assoc, μ_inv_naturalityᵣ_assoc],
241
- simp only [eq_to_hom_map, eq_to_hom_app, eq_to_iso.hom, eq_to_hom_trans_assoc,
242
- eq_to_iso.inv], },
238
+ rw [← cancel_epi ((shift_functor_add C m n).inv.app X.X)],
239
+ simp only [category.assoc, iso.inv_hom_id_app_assoc],
240
+ erw [← nat_trans.naturality_assoc],
241
+ dsimp,
242
+ simp only [functor.map_comp, category.assoc,
243
+ shift_functor_comm_hom_app_comp_shift_shift_functor_add_hom_app 1 m n X.X,
244
+ iso.inv_hom_id_app_assoc], },
243
245
{ intros X Y f, ext, dsimp, exact nat_trans.naturality _ _ }
244
246
end
245
247
246
- local attribute [reducible] endofunctor_monoidal_category
247
-
248
248
section
249
- local attribute [instance] endofunctor_monoidal_category
250
249
251
250
/-- The shift by zero is naturally isomorphic to the identity. -/
252
251
@[simps]
253
- def shift_ε : 𝟭 (differential_object C) ≅ shift_functor C 0 :=
252
+ def shift_zero : shift_functor C 0 ≅ 𝟭 (differential_object C) :=
254
253
begin
255
- refine nat_iso.of_components (λ X, mk_iso ((shift_monoidal_functor C ℤ).ε_iso.app X.X) _) _,
256
- { dsimp, simp, dsimp, simp },
257
- { introv, ext, dsimp, simp }
254
+ refine nat_iso.of_components (λ X, mk_iso ((shift_functor_zero C ℤ).app X.X) _) _,
255
+ { erw [← nat_trans.naturality],
256
+ dsimp,
257
+ simp only [shift_functor_zero_hom_app_shift, category.assoc], },
258
+ { tidy, },
258
259
end
259
260
260
261
end
261
262
262
- local attribute [simp] eq_to_hom_map
263
-
264
263
instance : has_shift (differential_object C) ℤ :=
265
264
has_shift_mk _ _
266
265
{ F := shift_functor C,
267
- ε := shift_ε C,
268
- μ := λ m n, (shift_functor_add C m n).symm }
266
+ zero := shift_zero C,
267
+ add := shift_functor_add C,
268
+ assoc_hom_app := λ m₁ m₂ m₃ X, begin
269
+ ext1,
270
+ convert shift_functor_add_assoc_hom_app m₁ m₂ m₃ X.X,
271
+ dsimp [shift_functor_add'],
272
+ simpa,
273
+ end ,
274
+ zero_add_hom_app := λ n X, begin
275
+ ext1,
276
+ convert shift_functor_add_zero_add_hom_app n X.X,
277
+ simpa,
278
+ end ,
279
+ add_zero_hom_app := λ n X, begin
280
+ ext1,
281
+ convert shift_functor_add_add_zero_hom_app n X.X,
282
+ simpa,
283
+ end , }
269
284
270
285
end differential_object
271
286
0 commit comments