l3lab/ntp-mathlib huggingface dataset:
/-- The one point compactification of a `T1Space` space is a `T1Space`. -/
instance [T1Space X] : T1Space (OnePoint X) where
  t1 z := by
    induction z using OnePoint.rec
    · exact isClosed_infty
    · 

Proof state:
case h₂
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T1Space X
x✝ : X
⊢ IsClosed {↑x✝}

Next tactic:
rw [← image_singleton, isClosed_image_coe]
/-- The one point compactification of a `T1Space` space is a `T1Space`. -/
instance [T1Space X] : T1Space (OnePoint X) where
  t1 z := by
    induction z using OnePoint.rec
    · exact isClosed_infty
    · rw [← image_singleton, isClosed_image_coe]
      

Proof state:
case h₂
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T1Space X
x✝ : X
⊢ IsClosed {x✝} ∧ IsCompact {x✝}

Next tactic:
exact ⟨isClosed_singleton, isCompact_singleton⟩
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
⊢ T4Space (OnePoint X)

Next tactic:
have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
z : X
⊢ Disjoint (𝓝 ↑z) (𝓝 ∞)

Next tactic:
rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
z : X
⊢ Disjoint (𝓝 z) (cocompact X) ∧ range some ∈ map some (𝓝 z)

Next tactic:
exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
⊢ T4Space (OnePoint X)

Next tactic:
suffices : T2Space (OnePoint X)
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); 

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
this : T2Space (OnePoint X)
⊢ T4Space (OnePoint X)
case this
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
⊢ T2Space (OnePoint X)

Next tactic:
infer_instance
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  

Proof state:
case this
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
⊢ T2Space (OnePoint X)

Next tactic:
refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
  

Proof state:
case this
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
x y : OnePoint X
hxy : x ≠ y
⊢ Disjoint (𝓝 x) (𝓝 y)

Next tactic:
induction x using OnePoint.rec
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
  induction x using OnePoint.rec <;> 

Proof state:
case this.h₁
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
y : OnePoint X
hxy : ∞ ≠ y
⊢ Disjoint (𝓝 ∞) (𝓝 y)

Next tactic:
induction y using OnePoint.rec
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
  induction x using OnePoint.rec <;> 

Proof state:
case this.h₂
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
y : OnePoint X
x✝ : X
hxy : ↑x✝ ≠ y
⊢ Disjoint (𝓝 ↑x✝) (𝓝 y)

Next tactic:
induction y using OnePoint.rec
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
  induction x using OnePoint.rec <;> induction y using OnePoint.rec
  · 

Proof state:
case this.h₁.h₁
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
hxy : ∞ ≠ ∞
⊢ Disjoint (𝓝 ∞) (𝓝 ∞)

Next tactic:
exact (hxy rfl).elim
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
  induction x using OnePoint.rec <;> induction y using OnePoint.rec
  · exact (hxy rfl).elim
  · 

Proof state:
case this.h₁.h₂
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
x✝ : X
hxy : ∞ ≠ ↑x✝
⊢ Disjoint (𝓝 ∞) (𝓝 ↑x✝)

Next tactic:
exact (key _).symm
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
  induction x using OnePoint.rec <;> induction y using OnePoint.rec
  · exact (hxy rfl).elim
  · exact (key _).symm
  · 

Proof state:
case this.h₂.h₁
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
x✝ : X
hxy : ↑x✝ ≠ ∞
⊢ Disjoint (𝓝 ↑x✝) (𝓝 ∞)

Next tactic:
exact key _
/-- The one point compactification of a weakly locally compact Hausdorff space is a T₄
(hence, Hausdorff and regular) topological space. -/
instance [WeaklyLocallyCompactSpace X] [T2Space X] : T4Space (OnePoint X) := by
  have key : ∀ z : X, Disjoint (𝓝 (some z)) (𝓝 ∞) := fun z => by
    rw [nhds_infty_eq, disjoint_sup_right, nhds_coe_eq, coclosedCompact_eq_cocompact,
      disjoint_map coe_injective, ← principal_singleton, disjoint_principal_right, compl_infty]
    exact ⟨disjoint_nhds_cocompact z, range_mem_map⟩
  suffices : T2Space (OnePoint X); infer_instance
  refine t2Space_iff_disjoint_nhds.2 fun x y hxy => ?_
  induction x using OnePoint.rec <;> induction y using OnePoint.rec
  · exact (hxy rfl).elim
  · exact (key _).symm
  · exact key _
  · 

