Lean4
/-- The cokernel of the image inclusion of a morphism `f` is isomorphic to the cokernel of `f`.
(This result requires that the factorisation through the image is an epimorphism.
This holds in any category with equalizers.)
-/
@[simps]
def cokernelImageι {X Y : C} (f : X ⟶ Y) [HasImage f] [HasCokernel (image.ι f)] [HasCokernel f]
[Epi (factorThruImage f)] : cokernel (image.ι f) ≅ cokernel f
where
hom :=
cokernel.desc _ (cokernel.π f)
(by
have w := cokernel.condition f
conv at w =>
lhs
congr
rw [← image.fac f]
rw [← HasZeroMorphisms.comp_zero (Limits.factorThruImage f), Category.assoc, cancel_epi] at w
exact w)
inv :=
cokernel.desc _ (cokernel.π _)
(by
conv =>
lhs
congr
rw [← image.fac f]
rw [Category.assoc, cokernel.condition, HasZeroMorphisms.comp_zero])