|
| 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 |
0 commit comments