Proof state:
case this.h₂.h₂
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : T2Space X
key : ∀ (z : X), Disjoint (𝓝 ↑z) (𝓝 ∞)
x✝¹ x✝ : X
hxy : ↑x✝¹ ≠ ↑x✝
⊢ Disjoint (𝓝 ↑x✝¹) (𝓝 ↑x✝)

Next tactic:
rwa [nhds_coe_eq, nhds_coe_eq, disjoint_map coe_injective, disjoint_nhds_nhds,
      ← coe_injective.ne_iff]
/-- If `X` is an infinite type with discrete topology (e.g., `ℕ`), then the identity map from
`CofiniteTopology (OnePoint X)` to `OnePoint X` is not continuous. -/
theorem not_continuous_cofiniteTopology_of_symm [Infinite X] [DiscreteTopology X] :
    ¬Continuous (@CofiniteTopology.of (OnePoint X)).symm := by
  

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : Infinite X
inst✝ : DiscreteTopology X
⊢ ¬Continuous ⇑CofiniteTopology.of.symm

Next tactic:
inhabit X
/-- If `X` is an infinite type with discrete topology (e.g., `ℕ`), then the identity map from
`CofiniteTopology (OnePoint X)` to `OnePoint X` is not continuous. -/
theorem not_continuous_cofiniteTopology_of_symm [Infinite X] [DiscreteTopology X] :
    ¬Continuous (@CofiniteTopology.of (OnePoint X)).symm := by
  inhabit X
  

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : Infinite X
inst✝ : DiscreteTopology X
inhabited_h : Inhabited X
⊢ ¬Continuous ⇑CofiniteTopology.of.symm

Next tactic:
simp only [continuous_iff_continuousAt, ContinuousAt, not_forall]
/-- If `X` is an infinite type with discrete topology (e.g., `ℕ`), then the identity map from
`CofiniteTopology (OnePoint X)` to `OnePoint X` is not continuous. -/
theorem not_continuous_cofiniteTopology_of_symm [Infinite X] [DiscreteTopology X] :
    ¬Continuous (@CofiniteTopology.of (OnePoint X)).symm := by
  inhabit X
  simp only [continuous_iff_continuousAt, ContinuousAt, not_forall]
  

Proof state:
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : Infinite X
inst✝ : DiscreteTopology X
inhabited_h : Inhabited X
⊢ ∃ x, ¬Tendsto (⇑CofiniteTopology.of.symm) (𝓝 x) (𝓝 (CofiniteTopology.of.symm x))

Next tactic:
use CofiniteTopology.of ↑(default : X)
/-- If `X` is an infinite type with discrete topology (e.g., `ℕ`), then the identity map from
`CofiniteTopology (OnePoint X)` to `OnePoint X` is not continuous. -/
theorem not_continuous_cofiniteTopology_of_symm [Infinite X] [DiscreteTopology X] :
    ¬Continuous (@CofiniteTopology.of (OnePoint X)).symm := by
  inhabit X
  simp only [continuous_iff_continuousAt, ContinuousAt, not_forall]
  use CofiniteTopology.of ↑(default : X)
  

Proof state:
case h
X : Type u_1
inst✝² : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝¹ : Infinite X
inst✝ : DiscreteTopology X
inhabited_h : Inhabited X
⊢ ¬Tendsto (⇑CofiniteTopology.of.symm) (𝓝 (CofiniteTopology.of ↑default))
      (𝓝 (CofiniteTopology.of.symm (CofiniteTopology.of ↑default)))

Next tactic:
simpa [nhds_coe_eq, nhds_discrete, CofiniteTopology.nhds_eq] using
    (finite_singleton ((default : X) : OnePoint X)).infinite_compl
