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

full_name: CategoryTheory.Limits.KernelFork.map_condition
code: @[reassoc (attr := simp)]
lemma map_condition : G.map c.ι ≫ G.map f = 0 
goal: G.map (CategoryTheory.Limits.Fork.ι c) ≫ G.map f = 0

full_name: CategoryTheory.Limits.KernelFork.map
code: /-- A kernel fork for `f` is mapped to a kernel fork for `G.map f` if `G` is a functor
which preserves zero morphisms. -/
def map : KernelFork (G.map f) 
goal: CategoryTheory.Limits.KernelFork (G.map f)

full_name: CategoryTheory.Limits.KernelFork.map_ι
code: @[simp]
lemma map_ι : (c.map G).ι = G.map c.ι 
goal: CategoryTheory.Limits.Fork.ι (c.map G) = G.map (CategoryTheory.Limits.Fork.ι c)

full_name: CategoryTheory.Limits.KernelFork.isLimitMapConeEquiv
code: /-- The underlying cone of a kernel fork is mapped to a limit cone if and only if
the mapped kernel fork is limit. -/
def isLimitMapConeEquiv :
    IsLimit (G.mapCone c) ≃ IsLimit (c.map G) 
goal: CategoryTheory.Limits.IsLimit (G.mapCone c) ≃ CategoryTheory.Limits.IsLimit (c.map G)

full_name: CategoryTheory.Limits.KernelFork.mapIsLimit
code: /-- A limit kernel fork is mapped to a limit kernel fork by a functor `G` when this functor
preserves the corresponding limit. -/
def mapIsLimit (hc : IsLimit c) (G : C ⥤ D)
    [Functor.PreservesZeroMorphisms G] [PreservesLimit (parallelPair f 0) G] :
    IsLimit (c.map G) 
goal: CategoryTheory.Limits.IsLimit (c.map G)

full_name: CategoryTheory.Limits.isLimitMapConeForkEquiv'
code: /-- The map of a kernel fork is a limit iff
the kernel fork consisting of the mapped morphisms is a limit.
This essentially lets us commute `KernelFork.ofι` with `Functor.mapCone`.

This is a variant of `isLimitMapConeForkEquiv` for equalizers,
which we can't use directly between `G.map 0 = 0` does not hold definitionally.
-/
def isLimitMapConeForkEquiv' :
    IsLimit (G.mapCone (KernelFork.ofι h w)) ≃
      IsLimit
        (KernelFork.ofι (G.map h) (by simp only [← G.map_comp, w, Functor.map_zero]) :
          Fork (G.map f) 0) 
goal: CategoryTheory.Limits.IsLimit (G.mapCone (CategoryTheory.Limits.KernelFork.ofι h w)) ≃
  CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.KernelFork.ofι (G.map h) ⋯)

full_name: CategoryTheory.Limits.isLimitForkMapOfIsLimit'
code: /-- The property of preserving kernels expressed in terms of kernel forks.

This is a variant of `isLimitForkMapOfIsLimit` for equalizers,
which we can't use directly between `G.map 0 = 0` does not hold definitionally.
-/
def isLimitForkMapOfIsLimit' [PreservesLimit (parallelPair f 0) G]
    (l : IsLimit (KernelFork.ofι h w)) :
    IsLimit
      (KernelFork.ofι (G.map h) (by simp only [← G.map_comp, w, Functor.map_zero]) :
        Fork (G.map f) 0) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.KernelFork.ofι (G.map h) ⋯)

full_name: CategoryTheory.Limits.isLimitOfHasKernelOfPreservesLimit
code: /-- If `G` preserves kernels and `C` has them, then the fork constructed of the mapped morphisms of
a kernel fork is a limit.
-/
def isLimitOfHasKernelOfPreservesLimit [PreservesLimit (parallelPair f 0) G] :
    IsLimit
      (Fork.ofι (G.map (kernel.ι f))
          (by simp only [← G.map_comp, kernel.condition, comp_zero, Functor.map_zero]) :
        Fork (G.map f) 0) 
goal: CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι (G.map (CategoryTheory.Limits.kernel.ι f)) ⋯)

full_name: CategoryTheory.Limits.instHasKernelMapOfPreservesLimitWalkingParallelPairParallelPairOfNatHom
code: instance [PreservesLimit (parallelPair f 0) G] : HasKernel (G.map f) 
goal: CategoryTheory.Limits.HasKernel (G.map f)

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

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

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

