@@ -216,13 +216,45 @@ noncomputable def end_.lift : X ⟶ end_ F :=
216
216
lemma end_.lift_π (j : J) : lift f hf ≫ π F j = f j := by
217
217
apply IsLimit.fac
218
218
219
+ variable {F' : Jᵒᵖ ⥤ J ⥤ C} [HasEnd F'] (f : F ⟶ F')
220
+
221
+ /-- A natural transformation of functors F ⟶ F' induces a map end_ F ⟶ end_ F'. -/
222
+ noncomputable def end_.map : end_ F ⟶ end_ F' :=
223
+ end_.lift (fun x ↦ end_.π _ _ ≫ (f.app (op x)).app x) (fun j j' φ ↦ by
224
+ have e := (f.app (op j)).naturality φ
225
+ simp only [Category.assoc]
226
+ rw [← e, reassoc_of% end_.condition F φ]
227
+ simp)
228
+
229
+ @[reassoc (attr := simp)]
230
+ lemma end_.map_π (j : J) :
231
+ end_.map f ≫ end_.π F' j = end_.π _ _ ≫ (f.app (op j)).app j := by
232
+ simp [end_.map]
233
+
234
+ @[reassoc (attr := simp)]
235
+ lemma end_.map_comp {F'' : Jᵒᵖ ⥤ J ⥤ C} [HasEnd F''] (g : F' ⟶ F'') :
236
+ end_.map f ≫ end_.map g = end_.map (f ≫ g) := by
237
+ aesop_cat
238
+
239
+ @[simp]
240
+ lemma end_.map_id : end_.map (𝟙 F) = 𝟙 _ := by aesop_cat
241
+
219
242
end
220
243
244
+ variable (J C) in
245
+ /-- If all bifunctors `Jᵒᵖ ⥤ J ⥤ C` have an end, then the construction
246
+ `F ↦ end_ F` defines a functor `(Jᵒᵖ ⥤ J ⥤ C) ⥤ C`. -/
247
+ @[simps]
248
+ noncomputable def endFunctor [∀ (F : Jᵒᵖ ⥤ J ⥤ C), HasEnd F] :
249
+ (Jᵒᵖ ⥤ J ⥤ C) ⥤ C where
250
+ obj F := end_ F
251
+ map f := end_.map f
252
+
221
253
end End
222
254
223
255
section Coend
224
256
225
- /-- Given `F : Jᵒᵖ ⥤ J ⥤ C`, this property asserts the existence of the end of `F`. -/
257
+ /-- Given `F : Jᵒᵖ ⥤ J ⥤ C`, this property asserts the existence of the coend of `F`. -/
226
258
abbrev HasCoend := HasMulticoequalizer (multispanIndexCoend F)
227
259
228
260
variable [HasCoend F]
@@ -252,16 +284,45 @@ section
252
284
variable {X : C} (f : ∀ j, (F.obj (op j)).obj j ⟶ X)
253
285
(hf : ∀ ⦃i j : J⦄ (g : i ⟶ j), (F.map g.op).app i ≫ f i = (F.obj (op j)).map g ≫ f j)
254
286
255
- /-- Constructor for morphisms to the end of a functor. -/
287
+ /-- Constructor for morphisms to the coend of a functor. -/
256
288
noncomputable def coend.desc : coend F ⟶ X :=
257
289
Cowedge.IsColimit.desc (colimit.isColimit _) f hf
258
290
259
291
@[reassoc (attr := simp)]
260
292
lemma coend.ι_desc (j : J) : ι F j ≫ desc f hf = f j := by
261
293
apply IsColimit.fac
262
294
295
+ variable {F' : Jᵒᵖ ⥤ J ⥤ C} [HasCoend F'] (f : F ⟶ F')
296
+
297
+ /-- A natural transformation of functors F ⟶ F' induces a map coend F ⟶ coend F'. -/
298
+ noncomputable def coend.map : coend F ⟶ coend F' :=
299
+ coend.desc (fun x ↦ (f.app (op x)).app x ≫ coend.ι _ _ ) (fun j j' φ ↦ by
300
+ simp [coend.condition])
301
+
302
+ @[reassoc (attr := simp)]
303
+ lemma coend.ι_map (j : J) :
304
+ coend.ι _ _ ≫ coend.map f = (f.app (op j)).app j ≫ coend.ι _ _ := by
305
+ simp [coend.map]
306
+
307
+ @[reassoc (attr := simp)]
308
+ lemma coend.map_comp {F'' : Jᵒᵖ ⥤ J ⥤ C} [HasCoend F''] (g : F' ⟶ F'') :
309
+ coend.map f ≫ coend.map g = coend.map (f ≫ g) := by
310
+ aesop_cat
311
+
312
+ @[simp]
313
+ lemma coend.map_id : coend.map (𝟙 F) = 𝟙 _ := by aesop_cat
314
+
263
315
end
264
316
317
+ variable (J C) in
318
+ /-- If all bifunctors `Jᵒᵖ ⥤ J ⥤ C` have a coend, then the construction
319
+ `F ↦ coend F` defines a functor `(Jᵒᵖ ⥤ J ⥤ C) ⥤ C`. -/
320
+ @[simps]
321
+ noncomputable def coendFunctor [∀ (F : Jᵒᵖ ⥤ J ⥤ C), HasCoend F] :
322
+ (Jᵒᵖ ⥤ J ⥤ C) ⥤ C where
323
+ obj F := coend F
324
+ map f := coend.map f
325
+
265
326
end Coend
266
327
267
328
end Limits
0 commit comments