@@ -30,25 +30,17 @@ variables {J C} (F : J ⥤ C)
30
30
natural transformations from the constant functor with value `X` to `F`.
31
31
An object representing this functor is a limit of `F`.
32
32
-/
33
+ @[simps]
33
34
def cones : Cᵒᵖ ⥤ Type v := (const J).op ⋙ (yoneda.obj F)
34
35
35
- lemma cones_obj (X : Cᵒᵖ) : F.cones.obj X = ((const J).obj (unop X) ⟶ F) := rfl
36
-
37
- @[simp] lemma cones_map_app {X₁ X₂ : Cᵒᵖ} (f : X₁ ⟶ X₂) (t : F.cones.obj X₁) (j : J) :
38
- (F.cones.map f t).app j = f.unop ≫ t.app j := rfl
39
-
40
36
/--
41
37
`F.cocones` is the functor assigning to an object `X` the type of
42
38
natural transformations from `F` to the constant functor with value `X`.
43
39
An object corepresenting this functor is a colimit of `F`.
44
40
-/
41
+ @[simps]
45
42
def cocones : C ⥤ Type v := const J ⋙ coyoneda.obj (op F)
46
43
47
- lemma cocones_obj (X : C) : F.cocones.obj X = (F ⟶ (const J).obj X) := rfl
48
-
49
- @[simp] lemma cocones_map_app {X₁ X₂ : C} (f : X₁ ⟶ X₂) (t : F.cocones.obj X₁) (j : J) :
50
- (F.cocones.map f t).app j = t.app j ≫ f := rfl
51
-
52
44
end functor
53
45
54
46
section
@@ -167,7 +159,7 @@ def equiv (F : J ⥤ C) : cocone F ≅ Σ X, F.cocones.obj X :=
167
159
{ X := X,
168
160
ι := c.extensions.app X f }
169
161
170
- @[simp] lemma extend_ι (c : cocone F) {X : C} (f : c.X ⟶ X) :
162
+ @[simp] lemma extend_ι (c : cocone F) {X : C} (f : c.X ⟶ X) :
171
163
(extend c f).ι = c.extensions.app X f :=
172
164
rfl
173
165
@@ -280,17 +272,11 @@ def whiskering_equivalence {K : Type v} [small_category K] (e : K ≌ J) :
280
272
The categories of cones over `F` and `G` are equivalent if `F` and `G` are naturally isomorphic
281
273
(possibly after changing the indexing category by an equivalence).
282
274
-/
275
+ @[simps functor_obj]
283
276
def equivalence_of_reindexing {K : Type v} [small_category K] {G : K ⥤ C}
284
277
(e : K ≌ J) (α : e.functor ⋙ F ≅ G) : cone F ≌ cone G :=
285
278
(whiskering_equivalence e).trans (postcompose_equivalence α)
286
279
287
- @[simp]
288
- lemma equivalence_of_reindexing_functor_obj {K : Type v} [small_category K] {G : K ⥤ C}
289
- (e : K ≌ J) (α : e.functor ⋙ F ≅ G) (c : cone F) :
290
- (equivalence_of_reindexing e α).functor.obj c =
291
- (postcompose α.hom).obj (cone.whisker e.functor c) :=
292
- rfl
293
-
294
280
section
295
281
variable (F)
296
282
@@ -447,17 +433,11 @@ def whiskering_equivalence {K : Type v} [small_category K] (e : K ≌ J) :
447
433
The categories of cocones over `F` and `G` are equivalent if `F` and `G` are naturally isomorphic
448
434
(possibly after changing the indexing category by an equivalence).
449
435
-/
436
+ @[simps functor_obj]
450
437
def equivalence_of_reindexing {K : Type v} [small_category K] {G : K ⥤ C}
451
438
(e : K ≌ J) (α : e.functor ⋙ F ≅ G) : cocone F ≌ cocone G :=
452
439
(whiskering_equivalence e).trans (precompose_equivalence α.symm)
453
440
454
- @[simp]
455
- lemma equivalence_of_reindexing_functor_obj {K : Type v} [small_category K] {G : K ⥤ C}
456
- (e : K ≌ J) (α : e.functor ⋙ F ≅ G) (c : cocone F) :
457
- (equivalence_of_reindexing e α).functor.obj c =
458
- (precompose α.inv).obj (cocone.whisker e.functor c) :=
459
- rfl
460
-
461
441
section
462
442
variable (F)
463
443
@@ -535,25 +515,19 @@ variables {F : J ⥤ C} {G : J ⥤ C} (H : C ⥤ D)
535
515
open category_theory.limits
536
516
537
517
/-- The image of a cone in C under a functor G : C ⥤ D is a cone in D. -/
518
+ @[simps]
538
519
def map_cone (c : cone F) : cone (F ⋙ H) := (cones.functoriality F H).obj c
539
520
/-- The image of a cocone in C under a functor G : C ⥤ D is a cocone in D. -/
521
+ @[simps]
540
522
def map_cocone (c : cocone F) : cocone (F ⋙ H) := (cocones.functoriality F H).obj c
541
523
542
- @[simp] lemma map_cone_X (c : cone F) : (H.map_cone c).X = H.obj c.X := rfl
543
- @[simp] lemma map_cocone_X (c : cocone F) : (H.map_cocone c).X = H.obj c.X := rfl
544
-
545
524
/-- Given a cone morphism `c ⟶ c'`, construct a cone morphism on the mapped cones functorially. -/
546
525
def map_cone_morphism {c c' : cone F} (f : c ⟶ c') :
547
526
H.map_cone c ⟶ H.map_cone c' := (cones.functoriality F H).map f
548
527
/-- Given a cocone morphism `c ⟶ c'`, construct a cocone morphism on the mapped cocones functorially. -/
549
528
def map_cocone_morphism {c c' : cocone F} (f : c ⟶ c') :
550
529
H.map_cocone c ⟶ H.map_cocone c' := (cocones.functoriality F H).map f
551
530
552
- @[simp] lemma map_cone_π (c : cone F) (j : J) :
553
- (map_cone H c).π.app j = H.map (c.π.app j) := rfl
554
- @[simp] lemma map_cocone_ι (c : cocone F) (j : J) :
555
- (map_cocone H c).ι.app j = H.map (c.ι.app j) := rfl
556
-
557
531
/-- If `H` is an equivalence, we invert `H.map_cone` and get a cone for `F` from a cone
558
532
for `F ⋙ H`.-/
559
533
def map_cone_inv [is_equivalence H]
@@ -587,7 +561,7 @@ def map_cocone_inv_map_cocone {F : J ⥤ D} (H : D ⥤ C) [is_equivalence H] (c
587
561
(limits.cocones.functoriality_equivalence F (as_equivalence H)).unit_iso.symm.app c
588
562
589
563
/-- `functoriality F _ ⋙ postcompose (whisker_left F _)` simplifies to `functoriality F _`. -/
590
- @[simps {rhs_md:=semireducible} ]
564
+ @[simps]
591
565
def functoriality_comp_postcompose {H H' : C ⥤ D} (α : H ≅ H') :
592
566
cones.functoriality F H ⋙ cones.postcompose (whisker_left F α.hom) ≅ cones.functoriality F H' :=
593
567
nat_iso.of_components (λ c, cones.ext (α.app _) (by tidy)) (by tidy)
@@ -597,7 +571,7 @@ For `F : J ⥤ C`, given a cone `c : cone F`, and a natural isomorphism `α : H
597
571
`H H' : C ⥤ D`, the postcomposition of the cone `H.map_cone` using the isomorphism `α` is
598
572
isomorphic to the cone `H'.map_cone`.
599
573
-/
600
- @[simps {rhs_md:=semireducible} ]
574
+ @[simps]
601
575
def postcompose_whisker_left_map_cone {H H' : C ⥤ D} (α : H ≅ H') (c : cone F) :
602
576
(cones.postcompose (whisker_left F α.hom : _)).obj (H.map_cone c) ≅ H'.map_cone c :=
603
577
(functoriality_comp_postcompose α).app c
@@ -607,7 +581,7 @@ def postcompose_whisker_left_map_cone {H H' : C ⥤ D} (α : H ≅ H') (c : cone
607
581
natural transformation `α : F ⟶ G` and a functor `H : C ⥤ D`, we have two obvious ways of producing
608
582
a cone over `G ⋙ H`, and they are both isomorphic.
609
583
-/
610
- @[simps {rhs_md:=semireducible} ]
584
+ @[simps]
611
585
def map_cone_postcompose {α : F ⟶ G} {c} :
612
586
H.map_cone ((cones.postcompose α).obj c) ≅
613
587
(cones.postcompose (whisker_right α H : _)).obj (H.map_cone c) :=
@@ -616,14 +590,14 @@ cones.ext (iso.refl _) (by tidy)
616
590
/--
617
591
`map_cone` commutes with `postcompose_equivalence`
618
592
-/
619
- @[simps {rhs_md:=semireducible} ]
593
+ @[simps]
620
594
def map_cone_postcompose_equivalence_functor {α : F ≅ G} {c} :
621
595
H.map_cone ((cones.postcompose_equivalence α).functor.obj c) ≅
622
596
(cones.postcompose_equivalence (iso_whisker_right α H : _)).functor.obj (H.map_cone c) :=
623
597
cones.ext (iso.refl _) (by tidy)
624
598
625
599
/-- `functoriality F _ ⋙ precompose (whisker_left F _)` simplifies to `functoriality F _`. -/
626
- @[simps {rhs_md:=semireducible} ]
600
+ @[simps]
627
601
def functoriality_comp_precompose {H H' : C ⥤ D} (α : H ≅ H') :
628
602
cocones.functoriality F H ⋙ cocones.precompose (whisker_left F α.inv)
629
603
≅ cocones.functoriality F H' :=
@@ -634,7 +608,7 @@ For `F : J ⥤ C`, given a cocone `c : cocone F`, and a natural isomorphism `α
634
608
`H H' : C ⥤ D`, the precomposition of the cocone `H.map_cocone` using the isomorphism `α` is
635
609
isomorphic to the cocone `H'.map_cocone`.
636
610
-/
637
- @[simps {rhs_md:=semireducible} ]
611
+ @[simps]
638
612
def precompose_whisker_left_map_cocone {H H' : C ⥤ D} (α : H ≅ H') (c : cocone F) :
639
613
(cocones.precompose (whisker_left F α.inv : _)).obj (H.map_cocone c) ≅ H'.map_cocone c :=
640
614
(functoriality_comp_precompose α).app c
@@ -644,7 +618,7 @@ def precompose_whisker_left_map_cocone {H H' : C ⥤ D} (α : H ≅ H') (c : coc
644
618
`c : cocone F`, a natural transformation `α : F ⟶ G` and a functor `H : C ⥤ D`, we have two obvious
645
619
ways of producing a cocone over `G ⋙ H`, and they are both isomorphic.
646
620
-/
647
- @[simps {rhs_md:=semireducible} ]
621
+ @[simps]
648
622
def map_cocone_precompose {α : F ⟶ G} {c} :
649
623
H.map_cocone ((cocones.precompose α).obj c) ≅
650
624
(cocones.precompose (whisker_right α H : _)).obj (H.map_cocone c) :=
@@ -653,7 +627,7 @@ cocones.ext (iso.refl _) (by tidy)
653
627
/--
654
628
`map_cocone` commutes with `precompose_equivalence`
655
629
-/
656
- @[simps {rhs_md:=semireducible} ]
630
+ @[simps]
657
631
def map_cocone_precompose_equivalence_functor {α : F ≅ G} {c} :
658
632
H.map_cocone ((cocones.precompose_equivalence α).functor.obj c) ≅
659
633
(cocones.precompose_equivalence (iso_whisker_right α H : _)).functor.obj (H.map_cocone c) :=
@@ -664,15 +638,15 @@ variables {K : Type v} [small_category K]
664
638
/--
665
639
`map_cone` commutes with `whisker`
666
640
-/
667
- @[simps {rhs_md:=semireducible} ]
641
+ @[simps]
668
642
def map_cone_whisker {E : K ⥤ J} {c : cone F} :
669
643
H.map_cone (c.whisker E) ≅ (H.map_cone c).whisker E :=
670
644
cones.ext (iso.refl _) (by tidy)
671
645
672
646
/--
673
647
`map_cocone` commutes with `whisker`
674
648
-/
675
- @[simps {rhs_md:=semireducible} ]
649
+ @[simps]
676
650
def map_cocone_whisker {E : K ⥤ J} {c : cocone F} :
677
651
H.map_cocone (c.whisker E) ≅ (H.map_cocone c).whisker E :=
678
652
cocones.ext (iso.refl _) (by tidy)
@@ -762,25 +736,23 @@ variables {F : J ⥤ Cᵒᵖ}
762
736
/-- Change a cocone on `F.left_op : Jᵒᵖ ⥤ C` to a cocone on `F : J ⥤ Cᵒᵖ`. -/
763
737
-- Here and below we only automatically generate the `@[simp]` lemma for the `X` field,
764
738
-- as we can write a simpler `rfl` lemma for the components of the natural transformation by hand.
765
- @[simps X] def cone_of_cocone_left_op (c : cocone F.left_op) : cone F :=
739
+ @[simps {rhs_md := semireducible, simp_rhs := tt}]
740
+ def cone_of_cocone_left_op (c : cocone F.left_op) : cone F :=
766
741
{ X := op c.X,
767
742
π := nat_trans.remove_left_op (c.ι ≫ (const.op_obj_unop (op c.X)).hom) }
768
743
769
- @[simp] lemma cone_of_cocone_left_op_π_app (c : cocone F.left_op) (j) :
770
- (cone_of_cocone_left_op c).π.app j = (c.ι.app (op j)).op :=
771
- by { dsimp [cone_of_cocone_left_op], simp }
772
-
773
744
/-- Change a cone on `F : J ⥤ Cᵒᵖ` to a cocone on `F.left_op : Jᵒᵖ ⥤ C`. -/
774
- @[simps X] def cocone_left_op_of_cone (c : cone F) : cocone (F.left_op) :=
745
+ @[simps {rhs_md := semireducible, simp_rhs := tt}]
746
+ def cocone_left_op_of_cone (c : cone F) : cocone (F.left_op) :=
775
747
{ X := unop c.X,
776
748
ι := nat_trans.left_op c.π }
777
749
778
- @[simp] lemma cocone_left_op_of_cone_ι_app (c : cone F) (j) :
779
- (cocone_left_op_of_cone c).ι.app j = (c.π.app (unop j)).unop :=
780
- by { dsimp [cocone_left_op_of_cone], simp }
781
-
782
750
/-- Change a cone on `F.left_op : Jᵒᵖ ⥤ C` to a cocone on `F : J ⥤ Cᵒᵖ`. -/
783
- @[simps X] def cocone_of_cone_left_op (c : cone F.left_op) : cocone F :=
751
+ /- When trying use `@[simps]` to generate the `ι_app` field of this definition, `@[simps]` tries to
752
+ reduce the RHS using `expr.dsimp` and `expr.simp`, but for some reason the expression is not
753
+ being simplified properly. -/
754
+ @[simps X]
755
+ def cocone_of_cone_left_op (c : cone F.left_op) : cocone F :=
784
756
{ X := op c.X,
785
757
ι := nat_trans.remove_left_op ((const.op_obj_unop (op c.X)).hom ≫ c.π) }
786
758
@@ -789,14 +761,11 @@ by { dsimp [cocone_left_op_of_cone], simp }
789
761
by { dsimp [cocone_of_cone_left_op], simp }
790
762
791
763
/-- Change a cocone on `F : J ⥤ Cᵒᵖ` to a cone on `F.left_op : Jᵒᵖ ⥤ C`. -/
792
- @[simps X] def cone_left_op_of_cocone (c : cocone F) : cone (F.left_op) :=
764
+ @[simps {rhs_md := semireducible, simp_rhs := tt}]
765
+ def cone_left_op_of_cocone (c : cocone F) : cone (F.left_op) :=
793
766
{ X := unop c.X,
794
767
π := nat_trans.left_op c.ι }
795
768
796
- @[simp] lemma cone_left_op_of_cocone_π_app (c : cocone F) (j) :
797
- (cone_left_op_of_cocone c).π.app j = (c.ι.app (unop j)).unop :=
798
- by { dsimp [cone_left_op_of_cocone], simp }
799
-
800
769
end
801
770
802
771
end category_theory.limits
0 commit comments