@@ -251,7 +251,7 @@ def whiskering_equivalence {K : Type v} [small_category K] (e : K ≌ J) :
251
251
intro k,
252
252
have t := s.π.naturality (e.unit_inv.app k),
253
253
dsimp at t,
254
- simp only [←e.counit_functor k, id_comp] at t,
254
+ simp only [←e.counit_app_functor k, id_comp] at t,
255
255
dsimp,
256
256
simp [t],
257
257
end )) (by tidy), }
@@ -281,6 +281,7 @@ def forget : cone F ⥤ C :=
281
281
282
282
variables {D : Type u'} [category.{v} D] (G : C ⥤ D)
283
283
284
+ /-- A functor `G : C ⥤ D` sends cones over `F` to cones over `F ⋙ G` functorially. -/
284
285
@[simps] def functoriality : cone F ⥤ cone (F ⋙ G) :=
285
286
{ obj := λ A,
286
287
{ X := G.obj A.X,
@@ -297,6 +298,20 @@ instance functoriality_full [full G] [faithful G] : full (functoriality F G) :=
297
298
instance functoriality_faithful [faithful G] : faithful (cones.functoriality F G) :=
298
299
{ map_injective' := λ X Y f g e, by { ext1, injection e, apply G.map_injective h_1 } }
299
300
301
+ /--
302
+ If `e : C ≌ D` is an equivalence of categories, then `functoriality F e.functor` induces an
303
+ equivalence between cones over `F` and cones over `F ⋙ e.functor`.
304
+ -/
305
+ @[simps]
306
+ def functoriality_equivalence (e : C ≌ D) : cone F ≌ cone (F ⋙ e.functor) :=
307
+ let f : (F ⋙ e.functor) ⋙ e.inverse ≅ F :=
308
+ functor.associator _ _ _ ≪≫ iso_whisker_left _ (e.unit_iso).symm ≪≫ functor.right_unitor _ in
309
+ { functor := functoriality F e.functor,
310
+ inverse := (functoriality (F ⋙ e.functor) e.inverse) ⋙
311
+ (postcompose_equivalence f).functor,
312
+ unit_iso := nat_iso.of_components (λ c, cones.ext (e.unit_iso.app _) (by tidy)) (by tidy),
313
+ counit_iso := nat_iso.of_components (λ c, cones.ext (e.counit_iso.app _) (by tidy)) (by tidy), }
314
+
300
315
/--
301
316
If `F` reflects isomorphisms, then `cones.functoriality F` reflects isomorphisms
302
317
as well.
@@ -400,7 +415,7 @@ def whiskering_equivalence {K : Type v} [small_category K] (e : K ≌ J) :
400
415
intro k,
401
416
have t := s.ι.naturality (e.unit.app k),
402
417
dsimp at t,
403
- simp only [e.functor_unit k, comp_id] at t,
418
+ simp only [←e.counit_inv_app_functor k, comp_id] at t,
404
419
dsimp,
405
420
simp [t],
406
421
end )) (by tidy), }
@@ -430,6 +445,7 @@ def forget : cocone F ⥤ C :=
430
445
431
446
variables {D : Type u'} [category.{v} D] (G : C ⥤ D)
432
447
448
+ /-- A functor `G : C ⥤ D` sends cocones over `F` to cocones over `F ⋙ G` functorially. -/
433
449
@[simps] def functoriality : cocone F ⥤ cocone (F ⋙ G) :=
434
450
{ obj := λ A,
435
451
{ X := G.obj A.X,
@@ -446,6 +462,29 @@ instance functoriality_full [full G] [faithful G] : full (functoriality F G) :=
446
462
instance functoriality_faithful [faithful G] : faithful (functoriality F G) :=
447
463
{ map_injective' := λ X Y f g e, by { ext1, injection e, apply G.map_injective h_1 } }
448
464
465
+ /--
466
+ If `e : C ≌ D` is an equivalence of categories, then `functoriality F e.functor` induces an
467
+ equivalence between cocones over `F` and cocones over `F ⋙ e.functor`.
468
+ -/
469
+ @[simps]
470
+ def functoriality_equivalence (e : C ≌ D) : cocone F ≌ cocone (F ⋙ e.functor) :=
471
+ let f : (F ⋙ e.functor) ⋙ e.inverse ≅ F :=
472
+ functor.associator _ _ _ ≪≫ iso_whisker_left _ (e.unit_iso).symm ≪≫ functor.right_unitor _ in
473
+ { functor := functoriality F e.functor,
474
+ inverse := (functoriality (F ⋙ e.functor) e.inverse) ⋙
475
+ (precompose_equivalence f.symm).functor,
476
+ unit_iso := nat_iso.of_components (λ c, cocones.ext (e.unit_iso.app _) (by tidy)) (by tidy),
477
+ counit_iso := nat_iso.of_components (λ c, cocones.ext (e.counit_iso.app _)
478
+ begin
479
+ -- Unfortunately this doesn't work by `tidy`.
480
+ -- In this configuration `simp` reaches a dead-end and needs help.
481
+ intros j,
482
+ dsimp,
483
+ simp only [←equivalence.counit_inv_app_functor, iso.inv_hom_id_app, map_comp, equivalence.fun_inv_map,
484
+ assoc, id_comp, iso.inv_hom_id_app_assoc],
485
+ dsimp, simp, -- See note [dsimp, simp].
486
+ end ) (by tidy), }
487
+
449
488
/--
450
489
If `F` reflects isomorphisms, then `cocones.functoriality F` reflects isomorphisms
451
490
as well.
@@ -480,17 +519,6 @@ def map_cocone (c : cocone F) : cocone (F ⋙ H) := (cocones.functoriality F H).
480
519
@[simp] lemma map_cone_X (c : cone F) : (H.map_cone c).X = H.obj c.X := rfl
481
520
@[simp] lemma map_cocone_X (c : cocone F) : (H.map_cocone c).X = H.obj c.X := rfl
482
521
483
- /-- If `H` is an equivalence, we invert `H.map_cone` and get an original cone for `F` from a cone
484
- for `F ⋙ H`.-/
485
- @[simps]
486
- def map_cone_inv [is_equivalence H]
487
- (c : cone (F ⋙ H)) : cone F :=
488
- let t := (inv H).map_cone c in
489
- let α : (F ⋙ H) ⋙ inv H ⟶ F :=
490
- ((whisker_left F H.fun_inv_id.hom) : F ⋙ (H ⋙ inv H) ⟶ _) ≫ (functor.right_unitor _).hom in
491
- { X := t.X,
492
- π := ((category_theory.cones J C).map α).app (op t.X) t.π }
493
-
494
522
/-- Given a cone morphism `c ⟶ c'`, construct a cone morphism on the mapped cones functorially. -/
495
523
def map_cone_morphism {c c' : cone F} (f : c ⟶ c') :
496
524
H.map_cone c ⟶ H.map_cone c' := (cones.functoriality F H).map f
@@ -503,22 +531,37 @@ def map_cocone_morphism {c c' : cocone F} (f : c ⟶ c') :
503
531
@[simp] lemma map_cocone_ι (c : cocone F) (j : J) :
504
532
(map_cocone H c).ι.app j = H.map (c.ι.app j) := rfl
505
533
534
+ /-- If `H` is an equivalence, we invert `H.map_cone` and get a cone for `F` from a cone
535
+ for `F ⋙ H`.-/
536
+ def map_cone_inv [is_equivalence H]
537
+ (c : cone (F ⋙ H)) : cone F :=
538
+ (limits.cones.functoriality_equivalence F (as_equivalence H)).inverse.obj c
539
+
506
540
/-- `map_cone` is the left inverse to `map_cone_inv`. -/
507
541
def map_cone_map_cone_inv {F : J ⥤ D} (H : D ⥤ C) [is_equivalence H] (c : cone (F ⋙ H)) :
508
542
map_cone H (map_cone_inv H c) ≅ c :=
509
- cones.ext (H.inv_fun_id.app c.X)
510
- begin
511
- intro j,
512
- dsimp,
513
- rw [comp_id, H.map_comp, is_equivalence.fun_inv_map H, assoc, nat_iso.cancel_nat_iso_hom_left,
514
- assoc, is_equivalence.inv_fun_id_inv_comp],
515
- dsimp, simp,
516
- end
543
+ (limits.cones.functoriality_equivalence F (as_equivalence H)).counit_iso.app c
517
544
518
545
/-- `map_cone` is the right inverse to `map_cone_inv`. -/
519
546
def map_cone_inv_map_cone {F : J ⥤ D} (H : D ⥤ C) [is_equivalence H] (c : cone F) :
520
547
map_cone_inv H (map_cone H c) ≅ c :=
521
- cones.ext (H.fun_inv_id.app _) (λ j, by simp)
548
+ (limits.cones.functoriality_equivalence F (as_equivalence H)).unit_iso.symm.app c
549
+ /-- If `H` is an equivalence, we invert `H.map_cone` and get a cone for `F` from a cone
550
+ for `F ⋙ H`.-/
551
+
552
+ def map_cocone_inv [is_equivalence H]
553
+ (c : cocone (F ⋙ H)) : cocone F :=
554
+ (limits.cocones.functoriality_equivalence F (as_equivalence H)).inverse.obj c
555
+
556
+ /-- `map_cocone` is the left inverse to `map_cocone_inv`. -/
557
+ def map_cocone_map_cocone_inv {F : J ⥤ D} (H : D ⥤ C) [is_equivalence H] (c : cocone (F ⋙ H)) :
558
+ map_cocone H (map_cocone_inv H c) ≅ c :=
559
+ (limits.cocones.functoriality_equivalence F (as_equivalence H)).counit_iso.app c
560
+
561
+ /-- `map_cocone` is the right inverse to `map_cocone_inv`. -/
562
+ def map_cocone_inv_map_cocone {F : J ⥤ D} (H : D ⥤ C) [is_equivalence H] (c : cocone F) :
563
+ map_cocone_inv H (map_cocone H c) ≅ c :=
564
+ (limits.cocones.functoriality_equivalence F (as_equivalence H)).unit_iso.symm.app c
522
565
523
566
end functor
524
567
0 commit comments