@@ -95,6 +95,16 @@ namespace is_limit
95
95
instance subsingleton {t : cone F} : subsingleton (is_limit t) :=
96
96
⟨by intros P Q; cases P; cases Q; congr; ext; solve_by_elim⟩
97
97
98
+ /-- Given a natural transformation `α : F ⟶ G`, we give a morphism from the cone point
99
+ of any cone over `F` to the cone point of a limit cone over `G`. -/
100
+ def map {F G : J ⥤ C} (s : cone F) {t : cone G} (P : is_limit t)
101
+ (α : F ⟶ G) : s.X ⟶ t.X :=
102
+ P.lift ((cones.postcompose α).obj s)
103
+
104
+ @[simp, reassoc] lemma map_π {F G : J ⥤ C} (c : cone F) {d : cone G} (hd : is_limit d)
105
+ (α : F ⟶ G) (j : J) : hd.map c α ≫ d.π.app j = c.π.app j ≫ α.app j :=
106
+ fac _ _ _
107
+
98
108
/- Repackaging the definition in terms of cone morphisms. -/
99
109
100
110
/-- The universal morphism from any other cone to a limit cone. -/
@@ -136,7 +146,6 @@ def hom_is_iso {s t : cone F} (P : is_limit s) (Q : is_limit t) (f : s ⟶ t) :
136
146
inv_hom_id' := Q.uniq_cone_morphism, }
137
147
138
148
/-- Limits of `F` are unique up to isomorphism. -/
139
- -- We may later want to prove the coherence of these isomorphisms.
140
149
def cone_point_unique_up_to_iso {s t : cone F} (P : is_limit s) (Q : is_limit t) : s.X ≅ t.X :=
141
150
(cones.forget F).map_iso (unique_up_to_iso P Q)
142
151
@@ -148,12 +157,38 @@ def cone_point_unique_up_to_iso {s t : cone F} (P : is_limit s) (Q : is_limit t)
148
157
(Q : is_limit t) (j : J) : (cone_point_unique_up_to_iso P Q).inv ≫ s.π.app j = t.π.app j :=
149
158
(unique_up_to_iso P Q).inv.w _
150
159
160
+ @[simp, reassoc] lemma lift_comp_cone_point_unique_up_to_iso_hom {r s t : cone F}
161
+ (P : is_limit s) (Q : is_limit t) :
162
+ P.lift r ≫ (cone_point_unique_up_to_iso P Q).hom = Q.lift r :=
163
+ Q.uniq _ _ (by simp)
164
+
165
+ @[simp, reassoc] lemma lift_comp_cone_point_unique_up_to_iso_inv {r s t : cone F}
166
+ (P : is_limit s) (Q : is_limit t) :
167
+ Q.lift r ≫ (cone_point_unique_up_to_iso P Q).inv = P.lift r :=
168
+ P.uniq _ _ (by simp)
169
+
151
170
/-- Transport evidence that a cone is a limit cone across an isomorphism of cones. -/
152
171
def of_iso_limit {r t : cone F} (P : is_limit r) (i : r ≅ t) : is_limit t :=
153
172
is_limit.mk_cone_morphism
154
173
(λ s, P.lift_cone_morphism s ≫ i.hom)
155
174
(λ s m, by rw ←i.comp_inv_eq; apply P.uniq_cone_morphism)
156
175
176
+ @[simp] lemma of_iso_limit_lift {r t : cone F} (P : is_limit r) (i : r ≅ t) (s) :
177
+ (P.of_iso_limit i).lift s = P.lift s ≫ i.hom.hom :=
178
+ rfl
179
+
180
+ /-- Isomorphism of cones preserves whether or not they are limiting cones. -/
181
+ def equiv_iso_limit {r t : cone F} (i : r ≅ t) : is_limit r ≃ is_limit t :=
182
+ { to_fun := λ h, h.of_iso_limit i,
183
+ inv_fun := λ h, h.of_iso_limit i.symm,
184
+ left_inv := by tidy,
185
+ right_inv := by tidy }
186
+
187
+ @[simp] lemma equiv_iso_limit_apply {r t : cone F} (i : r ≅ t) (P : is_limit r) :
188
+ equiv_iso_limit i P = P.of_iso_limit i := rfl
189
+ @[simp] lemma equiv_iso_limit_symm_apply {r t : cone F} (i : r ≅ t) (P : is_limit t) :
190
+ (equiv_iso_limit i).symm P = P.of_iso_limit i.symm := rfl
191
+
157
192
/--
158
193
If the canonical morphism from a cone point to a limiting cone point is an iso, then the
159
194
first cone was limiting also.
@@ -224,10 +259,28 @@ are themselves isomorphic.
224
259
@[simps]
225
260
def cone_points_iso_of_nat_iso {F G : J ⥤ C} {s : cone F} {t : cone G}
226
261
(P : is_limit s) (Q : is_limit t) (w : F ≅ G) : s.X ≅ t.X :=
227
- { hom := Q.lift ((limits.cones.postcompose w.hom).obj s),
228
- inv := P.lift ((limits.cones.postcompose w.inv).obj t),
229
- hom_inv_id' := by { apply hom_ext P, tidy, },
230
- inv_hom_id' := by { apply hom_ext Q, tidy, }, }
262
+ { hom := Q.map s w.hom,
263
+ inv := P.map t w.inv,
264
+ hom_inv_id' := P.hom_ext (by tidy),
265
+ inv_hom_id' := Q.hom_ext (by tidy), }
266
+
267
+ @[reassoc]
268
+ lemma cone_points_iso_of_nat_iso_hom_comp {F G : J ⥤ C} {s : cone F} {t : cone G}
269
+ (P : is_limit s) (Q : is_limit t) (w : F ≅ G) (j : J) :
270
+ (cone_points_iso_of_nat_iso P Q w).hom ≫ t.π.app j = s.π.app j ≫ w.hom.app j :=
271
+ by simp
272
+
273
+ @[reassoc]
274
+ lemma cone_points_iso_of_nat_iso_inv_comp {F G : J ⥤ C} {s : cone F} {t : cone G}
275
+ (P : is_limit s) (Q : is_limit t) (w : F ≅ G) (j : J) :
276
+ (cone_points_iso_of_nat_iso P Q w).inv ≫ s.π.app j = t.π.app j ≫ w.inv.app j :=
277
+ by simp
278
+
279
+ @[reassoc]
280
+ lemma lift_comp_cone_points_iso_of_nat_iso_hom {F G : J ⥤ C} {r s : cone F} {t : cone G}
281
+ (P : is_limit s) (Q : is_limit t) (w : F ≅ G) :
282
+ P.lift r ≫ (cone_points_iso_of_nat_iso P Q w).hom = Q.map r w.hom :=
283
+ Q.hom_ext (by simp)
231
284
232
285
section equivalence
233
286
open category_theory.equivalence
@@ -318,25 +371,21 @@ If `F` and `G` are naturally isomorphic, then `F.map_cone c` being a limit impli
318
371
-/
319
372
def map_cone_equiv {D : Type u'} [category.{v} D] {K : J ⥤ C} {F G : C ⥤ D} (h : F ≅ G) {c : cone K}
320
373
(t : is_limit (F.map_cone c)) : is_limit (G.map_cone c) :=
321
- { lift := λ s, t.lift ((cones.postcompose (iso_whisker_left K h).inv).obj s) ≫ h.hom.app c.X,
374
+ { lift := λ s, t.map s (iso_whisker_left K h).inv ≫ h.hom.app c.X,
322
375
fac' := λ s j,
323
376
begin
324
- slice_lhs 2 3 {erw ← h.hom.naturality (c.π.app j)},
325
- slice_lhs 1 2 {erw t.fac ((cones.postcompose (iso_whisker_left K h).inv).obj s) j},
377
+ erw [assoc, ← h.hom.naturality (c.π.app j), t.map_π_assoc s (iso_whisker_left K h).inv j],
326
378
dsimp,
327
- slice_lhs 2 3 {rw iso.inv_hom_id_app},
328
- rw category.comp_id,
379
+ simp,
329
380
end ,
330
381
uniq' := λ s m J,
331
382
begin
332
383
rw ← cancel_mono (h.inv.app c.X),
333
384
apply t.hom_ext,
334
385
intro j,
335
- dsimp,
336
- slice_lhs 2 3 {erw ← h.inv.naturality (c.π.app j)},
337
- slice_lhs 1 2 {erw J j},
338
- conv_rhs {congr, rw [category.assoc, iso.hom_inv_id_app, comp_id]},
339
- apply (t.fac ((cones.postcompose (iso_whisker_left K h).inv).obj s) j).symm
386
+ rw [assoc, assoc, assoc, h.hom_inv_id_app_assoc],
387
+ erw [← h.inv.naturality (c.π.app j), reassoc_of (J j)],
388
+ apply (t.map_π s (iso_whisker_left K h).inv j).symm,
340
389
end }
341
390
342
391
/--
@@ -452,6 +501,17 @@ namespace is_colimit
452
501
instance subsingleton {t : cocone F} : subsingleton (is_colimit t) :=
453
502
⟨by intros P Q; cases P; cases Q; congr; ext; solve_by_elim⟩
454
503
504
+ /-- Given a natural transformation `α : F ⟶ G`, we give a morphism from the cocone point
505
+ of a colimit cocone over `F` to the cocone point of any cocone over `G`. -/
506
+ def map {F G : J ⥤ C} {s : cocone F} (P : is_colimit s) (t : cocone G)
507
+ (α : F ⟶ G) : s.X ⟶ t.X :=
508
+ P.desc ((cocones.precompose α).obj t)
509
+
510
+ @[simp, reassoc]
511
+ lemma ι_map {F G : J ⥤ C} {c : cocone F} (hc : is_colimit c) (d : cocone G) (α : F ⟶ G)
512
+ (j : J) : c.ι.app j ≫ is_colimit.map hc d α = α.app j ≫ d.ι.app j :=
513
+ fac _ _ _
514
+
455
515
/- Repackaging the definition in terms of cocone morphisms. -/
456
516
457
517
/-- The universal morphism from a colimit cocone to any other cocone. -/
@@ -493,7 +553,6 @@ def hom_is_iso {s t : cocone F} (P : is_colimit s) (Q : is_colimit t) (f : s ⟶
493
553
inv_hom_id' := Q.uniq_cocone_morphism, }
494
554
495
555
/-- Colimits of `F` are unique up to isomorphism. -/
496
- -- We may later want to prove the coherence of these isomorphisms.
497
556
def cocone_point_unique_up_to_iso {s t : cocone F} (P : is_colimit s) (Q : is_colimit t) : s.X ≅ t.X :=
498
557
(cocones.forget F).map_iso (unique_up_to_iso P Q)
499
558
@@ -505,12 +564,36 @@ def cocone_point_unique_up_to_iso {s t : cocone F} (P : is_colimit s) (Q : is_co
505
564
(Q : is_colimit t) (j : J) : t.ι.app j ≫ (cocone_point_unique_up_to_iso P Q).inv = s.ι.app j :=
506
565
(unique_up_to_iso P Q).inv.w _
507
566
567
+ @[simp, reassoc] lemma cocone_point_unique_up_to_iso_hom_desc {r s t : cocone F} (P : is_colimit s)
568
+ (Q : is_colimit t) : (cocone_point_unique_up_to_iso P Q).hom ≫ Q.desc r = P.desc r :=
569
+ P.uniq _ _ (by simp)
570
+
571
+ @[simp, reassoc] lemma cocone_point_unique_up_to_iso_inv_desc {r s t : cocone F} (P : is_colimit s)
572
+ (Q : is_colimit t) : (cocone_point_unique_up_to_iso P Q).inv ≫ P.desc r = Q.desc r :=
573
+ Q.uniq _ _ (by simp)
574
+
508
575
/-- Transport evidence that a cocone is a colimit cocone across an isomorphism of cocones. -/
509
576
def of_iso_colimit {r t : cocone F} (P : is_colimit r) (i : r ≅ t) : is_colimit t :=
510
577
is_colimit.mk_cocone_morphism
511
578
(λ s, i.inv ≫ P.desc_cocone_morphism s)
512
579
(λ s m, by rw i.eq_inv_comp; apply P.uniq_cocone_morphism)
513
580
581
+ @[simp] lemma of_iso_colimit_desc {r t : cocone F} (P : is_colimit r) (i : r ≅ t) (s) :
582
+ (P.of_iso_colimit i).desc s = i.inv.hom ≫ P.desc s :=
583
+ rfl
584
+
585
+ /-- Isomorphism of cocones preserves whether or not they are colimiting cocones. -/
586
+ def equiv_iso_colimit {r t : cocone F} (i : r ≅ t) : is_colimit r ≃ is_colimit t :=
587
+ { to_fun := λ h, h.of_iso_colimit i,
588
+ inv_fun := λ h, h.of_iso_colimit i.symm,
589
+ left_inv := by tidy,
590
+ right_inv := by tidy }
591
+
592
+ @[simp] lemma equiv_iso_colimit_apply {r t : cocone F} (i : r ≅ t) (P : is_colimit r) :
593
+ equiv_iso_colimit i P = P.of_iso_colimit i := rfl
594
+ @[simp] lemma equiv_iso_colimit_symm_apply {r t : cocone F} (i : r ≅ t) (P : is_colimit t) :
595
+ (equiv_iso_colimit i).symm P = P.of_iso_colimit i.symm := rfl
596
+
514
597
/--
515
598
If the canonical morphism to a cocone point from a colimiting cocone point is an iso, then the
516
599
first cocone was colimiting also.
@@ -596,10 +679,28 @@ are themselves isomorphic.
596
679
@[simps]
597
680
def cocone_points_iso_of_nat_iso {F G : J ⥤ C} {s : cocone F} {t : cocone G}
598
681
(P : is_colimit s) (Q : is_colimit t) (w : F ≅ G) : s.X ≅ t.X :=
599
- { hom := P.desc ((limits.cocones.precompose w.hom).obj t),
600
- inv := Q.desc ((limits.cocones.precompose w.inv).obj s),
601
- hom_inv_id' := by { apply hom_ext P, tidy, },
602
- inv_hom_id' := by { apply hom_ext Q, tidy, }, }
682
+ { hom := P.map t w.hom,
683
+ inv := Q.map s w.inv,
684
+ hom_inv_id' := P.hom_ext (by tidy),
685
+ inv_hom_id' := Q.hom_ext (by tidy) }
686
+
687
+ @[reassoc]
688
+ lemma comp_cocone_points_iso_of_nat_iso_hom {F G : J ⥤ C} {s : cocone F} {t : cocone G}
689
+ (P : is_colimit s) (Q : is_colimit t) (w : F ≅ G) (j : J) :
690
+ s.ι.app j ≫ (cocone_points_iso_of_nat_iso P Q w).hom = w.hom.app j ≫ t.ι.app j :=
691
+ by simp
692
+
693
+ @[reassoc]
694
+ lemma comp_cocone_points_iso_of_nat_iso_inv {F G : J ⥤ C} {s : cocone F} {t : cocone G}
695
+ (P : is_colimit s) (Q : is_colimit t) (w : F ≅ G) (j : J) :
696
+ t.ι.app j ≫ (cocone_points_iso_of_nat_iso P Q w).inv = w.inv.app j ≫ s.ι.app j :=
697
+ by simp
698
+
699
+ @[reassoc]
700
+ lemma cocone_points_iso_of_nat_iso_hom_desc {F G : J ⥤ C} {s : cocone F} {r t : cocone G}
701
+ (P : is_colimit s) (Q : is_colimit t) (w : F ≅ G) :
702
+ (cocone_points_iso_of_nat_iso P Q w).hom ≫ Q.desc r = P.map _ w.hom :=
703
+ P.hom_ext (by simp)
603
704
604
705
section equivalence
605
706
open category_theory.equivalence
@@ -853,9 +954,23 @@ def limit.lift (F : J ⥤ C) [has_limit F] (c : cone F) : c.X ⟶ limit F :=
853
954
limit.lift F c ≫ limit.π F j = c.π.app j :=
854
955
is_limit.fac _ c j
855
956
957
+ /--
958
+ Functoriality of limits.
959
+
960
+ Usually this morphism should be accessed through `lim.map`,
961
+ but may be needed separately when you have specified limits for the source and target functors,
962
+ but not necessarily for all functors of shape `J`.
963
+ -/
964
+ def lim_map {F G : J ⥤ C} [has_limit F] [has_limit G] (α : F ⟶ G) : limit F ⟶ limit G :=
965
+ is_limit.map _ (limit.is_limit G) α
966
+
967
+ @[simp, reassoc] lemma lim_map_π {F G : J ⥤ C} [has_limit F] [has_limit G] (α : F ⟶ G) (j : J) :
968
+ lim_map α ≫ limit.π G j = limit.π F j ≫ α.app j :=
969
+ limit.lift_π _ j
970
+
856
971
/-- The cone morphism from any cone to the arbitrary choice of limit cone. -/
857
972
def limit.cone_morphism {F : J ⥤ C} [has_limit F] (c : cone F) :
858
- c ⟶ ( limit.cone F) :=
973
+ c ⟶ limit.cone F :=
859
974
(limit.is_limit F).lift_cone_morphism c
860
975
861
976
@[simp] lemma limit.cone_morphism_hom {F : J ⥤ C} [has_limit F] (c : cone F) :
@@ -964,7 +1079,13 @@ is_limit.cone_points_iso_of_nat_iso (limit.is_limit F) (limit.is_limit G) w
964
1079
lemma has_limit.iso_of_nat_iso_hom_π {F G : J ⥤ C} [has_limit F] [has_limit G]
965
1080
(w : F ≅ G) (j : J) :
966
1081
(has_limit.iso_of_nat_iso w).hom ≫ limit.π G j = limit.π F j ≫ w.hom.app j :=
967
- by simp [has_limit.iso_of_nat_iso, is_limit.cone_points_iso_of_nat_iso_hom]
1082
+ is_limit.cone_points_iso_of_nat_iso_hom_comp _ _ _ _
1083
+
1084
+ @[simp, reassoc]
1085
+ lemma has_limit.lift_iso_of_nat_iso_hom {F G : J ⥤ C} [has_limit F] [has_limit G] (t : cone F)
1086
+ (w : F ≅ G) :
1087
+ limit.lift F t ≫ (has_limit.iso_of_nat_iso w).hom = limit.lift G ((cones.postcompose w.hom).obj _) :=
1088
+ is_limit.lift_comp_cone_points_iso_of_nat_iso_hom _ _ _
968
1089
969
1090
/--
970
1091
The limits of `F : J ⥤ C` and `G : K ⥤ C` are isomorphic,
@@ -1088,29 +1209,6 @@ end
1088
1209
1089
1210
section lim_functor
1090
1211
1091
- /-- Given a natural transformation `α : F ⟶ G`, we give a morphism from the cone point
1092
- of any cone over `F` to the cone point of a limit cone over `G`. -/
1093
- def is_limit.map {F G : J ⥤ C} (s : cone F) {t : cone G} (P : is_limit t)
1094
- (α : F ⟶ G) : s.X ⟶ t.X :=
1095
- P.lift ((cones.postcompose α).obj s)
1096
-
1097
- @[simp, reassoc] lemma is_limit_map_π {F G : J ⥤ C} (c : cone F) {d : cone G} (hd : is_limit d)
1098
- (α : F ⟶ G) (j : J) : is_limit.map c hd α ≫ d.π.app j = c.π.app j ≫ α.app j :=
1099
- by apply is_limit.fac
1100
-
1101
- /--
1102
- Functoriality of limits.
1103
-
1104
- Usually this morphism should be accessed through `lim.map`,
1105
- but may be needed separately when you have specified limits for the source and target functors,
1106
- but not necessarily for all functors of shape `J`.
1107
- -/
1108
- def lim_map {F G : J ⥤ C} [has_limit F] [has_limit G] (α : F ⟶ G) : limit F ⟶ limit G :=
1109
- is_limit.map _ (limit.is_limit G) α
1110
-
1111
- @[simp, reassoc] lemma lim_map_π {F G : J ⥤ C} [has_limit F] [has_limit G] (α : F ⟶ G) (j : J) :
1112
- lim_map α ≫ limit.π G j = limit.π F j ≫ α.app j :=
1113
- by apply is_limit.fac
1114
1212
1115
1213
variables [has_limits_of_shape J C]
1116
1214
@@ -1269,6 +1367,21 @@ We thus use `reassoc` to define additional `@[simp]` lemmas, with an arbitrary e
1269
1367
colimit.ι F j ≫ colimit.desc F c = c.ι.app j :=
1270
1368
is_colimit.fac _ c j
1271
1369
1370
+ /--
1371
+ Functoriality of colimits.
1372
+
1373
+ Usually this morphism should be accessed through `colim.map`,
1374
+ but may be needed separately when you have specified colimits for the source and target functors,
1375
+ but not necessarily for all functors of shape `J`.
1376
+ -/
1377
+ def colim_map {F G : J ⥤ C} [has_colimit F] [has_colimit G] (α : F ⟶ G) : colimit F ⟶ colimit G :=
1378
+ is_colimit.map (colimit.is_colimit F) _ α
1379
+
1380
+ @[simp, reassoc]
1381
+ lemma ι_colim_map {F G : J ⥤ C} [has_colimit F] [has_colimit G] (α : F ⟶ G) (j : J) :
1382
+ colimit.ι F j ≫ colim_map α = α.app j ≫ colimit.ι G j :=
1383
+ colimit.ι_desc _ j
1384
+
1272
1385
/-- The cocone morphism from the arbitrary choice of colimit cocone to any cocone. -/
1273
1386
def colimit.cocone_morphism {F : J ⥤ C} [has_colimit F] (c : cocone F) :
1274
1387
(colimit.cocone F) ⟶ c :=
@@ -1383,7 +1496,13 @@ is_colimit.cocone_points_iso_of_nat_iso (colimit.is_colimit F) (colimit.is_colim
1383
1496
lemma has_colimit.iso_of_nat_iso_ι_hom {F G : J ⥤ C} [has_colimit F] [has_colimit G]
1384
1497
(w : F ≅ G) (j : J) :
1385
1498
colimit.ι F j ≫ (has_colimit.iso_of_nat_iso w).hom = w.hom.app j ≫ colimit.ι G j :=
1386
- by simp [has_colimit.iso_of_nat_iso, is_colimit.cocone_points_iso_of_nat_iso_inv]
1499
+ is_colimit.comp_cocone_points_iso_of_nat_iso_hom _ _ _ _
1500
+
1501
+ @[simp, reassoc]
1502
+ lemma has_colimit.iso_of_nat_iso_hom_desc {F G : J ⥤ C} [has_colimit F] [has_colimit G] (t : cocone G)
1503
+ (w : F ≅ G) :
1504
+ (has_colimit.iso_of_nat_iso w).hom ≫ colimit.desc G t = colimit.desc F ((cocones.precompose w.hom).obj _) :=
1505
+ is_colimit.cocone_points_iso_of_nat_iso_hom_desc _ _ _
1387
1506
1388
1507
/--
1389
1508
The colimits of `F : J ⥤ C` and `G : K ⥤ C` are isomorphic,
@@ -1517,31 +1636,6 @@ end
1517
1636
1518
1637
section colim_functor
1519
1638
1520
- /-- Given a natural transformation `α : F ⟶ G`, we give a morphism from the cocone point
1521
- of a colimit cocone over `F` to the cocone point of any cocone over `G`. -/
1522
- def is_colimit.map {F G : J ⥤ C} {s : cocone F} (P : is_colimit s) (t : cocone G)
1523
- (α : F ⟶ G) : s.X ⟶ t.X :=
1524
- P.desc ((cocones.precompose α).obj t)
1525
-
1526
- @[simp, reassoc]
1527
- lemma ι_is_colimit_map {F G : J ⥤ C} {c : cocone F} (hc : is_colimit c) (d : cocone G) (α : F ⟶ G)
1528
- (j : J) : c.ι.app j ≫ is_colimit.map hc d α = α.app j ≫ d.ι.app j :=
1529
- by apply is_colimit.fac
1530
-
1531
- /--
1532
- Functoriality of colimits.
1533
-
1534
- Usually this morphism should be accessed through `colim.map`,
1535
- but may be needed separately when you have specified colimits for the source and target functors,
1536
- but not necessarily for all functors of shape `J`.
1537
- -/
1538
- def colim_map {F G : J ⥤ C} [has_colimit F] [has_colimit G] (α : F ⟶ G) : colimit F ⟶ colimit G :=
1539
- is_colimit.map (colimit.is_colimit F) _ α
1540
-
1541
- @[simp, reassoc]
1542
- lemma ι_colim_map {F G : J ⥤ C} [has_colimit F] [has_colimit G] (α : F ⟶ G) (j : J) :
1543
- colimit.ι F j ≫ colim_map α = α.app j ≫ colimit.ι G j :=
1544
- by apply is_colimit.fac
1545
1639
1546
1640
variables [has_colimits_of_shape J C]
1547
1641
0 commit comments