Skip to content

Commit fad8b5d

Browse files
committed
feat(CategoryTheory/Limits): preservation of multicoequalizers (#22205)
1 parent b533ec6 commit fad8b5d

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,6 +2137,7 @@ import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Biproducts
21372137
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Equalizers
21382138
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Images
21392139
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Kernels
2140+
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Multiequalizer
21402141
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Preorder
21412142
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products
21422143
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Pullbacks
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/-
2+
Copyright (c) 2025 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
7+
8+
/-!
9+
# Preservation of multicoequalizers
10+
11+
Let `J : MultispanShape` and `d : MultispanIndex J C`.
12+
If `F : C ⥤ D`, we define `d.map F : MultispanIndex J D` and
13+
an isomorphism of functors `(d.map F).multispan ≅ d.multispan ⋙ F`
14+
(see `MultispanIndex.multispanMapIso`).
15+
If `c : Multicofork d`, we define `c.map F : Multicofork (d.map F)` and
16+
obtain a bijection `IsColimit (F.mapCocone c) ≃ IsColimit (c.map F)`
17+
(see `Multicofork.isColimitMapEquiv`). As a result, if `F` preserves
18+
the colimit of `d.multispan`, we deduce that if `c` is a colimit,
19+
then `c.map F` also is (see `Multicofork.isColimitMapOfPreserves`).
20+
21+
-/
22+
23+
universe w w' v u
24+
25+
namespace CategoryTheory
26+
27+
variable {C D : Type*} [Category C] [Category D]
28+
29+
namespace Limits
30+
31+
variable {J : MultispanShape.{w, w'}} (d : MultispanIndex J C)
32+
(c : Multicofork d) (F : C ⥤ D)
33+
34+
/-- The multispan index obtained by applying a functor. -/
35+
@[simps]
36+
def MultispanIndex.map : MultispanIndex J D where
37+
left i := F.obj (d.left i)
38+
right i := F.obj (d.right i)
39+
fst i := F.map (d.fst i)
40+
snd i := F.map (d.snd i)
41+
42+
/-- If `d : MultispanIndex J C` and `F : C ⥤ D`, this is the obvious isomorphism
43+
`(d.map F).multispan ≅ d.multispan ⋙ F`. -/
44+
@[simps!]
45+
def MultispanIndex.multispanMapIso : (d.map F).multispan ≅ d.multispan ⋙ F :=
46+
NatIso.ofComponents
47+
(fun i ↦ match i with
48+
| .left _ => Iso.refl _
49+
| .right _ => Iso.refl _)
50+
(by rintro _ _ (_ | _) <;> simp)
51+
52+
variable {d}
53+
54+
/-- If `d : MultispanIndex J C`, `c : Multicofork d` and `F : C ⥤ D`,
55+
this is the induced multicofork of `d.map F`. -/
56+
@[simps!]
57+
def Multicofork.map : Multicofork (d.map F) :=
58+
Multicofork.ofπ _ (F.obj c.pt) (fun i ↦ F.map (c.π i)) (fun j ↦ by
59+
dsimp
60+
rw [← F.map_comp, ← F.map_comp, condition])
61+
62+
/-- If `d : MultispanIndex J C`, `c : Multicofork d` and `F : C ⥤ D`,
63+
the cocone `F.mapCocone c` is colimit iff the multicofork `c.map F` is. -/
64+
def Multicofork.isColimitMapEquiv :
65+
IsColimit (F.mapCocone c) ≃ IsColimit (c.map F) :=
66+
(IsColimit.precomposeInvEquiv (d.multispanMapIso F).symm (F.mapCocone c)).symm.trans
67+
(IsColimit.equivIsoColimit
68+
(Multicofork.ext (Iso.refl _) (fun i ↦ by dsimp only [Multicofork.π]; simp)))
69+
70+
/-- If `d : MultispanIndex J C`, `c : Multicofork d` is a colimit multicofork,
71+
and `F : C ⥤ D` is a functor which preserves the colimit of `d.multispan`,
72+
then the multicofork `c.map F` is colimit. -/
73+
noncomputable def Multicofork.isColimitMapOfPreserves
74+
[PreservesColimit d.multispan F] (hc : IsColimit c) : IsColimit (c.map F) :=
75+
(isColimitMapEquiv c F) (isColimitOfPreserves F hc)
76+
77+
end Limits
78+
79+
end CategoryTheory

Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,14 @@ theorem ofSigmaCofork_ι_app_right' (c : Cofork I.fstSigmaMap I.sndSigmaMap) (b)
666666
π (ofSigmaCofork I c) b = (Sigma.ι I.right b :) ≫ c.π :=
667667
rfl
668668

669+
variable {I} in
670+
/-- Constructor for isomorphisms between multicoforks. -/
671+
@[simps!]
672+
def ext {K K' : Multicofork I}
673+
(e : K.pt ≅ K'.pt) (h : ∀ (i : J.R), K.π i ≫ e.hom = K'.π i := by aesop_cat) :
674+
K ≅ K' :=
675+
Cocones.ext e (by rintro (i | j) <;> simp [h])
676+
669677
end Multicofork
670678

671679
namespace MultispanIndex

0 commit comments

Comments
 (0)