Theorem: homology_map_eq_of_homotopy
File: Mathlib/Algebra/Homology/Homotopy.lean

tactic: dsimp [homologyFunctor]
state_before: ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ (homologyFunctor V c i).map f = (homologyFunctor V c i).map g

tactic: apply eq_of_sub_eq_zero
state_before: ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ homology.map (_ : dTo C i ≫ dFrom C i = 0) (_ : dTo D i ≫ dFrom D i = 0) (Hom.sqTo f i) (Hom.sqFrom f i)
      (_ : (Hom.sqTo f i).right = (Hom.sqTo f i).right) =
    homology.map (_ : dTo C i ≫ dFrom C i = 0) (_ : dTo D i ≫ dFrom D i = 0) (Hom.sqTo g i) (Hom.sqFrom g i)
      (_ : (Hom.sqTo g i).right = (Hom.sqTo g i).right)

tactic: ext
state_before: case h
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ homology.map (_ : dTo C i ≫ dFrom C i = 0) (_ : dTo D i ≫ dFrom D i = 0) (Hom.sqTo f i) (Hom.sqFrom f i)
        (_ : (Hom.sqTo f i).right = (Hom.sqTo f i).right) -
      homology.map (_ : dTo C i ≫ dFrom C i = 0) (_ : dTo D i ≫ dFrom D i = 0) (Hom.sqTo g i) (Hom.sqFrom g i)
        (_ : (Hom.sqTo g i).right = (Hom.sqTo g i).right) =
    0

tactic: simp only [homology.π_map, comp_zero, Preadditive.comp_sub]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ homology.π (dTo C i) (dFrom C i) (_ : dTo C i ≫ dFrom C i = 0) ≫
      (homology.map (_ : dTo C i ≫ dFrom C i = 0) (_ : dTo D i ≫ dFrom D i = 0) (Hom.sqTo f i) (Hom.sqFrom f i)
          (_ : (Hom.sqTo f i).right = (Hom.sqTo f i).right) -
        homology.map (_ : dTo C i ≫ dFrom C i = 0) (_ : dTo D i ≫ dFrom D i = 0) (Hom.sqTo g i) (Hom.sqFrom g i)
          (_ : (Hom.sqTo g i).right = (Hom.sqTo g i).right)) =
    homology.π (dTo C i) (dFrom C i) (_ : dTo C i ≫ dFrom C i = 0) ≫ 0

tactic: dsimp [kernelSubobjectMap]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ kernelSubobjectMap (Hom.sqFrom f i) ≫ homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) -
      kernelSubobjectMap (Hom.sqFrom g i) ≫ homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) =
    0

tactic: simp_rw [h.comm i]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ Subobject.factorThru (kernelSubobject (dFrom D i)) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f f i)
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ (Hom.sqFrom f i).left)) ≫
        homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) -
      Subobject.factorThru (kernelSubobject (dFrom D i)) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ (Hom.sqFrom g i).left)) ≫
        homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) =
    0

tactic: simp only [zero_add, zero_comp, dNext_eq_dFrom_fromNext, kernelSubobject_arrow_comp_assoc,
  Preadditive.comp_add]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ Subobject.factorThru (kernelSubobject (dFrom D i))
          (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ (↑(dNext i) h.hom + ↑(prevD i) h.hom + Hom.f g i))
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ (↑(dNext i) h.hom + ↑(prevD i) h.hom + Hom.f g i))) ≫
        homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) -
      Subobject.factorThru (kernelSubobject (dFrom D i)) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ (Hom.sqFrom g i).left)) ≫
        homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) =
    0

tactic: rw [← Preadditive.sub_comp]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ Subobject.factorThru (kernelSubobject (dFrom D i))
          (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom +
            Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom +
                Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)) ≫
        homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) -
      Subobject.factorThru (kernelSubobject (dFrom D i)) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ (Hom.sqFrom g i).left)) ≫
        homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) =
    0

tactic: simp only [CategoryTheory.Subobject.factorThru_add_sub_factorThru_right]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ (Subobject.factorThru (kernelSubobject (dFrom D i))
          (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom +
            Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom +
                Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)) -
        Subobject.factorThru (kernelSubobject (dFrom D i)) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ Hom.f g i)
          (_ :
            Subobject.Factors (kernelSubobject (dFrom D i))
              (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ (Hom.sqFrom g i).left))) ≫
      homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) =
    0

tactic: erw [Subobject.factorThru_ofLE (D.boundaries_le_cycles i)]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ Subobject.factorThru (kernelSubobject (dFrom D i)) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom)
        (_ :
          Subobject.Factors (kernelSubobject (dFrom D i))
            (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom)) ≫
      homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) =
    0

tactic: simp
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ (Subobject.factorThru (boundaries D i) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom) ?h.p ≫
        Subobject.ofLE (boundaries D i) (cycles D i) (_ : boundaries D i ≤ cycles D i)) ≫
      homology.π (dTo D i) (dFrom D i) (_ : dTo D i ≫ dFrom D i = 0) =
    0

tactic: rw [prevD_eq_toPrev_dTo, ← Category.assoc]
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ Subobject.Factors (boundaries D i) (Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(prevD i) h.hom)

tactic: apply imageSubobject_factors_comp_self
state_before: case h.p
ι : Type u_1
V : Type u
inst✝⁵ : Category V
inst✝⁴ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i✝ : ι
inst✝³ : HasEqualizers V
inst✝² : HasCokernels V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
h : Homotopy f g
i : ι
⊢ Subobject.Factors (boundaries D i) ((Subobject.arrow (kernelSubobject (dFrom C i)) ≫ ↑(toPrev i) h.hom) ≫ dTo D i)