File: Mathlib/Algebra/Homology/ImageToKernel.lean

full_name: image_le_kernel
code: theorem image_le_kernel (w : f ≫ g = 0) : imageSubobject f ≤ kernelSubobject g 
goal: CategoryTheory.Limits.imageSubobject f ≤ CategoryTheory.Limits.kernelSubobject g

full_name: imageToKernel
code: /-- The canonical morphism `imageSubobject f ⟶ kernelSubobject g` when `f ≫ g = 0`.
-/
def imageToKernel (w : f ≫ g = 0) : (imageSubobject f : V) ⟶ (kernelSubobject g : V) 
goal: CategoryTheory.Subobject.underlying.obj (CategoryTheory.Limits.imageSubobject f) ⟶
  CategoryTheory.Subobject.underlying.obj (CategoryTheory.Limits.kernelSubobject g)

full_name: instMonoImageToKernel
code: instance (w : f ≫ g = 0) : Mono (imageToKernel f g w) 
goal: CategoryTheory.Mono (imageToKernel f g w)

full_name: subobject_ofLE_as_imageToKernel
code: /-- Prefer `imageToKernel`. -/
@[simp]
theorem subobject_ofLE_as_imageToKernel (w : f ≫ g = 0) (h) :
    Subobject.ofLE (imageSubobject f) (kernelSubobject g) h = imageToKernel f g w 
goal: (CategoryTheory.Limits.imageSubobject f).ofLE (CategoryTheory.Limits.kernelSubobject g) h = imageToKernel f g w

full_name: imageToKernel_arrow
code: @[reassoc (attr := simp)]
theorem imageToKernel_arrow (w : f ≫ g = 0) :
    imageToKernel f g w ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow 
goal: imageToKernel f g w ≫ (CategoryTheory.Limits.kernelSubobject g).arrow = (CategoryTheory.Limits.imageSubobject f).arrow

full_name: imageToKernel_arrow_apply
code: @[simp]
lemma imageToKernel_arrow_apply [ConcreteCategory V] (w : f ≫ g = 0)
    (x : (forget V).obj (Subobject.underlying.obj (imageSubobject f))) :
    (kernelSubobject g).arrow (imageToKernel f g w x) =
      (imageSubobject f).arrow x 
goal: (CategoryTheory.Limits.kernelSubobject g).arrow ((imageToKernel f g w) x) =
  (CategoryTheory.Limits.imageSubobject f).arrow x

full_name: factorThruImageSubobject_comp_imageToKernel
code: theorem factorThruImageSubobject_comp_imageToKernel (w : f ≫ g = 0) :
    factorThruImageSubobject f ≫ imageToKernel f g w = factorThruKernelSubobject g f w 
goal: CategoryTheory.Limits.factorThruImageSubobject f ≫ imageToKernel f g w =
  CategoryTheory.Limits.factorThruKernelSubobject g f w

full_name: imageToKernel_zero_left
code: @[simp]
theorem imageToKernel_zero_left [HasKernels V] [HasZeroObject V] {w} :
    imageToKernel (0 : A ⟶ B) g w = 0 
goal: imageToKernel 0 g w = 0

full_name: imageToKernel_zero_right
code: theorem imageToKernel_zero_right [HasImages V] {w} :
    imageToKernel f (0 : B ⟶ C) w =
      (imageSubobject f).arrow ≫ inv (kernelSubobject (0 : B ⟶ C)).arrow 
goal: imageToKernel f 0 w =
  (CategoryTheory.Limits.imageSubobject f).arrow ≫ CategoryTheory.inv (CategoryTheory.Limits.kernelSubobject 0).arrow

full_name: imageToKernel_comp_right
code: theorem imageToKernel_comp_right {D : V} (h : C ⟶ D) (w : f ≫ g = 0) :
    imageToKernel f (g ≫ h) (by simp [reassoc_of% w]) =
      imageToKernel f g w ≫ Subobject.ofLE _ _ (kernelSubobject_comp_le g h) 
goal: imageToKernel f (g ≫ h) ⋯ =
  imageToKernel f g w ≫ (CategoryTheory.Limits.kernelSubobject g).ofLE (CategoryTheory.Limits.kernelSubobject (g ≫ h)) ⋯

full_name: imageToKernel_comp_left
code: theorem imageToKernel_comp_left {Z : V} (h : Z ⟶ A) (w : f ≫ g = 0) :
    imageToKernel (h ≫ f) g (by simp [w]) =
      Subobject.ofLE _ _ (imageSubobject_comp_le h f) ≫ imageToKernel f g w 
goal: imageToKernel (h ≫ f) g ⋯ =
  (CategoryTheory.Limits.imageSubobject (h ≫ f)).ofLE (CategoryTheory.Limits.imageSubobject f) ⋯ ≫ imageToKernel f g w