theorem imageToKernel_op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.op f.op (by 

Proof state:
V : Type u_1
inst✝¹ : Category.{?u.28, u_1} V
inst✝ : Abelian V
X Y Z : V
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ g.op ≫ f.op = 0

Next tactic:
rw [← op_comp, w, op_zero]
theorem imageToKernel_op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.op f.op (by rw [← op_comp, w, op_zero]) =
      (imageSubobjectIso _ ≪≫ (imageOpOp _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by 

Proof state:
V : Type u_1
inst✝¹ : Category.{?u.28, u_1} V
inst✝ : Abelian V
X Y Z : V
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ f ≫ factorThruImage g = 0

Next tactic:
rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp]
theorem imageToKernel_op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.op f.op (by rw [← op_comp, w, op_zero]) =
      (imageSubobjectIso _ ≪≫ (imageOpOp _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp])).op ≫
          (kernelSubobjectIso _ ≪≫ kernelOpOp _).inv := by
  

Proof state:
V : Type u_1
inst✝¹ : Category.{u_2, u_1} V
inst✝ : Abelian V
X Y Z : V
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ imageToKernel g.op f.op (_ : g.op ≫ f.op = 0) =
    (imageSubobjectIso g.op ≪≫ (imageOpOp g).symm).hom ≫
      (cokernel.desc f (factorThruImage g) (_ : f ≫ factorThruImage g = 0)).op ≫
        (kernelSubobjectIso f.op ≪≫ kernelOpOp f).inv

Next tactic:
ext
theorem imageToKernel_op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.op f.op (by rw [← op_comp, w, op_zero]) =
      (imageSubobjectIso _ ≪≫ (imageOpOp _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp])).op ≫
          (kernelSubobjectIso _ ≪≫ kernelOpOp _).inv := by
  ext
  

Proof state:
case h
V : Type u_1
inst✝¹ : Category.{u_2, u_1} V
inst✝ : Abelian V
X Y Z : V
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ imageToKernel g.op f.op (_ : g.op ≫ f.op = 0) ≫ Subobject.arrow (kernelSubobject f.op) =
    ((imageSubobjectIso g.op ≪≫ (imageOpOp g).symm).hom ≫
        (cokernel.desc f (factorThruImage g) (_ : f ≫ factorThruImage g = 0)).op ≫
          (kernelSubobjectIso f.op ≪≫ kernelOpOp f).inv) ≫
      Subobject.arrow (kernelSubobject f.op)

Next tactic:
simp only [Iso.trans_hom, Iso.symm_hom, Iso.trans_inv, kernelOpOp_inv, Category.assoc,
    imageToKernel_arrow, kernelSubobject_arrow', kernel.lift_ι, ← op_comp, cokernel.π_desc,
    ← imageSubobject_arrow, ← imageUnopOp_inv_comp_op_factorThruImage g.op]
theorem imageToKernel_op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.op f.op (by rw [← op_comp, w, op_zero]) =
      (imageSubobjectIso _ ≪≫ (imageOpOp _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp])).op ≫
          (kernelSubobjectIso _ ≪≫ kernelOpOp _).inv := by
  ext
  simp only [Iso.trans_hom, Iso.symm_hom, Iso.trans_inv, kernelOpOp_inv, Category.assoc,
    imageToKernel_arrow, kernelSubobject_arrow', kernel.lift_ι, ← op_comp, cokernel.π_desc,
    ← imageSubobject_arrow, ← imageUnopOp_inv_comp_op_factorThruImage g.op]
  

Proof state:
case h
V : Type u_1
inst✝¹ : Category.{u_2, u_1} V
inst✝ : Abelian V
X Y Z : V
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ (imageSubobjectIso g.op).hom ≫ (imageUnopOp g.op).inv ≫ (factorThruImage g.op.unop).op =
    (imageSubobjectIso g.op).hom ≫ (imageOpOp g).inv ≫ (factorThruImage g).op

