@@ -512,8 +512,7 @@ begin
512
512
dsimp,
513
513
rw [comp_id, H.map_comp, is_equivalence.fun_inv_map H, assoc, nat_iso.cancel_nat_iso_hom_left,
514
514
assoc, is_equivalence.inv_fun_id_inv_comp],
515
- apply comp_id,
516
- -- annoyingly `dsimp, simp` leaves it as `c.π.app j ≫ 𝟙 _ = c.π.app j` instead of closing...
515
+ dsimp, simp,
517
516
end
518
517
519
518
/-- `map_cone` is the right inverse to `map_cone_inv`. -/
@@ -527,14 +526,88 @@ end category_theory
527
526
528
527
namespace category_theory.limits
529
528
529
+ section
530
+ variables {F : J ⥤ C}
531
+
532
+ /-- Change a `cocone F` into a `cone F.op`. -/
533
+ @[simps] def cocone.op (c : cocone F) : cone F.op :=
534
+ { X := op c.X,
535
+ π :=
536
+ { app := λ j, (c.ι.app (unop j)).op,
537
+ naturality' := λ j j' f, has_hom.hom.unop_inj (by tidy) } }
538
+
539
+ /-- Change a `cone F` into a `cocone F.op`. -/
540
+ @[simps] def cone.op (c : cone F) : cocone F.op :=
541
+ { X := op c.X,
542
+ ι :=
543
+ { app := λ j, (c.π.app (unop j)).op,
544
+ naturality' := λ j j' f, has_hom.hom.unop_inj (by tidy) } }
545
+
546
+ /-- Change a `cocone F.op` into a `cone F`. -/
547
+ @[simps] def cocone.unop (c : cocone F.op) : cone F :=
548
+ { X := unop c.X,
549
+ π :=
550
+ { app := λ j, (c.ι.app (op j)).unop,
551
+ naturality' := λ j j' f, has_hom.hom.op_inj
552
+ begin dsimp, simp only [comp_id], exact (c.w f.op).symm, end } }
553
+
554
+ /-- Change a `cone F.op` into a `cocone F`. -/
555
+ @[simps] def cone.unop (c : cone F.op) : cocone F :=
556
+ { X := unop c.X,
557
+ ι :=
558
+ { app := λ j, (c.π.app (op j)).unop,
559
+ naturality' := λ j j' f, has_hom.hom.op_inj
560
+ begin dsimp, simp only [id_comp], exact (c.w f.op), end } }
561
+
562
+ variables (F)
563
+
564
+ /--
565
+ The category of cocones on `F`
566
+ is equivalent to the opposite category of
567
+ the category of cones on the opposite of `F`.
568
+ -/
569
+ @[simps]
570
+ def cocone_equivalence_op_cone_op : cocone F ≌ (cone F.op)ᵒᵖ :=
571
+ { functor :=
572
+ { obj := λ c, op (cocone.op c),
573
+ map := λ X Y f, has_hom.hom.op
574
+ { hom := f.hom.op,
575
+ w' := λ j, by { apply has_hom.hom.unop_inj, dsimp, simp, }, } },
576
+ inverse :=
577
+ { obj := λ c, cone.unop (unop c),
578
+ map := λ X Y f,
579
+ { hom := f.unop.hom.unop,
580
+ w' := λ j, by { apply has_hom.hom.op_inj, dsimp, simp, }, } },
581
+ unit_iso := nat_iso.of_components (λ c, cocones.ext (iso.refl _) (by tidy)) (by tidy),
582
+ counit_iso := nat_iso.of_components (λ c,
583
+ by { op_induction c, dsimp, apply iso.op, exact cones.ext (iso.refl _) (by tidy), })
584
+ begin
585
+ intros,
586
+ have hX : X = op (unop X) := rfl,
587
+ revert hX,
588
+ generalize : unop X = X',
589
+ rintro rfl,
590
+ have hY : Y = op (unop Y) := rfl,
591
+ revert hY,
592
+ generalize : unop Y = Y',
593
+ rintro rfl,
594
+ apply has_hom.hom.unop_inj,
595
+ apply cone_morphism.ext,
596
+ dsimp, simp,
597
+ end ,
598
+ functor_unit_iso_comp' := λ c, begin apply has_hom.hom.unop_inj, ext, dsimp, simp, end }
599
+
600
+ end
601
+
602
+ section
530
603
variables {F : J ⥤ Cᵒᵖ}
531
604
532
- -- Here and below we only automatically generate the `@[simp]` lemma for the `X` field,
533
- -- as we can be a simpler `rfl` lemma for the components of the natural transformation by hand.
534
605
/-- Change a cocone on `F.left_op : Jᵒᵖ ⥤ C` to a cocone on `F : J ⥤ Cᵒᵖ`. -/
606
+ -- Here and below we only automatically generate the `@[simp]` lemma for the `X` field,
607
+ -- as we can write a simpler `rfl` lemma for the components of the natural transformation by hand.
535
608
@[simps X] def cone_of_cocone_left_op (c : cocone F.left_op) : cone F :=
536
609
{ X := op c.X,
537
- π := nat_trans.right_op (c.ι ≫ (const.op_obj_unop (op c.X)).hom) }
610
+ π := nat_trans.remove_left_op (c.ι ≫ (const.op_obj_unop (op c.X)).hom) }
538
611
539
612
@[simp] lemma cone_of_cocone_left_op_π_app (c : cocone F.left_op) (j) :
540
613
(cone_of_cocone_left_op c).π.app j = (c.ι.app (op j)).op :=
@@ -552,7 +625,7 @@ by { dsimp [cocone_left_op_of_cone], simp }
552
625
/-- Change a cone on `F.left_op : Jᵒᵖ ⥤ C` to a cocone on `F : J ⥤ Cᵒᵖ`. -/
553
626
@[simps X] def cocone_of_cone_left_op (c : cone F.left_op) : cocone F :=
554
627
{ X := op c.X,
555
- ι := nat_trans.right_op ((const.op_obj_unop (op c.X)).hom ≫ c.π) }
628
+ ι := nat_trans.remove_left_op ((const.op_obj_unop (op c.X)).hom ≫ c.π) }
556
629
557
630
@[simp] lemma cocone_of_cone_left_op_ι_app (c : cone F.left_op) (j) :
558
631
(cocone_of_cone_left_op c).ι.app j = (c.π.app (op j)).op :=
@@ -566,4 +639,29 @@ by { dsimp [cocone_of_cone_left_op], simp }
566
639
@[simp] lemma cone_left_op_of_cocone_π_app (c : cocone F) (j) :
567
640
(cone_left_op_of_cocone c).π.app j = (c.ι.app (unop j)).unop :=
568
641
by { dsimp [cone_left_op_of_cocone], simp }
642
+
643
+ end
644
+
569
645
end category_theory.limits
646
+
647
+ namespace category_theory.functor
648
+
649
+ open category_theory.limits
650
+
651
+ variables {F : J ⥤ C}
652
+ variables {D : Type u'} [category.{v} D]
653
+
654
+ section
655
+ variables (G : C ⥤ D)
656
+
657
+ /-- The opposite cocone of the image of a cone is the image of the opposite cocone. -/
658
+ def map_cone_op (t : cone F) : (G.map_cone t).op ≅ (G.op.map_cocone t.op) :=
659
+ cocones.ext (iso.refl _) (by tidy)
660
+
661
+ /-- The opposite cone of the image of a cocone is the image of the opposite cone. -/
662
+ def map_cocone_op {t : cocone F} : (G.map_cocone t).op ≅ (G.op.map_cone t.op) :=
663
+ cones.ext (iso.refl _) (by tidy)
664
+
665
+ end
666
+
667
+ end category_theory.functor
0 commit comments