full_name: CategoryTheory.Limits.instIsIsoKernelComparison
code: instance : IsIso (kernelComparison f G) 
goal: CategoryTheory.IsIso (CategoryTheory.Limits.kernelComparison f G)

full_name: CategoryTheory.Limits.kernel_map_comp_preserves_kernel_iso_inv
code: @[reassoc]
theorem kernel_map_comp_preserves_kernel_iso_inv {X' Y' : C} (g : X' ⟶ Y') [HasKernel g]
    [HasKernel (G.map g)] [PreservesLimit (parallelPair g 0) G] (p : X ⟶ X') (q : Y ⟶ Y')
    (hpq : f ≫ q = p ≫ g) :
    kernel.map (G.map f) (G.map g) (G.map p) (G.map q) (by rw [← G.map_comp, hpq, G.map_comp]) ≫
        (PreservesKernel.iso G _).inv =
      (PreservesKernel.iso G _).inv ≫ G.map (kernel.map f g p q hpq) 
goal: CategoryTheory.Limits.kernel.map (G.map f) (G.map g) (G.map p) (G.map q) ⋯ ≫
    (CategoryTheory.Limits.PreservesKernel.iso G g).inv =
  (CategoryTheory.Limits.PreservesKernel.iso G f).inv ≫ G.map (CategoryTheory.Limits.kernel.map f g p q hpq)

full_name: CategoryTheory.Limits.CokernelCofork.map_condition
code: @[reassoc (attr := simp)]
lemma map_condition : G.map f ≫ G.map c.π = 0 
goal: G.map f ≫ G.map (CategoryTheory.Limits.Cofork.π c) = 0

full_name: CategoryTheory.Limits.CokernelCofork.map
code: /-- A cokernel cofork for `f` is mapped to a cokernel cofork for `G.map f` if `G` is a functor
which preserves zero morphisms. -/
def map : CokernelCofork (G.map f) 
goal: CategoryTheory.Limits.CokernelCofork (G.map f)

full_name: CategoryTheory.Limits.CokernelCofork.map_π
code: @[simp]
lemma map_π : (c.map G).π = G.map c.π 
goal: CategoryTheory.Limits.Cofork.π (c.map G) = G.map (CategoryTheory.Limits.Cofork.π c)

full_name: CategoryTheory.Limits.CokernelCofork.isColimitMapCoconeEquiv
code: /-- The underlying cocone of a cokernel cofork is mapped to a colimit cocone if and only if
the mapped cokernel cofork is colimit. -/
def isColimitMapCoconeEquiv :
    IsColimit (G.mapCocone c) ≃ IsColimit (c.map G) 
goal: CategoryTheory.Limits.IsColimit (G.mapCocone c) ≃ CategoryTheory.Limits.IsColimit (c.map G)

full_name: CategoryTheory.Limits.CokernelCofork.mapIsColimit
code: /-- A colimit cokernel cofork is mapped to a colimit cokernel cofork by a functor `G`
when this functor preserves the corresponding colimit. -/
def mapIsColimit  (hc : IsColimit c) (G : C ⥤ D)
    [Functor.PreservesZeroMorphisms G] [PreservesColimit (parallelPair f 0) G] :
    IsColimit (c.map G) 
goal: CategoryTheory.Limits.IsColimit (c.map G)

full_name: CategoryTheory.Limits.isColimitMapCoconeCoforkEquiv'
code: /-- The map of a cokernel cofork is a colimit iff
the cokernel cofork consisting of the mapped morphisms is a colimit.
This essentially lets us commute `CokernelCofork.ofπ` with `Functor.mapCocone`.

This is a variant of `isColimitMapCoconeCoforkEquiv` for equalizers,
which we can't use directly between `G.map 0 = 0` does not hold definitionally.
-/
def isColimitMapCoconeCoforkEquiv' :
    IsColimit (G.mapCocone (CokernelCofork.ofπ h w)) ≃
      IsColimit
        (CokernelCofork.ofπ (G.map h) (by simp only [← G.map_comp, w, Functor.map_zero]) :
          Cofork (G.map f) 0) 
goal: CategoryTheory.Limits.IsColimit (G.mapCocone (CategoryTheory.Limits.CokernelCofork.ofπ h w)) ≃
  CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.CokernelCofork.ofπ (G.map h) ⋯)

full_name: CategoryTheory.Limits.isColimitCoforkMapOfIsColimit'
code: /-- The property of preserving cokernels expressed in terms of cokernel coforks.