Next tactic:
rfl
theorem imageToKernel_unop {X Y Z : Vᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.unop f.unop (by 

Proof state:
V : Type u_1
inst✝¹ : Category.{?u.11101, u_1} V
inst✝ : Abelian V
X Y Z : Vᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ g.unop ≫ f.unop = 0

Next tactic:
rw [← unop_comp, w, unop_zero]
theorem imageToKernel_unop {X Y Z : Vᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.unop f.unop (by rw [← unop_comp, w, unop_zero]) =
      (imageSubobjectIso _ ≪≫ (imageUnopUnop _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by 

Proof state:
V : Type u_1
inst✝¹ : Category.{?u.11101, u_1} V
inst✝ : Abelian V
X Y Z : Vᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ f ≫ factorThruImage g = 0

Next tactic:
rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp]
theorem imageToKernel_unop {X Y Z : Vᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.unop f.unop (by rw [← unop_comp, w, unop_zero]) =
      (imageSubobjectIso _ ≪≫ (imageUnopUnop _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp])).unop ≫
          (kernelSubobjectIso _ ≪≫ kernelUnopUnop _).inv := by
  

Proof state:
V : Type u_1
inst✝¹ : Category.{u_2, u_1} V
inst✝ : Abelian V
X Y Z : Vᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ imageToKernel g.unop f.unop (_ : g.unop ≫ f.unop = 0) =
    (imageSubobjectIso g.unop ≪≫ (imageUnopUnop g).symm).hom ≫
      (cokernel.desc f (factorThruImage g) (_ : f ≫ factorThruImage g = 0)).unop ≫
        (kernelSubobjectIso f.unop ≪≫ kernelUnopUnop f).inv

Next tactic:
ext
theorem imageToKernel_unop {X Y Z : Vᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.unop f.unop (by rw [← unop_comp, w, unop_zero]) =
      (imageSubobjectIso _ ≪≫ (imageUnopUnop _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp])).unop ≫
          (kernelSubobjectIso _ ≪≫ kernelUnopUnop _).inv := by
  ext
  

Proof state:
case h
V : Type u_1
inst✝¹ : Category.{u_2, u_1} V
inst✝ : Abelian V
X Y Z : Vᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ imageToKernel g.unop f.unop (_ : g.unop ≫ f.unop = 0) ≫ Subobject.arrow (kernelSubobject f.unop) =
    ((imageSubobjectIso g.unop ≪≫ (imageUnopUnop g).symm).hom ≫
        (cokernel.desc f (factorThruImage g) (_ : f ≫ factorThruImage g = 0)).unop ≫
          (kernelSubobjectIso f.unop ≪≫ kernelUnopUnop f).inv) ≫
      Subobject.arrow (kernelSubobject f.unop)

Next tactic:
dsimp only [imageUnopUnop]
theorem imageToKernel_unop {X Y Z : Vᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.unop f.unop (by rw [← unop_comp, w, unop_zero]) =
      (imageSubobjectIso _ ≪≫ (imageUnopUnop _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp])).unop ≫
          (kernelSubobjectIso _ ≪≫ kernelUnopUnop _).inv := by
  ext
  dsimp only [imageUnopUnop]
  

Proof state:
case h
V : Type u_1
inst✝¹ : Category.{u_2, u_1} V
inst✝ : Abelian V
X Y Z : Vᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ imageToKernel g.unop f.unop (_ : g.unop ≫ f.unop = 0) ≫ Subobject.arrow (kernelSubobject f.unop) =
    ((imageSubobjectIso g.unop ≪≫ (Iso.unop (imageUnopOp g)).symm).hom ≫
        (cokernel.desc f (factorThruImage g) (_ : f ≫ factorThruImage g = 0)).unop ≫
          (kernelSubobjectIso f.unop ≪≫ kernelUnopUnop f).inv) ≫
      Subobject.arrow (kernelSubobject f.unop)

Next tactic:
simp only [Iso.trans_hom, Iso.symm_hom, Iso.trans_inv, kernelUnopUnop_inv, Category.assoc,
    imageToKernel_arrow, kernelSubobject_arrow', kernel.lift_ι, cokernel.π_desc, Iso.unop_inv,
    ← unop_comp, factorThruImage_comp_imageUnopOp_inv, Quiver.Hom.unop_op, imageSubobject_arrow]
/-- Given `f, g` with `f ≫ g = 0`, the homology of `g.op, f.op` is the opposite of the homology of
`f, g`. -/
def homology'Op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    homology' g.op f.op (by 

Proof state:
V : Type u_1
inst✝¹ : Category.{?u.23271, u_1} V
inst✝ : Abelian V
X Y Z : V
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ g.op ≫ f.op = 0

Next tactic:
rw [← op_comp, w, op_zero]
/-- Given `f, g` with `f ≫ g = 0`, the homology of `g.op, f.op` is the opposite of the homology of
`f, g`. -/
def homology'Op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    homology' g.op f.op (by rw [← op_comp, w, op_zero]) ≅ Opposite.op (homology' f g w) :=
  cokernelIsoOfEq (imageToKernel_op _ _ w) ≪≫ cokernelEpiComp _ _ ≪≫ cokernelCompIsIso _ _ ≪≫
    cokernelOpOp _ ≪≫ (homology'IsoKernelDesc _ _ _ ≪≫
    kernelIsoOfEq (by 

Proof state:
V : Type u_1
inst✝¹ : Category.{?u.23271, u_1} V
inst✝ : Abelian V
X Y Z : V
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ cokernel.desc f g w = cokernel.desc f (factorThruImage g) (_ : f ≫ factorThruImage g = 0) ≫ image.ι g

Next tactic:
ext