File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean

full_name: CategoryTheory.Limits.isLimitMapConeForkEquiv
code: /-- The map of a fork is a limit iff the fork consisting of the mapped morphisms is a limit. This
essentially lets us commute `Fork.ofι` with `Functor.mapCone`.
-/
def isLimitMapConeForkEquiv :
    IsLimit (G.mapCone (Fork.ofι h w)) ≃
      IsLimit (Fork.ofι (G.map h) (by simp only [← G.map_comp, w]) : Fork (G.map f) (G.map g)) 
goal: CategoryTheory.Limits.IsLimit (G.mapCone (CategoryTheory.Limits.Fork.ofι h w)) ≃
  CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι (G.map h) ⋯)

full_name: CategoryTheory.Limits.isLimitForkMapOfIsLimit
code: /-- The property of preserving equalizers expressed in terms of forks. -/
def isLimitForkMapOfIsLimit [PreservesLimit (parallelPair f g) G] (l : IsLimit (Fork.ofι h w)) :
    IsLimit (Fork.ofι (G.map h) (by simp only [← G.map_comp, w]) : Fork (G.map f) (G.map g)) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι (G.map h) ⋯)

full_name: CategoryTheory.Limits.isLimitOfIsLimitForkMap
code: /-- The property of reflecting equalizers expressed in terms of forks. -/
def isLimitOfIsLimitForkMap [ReflectsLimit (parallelPair f g) G]
    (l : IsLimit (Fork.ofι (G.map h) (by simp only [← G.map_comp, w]) : Fork (G.map f) (G.map g))) :
    IsLimit (Fork.ofι h w) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι h w)

full_name: CategoryTheory.Limits.isLimitOfHasEqualizerOfPreservesLimit
code: /--
If `G` preserves equalizers and `C` has them, then the fork constructed of the mapped morphisms of
a fork is a limit.
-/
def isLimitOfHasEqualizerOfPreservesLimit [PreservesLimit (parallelPair f g) G] :
    IsLimit (Fork.ofι
      (G.map (equalizer.ι f g)) (by simp only [← G.map_comp]; rw [equalizer.condition]) :
      Fork (G.map f) (G.map g)) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι (G.map (CategoryTheory.Limits.equalizer.ι f g)) ⋯)

full_name: CategoryTheory.Limits.PreservesEqualizer.ofIsoComparison
code: /-- If the equalizer comparison map for `G` at `(f,g)` is an isomorphism, then `G` preserves the
equalizer of `(f,g)`.
-/
def PreservesEqualizer.ofIsoComparison [i : IsIso (equalizerComparison f g G)] :
    PreservesLimit (parallelPair f g) G 
goal: CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair f g) G

full_name: CategoryTheory.Limits.PreservesEqualizer.iso
code: /--
If `G` preserves the equalizer of `(f,g)`, then the equalizer comparison map for `G` at `(f,g)` is
an isomorphism.
-/
def PreservesEqualizer.iso : G.obj (equalizer f g) ≅ equalizer (G.map f) (G.map g) 
goal: G.obj (CategoryTheory.Limits.equalizer f g) ≅ CategoryTheory.Limits.equalizer (G.map f) (G.map g)

full_name: CategoryTheory.Limits.PreservesEqualizer.iso_hom
code: @[simp]
theorem PreservesEqualizer.iso_hom :
    (PreservesEqualizer.iso G f g).hom = equalizerComparison f g G 
goal: (CategoryTheory.Limits.PreservesEqualizer.iso G f g).hom = CategoryTheory.Limits.equalizerComparison f g G

full_name: CategoryTheory.Limits.PreservesEqualizer.iso_inv_ι
code: @[simp]
theorem PreservesEqualizer.iso_inv_ι :
    (PreservesEqualizer.iso G f g).inv ≫ G.map (equalizer.ι f g) =
      equalizer.ι (G.map f) (G.map g) 
goal: (CategoryTheory.Limits.PreservesEqualizer.iso G f g).inv ≫ G.map (CategoryTheory.Limits.equalizer.ι f g) =
  CategoryTheory.Limits.equalizer.ι (G.map f) (G.map g)