full_name: imageToKernel_comp_mono
code: @[simp]
theorem imageToKernel_comp_mono {D : V} (h : C ⟶ D) [Mono h] (w) :
    imageToKernel f (g ≫ h) w =
      imageToKernel f g ((cancel_mono h).mp (by simpa using w : (f ≫ g) ≫ h = 0 ≫ h)) ≫
        (Subobject.isoOfEq _ _ (kernelSubobject_comp_mono g h)).inv 
goal: imageToKernel f (g ≫ h) w =
  imageToKernel f g ⋯ ≫
    ((CategoryTheory.Limits.kernelSubobject (g ≫ h)).isoOfEq (CategoryTheory.Limits.kernelSubobject g) ⋯).inv

full_name: imageToKernel_epi_comp
code: @[simp]
theorem imageToKernel_epi_comp {Z : V} (h : Z ⟶ A) [Epi h] (w) :
    imageToKernel (h ≫ f) g w =
      Subobject.ofLE _ _ (imageSubobject_comp_le h f) ≫
        imageToKernel f g ((cancel_epi h).mp (by simpa using w : h ≫ f ≫ g = h ≫ 0)) 
goal: imageToKernel (h ≫ f) g w =
  (CategoryTheory.Limits.imageSubobject (h ≫ f)).ofLE (CategoryTheory.Limits.imageSubobject f) ⋯ ≫ imageToKernel f g ⋯

full_name: imageToKernel_comp_hom_inv_comp
code: @[simp]
theorem imageToKernel_comp_hom_inv_comp [HasEqualizers V] [HasImages V] {Z : V} {i : B ≅ Z} (w) :
    imageToKernel (f ≫ i.hom) (i.inv ≫ g) w =
      (imageSubobjectCompIso _ _).hom ≫
        imageToKernel f g (by simpa using w) ≫ (kernelSubobjectIsoComp i.inv g).inv 
goal: imageToKernel (f ≫ i.hom) (i.inv ≫ g) w =
  (CategoryTheory.Limits.imageSubobjectCompIso f i.hom).hom ≫
    imageToKernel f g ⋯ ≫ (CategoryTheory.Limits.kernelSubobjectIsoComp i.inv g).inv

full_name: imageToKernel_epi_of_zero_of_mono
code: /-- `imageToKernel` for `A --0--> B --g--> C`, where `g` is a mono is itself an epi
(i.e. the sequence is exact at `B`).
-/
instance imageToKernel_epi_of_zero_of_mono [HasKernels V] [HasZeroObject V] [Mono g] :
    Epi (imageToKernel (0 : A ⟶ B) g (by simp)) 
goal: CategoryTheory.Epi (imageToKernel 0 g ⋯)

full_name: imageToKernel_epi_of_epi_of_zero
code: /-- `imageToKernel` for `A --f--> B --0--> C`, where `g` is an epi is itself an epi
(i.e. the sequence is exact at `B`).
-/
instance imageToKernel_epi_of_epi_of_zero [HasImages V] [Epi f] :
    Epi (imageToKernel f (0 : B ⟶ C) (by simp)) 
goal: CategoryTheory.Epi (imageToKernel f 0 ⋯)

full_name: imageToKernel'
code: /-- While `imageToKernel f g w` provides a morphism
`imageSubobject f ⟶ kernelSubobject g`
in terms of the subobject API,
this variant provides a morphism
`image f ⟶ kernel g`,
which is sometimes more convenient.
-/
def imageToKernel' (w : f ≫ g = 0) : image f ⟶ kernel g 
goal: CategoryTheory.Limits.image f ⟶ CategoryTheory.Limits.kernel g

full_name: imageSubobjectIso_imageToKernel'
code: @[simp]
theorem imageSubobjectIso_imageToKernel' (w : f ≫ g = 0) :
    (imageSubobjectIso f).hom ≫ imageToKernel' f g w =
      imageToKernel f g w ≫ (kernelSubobjectIso g).hom 
goal: (CategoryTheory.Limits.imageSubobjectIso f).hom ≫ imageToKernel' f g w =
  imageToKernel f g w ≫ (CategoryTheory.Limits.kernelSubobjectIso g).hom

full_name: imageToKernel'_kernelSubobjectIso
code: @[simp]
theorem imageToKernel'_kernelSubobjectIso (w : f ≫ g = 0) :
    imageToKernel' f g w ≫ (kernelSubobjectIso g).inv =
      (imageSubobjectIso f).inv ≫ imageToKernel f g w 
goal: imageToKernel' f g w ≫ (CategoryTheory.Limits.kernelSubobjectIso g).inv =
  (CategoryTheory.Limits.imageSubobjectIso f).inv ≫ imageToKernel f g w