-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
/-- Given a morphism of short complexes `φ : S₁ ⟶ S₂` in an abelian category, if `S₁.g = 0`
(e.g when `S₁` is of the form `S₁.X₁ ⟶ S₁.X₂ ⟶ 0`) and both `S₂.f` and `S₂.g` are zero
(e.g when `S₂` is of the form `0 ⟶ S₂.X₂ ⟶ 0`), then `φ` is a quasi-isomorphism iff
the obvious short complex `S₁.X₂ ⟶ S₁.X₂ ⟶ S₂.X₂` is exact and `φ.τ₂` is an epi). -/
lemma quasiIso_iff_of_zeros' {S₁ S₂ : ShortComplex C} (φ : S₁ ⟶ S₂)
    (hg₁ : S₁.g = 0) (hf₂ : S₂.f = 0) (hg₂ : S₂.g = 0) :
    QuasiIso φ ↔
      (ShortComplex.mk S₁.f φ.τ₂ (by rw [← φ.comm₁₂, hf₂, comp_zero])).Exact ∧ Epi φ.τ₂

Proof state:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

Tactic:
rw [← exact_unop_iff]

Result:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).unop.Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

Proof state:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
this : Mono φ.τ₂.op ↔ Epi φ.τ₂
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).unop.Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

Tactic:
tauto

Result:
no goals

Proof state:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ QuasiIso φ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

Tactic:
rw [← quasiIso_opMap_iff, quasiIso_iff_of_zeros]

Result:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

case hf₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.f = 0

case hg₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.g = 0

case hf₂
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₁.op.f = 0

Proof state:
case hf₂
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₁.op.f = 0

Tactic:
dsimp

Result:
case hf₂
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₁.g.op = 0

Proof state:
case hg₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.g = 0

Tactic:
dsimp

Result:
case hg₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.f.op = 0

Proof state:
case hf₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.g.op = 0

Tactic:
rw [hg₂, op_zero]

Result:
no goals

Proof state:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).unop.Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

Tactic:
have : Mono φ.τ₂.op ↔ Epi φ.τ₂ :=
  ⟨fun _ => unop_epi_of_mono φ.τ₂.op, fun _ => op_mono_of_epi _⟩

Result:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
this : Mono φ.τ₂.op ↔ Epi φ.τ₂
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).unop.Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

Proof state:
case hg₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.f.op = 0

Tactic:
rw [hf₂, op_zero]

Result:
no goals

Proof state:
case hf₂
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₁.g.op = 0

Tactic:
rw [hg₁, op_zero]

Result:
no goals

Proof state:
case hf₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.f = 0

Tactic:
dsimp

Result:
case hf₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.g.op = 0

Proof state:
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

case hf₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.f = 0

case hg₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.g = 0

case hf₂
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₁.op.f = 0

Tactic:
rotate_left

Result:
case hf₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.f = 0

case hg₁
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₂.op.g = 0

case hf₂
C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₁.op.f = 0

C : Type u_1
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ (mk (opMap φ).τ₂ S₁.op.g ⋯).Exact ∧ Mono (opMap φ).τ₂ ↔ (mk S₁.f φ.τ₂ ⋯).Exact ∧ Epi φ.τ₂

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.212072, u_1} C
inst✝¹ : Category.{?u.212076, u_2} D
inst✝ : Abelian C
S₁ S₂ : ShortComplex C
φ : S₁ ⟶ S₂
hg₁ : S₁.g = 0
hf₂ : S₂.f = 0
hg₂ : S₂.g = 0
⊢ S₁.f ≫ φ.τ₂ = 0

Tactic:
rw [← φ.comm₁₂, hf₂, comp_zero]

Result:
no goals