full_name: CategoryTheory.Limits.instIsIsoEqualizerComparison
code: instance : IsIso (equalizerComparison f g G) 
goal: CategoryTheory.IsIso (CategoryTheory.Limits.equalizerComparison f g G)

full_name: CategoryTheory.Limits.isColimitMapCoconeCoforkEquiv
code: /-- The map of a cofork is a colimit iff the cofork consisting of the mapped morphisms is a colimit.
This essentially lets us commute `Cofork.ofπ` with `Functor.mapCocone`.
-/
def isColimitMapCoconeCoforkEquiv :
    IsColimit (G.mapCocone (Cofork.ofπ h w)) ≃
      IsColimit
        (Cofork.ofπ (G.map h) (by simp only [← G.map_comp, w]) : Cofork (G.map f) (G.map g)) 
goal: CategoryTheory.Limits.IsColimit (G.mapCocone (CategoryTheory.Limits.Cofork.ofπ h w)) ≃
  CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.Cofork.ofπ (G.map h) ⋯)

full_name: CategoryTheory.Limits.isColimitCoforkMapOfIsColimit
code: /-- The property of preserving coequalizers expressed in terms of coforks. -/
def isColimitCoforkMapOfIsColimit [PreservesColimit (parallelPair f g) G]
    (l : IsColimit (Cofork.ofπ h w)) :
    IsColimit
      (Cofork.ofπ (G.map h) (by simp only [← G.map_comp, w]) : Cofork (G.map f) (G.map g)) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.Cofork.ofπ (G.map h) ⋯)

full_name: CategoryTheory.Limits.isColimitOfIsColimitCoforkMap
code: /-- The property of reflecting coequalizers expressed in terms of coforks. -/
def isColimitOfIsColimitCoforkMap [ReflectsColimit (parallelPair f g) G]
    (l :
      IsColimit
        (Cofork.ofπ (G.map h) (by simp only [← G.map_comp, w]) : Cofork (G.map f) (G.map g))) :
    IsColimit (Cofork.ofπ h w) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.Cofork.ofπ h w)

full_name: CategoryTheory.Limits.isColimitOfHasCoequalizerOfPreservesColimit
code: /--
If `G` preserves coequalizers and `C` has them, then the cofork constructed of the mapped morphisms
of a cofork is a colimit.
-/
def isColimitOfHasCoequalizerOfPreservesColimit [PreservesColimit (parallelPair f g) G] :
    IsColimit (Cofork.ofπ (G.map (coequalizer.π f g)) (by
      simp only [← G.map_comp]; rw [coequalizer.condition]) : Cofork (G.map f) (G.map g)) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.Cofork.ofπ (G.map (CategoryTheory.Limits.coequalizer.π f g)) ⋯)

full_name: CategoryTheory.Limits.ofIsoComparison
code: /-- If the coequalizer comparison map for `G` at `(f,g)` is an isomorphism, then `G` preserves the
coequalizer of `(f,g)`.
-/
def ofIsoComparison [i : IsIso (coequalizerComparison f g G)] :
    PreservesColimit (parallelPair f g) G 
goal: CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair f g) G

full_name: CategoryTheory.Limits.PreservesCoequalizer.iso
code: /--
If `G` preserves the coequalizer of `(f,g)`, then the coequalizer comparison map for `G` at `(f,g)`
is an isomorphism.
-/
def PreservesCoequalizer.iso : coequalizer (G.map f) (G.map g) ≅ G.obj (coequalizer f g) 
goal: CategoryTheory.Limits.coequalizer (G.map f) (G.map g) ≅ G.obj (CategoryTheory.Limits.coequalizer f g)

full_name: CategoryTheory.Limits.PreservesCoequalizer.iso_hom
code: @[simp]
theorem PreservesCoequalizer.iso_hom :
    (PreservesCoequalizer.iso G f g).hom = coequalizerComparison f g G 
goal: (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).hom = CategoryTheory.Limits.coequalizerComparison f g G

full_name: CategoryTheory.Limits.instIsIsoCoequalizerComparison
code: instance : IsIso (coequalizerComparison f g G) 
goal: CategoryTheory.IsIso (CategoryTheory.Limits.coequalizerComparison f g G)

