Theorem: HomologicalComplex.ext
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: obtain ⟨X₁, d₁, s₁, h₁⟩ := C₁
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C₁ C₂ : HomologicalComplex V c
h_X : C₁.X = C₂.X
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j → d C₁ i j ≫ eqToHom (_ : X C₁ j = X C₂ j) = eqToHom (_ : X C₁ i = X C₂ i) ≫ d C₂ i j
⊢ C₁ = C₂

tactic: obtain ⟨X₂, d₂, s₂, h₂⟩ := C₂
state_before: case mk
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C₂ : HomologicalComplex V c
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
h_X : (mk X₁ d₁).X = C₂.X
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X C₂ j) = eqToHom (_ : X (mk X₁ d₁) i = X C₂ i) ≫ d C₂ i j
⊢ mk X₁ d₁ = C₂

tactic: dsimp at h_X
state_before: case mk.mk
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
X₂ : ι → V
d₂ : (i j : ι) → X₂ i ⟶ X₂ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_X : (mk X₁ d₁).X = (mk X₂ d₂).X
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₂ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₂ d₂) i) ≫ d (mk X₂ d₂) i j
⊢ mk X₁ d₁ = mk X₂ d₂

tactic: subst h_X
state_before: case mk.mk
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
X₂ : ι → V
d₂ : (i j : ι) → X₂ i ⟶ X₂ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_X : X₁ = X₂
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₂ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₂ d₂) i) ≫ d (mk X₂ d₂) i j
⊢ mk X₁ d₁ = mk X₂ d₂

tactic: simp only [mk.injEq, heq_eq_eq, true_and]
state_before: case mk.mk
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
⊢ mk X₁ d₁ = mk X₁ d₂

tactic: ext i j
state_before: case mk.mk
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
⊢ d₁ = d₂

tactic: by_cases hij: c.Rel i j
state_before: case mk.mk.h.h
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
i j : ι
⊢ d₁ i j = d₂ i j

tactic: . simpa only [comp_id, id_comp, eqToHom_refl] using h_d i j hij
state_before: case pos
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
i j : ι
hij : ComplexShape.Rel c i j
⊢ d₁ i j = d₂ i j

case neg
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
i j : ι
hij : ¬ComplexShape.Rel c i j
⊢ d₁ i j = d₂ i j

tactic: . rw [s₁ i j hij, s₂ i j hij]
state_before: case neg
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
i j : ι
hij : ¬ComplexShape.Rel c i j
⊢ d₁ i j = d₂ i j

tactic: simpa only [comp_id, id_comp, eqToHom_refl] using h_d i j hij
state_before: case pos
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
i j : ι
hij : ComplexShape.Rel c i j
⊢ d₁ i j = d₂ i j

tactic: rw [s₁ i j hij, s₂ i j hij]
state_before: case neg
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
X₁ : ι → V
d₁ : (i j : ι) → X₁ i ⟶ X₁ j
s₁ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₁ i j = 0
h₁ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₁ i j ≫ d₁ j k = 0
d₂ : (i j : ι) → X₁ i ⟶ X₁ j
s₂ : ∀ (i j : ι), ¬ComplexShape.Rel c i j → d₂ i j = 0
h₂ : ∀ (i j k : ι), ComplexShape.Rel c i j → ComplexShape.Rel c j k → d₂ i j ≫ d₂ j k = 0
h_d :
  ∀ (i j : ι),
    ComplexShape.Rel c i j →
      d (mk X₁ d₁) i j ≫ eqToHom (_ : X (mk X₁ d₁) j = X (mk X₁ d₂) j) =
        eqToHom (_ : X (mk X₁ d₁) i = X (mk X₁ d₂) i) ≫ d (mk X₁ d₂) i j
i j : ι
hij : ¬ComplexShape.Rel c i j
⊢ d₁ i j = d₂ i j