l3lab/ntp-mathlib huggingface dataset:
lemma homologyMap_eq :
    homologyMap φ = h₁.homologyIso.hom ≫ γ.φH ≫ h₂.homologyIso.inv := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : RightHomologyData S₁
h₂ : RightHomologyData S₂
γ : RightHomologyMapData φ h₁ h₂
inst✝¹ : HasHomology S₁
inst✝ : HasHomology S₂
⊢ homologyMap φ = (RightHomologyData.homologyIso h₁).hom ≫ γ.φH ≫ (RightHomologyData.homologyIso h₂).inv

Next tactic:
dsimp [homologyMap, homologyMap', RightHomologyData.homologyIso,
    rightHomologyIso, RightHomologyData.rightHomologyIso]
lemma homologyMap_eq :
    homologyMap φ = h₁.homologyIso.hom ≫ γ.φH ≫ h₂.homologyIso.inv := by
  dsimp [homologyMap, homologyMap', RightHomologyData.homologyIso,
    rightHomologyIso, RightHomologyData.rightHomologyIso]
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : RightHomologyData S₁
h₂ : RightHomologyData S₂
γ : RightHomologyMapData φ h₁ h₂
inst✝¹ : HasHomology S₁
inst✝ : HasHomology S₂
⊢ leftHomologyMap' φ (homologyData S₁).left (homologyData S₂).left =
    (((homologyData S₁).iso.hom ≫ rightHomologyMap' (𝟙 S₁) (homologyData S₁).right (rightHomologyData S₁)) ≫
        rightHomologyMap' (𝟙 S₁) (rightHomologyData S₁) h₁) ≫
      γ.φH ≫
        rightHomologyMap' (𝟙 S₂) h₂ (rightHomologyData S₂) ≫
          rightHomologyMap' (𝟙 S₂) (rightHomologyData S₂) (homologyData S₂).right ≫ (homologyData S₂).iso.inv

Next tactic:
have γ' : HomologyMapData φ S₁.homologyData S₂.homologyData := default
lemma homologyMap_eq :
    homologyMap φ = h₁.homologyIso.hom ≫ γ.φH ≫ h₂.homologyIso.inv := by
  dsimp [homologyMap, homologyMap', RightHomologyData.homologyIso,
    rightHomologyIso, RightHomologyData.rightHomologyIso]
  have γ' : HomologyMapData φ S₁.homologyData S₂.homologyData := default
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : RightHomologyData S₁
h₂ : RightHomologyData S₂
γ : RightHomologyMapData φ h₁ h₂
inst✝¹ : HasHomology S₁
inst✝ : HasHomology S₂
γ' : HomologyMapData φ (homologyData S₁) (homologyData S₂)
⊢ leftHomologyMap' φ (homologyData S₁).left (homologyData S₂).left =
    (((homologyData S₁).iso.hom ≫ rightHomologyMap' (𝟙 S₁) (homologyData S₁).right (rightHomologyData S₁)) ≫
        rightHomologyMap' (𝟙 S₁) (rightHomologyData S₁) h₁) ≫
      γ.φH ≫
        rightHomologyMap' (𝟙 S₂) h₂ (rightHomologyData S₂) ≫
          rightHomologyMap' (𝟙 S₂) (rightHomologyData S₂) (homologyData S₂).right ≫ (homologyData S₂).iso.inv

Next tactic:
simp only [← γ.rightHomologyMap'_eq, assoc, ← rightHomologyMap'_comp_assoc,
    id_comp, comp_id, γ'.left.leftHomologyMap'_eq, γ'.right.rightHomologyMap'_eq, ← γ'.comm_assoc,
    Iso.hom_inv_id]
lemma homologyMap_comm :
    homologyMap φ ≫ h₂.homologyIso.hom = h₁.homologyIso.hom ≫ γ.φH := by
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : RightHomologyData S₁
h₂ : RightHomologyData S₂
γ : RightHomologyMapData φ h₁ h₂
inst✝¹ : HasHomology S₁
inst✝ : HasHomology S₂
⊢ homologyMap φ ≫ (RightHomologyData.homologyIso h₂).hom = (RightHomologyData.homologyIso h₁).hom ≫ γ.φH

Next tactic:
simp only [γ.homologyMap_eq, assoc, Iso.inv_hom_id, comp_id]
/-- Given an isomorphism `S₁ ≅ S₂` of short complexes and homology data `h₁` and `h₂`
for `S₁` and `S₂` respectively, this is the induced homology isomorphism `h₁.left.H ≅ h₁.left.H`. -/
@[simps]
def homologyMapIso' (e : S₁ ≅ S₂) (h₁ : S₁.HomologyData)
    (h₂ : S₂.HomologyData) : h₁.left.H ≅ h₂.left.H where
  hom := homologyMap' e.hom h₁ h₂
  inv := homologyMap' e.inv h₂ h₁
  hom_inv_id := by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
e : S₁ ≅ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
⊢ homologyMap' e.hom h₁ h₂ ≫ homologyMap' e.inv h₂ h₁ = 𝟙 h₁.left.H

Next tactic:
rw [← homologyMap'_comp, e.hom_inv_id, homologyMap'_id]
/-- Given an isomorphism `S₁ ≅ S₂` of short complexes and homology data `h₁` and `h₂`
for `S₁` and `S₂` respectively, this is the induced homology isomorphism `h₁.left.H ≅ h₁.left.H`. -/
@[simps]
def homologyMapIso' (e : S₁ ≅ S₂) (h₁ : S₁.HomologyData)
    (h₂ : S₂.HomologyData) : h₁.left.H ≅ h₂.left.H where
  hom := homologyMap' e.hom h₁ h₂
  inv := homologyMap' e.inv h₂ h₁
  hom_inv_id := by rw [← homologyMap'_comp, e.hom_inv_id, homologyMap'_id]
  inv_hom_id := by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
e : S₁ ≅ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
⊢ homologyMap' e.inv h₂ h₁ ≫ homologyMap' e.hom h₁ h₂ = 𝟙 h₂.left.H

Next tactic:
rw [← homologyMap'_comp, e.inv_hom_id, homologyMap'_id]
/-- The homology isomorphism `S₁.homology ⟶ S₂.homology` induced by an isomorphism
`S₁ ≅ S₂` of short complexes. -/
@[simps]
noncomputable def homologyMapIso (e : S₁ ≅ S₂) [S₁.HasHomology]
    [S₂.HasHomology] : S₁.homology ≅ S₂.homology where
  hom := homologyMap e.hom
  inv := homologyMap e.inv
  hom_inv_id := by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
e : S₁ ≅ S₂
inst✝¹ : HasHomology S₁
inst✝ : HasHomology S₂
⊢ homologyMap e.hom ≫ homologyMap e.inv = 𝟙 (homology S₁)

Next tactic:
rw [← homologyMap_comp, e.hom_inv_id, homologyMap_id]
/-- The homology isomorphism `S₁.homology ⟶ S₂.homology` induced by an isomorphism
`S₁ ≅ S₂` of short complexes. -/
@[simps]
noncomputable def homologyMapIso (e : S₁ ≅ S₂) [S₁.HasHomology]
    [S₂.HasHomology] : S₁.homology ≅ S₂.homology where
  hom := homologyMap e.hom
  inv := homologyMap e.inv
  hom_inv_id := by rw [← homologyMap_comp, e.hom_inv_id, homologyMap_id]
  inv_hom_id := by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
e : S₁ ≅ S₂
inst✝¹ : HasHomology S₁
inst✝ : HasHomology S₂
⊢ homologyMap e.inv ≫ homologyMap e.hom = 𝟙 (homology S₂)

Next tactic:
rw [← homologyMap_comp, e.inv_hom_id, homologyMap_id]
/-- If a short complex `S` has both a left homology data `h₁` and a right homology data `h₂`,
this is the canonical morphism `h₁.H ⟶ h₂.H`. -/
def leftRightHomologyComparison' : h₁.H ⟶ h₂.H :=
  h₂.liftH (h₁.descH (h₁.i ≫ h₂.p) (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ LeftHomologyData.f' h₁ ≫ h₁.i ≫ h₂.p = 0

Next tactic:
simp
/-- If a short complex `S` has both a left homology data `h₁` and a right homology data `h₂`,
this is the canonical morphism `h₁.H ⟶ h₂.H`. -/
def leftRightHomologyComparison' : h₁.H ⟶ h₂.H :=
  h₂.liftH (h₁.descH (h₁.i ≫ h₂.p) (by simp))
    (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ LeftHomologyData.descH h₁ (h₁.i ≫ h₂.p) (_ : LeftHomologyData.f' h₁ ≫ h₁.i ≫ h₂.p = 0) ≫ RightHomologyData.g' h₂ = 0

Next tactic:
rw [← cancel_epi h₁.π, LeftHomologyData.π_descH_assoc, assoc,
      RightHomologyData.p_g', LeftHomologyData.wi, comp_zero]
lemma leftRightHomologyComparison'_eq_liftH :
    leftRightHomologyComparison' h₁ h₂ =
      h₂.liftH (h₁.descH (h₁.i ≫ h₂.p) (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ LeftHomologyData.f' h₁ ≫ h₁.i ≫ h₂.p = 0

Next tactic:
simp
lemma leftRightHomologyComparison'_eq_liftH :
    leftRightHomologyComparison' h₁ h₂ =
      h₂.liftH (h₁.descH (h₁.i ≫ h₂.p) (by simp))
        (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ LeftHomologyData.descH h₁ (h₁.i ≫ h₂.p) (_ : LeftHomologyData.f' h₁ ≫ h₁.i ≫ h₂.p = 0) ≫ RightHomologyData.g' h₂ = 0

Next tactic:
rw [← cancel_epi h₁.π, LeftHomologyData.π_descH_assoc, assoc,
          RightHomologyData.p_g', LeftHomologyData.wi, comp_zero]
@[reassoc (attr := simp)]
lemma π_leftRightHomologyComparison'_ι :
    h₁.π ≫ leftRightHomologyComparison' h₁ h₂ ≫ h₂.ι = h₁.i ≫ h₂.p :=
  by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ h₁.π ≫ leftRightHomologyComparison' h₁ h₂ ≫ h₂.ι = h₁.i ≫ h₂.p

Next tactic:
simp only [leftRightHomologyComparison'_eq_liftH,
    RightHomologyData.liftH_ι, LeftHomologyData.π_descH]
lemma leftRightHomologyComparison'_eq_descH :
    leftRightHomologyComparison' h₁ h₂ =
      h₁.descH (h₂.liftH (h₁.i ≫ h₂.p) (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ (h₁.i ≫ h₂.p) ≫ RightHomologyData.g' h₂ = 0

Next tactic:
simp
lemma leftRightHomologyComparison'_eq_descH :
    leftRightHomologyComparison' h₁ h₂ =
      h₁.descH (h₂.liftH (h₁.i ≫ h₂.p) (by simp))
        (by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ LeftHomologyData.f' h₁ ≫ RightHomologyData.liftH h₂ (h₁.i ≫ h₂.p) (_ : (h₁.i ≫ h₂.p) ≫ RightHomologyData.g' h₂ = 0) =
    0

Next tactic:
rw [← cancel_mono h₂.ι, assoc, RightHomologyData.liftH_ι,
          LeftHomologyData.f'_i_assoc, RightHomologyData.wp, zero_comp]
lemma leftRightHomologyComparison'_eq_descH :
    leftRightHomologyComparison' h₁ h₂ =
      h₁.descH (h₂.liftH (h₁.i ≫ h₂.p) (by simp))
        (by rw [← cancel_mono h₂.ι, assoc, RightHomologyData.liftH_ι,
          LeftHomologyData.f'_i_assoc, RightHomologyData.wp, zero_comp]) := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ leftRightHomologyComparison' h₁ h₂ =
    LeftHomologyData.descH h₁
      (RightHomologyData.liftH h₂ (h₁.i ≫ h₂.p) (_ : (h₁.i ≫ h₂.p) ≫ RightHomologyData.g' h₂ = 0))
      (_ :
        LeftHomologyData.f' h₁ ≫
            RightHomologyData.liftH h₂ (h₁.i ≫ h₂.p) (_ : (h₁.i ≫ h₂.p) ≫ RightHomologyData.g' h₂ = 0) =
          0)

Next tactic:
simp only [← cancel_mono h₂.ι, ← cancel_epi h₁.π, π_leftRightHomologyComparison'_ι,
    LeftHomologyData.π_descH_assoc, RightHomologyData.liftH_ι]
@[reassoc]
lemma leftRightHomologyComparison'_naturality (φ : S₁ ⟶ S₂) (h₁ : S₁.LeftHomologyData)
    (h₂ : S₁.RightHomologyData) (h₁' : S₂.LeftHomologyData) (h₂' : S₂.RightHomologyData) :
    leftHomologyMap' φ h₁ h₁' ≫ leftRightHomologyComparison' h₁' h₂' =
      leftRightHomologyComparison' h₁ h₂ ≫ rightHomologyMap' φ h₂ h₂' := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ✝ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
φ : S₁ ⟶ S₂
h₁ : LeftHomologyData S₁
h₂ : RightHomologyData S₁
h₁' : LeftHomologyData S₂
h₂' : RightHomologyData S₂
⊢ leftHomologyMap' φ h₁ h₁' ≫ leftRightHomologyComparison' h₁' h₂' =
    leftRightHomologyComparison' h₁ h₂ ≫ rightHomologyMap' φ h₂ h₂'

Next tactic:
simp only [← cancel_epi h₁.π, ← cancel_mono h₂'.ι, assoc,
    leftHomologyπ_naturality'_assoc, rightHomologyι_naturality',
    π_leftRightHomologyComparison'_ι, π_leftRightHomologyComparison'_ι_assoc,
    cyclesMap'_i_assoc, p_opcyclesMap']
lemma leftRightHomologyComparison'_compatibility (h₁ h₁' : S.LeftHomologyData)
    (h₂ h₂' : S.RightHomologyData) :
    leftRightHomologyComparison' h₁ h₂ = leftHomologyMap' (𝟙 S) h₁ h₁' ≫
      leftRightHomologyComparison' h₁' h₂' ≫ rightHomologyMap' (𝟙 S) _ _ := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ h₁' : LeftHomologyData S
h₂ h₂' : RightHomologyData S
⊢ leftRightHomologyComparison' h₁ h₂ =
    leftHomologyMap' (𝟙 S) h₁ h₁' ≫ leftRightHomologyComparison' h₁' h₂' ≫ rightHomologyMap' (𝟙 S) h₂' h₂

Next tactic:
rw [leftRightHomologyComparison'_naturality_assoc (𝟙 S) h₁ h₂ h₁' h₂',
    ← rightHomologyMap'_comp, comp_id, rightHomologyMap'_id, comp_id]
@[simp]
lemma HomologyData.leftRightHomologyComparison'_eq (h : S.HomologyData) :
    leftRightHomologyComparison' h.left h.right = h.iso.hom := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
h : HomologyData S
⊢ leftRightHomologyComparison' h.left h.right = h.iso.hom

Next tactic:
simp only [← cancel_epi h.left.π, ← cancel_mono h.right.ι,
    π_leftRightHomologyComparison'_ι, HomologyData.comm]
instance isIso_leftRightHomologyComparison'_of_homologyData (h : S.HomologyData) :
  IsIso (leftRightHomologyComparison' h.left h.right) := by
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
h : HomologyData S
⊢ IsIso (leftRightHomologyComparison' h.left h.right)

Next tactic:
rw [h.leftRightHomologyComparison'_eq]
instance isIso_leftRightHomologyComparison'_of_homologyData (h : S.HomologyData) :
  IsIso (leftRightHomologyComparison' h.left h.right) := by
    rw [h.leftRightHomologyComparison'_eq]
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
h : HomologyData S
⊢ IsIso h.iso.hom

Next tactic:
infer_instance
instance isIso_leftRightHomologyComparison' [S.HasHomology]
    (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData) :
    IsIso (leftRightHomologyComparison' h₁ h₂) := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
inst✝ : HasHomology S
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ IsIso (leftRightHomologyComparison' h₁ h₂)

Next tactic:
rw [leftRightHomologyComparison'_compatibility h₁ S.homologyData.left h₂
    S.homologyData.right]
instance isIso_leftRightHomologyComparison' [S.HasHomology]
    (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData) :
    IsIso (leftRightHomologyComparison' h₁ h₂) := by
  rw [leftRightHomologyComparison'_compatibility h₁ S.homologyData.left h₂
    S.homologyData.right]
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
inst✝ : HasHomology S
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ IsIso
    (leftHomologyMap' (𝟙 S) h₁ (homologyData S).left ≫
      leftRightHomologyComparison' (homologyData S).left (homologyData S).right ≫
        rightHomologyMap' (𝟙 S) (homologyData S).right h₂)

Next tactic:
infer_instance
instance isIso_leftRightHomologyComparison [S.HasHomology] :
    IsIso S.leftRightHomologyComparison := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
inst✝ : HasHomology S
⊢ IsIso (leftRightHomologyComparison S)

Next tactic:
dsimp only [leftRightHomologyComparison]
instance isIso_leftRightHomologyComparison [S.HasHomology] :
    IsIso S.leftRightHomologyComparison := by
  dsimp only [leftRightHomologyComparison]
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
inst✝ : HasHomology S
⊢ IsIso (leftRightHomologyComparison' (leftHomologyData S) (rightHomologyData S))

Next tactic:
infer_instance
lemma leftRightHomologyComparison'_eq_leftHomologpMap'_comp_iso_hom_comp_rightHomologyMap'
    (h : S.HomologyData) (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData) :
    leftRightHomologyComparison' h₁ h₂ =
      leftHomologyMap' (𝟙 S) h₁ h.left ≫ h.iso.hom ≫ rightHomologyMap' (𝟙 S) h.right h₂ := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h : HomologyData S
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
⊢ leftRightHomologyComparison' h₁ h₂ = leftHomologyMap' (𝟙 S) h₁ h.left ≫ h.iso.hom ≫ rightHomologyMap' (𝟙 S) h.right h₂

Next tactic:
simpa only [h.leftRightHomologyComparison'_eq] using
    leftRightHomologyComparison'_compatibility h₁ h.left h₂ h.right
@[reassoc]
lemma leftRightHomologyComparison'_fac (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData)
    [S.HasHomology] :
    leftRightHomologyComparison' h₁ h₂ = h₁.homologyIso.inv ≫ h₂.homologyIso.hom := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
inst✝ : HasHomology S
⊢ leftRightHomologyComparison' h₁ h₂ = (LeftHomologyData.homologyIso h₁).inv ≫ (RightHomologyData.homologyIso h₂).hom

Next tactic:
rw [leftRightHomologyComparison'_eq_leftHomologpMap'_comp_iso_hom_comp_rightHomologyMap'
    S.homologyData h₁ h₂]
@[reassoc]
lemma leftRightHomologyComparison'_fac (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData)
    [S.HasHomology] :
    leftRightHomologyComparison' h₁ h₂ = h₁.homologyIso.inv ≫ h₂.homologyIso.hom := by
  rw [leftRightHomologyComparison'_eq_leftHomologpMap'_comp_iso_hom_comp_rightHomologyMap'
    S.homologyData h₁ h₂]
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
inst✝ : HasHomology S
⊢ leftHomologyMap' (𝟙 S) h₁ (homologyData S).left ≫
      (homologyData S).iso.hom ≫ rightHomologyMap' (𝟙 S) (homologyData S).right h₂ =
    (LeftHomologyData.homologyIso h₁).inv ≫ (RightHomologyData.homologyIso h₂).hom

Next tactic:
dsimp only [LeftHomologyData.homologyIso, LeftHomologyData.leftHomologyIso,
    Iso.symm, Iso.trans, Iso.refl, leftHomologyMapIso', leftHomologyIso,
    RightHomologyData.homologyIso, RightHomologyData.rightHomologyIso,
    rightHomologyMapIso', rightHomologyIso]
@[reassoc]
lemma leftRightHomologyComparison'_fac (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData)
    [S.HasHomology] :
    leftRightHomologyComparison' h₁ h₂ = h₁.homologyIso.inv ≫ h₂.homologyIso.hom := by
  rw [leftRightHomologyComparison'_eq_leftHomologpMap'_comp_iso_hom_comp_rightHomologyMap'
    S.homologyData h₁ h₂]
  dsimp only [LeftHomologyData.homologyIso, LeftHomologyData.leftHomologyIso,
    Iso.symm, Iso.trans, Iso.refl, leftHomologyMapIso', leftHomologyIso,
    RightHomologyData.homologyIso, RightHomologyData.rightHomologyIso,
    rightHomologyMapIso', rightHomologyIso]
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁✝ : HomologyData S₁
h₂✝ : HomologyData S₂
h₁ : LeftHomologyData S
h₂ : RightHomologyData S
inst✝ : HasHomology S
⊢ leftHomologyMap' (𝟙 S) h₁ (homologyData S).left ≫
      (homologyData S).iso.hom ≫ rightHomologyMap' (𝟙 S) (homologyData S).right h₂ =
    (leftHomologyMap' (𝟙 S) h₁ (leftHomologyData S) ≫
        leftHomologyMap' (𝟙 S) (leftHomologyData S) (homologyData S).left) ≫
      ((homologyData S).iso.hom ≫ rightHomologyMap' (𝟙 S) (homologyData S).right (rightHomologyData S)) ≫
        rightHomologyMap' (𝟙 S) (rightHomologyData S) h₂

Next tactic:
simp only [assoc, ← leftHomologyMap'_comp_assoc, id_comp, ← rightHomologyMap'_comp]
@[reassoc]
lemma leftRightHomologyComparison_fac [S.HasHomology] :
    S.leftRightHomologyComparison = S.leftHomologyIso.hom ≫ S.rightHomologyIso.inv := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
inst✝ : HasHomology S
⊢ leftRightHomologyComparison S = (leftHomologyIso S).hom ≫ (rightHomologyIso S).inv

Next tactic:
simpa only [LeftHomologyData.homologyIso_leftHomologyData, Iso.symm_inv,
    RightHomologyData.homologyIso_rightHomologyData, Iso.symm_hom] using
      leftRightHomologyComparison'_fac S.leftHomologyData S.rightHomologyData
lemma HomologyData.right_homologyIso_eq_left_homologyIso_trans_iso
    (h : S.HomologyData) [S.HasHomology] :
    h.right.homologyIso = h.left.homologyIso ≪≫ h.iso := by
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
h : HomologyData S
inst✝ : HasHomology S
⊢ RightHomologyData.homologyIso h.right = LeftHomologyData.homologyIso h.left ≪≫ h.iso

Next tactic:
suffices h.iso = h.left.homologyIso.symm ≪≫ h.right.homologyIso by
    rw [this, Iso.self_symm_id_assoc]
lemma HomologyData.right_homologyIso_eq_left_homologyIso_trans_iso
    (h : S.HomologyData) [S.HasHomology] :
    h.right.homologyIso = h.left.homologyIso ≪≫ h.iso := by
  suffices h.iso = h.left.homologyIso.symm ≪≫ h.right.homologyIso by
    

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
h : HomologyData S
inst✝ : HasHomology S
this : h.iso = (LeftHomologyData.homologyIso h.left).symm ≪≫ RightHomologyData.homologyIso h.right
⊢ RightHomologyData.homologyIso h.right = LeftHomologyData.homologyIso h.left ≪≫ h.iso

Next tactic:
rw [this, Iso.self_symm_id_assoc]
lemma HomologyData.right_homologyIso_eq_left_homologyIso_trans_iso
    (h : S.HomologyData) [S.HasHomology] :
    h.right.homologyIso = h.left.homologyIso ≪≫ h.iso := by
  suffices h.iso = h.left.homologyIso.symm ≪≫ h.right.homologyIso by
    rw [this, Iso.self_symm_id_assoc]
  

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
h : HomologyData S
inst✝ : HasHomology S
⊢ h.iso = (LeftHomologyData.homologyIso h.left).symm ≪≫ RightHomologyData.homologyIso h.right

Next tactic:
ext
lemma HomologyData.right_homologyIso_eq_left_homologyIso_trans_iso
    (h : S.HomologyData) [S.HasHomology] :
    h.right.homologyIso = h.left.homologyIso ≪≫ h.iso := by
  suffices h.iso = h.left.homologyIso.symm ≪≫ h.right.homologyIso by
    rw [this, Iso.self_symm_id_assoc]
  ext
  

Proof state:
case w
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : HomologyData S₁
h₂ : HomologyData S₂
h : HomologyData S
inst✝ : HasHomology S
⊢ h.iso.hom = ((LeftHomologyData.homologyIso h.left).symm ≪≫ RightHomologyData.homologyIso h.right).hom

Next tactic:
dsimp