full_name: CategoryTheory.Limits.map_π_epi
code: instance map_π_epi : Epi (G.map (coequalizer.π f g)) 
goal: CategoryTheory.Epi (G.map (CategoryTheory.Limits.coequalizer.π f g))

full_name: CategoryTheory.Limits.map_π_preserves_coequalizer_inv
code: @[reassoc]
theorem map_π_preserves_coequalizer_inv :
    G.map (coequalizer.π f g) ≫ (PreservesCoequalizer.iso G f g).inv =
      coequalizer.π (G.map f) (G.map g) 
goal: G.map (CategoryTheory.Limits.coequalizer.π f g) ≫ (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).inv =
  CategoryTheory.Limits.coequalizer.π (G.map f) (G.map g)

full_name: CategoryTheory.Limits.map_π_preserves_coequalizer_inv_desc
code: @[reassoc]
theorem map_π_preserves_coequalizer_inv_desc {W : D} (k : G.obj Y ⟶ W)
    (wk : G.map f ≫ k = G.map g ≫ k) : G.map (coequalizer.π f g) ≫
      (PreservesCoequalizer.iso G f g).inv ≫ coequalizer.desc k wk = k 
goal: G.map (CategoryTheory.Limits.coequalizer.π f g) ≫
    (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).inv ≫ CategoryTheory.Limits.coequalizer.desc k wk =
  k

full_name: CategoryTheory.Limits.map_π_preserves_coequalizer_inv_colimMap
code: @[reassoc]
theorem map_π_preserves_coequalizer_inv_colimMap {X' Y' : D} (f' g' : X' ⟶ Y')
    [HasCoequalizer f' g'] (p : G.obj X ⟶ X') (q : G.obj Y ⟶ Y') (wf : G.map f ≫ q = p ≫ f')
    (wg : G.map g ≫ q = p ≫ g') :
    G.map (coequalizer.π f g) ≫
        (PreservesCoequalizer.iso G f g).inv ≫
          colimMap (parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) =
      q ≫ coequalizer.π f' g' 
goal: G.map (CategoryTheory.Limits.coequalizer.π f g) ≫
    (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).inv ≫
      CategoryTheory.Limits.colimMap (CategoryTheory.Limits.parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) =
  q ≫ CategoryTheory.Limits.coequalizer.π f' g'

full_name: CategoryTheory.Limits.map_π_preserves_coequalizer_inv_colimMap_desc
code: @[reassoc]
theorem map_π_preserves_coequalizer_inv_colimMap_desc {X' Y' : D} (f' g' : X' ⟶ Y')
    [HasCoequalizer f' g'] (p : G.obj X ⟶ X') (q : G.obj Y ⟶ Y') (wf : G.map f ≫ q = p ≫ f')
    (wg : G.map g ≫ q = p ≫ g') {Z' : D} (h : Y' ⟶ Z') (wh : f' ≫ h = g' ≫ h) :
    G.map (coequalizer.π f g) ≫
        (PreservesCoequalizer.iso G f g).inv ≫
          colimMap (parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) ≫ coequalizer.desc h wh =
      q ≫ h 
goal: G.map (CategoryTheory.Limits.coequalizer.π f g) ≫
    (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).inv ≫
      CategoryTheory.Limits.colimMap (CategoryTheory.Limits.parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) ≫
        CategoryTheory.Limits.coequalizer.desc h wh =
  q ≫ h

full_name: CategoryTheory.Limits.preservesSplitCoequalizers
code: /-- Any functor preserves coequalizers of split pairs. -/
instance (priority := 1) preservesSplitCoequalizers (f g : X ⟶ Y) [HasSplitCoequalizer f g] :
    PreservesColimit (parallelPair f g) G 
goal: CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair f g) G

full_name: CategoryTheory.Limits.preservesSplitEqualizers
code: instance (priority := 1) preservesSplitEqualizers (f g : X ⟶ Y) [HasSplitEqualizer f g] :
    PreservesLimit (parallelPair f g) G 
goal: CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair f g) G