This is a variant of `isColimitCoforkMapOfIsColimit` for equalizers,
which we can't use directly between `G.map 0 = 0` does not hold definitionally.
-/
def isColimitCoforkMapOfIsColimit' [PreservesColimit (parallelPair f 0) G]
    (l : IsColimit (CokernelCofork.ofπ h w)) :
    IsColimit
      (CokernelCofork.ofπ (G.map h) (by simp only [← G.map_comp, w, Functor.map_zero]) :
        Cofork (G.map f) 0) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.CokernelCofork.ofπ (G.map h) ⋯)

full_name: CategoryTheory.Limits.isColimitOfHasCokernelOfPreservesColimit
code: /--
If `G` preserves cokernels and `C` has them, then the cofork constructed of the mapped morphisms of
a cokernel cofork is a colimit.
-/
def isColimitOfHasCokernelOfPreservesColimit [PreservesColimit (parallelPair f 0) G] :
    IsColimit
      (Cofork.ofπ (G.map (cokernel.π f))
          (by simp only [← G.map_comp, cokernel.condition, zero_comp, Functor.map_zero]) :
        Cofork (G.map f) 0) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.Cofork.ofπ (G.map (CategoryTheory.Limits.cokernel.π f)) ⋯)

full_name: CategoryTheory.Limits.instHasCokernelMapOfPreservesColimitWalkingParallelPairParallelPairOfNatHom
code: instance [PreservesColimit (parallelPair f 0) G] : HasCokernel (G.map f) 
goal: CategoryTheory.Limits.HasCokernel (G.map f)

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

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

full_name: CategoryTheory.Limits.PreservesCokernel.iso_inv
code: @[simp]
theorem PreservesCokernel.iso_inv : (PreservesCokernel.iso G f).inv = cokernelComparison f G 
goal: (CategoryTheory.Limits.PreservesCokernel.iso G f).inv = CategoryTheory.Limits.cokernelComparison f G

full_name: CategoryTheory.Limits.instIsIsoCokernelComparison
code: instance : IsIso (cokernelComparison f G) 
goal: CategoryTheory.IsIso (CategoryTheory.Limits.cokernelComparison f G)

full_name: CategoryTheory.Limits.preserves_cokernel_iso_comp_cokernel_map
code: @[reassoc]
theorem preserves_cokernel_iso_comp_cokernel_map {X' Y' : C} (g : X' ⟶ Y') [HasCokernel g]
    [HasCokernel (G.map g)] [PreservesColimit (parallelPair g 0) G] (p : X ⟶ X') (q : Y ⟶ Y')
    (hpq : f ≫ q = p ≫ g) :
    (PreservesCokernel.iso G _).hom ≫
        cokernel.map (G.map f) (G.map g) (G.map p) (G.map q)
          (by rw [← G.map_comp, hpq, G.map_comp]) =
      G.map (cokernel.map f g p q hpq) ≫ (PreservesCokernel.iso G _).hom 
goal: (CategoryTheory.Limits.PreservesCokernel.iso G f).hom ≫
    CategoryTheory.Limits.cokernel.map (G.map f) (G.map g) (G.map p) (G.map q) ⋯ =
  G.map (CategoryTheory.Limits.cokernel.map f g p q hpq) ≫ (CategoryTheory.Limits.PreservesCokernel.iso G g).hom

full_name: CategoryTheory.Limits.preservesKernelZero
code: noncomputable instance preservesKernelZero :
    PreservesLimit (parallelPair (0 : X ⟶ Y) 0) G 
goal: CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair 0 0) G

full_name: CategoryTheory.Limits.preservesCokernelZero
code: noncomputable instance preservesCokernelZero :
    PreservesColimit (parallelPair (0 : X ⟶ Y) 0) G 
goal: CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair 0 0) G

full_name: CategoryTheory.Limits.preservesKernelZero'
code: /-- The kernel of a zero map is preserved by any functor which preserves zero morphisms. -/
noncomputable def preservesKernelZero' (f : X ⟶ Y) (hf : f = 0) :
    PreservesLimit (parallelPair f 0) G 
goal: CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair f 0) G

full_name: CategoryTheory.Limits.preservesCokernelZero'
code: /-- The cokernel of a zero map is preserved by any functor which preserves zero morphisms. -/
noncomputable def preservesCokernelZero' (f : X ⟶ Y) (hf : f = 0) :
    PreservesColimit (parallelPair f 0) G 
goal: CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair f 0) G