l3lab/ntp-mathlib huggingface dataset:
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ (IsEquivalence.inverse (equivalence₂ eB hF).inverse).map
        ((((Iso.refl (eB.functor ⋙ e'.inverse ⋙ eA.inverse) ≪≫ isoWhiskerRight hG eA.inverse) ≪≫
                  isoWhiskerLeft G eA.unitIso.symm) ≪≫
                Functor.rightUnitor G).inv.app
          Y) ≫
      IsEquivalence.unitIso.inv.app Y =
    eB.inverse.map (η.hom.app Y) ≫ eB.unitIso.inv.app Y

Next tactic:
dsimp
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  dsimp
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ eB.inverse.map
        (F.map
          (𝟙 (G.obj Y) ≫
            eA.unitIso.hom.app (G.obj Y) ≫
              eA.inverse.map (hG.inv.app Y) ≫ 𝟙 (eA.inverse.obj (e'.inverse.obj (eB.functor.obj Y))))) ≫
      (equivalence₂ eB hF).counitIso.hom.app Y =
    eB.inverse.map (η.hom.app Y) ≫ eB.unitIso.inv.app Y

Next tactic:
simp only [comp_id, id_comp, F.map_comp, assoc,
    equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app,
    ← eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  dsimp
  simp only [comp_id, id_comp, F.map_comp, assoc,
    equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app,
    ← eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ eB.inverse.map
        (F.map (eA.unitIso.hom.app (G.obj Y)) ≫
          F.map (eA.inverse.map (hG.inv.app Y)) ≫
            hF.inv.app (eA.inverse.obj (e'.inverse.obj (eB.functor.obj Y))) ≫
              e'.functor.map (eA.counitIso.hom.app (e'.inverse.obj (eB.functor.obj Y))) ≫
                e'.functor.map (hG.hom.app Y) ≫ hF.hom.app (G.obj Y) ≫ η.hom.app Y) ≫
      eB.unitIso.inv.app Y =
    eB.inverse.map (η.hom.app Y) ≫ eB.unitIso.inv.app Y

Next tactic:
erw [hF.inv.naturality_assoc, hF.inv.naturality_assoc]
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  dsimp
  simp only [comp_id, id_comp, F.map_comp, assoc,
    equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app,
    ← eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]
  erw [hF.inv.naturality_assoc, hF.inv.naturality_assoc]
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ eB.inverse.map
        (hF.inv.app (G.obj Y) ≫
          (eA.functor ⋙ e'.functor).map (eA.unitIso.hom.app (G.obj Y)) ≫
            (eA.functor ⋙ e'.functor).map (eA.inverse.map (hG.inv.app Y)) ≫
              e'.functor.map (eA.counitIso.hom.app (e'.inverse.obj (eB.functor.obj Y))) ≫
                e'.functor.map (hG.hom.app Y) ≫ hF.hom.app (G.obj Y) ≫ η.hom.app Y) ≫
      eB.unitIso.inv.app Y =
    eB.inverse.map (η.hom.app Y) ≫ eB.unitIso.inv.app Y

Next tactic:
dsimp
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  dsimp
  simp only [comp_id, id_comp, F.map_comp, assoc,
    equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app,
    ← eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]
  erw [hF.inv.naturality_assoc, hF.inv.naturality_assoc]
  dsimp
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ eB.inverse.map
        (hF.inv.app (G.obj Y) ≫
          e'.functor.map (eA.functor.map (eA.unitIso.hom.app (G.obj Y))) ≫
            e'.functor.map (eA.functor.map (eA.inverse.map (hG.inv.app Y))) ≫
              e'.functor.map (eA.counitIso.hom.app (e'.inverse.obj (eB.functor.obj Y))) ≫
                e'.functor.map (hG.hom.app Y) ≫ hF.hom.app (G.obj Y) ≫ η.hom.app Y) ≫
      eB.unitIso.inv.app Y =
    eB.inverse.map (η.hom.app Y) ≫ eB.unitIso.inv.app Y

Next tactic:
congr 2
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  dsimp
  simp only [comp_id, id_comp, F.map_comp, assoc,
    equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app,
    ← eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]
  erw [hF.inv.naturality_assoc, hF.inv.naturality_assoc]
  dsimp
  congr 2
  

Proof state:
case w.app.h.e_a.e_a
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ hF.inv.app (G.obj Y) ≫
      e'.functor.map (eA.functor.map (eA.unitIso.hom.app (G.obj Y))) ≫
        e'.functor.map (eA.functor.map (eA.inverse.map (hG.inv.app Y))) ≫
          e'.functor.map (eA.counitIso.hom.app (e'.inverse.obj (eB.functor.obj Y))) ≫
            e'.functor.map (hG.hom.app Y) ≫ hF.hom.app (G.obj Y) ≫ η.hom.app Y =
    η.hom.app Y

Next tactic:
simp only [assoc, ← e'.functor.map_comp_assoc, Equivalence.fun_inv_map,
    Iso.inv_hom_id_app_assoc, hG.inv_hom_id_app]
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  dsimp
  simp only [comp_id, id_comp, F.map_comp, assoc,
    equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app,
    ← eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]
  erw [hF.inv.naturality_assoc, hF.inv.naturality_assoc]
  dsimp
  congr 2
  simp only [assoc, ← e'.functor.map_comp_assoc, Equivalence.fun_inv_map,
    Iso.inv_hom_id_app_assoc, hG.inv_hom_id_app]
  

Proof state:
case w.app.h.e_a.e_a
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ hF.inv.app (G.obj Y) ≫
      e'.functor.map
          (eA.functor.map (eA.unitIso.hom.app (G.obj Y)) ≫
            eA.counit.app (eA.functor.obj (G.obj Y)) ≫ 𝟙 ((G ⋙ eA.functor).obj Y)) ≫
        hF.hom.app (G.obj Y) ≫ η.hom.app Y =
    η.hom.app Y

Next tactic:
dsimp
theorem equivalenceCounitIso_eq : (equivalence hF hG).counitIso = equivalenceCounitIso η := by
  ext1; apply NatTrans.ext; ext Y
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence]
  rw [equivalenceCounitIso_hom_app, IsEquivalence.ofIso_unitIso_inv_app]
  dsimp
  simp only [comp_id, id_comp, F.map_comp, assoc,
    equivalence₂CounitIso_eq, equivalence₂CounitIso_hom_app,
    ← eB.inverse.map_comp_assoc, ← τ₀_hom_app, hη, τ₁_hom_app]
  erw [hF.inv.naturality_assoc, hF.inv.naturality_assoc]
  dsimp
  congr 2
  simp only [assoc, ← e'.functor.map_comp_assoc, Equivalence.fun_inv_map,
    Iso.inv_hom_id_app_assoc, hG.inv_hom_id_app]
  dsimp
  

Proof state:
case w.app.h.e_a.e_a
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_6, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_5, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
Y : B
⊢ hF.inv.app (G.obj Y) ≫
      e'.functor.map
          (eA.functor.map (eA.unitIso.hom.app (G.obj Y)) ≫
            eA.counit.app (eA.functor.obj (G.obj Y)) ≫ 𝟙 (eA.functor.obj (G.obj Y))) ≫
        hF.hom.app (G.obj Y) ≫ η.hom.app Y =
    η.hom.app Y

Next tactic:
rw [comp_id, eA.functor_unitIso_comp, e'.functor.map_id, id_comp, hF.inv_hom_id_app_assoc]
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  

Proof state:
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
⊢ (equivalence hF hG).unitIso = equivalenceUnitIso hG ε

Next tactic:
ext1
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  ext1; 

Proof state:
case w
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
⊢ (equivalence hF hG).unitIso.hom = (equivalenceUnitIso hG ε).hom

Next tactic:
apply NatTrans.ext
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  ext1; apply NatTrans.ext; 

Proof state:
case w.app
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
⊢ (equivalence hF hG).unitIso.hom.app = (equivalenceUnitIso hG ε).hom.app

Next tactic:
ext X
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  ext1; apply NatTrans.ext; ext X
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
X : A
⊢ (equivalence hF hG).unitIso.hom.app X = (equivalenceUnitIso hG ε).hom.app X

Next tactic:
dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence, IsEquivalence.inverse]
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  ext1; apply NatTrans.ext; ext X
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence, IsEquivalence.inverse]
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
X : A
⊢ IsEquivalence.counitIso.inv.app X = (equivalenceUnitIso hG ε).hom.app X

Next tactic:
rw [IsEquivalence.ofIso_counitIso_inv_app]
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  ext1; apply NatTrans.ext; ext X
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence, IsEquivalence.inverse]
  rw [IsEquivalence.ofIso_counitIso_inv_app]
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
X : A
⊢ IsEquivalence.counitIso.inv.app X ≫
      (((Iso.refl (eB.functor ⋙ e'.inverse ⋙ eA.inverse) ≪≫ isoWhiskerRight hG eA.inverse) ≪≫
                isoWhiskerLeft G eA.unitIso.symm) ≪≫
              Functor.rightUnitor G).hom.app
        ((IsEquivalence.inverse (equivalence₂ eB hF).inverse).obj X) =
    (equivalenceUnitIso hG ε).hom.app X

Next tactic:
dsimp
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  ext1; apply NatTrans.ext; ext X
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence, IsEquivalence.inverse]
  rw [IsEquivalence.ofIso_counitIso_inv_app]
  dsimp
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
X : A
⊢ (equivalence₂ eB hF).unitIso.hom.app X ≫
      ((𝟙 (eA.inverse.obj (e'.inverse.obj (eB.functor.obj (eB.inverse.obj (F.obj X))))) ≫
            eA.inverse.map (hG.hom.app (eB.inverse.obj (F.obj X)))) ≫
          eA.unitIso.inv.app (G.obj (eB.inverse.obj (F.obj X)))) ≫
        𝟙 (G.obj (eB.inverse.obj (F.obj X))) =
    (equivalenceUnitIso hG ε).hom.app X

Next tactic:
erw [id_comp, comp_id]
theorem equivalenceUnitIso_eq : (equivalence hF hG).unitIso = equivalenceUnitIso hG ε := by
  ext1; apply NatTrans.ext; ext X
  dsimp [equivalence, Functor.asEquivalence, IsEquivalence.ofEquivalence, IsEquivalence.inverse]
  rw [IsEquivalence.ofIso_counitIso_inv_app]
  dsimp
  erw [id_comp, comp_id]
  

Proof state:
case w.app.h
A : Type u_1
A' : Type u_2
B : Type u_3
B' : Type u_4
inst✝³ : Category.{u_5, u_1} A
inst✝² : Category.{u_7, u_2} A'
inst✝¹ : Category.{u_6, u_3} B
inst✝ : Category.{u_8, u_4} B'
eA : A ≌ A'
eB : B ≌ B'
e' : A' ≌ B'
F : A ⥤ B'
hF : eA.functor ⋙ e'.functor ≅ F
G : B ⥤ A
hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor
η : G ⋙ F ≅ eB.functor
hη : τ₀ = τ₁ hF hG η
ε : eA.functor ≅ F ⋙ e'.inverse
hε : υ hF = ε
X : A
⊢ (equivalence₂ eB hF).unitIso.hom.app X ≫
      eA.inverse.map (hG.hom.app (eB.inverse.obj (F.obj X))) ≫ eA.unitIso.inv.app (G.obj (eB.inverse.obj (F.obj X))) =
    (equivalenceUnitIso hG ε).hom.app X

Next tactic:
simp only [equivalence₂UnitIso_eq eB hF, equivalence₂UnitIso_hom_app,
    assoc, equivalenceUnitIso_hom_app, ← eA.inverse.map_comp_assoc, ← hε, υ_hom_app]
@[simp]
theorem isLUB_image {s : Set α} {x : β} : IsLUB (f '' s) x ↔ IsLUB s (f.symm x) :=
  ⟨fun h => IsLUB.of_image (by 

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set α
x : β
h : IsLUB (⇑f '' s) x
⊢ ∀ {x y : α}, f x ≤ f y ↔ x ≤ y

Next tactic:
simp
@[simp]
theorem isLUB_image {s : Set α} {x : β} : IsLUB (f '' s) x ↔ IsLUB s (f.symm x) :=
  ⟨fun h => IsLUB.of_image (by simp) ((f.apply_symm_apply x).symm ▸ h), fun h =>
    (IsLUB.of_image (by 

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set α
x : β
h : IsLUB s ((symm f) x)
⊢ ∀ {x y : β}, (symm f) x ≤ (symm f) y ↔ x ≤ y

Next tactic:
simp
theorem isLUB_image' {s : Set α} {x : α} : IsLUB (f '' s) (f x) ↔ IsLUB s x := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set α
x : α
⊢ IsLUB (⇑f '' s) (f x) ↔ IsLUB s x

Next tactic:
rw [isLUB_image, f.symm_apply_apply]
@[simp]
theorem isLUB_preimage {s : Set β} {x : α} : IsLUB (f ⁻¹' s) x ↔ IsLUB s (f x) := by
  

Proof state:
α : Type u_2
β : Type u_1
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set β
x : α
⊢ IsLUB (⇑f ⁻¹' s) x ↔ IsLUB s (f x)

Next tactic:
rw [← f.symm_symm, ← image_eq_preimage, isLUB_image]
theorem isLUB_preimage' {s : Set β} {x : β} : IsLUB (f ⁻¹' s) (f.symm x) ↔ IsLUB s x := by
  

Proof state:
α : Type u_2
β : Type u_1
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set β
x : β
⊢ IsLUB (⇑f ⁻¹' s) ((symm f) x) ↔ IsLUB s x

Next tactic:
rw [isLUB_preimage, f.apply_symm_apply]
/-- Transferred from `DFinsupp.Lex.acc`. See the top of that file for an explanation for the
  appearance of the relation `rᶜ ⊓ (≠)`. -/
theorem Lex.acc (x : α →₀ N) (h : ∀ a ∈ x.support, Acc (rᶜ ⊓ (· ≠ ·)) a) :
    Acc (Finsupp.Lex r s) x := by
  

Proof state:
α : Type u_1
N : Type u_2
inst✝ : Zero N
r : α → α → Prop
s : N → N → Prop
hbot : ∀ ⦃n : N⦄, ¬s n 0
hs : WellFounded s
x : α →₀ N
h : ∀ a ∈ x.support, Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a
⊢ Acc (Finsupp.Lex r s) x

Next tactic:
rw [lex_eq_invImage_dfinsupp_lex]
/-- Transferred from `DFinsupp.Lex.acc`. See the top of that file for an explanation for the
  appearance of the relation `rᶜ ⊓ (≠)`. -/
theorem Lex.acc (x : α →₀ N) (h : ∀ a ∈ x.support, Acc (rᶜ ⊓ (· ≠ ·)) a) :
    Acc (Finsupp.Lex r s) x := by
  rw [lex_eq_invImage_dfinsupp_lex]
  

Proof state:
α : Type u_1
N : Type u_2
inst✝ : Zero N
r : α → α → Prop
s : N → N → Prop
hbot : ∀ ⦃n : N⦄, ¬s n 0
hs : WellFounded s
x : α →₀ N
h : ∀ a ∈ x.support, Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a
⊢ Acc (InvImage (DFinsupp.Lex r fun x => s) toDFinsupp) x

Next tactic:
classical
    refine' InvImage.accessible toDFinsupp (DFinsupp.Lex.acc (fun _ => hbot) (fun _ => hs) _ _)
    simpa only [toDFinsupp_support] using h
/-- Transferred from `DFinsupp.Lex.acc`. See the top of that file for an explanation for the
  appearance of the relation `rᶜ ⊓ (≠)`. -/
theorem Lex.acc (x : α →₀ N) (h : ∀ a ∈ x.support, Acc (rᶜ ⊓ (· ≠ ·)) a) :
    Acc (Finsupp.Lex r s) x := by
  rw [lex_eq_invImage_dfinsupp_lex]
  classical
    

Proof state:
α : Type u_1
N : Type u_2
inst✝ : Zero N
r : α → α → Prop
s : N → N → Prop
hbot : ∀ ⦃n : N⦄, ¬s n 0
hs : WellFounded s
x : α →₀ N
h : ∀ a ∈ x.support, Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a
⊢ Acc (InvImage (DFinsupp.Lex r fun x => s) toDFinsupp) x

Next tactic:
refine' InvImage.accessible toDFinsupp (DFinsupp.Lex.acc (fun _ => hbot) (fun _ => hs) _ _)
/-- Transferred from `DFinsupp.Lex.acc`. See the top of that file for an explanation for the
  appearance of the relation `rᶜ ⊓ (≠)`. -/
theorem Lex.acc (x : α →₀ N) (h : ∀ a ∈ x.support, Acc (rᶜ ⊓ (· ≠ ·)) a) :
    Acc (Finsupp.Lex r s) x := by
  rw [lex_eq_invImage_dfinsupp_lex]
  classical
    refine' InvImage.accessible toDFinsupp (DFinsupp.Lex.acc (fun _ => hbot) (fun _ => hs) _ _)
    

Proof state:
α : Type u_1
N : Type u_2
inst✝ : Zero N
r : α → α → Prop
s : N → N → Prop
hbot : ∀ ⦃n : N⦄, ¬s n 0
hs : WellFounded s
x : α →₀ N
h : ∀ a ∈ x.support, Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a
⊢ ∀ i ∈ DFinsupp.support (toDFinsupp x), Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) i

Next tactic:
simpa only [toDFinsupp_support] using h
@[simp]
lemma ab_zero_apply (x : S.X₁) : S.g (S.f x) = 0 := by
  

Proof state:
S : ShortComplex Ab
x : ↑S.X₁
⊢ S.g (S.f x) = 0

Next tactic:
erw [← comp_apply, S.zero]
@[simp]
lemma ab_zero_apply (x : S.X₁) : S.g (S.f x) = 0 := by
  erw [← comp_apply, S.zero]
  

Proof state:
S : ShortComplex Ab
x : ↑S.X₁
⊢ 0 x = 0

Next tactic:
rfl
/-- The canonical additive morphism `S.X₁ →+ AddMonoidHom.ker S.g` induced by `S.f`. -/
@[simps!]
def abToCycles : S.X₁ →+ AddMonoidHom.ker S.g :=
    AddMonoidHom.mk' (fun x => ⟨S.f x, S.ab_zero_apply x⟩) (by 

Proof state:
S : ShortComplex Ab
⊢ ∀ (a b : ↑S.X₁),
    (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) (a + b) =
      (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) a +
        (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) b

Next tactic:
aesop
/-- The explicit left homology data of a short complex of abelian group that is
given by a kernel and a quotient given by the `AddMonoidHom` API. -/
@[simps]
def abLeftHomologyData : S.LeftHomologyData where
  K := AddCommGroupCat.of (AddMonoidHom.ker S.g)
  H := AddCommGroupCat.of ((AddMonoidHom.ker S.g) ⧸ AddMonoidHom.range S.abToCycles)
  i := (AddMonoidHom.ker S.g).subtype
  π := QuotientAddGroup.mk' _
  wi := by
    

Proof state:
S : ShortComplex Ab
⊢ AddSubgroup.subtype (AddMonoidHom.ker S.g) ≫ S.g = 0

Next tactic:
ext ⟨_, hx⟩
/-- The explicit left homology data of a short complex of abelian group that is
given by a kernel and a quotient given by the `AddMonoidHom` API. -/
@[simps]
def abLeftHomologyData : S.LeftHomologyData where
  K := AddCommGroupCat.of (AddMonoidHom.ker S.g)
  H := AddCommGroupCat.of ((AddMonoidHom.ker S.g) ⧸ AddMonoidHom.range S.abToCycles)
  i := (AddMonoidHom.ker S.g).subtype
  π := QuotientAddGroup.mk' _
  wi := by
    ext ⟨_, hx⟩
    

Proof state:
case w.mk
S : ShortComplex Ab
val✝ : ↑S.X₂
hx : val✝ ∈ AddMonoidHom.ker S.g
⊢ (AddSubgroup.subtype (AddMonoidHom.ker S.g) ≫ S.g) { val := val✝, property := hx } = 0 { val := val✝, property := hx }

Next tactic:
exact hx
/-- The explicit left homology data of a short complex of abelian group that is
given by a kernel and a quotient given by the `AddMonoidHom` API. -/
@[simps]
def abLeftHomologyData : S.LeftHomologyData where
  K := AddCommGroupCat.of (AddMonoidHom.ker S.g)
  H := AddCommGroupCat.of ((AddMonoidHom.ker S.g) ⧸ AddMonoidHom.range S.abToCycles)
  i := (AddMonoidHom.ker S.g).subtype
  π := QuotientAddGroup.mk' _
  wi := by
    ext ⟨_, hx⟩
    exact hx
  hi := AddCommGroupCat.kernelIsLimit _
  wπ := by
    

Proof state:
S : ShortComplex Ab
⊢ Limits.IsLimit.lift (AddCommGroupCat.kernelIsLimit S.g) (Limits.KernelFork.ofι S.f (_ : S.f ≫ S.g = 0)) ≫
      QuotientAddGroup.mk' (AddMonoidHom.range (abToCycles S)) =
    0

Next tactic:
ext (x : S.X₁)