l3lab/ntp-mathlib huggingface dataset:
/-- The counit isomorphism of the equivalence `D ≌ i.EssImageSubcategory` given
by `equivEssImageOfReflective` when the functor `i` is reflective. -/
def equivEssImageOfReflective_counitIso_app [Reflective i] (X : Functor.EssImageSubcategory i) :
    ((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).obj X ≅ X := by
  refine' Iso.symm (@asIso _ _ X _ ((ofRightAdjoint i).unit.app X.obj) ?_)
  

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : Functor.EssImageSubcategory i
⊢ IsIso ((ofRightAdjoint i).unit.app X.obj)

Next tactic:
refine @isIso_of_reflects_iso _ _ _ _ _ _ _ i.essImageInclusion ?_ _
/-- The counit isomorphism of the equivalence `D ≌ i.EssImageSubcategory` given
by `equivEssImageOfReflective` when the functor `i` is reflective. -/
def equivEssImageOfReflective_counitIso_app [Reflective i] (X : Functor.EssImageSubcategory i) :
    ((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).obj X ≅ X := by
  refine' Iso.symm (@asIso _ _ X _ ((ofRightAdjoint i).unit.app X.obj) ?_)
  refine @isIso_of_reflects_iso _ _ _ _ _ _ _ i.essImageInclusion ?_ _
  

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : Functor.EssImageSubcategory i
⊢ IsIso ((Functor.essImageInclusion i).map ((ofRightAdjoint i).unit.app X.obj))

Next tactic:
dsimp
/-- The counit isomorphism of the equivalence `D ≌ i.EssImageSubcategory` given
by `equivEssImageOfReflective` when the functor `i` is reflective. -/
def equivEssImageOfReflective_counitIso_app [Reflective i] (X : Functor.EssImageSubcategory i) :
    ((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).obj X ≅ X := by
  refine' Iso.symm (@asIso _ _ X _ ((ofRightAdjoint i).unit.app X.obj) ?_)
  refine @isIso_of_reflects_iso _ _ _ _ _ _ _ i.essImageInclusion ?_ _
  dsimp
  

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : Functor.EssImageSubcategory i
⊢ IsIso ((ofRightAdjoint i).unit.app X.obj)

Next tactic:
exact inferInstance
lemma equivEssImageOfReflective_map_counitIso_app_hom [Reflective i]
    (X : Functor.EssImageSubcategory i) :
  (Functor.essImageInclusion i).map (equivEssImageOfReflective_counitIso_app X).hom =
    inv (NatTrans.app (ofRightAdjoint i).unit X.obj) := by
    

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : Functor.EssImageSubcategory i
⊢ (Functor.essImageInclusion i).map (equivEssImageOfReflective_counitIso_app X).hom =
    inv ((ofRightAdjoint i).unit.app X.obj)

Next tactic:
simp [equivEssImageOfReflective_counitIso_app, asIso]
lemma equivEssImageOfReflective_map_counitIso_app_hom [Reflective i]
    (X : Functor.EssImageSubcategory i) :
  (Functor.essImageInclusion i).map (equivEssImageOfReflective_counitIso_app X).hom =
    inv (NatTrans.app (ofRightAdjoint i).unit X.obj) := by
    simp [equivEssImageOfReflective_counitIso_app, asIso]
    

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : Functor.EssImageSubcategory i
⊢ inv ((ofRightAdjoint i).unit.app X.obj) = inv ((ofRightAdjoint i).unit.app X.obj)

Next tactic:
rfl
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
⊢ ∀ {X Y : D} (f : X ⟶ Y),
    (𝟭 D).map f ≫ ((fun X => (asIso ((ofRightAdjoint i).counit.app X)).symm) Y).hom =
      ((fun X => (asIso ((ofRightAdjoint i).counit.app X)).symm) X).hom ≫
        (Functor.toEssImage i ⋙ Functor.essImageInclusion i ⋙ leftAdjoint i).map f

Next tactic:
intro X Y f
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X Y : D
f : X ⟶ Y
⊢ (𝟭 D).map f ≫ ((fun X => (asIso ((ofRightAdjoint i).counit.app X)).symm) Y).hom =
    ((fun X => (asIso ((ofRightAdjoint i).counit.app X)).symm) X).hom ≫
      (Functor.toEssImage i ⋙ Functor.essImageInclusion i ⋙ leftAdjoint i).map f

Next tactic:
dsimp
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X Y : D
f : X ⟶ Y
⊢ f ≫ inv ((ofRightAdjoint i).counit.app Y) = inv ((ofRightAdjoint i).counit.app X) ≫ (leftAdjoint i).map (i.map f)

Next tactic:
rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X Y : D
f : X ⟶ Y
⊢ (ofRightAdjoint i).counit.app X ≫ f = (leftAdjoint i).map (i.map f) ≫ (ofRightAdjoint i).counit.app Y

Next tactic:
exact ((ofRightAdjoint i).counit.naturality f).symm
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
⊢ ∀ {X Y : Functor.EssImageSubcategory i} (f : X ⟶ Y),
    ((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).map f ≫
        (equivEssImageOfReflective_counitIso_app Y).hom =
      (equivEssImageOfReflective_counitIso_app X).hom ≫ (𝟭 (Functor.EssImageSubcategory i)).map f

Next tactic:
intro X Y f
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        intro X Y f
        

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X Y : Functor.EssImageSubcategory i
f : X ⟶ Y
⊢ ((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).map f ≫
      (equivEssImageOfReflective_counitIso_app Y).hom =
    (equivEssImageOfReflective_counitIso_app X).hom ≫ (𝟭 (Functor.EssImageSubcategory i)).map f

Next tactic:
apply (Functor.essImageInclusion i).map_injective
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        intro X Y f
        apply (Functor.essImageInclusion i).map_injective
        

Proof state:
case a
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X Y : Functor.EssImageSubcategory i
f : X ⟶ Y
⊢ (Functor.essImageInclusion i).map
      (((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).map f ≫
        (equivEssImageOfReflective_counitIso_app Y).hom) =
    (Functor.essImageInclusion i).map
      ((equivEssImageOfReflective_counitIso_app X).hom ≫ (𝟭 (Functor.EssImageSubcategory i)).map f)

Next tactic:
have h := ((ofRightAdjoint i).unit.naturality f).symm
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        intro X Y f
        apply (Functor.essImageInclusion i).map_injective
        have h := ((ofRightAdjoint i).unit.naturality f).symm
        

Proof state:
case a
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X Y : Functor.EssImageSubcategory i
f : X ⟶ Y
h : (ofRightAdjoint i).unit.app X.obj ≫ (leftAdjoint i ⋙ i).map f = (𝟭 C).map f ≫ (ofRightAdjoint i).unit.app Y.obj
⊢ (Functor.essImageInclusion i).map
      (((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).map f ≫
        (equivEssImageOfReflective_counitIso_app Y).hom) =
    (Functor.essImageInclusion i).map
      ((equivEssImageOfReflective_counitIso_app X).hom ≫ (𝟭 (Functor.EssImageSubcategory i)).map f)

Next tactic:
rw [Functor.id_map] at h
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        intro X Y f
        apply (Functor.essImageInclusion i).map_injective
        have h := ((ofRightAdjoint i).unit.naturality f).symm
        rw [Functor.id_map] at h
        

Proof state:
case a
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X Y : Functor.EssImageSubcategory i
f : X ⟶ Y
h : (ofRightAdjoint i).unit.app X.obj ≫ (leftAdjoint i ⋙ i).map f = f ≫ (ofRightAdjoint i).unit.app Y.obj
⊢ (Functor.essImageInclusion i).map
      (((Functor.essImageInclusion i ⋙ leftAdjoint i) ⋙ Functor.toEssImage i).map f ≫
        (equivEssImageOfReflective_counitIso_app Y).hom) =
    (Functor.essImageInclusion i).map
      ((equivEssImageOfReflective_counitIso_app X).hom ≫ (𝟭 (Functor.EssImageSubcategory i)).map f)

Next tactic:
erw [Functor.map_comp, Functor.map_comp,
          equivEssImageOfReflective_map_counitIso_app_hom,
          equivEssImageOfReflective_map_counitIso_app_hom,
          IsIso.comp_inv_eq, assoc, ← h, IsIso.inv_hom_id_assoc, Functor.comp_map]
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        intro X Y f
        apply (Functor.essImageInclusion i).map_injective
        have h := ((ofRightAdjoint i).unit.naturality f).symm
        rw [Functor.id_map] at h
        erw [Functor.map_comp, Functor.map_comp,
          equivEssImageOfReflective_map_counitIso_app_hom,
          equivEssImageOfReflective_map_counitIso_app_hom,
          IsIso.comp_inv_eq, assoc, ← h, IsIso.inv_hom_id_assoc, Functor.comp_map])
  functor_unitIso_comp := fun X => by
    -- porting note: this proof was automatically handled by the automation in mathlib
    

Proof state:
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : D
⊢ (Functor.toEssImage i).map ((NatIso.ofComponents fun X => (asIso ((ofRightAdjoint i).counit.app X)).symm).hom.app X) ≫
      (NatIso.ofComponents equivEssImageOfReflective_counitIso_app).hom.app ((Functor.toEssImage i).obj X) =
    𝟙 ((Functor.toEssImage i).obj X)

Next tactic:
apply (Functor.essImageInclusion i).map_injective
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        intro X Y f
        apply (Functor.essImageInclusion i).map_injective
        have h := ((ofRightAdjoint i).unit.naturality f).symm
        rw [Functor.id_map] at h
        erw [Functor.map_comp, Functor.map_comp,
          equivEssImageOfReflective_map_counitIso_app_hom,
          equivEssImageOfReflective_map_counitIso_app_hom,
          IsIso.comp_inv_eq, assoc, ← h, IsIso.inv_hom_id_assoc, Functor.comp_map])
  functor_unitIso_comp := fun X => by
    -- porting note: this proof was automatically handled by the automation in mathlib
    apply (Functor.essImageInclusion i).map_injective
    

Proof state:
case a
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : D
⊢ (Functor.essImageInclusion i).map
      ((Functor.toEssImage i).map
          ((NatIso.ofComponents fun X => (asIso ((ofRightAdjoint i).counit.app X)).symm).hom.app X) ≫
        (NatIso.ofComponents equivEssImageOfReflective_counitIso_app).hom.app ((Functor.toEssImage i).obj X)) =
    (Functor.essImageInclusion i).map (𝟙 ((Functor.toEssImage i).obj X))

Next tactic:
erw [Functor.map_comp, equivEssImageOfReflective_map_counitIso_app_hom]
/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory
    where
  functor := i.toEssImage
  inverse := i.essImageInclusion ⋙ (leftAdjoint i : _)
  unitIso :=
    NatIso.ofComponents (fun X => (asIso <| (ofRightAdjoint i).counit.app X).symm)
      (by
        intro X Y f
        dsimp
        rw [IsIso.comp_inv_eq, Category.assoc, IsIso.eq_inv_comp]
        exact ((ofRightAdjoint i).counit.naturality f).symm)
  counitIso :=
    NatIso.ofComponents equivEssImageOfReflective_counitIso_app
      (by
        intro X Y f
        apply (Functor.essImageInclusion i).map_injective
        have h := ((ofRightAdjoint i).unit.naturality f).symm
        rw [Functor.id_map] at h
        erw [Functor.map_comp, Functor.map_comp,
          equivEssImageOfReflective_map_counitIso_app_hom,
          equivEssImageOfReflective_map_counitIso_app_hom,
          IsIso.comp_inv_eq, assoc, ← h, IsIso.inv_hom_id_assoc, Functor.comp_map])
  functor_unitIso_comp := fun X => by
    -- porting note: this proof was automatically handled by the automation in mathlib
    apply (Functor.essImageInclusion i).map_injective
    erw [Functor.map_comp, equivEssImageOfReflective_map_counitIso_app_hom]
    

Proof state:
case a
C : Type u₁
D : Type u₂
E : Type u₃
inst✝³ : Category.{v₁, u₁} C
inst✝² : Category.{v₂, u₂} D
inst✝¹ : Category.{v₃, u₃} E
i : D ⥤ C
inst✝ : Reflective i
X : D
⊢ (Functor.essImageInclusion i).map
        ((Functor.toEssImage i).map
          ((NatIso.ofComponents fun X => (asIso ((ofRightAdjoint i).counit.app X)).symm).hom.app X)) ≫
      inv ((ofRightAdjoint i).unit.app ((𝟭 (Functor.EssImageSubcategory i)).obj ((Functor.toEssImage i).obj X)).obj) =
    (Functor.essImageInclusion i).map (𝟙 ((Functor.toEssImage i).obj X))

Next tactic:
aesop_cat
/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The unit for the adjunction `(tensorLeft F) ⊣ (ihom F)`. -/
@[simps]
def closedUnit (F : D ⥤ C) : 𝟭 (D ⥤ C) ⟶ tensorLeft F ⋙ closedIhom F where
  app G :=
  { app := fun X => (ihom.coev (F.obj X)).app (G.obj X)
    naturality := by
      

Proof state:
D : Type u_1
C : Type u_2
inst✝³ : Groupoid D
inst✝² : Category.{?u.4489, u_2} C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalClosed C
F G : D ⥤ C
⊢ ∀ ⦃X Y : D⦄ (f : X ⟶ Y),
    ((𝟭 (D ⥤ C)).obj G).map f ≫ (fun X => (ihom.coev (F.obj X)).app (G.obj X)) Y =
      (fun X => (ihom.coev (F.obj X)).app (G.obj X)) X ≫ ((tensorLeft F ⋙ closedIhom F).obj G).map f

Next tactic:
intro X Y f
/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The unit for the adjunction `(tensorLeft F) ⊣ (ihom F)`. -/
@[simps]
def closedUnit (F : D ⥤ C) : 𝟭 (D ⥤ C) ⟶ tensorLeft F ⋙ closedIhom F where
  app G :=
  { app := fun X => (ihom.coev (F.obj X)).app (G.obj X)
    naturality := by
      intro X Y f
      

Proof state:
D : Type u_1
C : Type u_2
inst✝³ : Groupoid D
inst✝² : Category.{?u.4489, u_2} C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalClosed C
F G : D ⥤ C
X Y : D
f : X ⟶ Y
⊢ ((𝟭 (D ⥤ C)).obj G).map f ≫ (fun X => (ihom.coev (F.obj X)).app (G.obj X)) Y =
    (fun X => (ihom.coev (F.obj X)).app (G.obj X)) X ≫ ((tensorLeft F ⋙ closedIhom F).obj G).map f

Next tactic:
dsimp
/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The unit for the adjunction `(tensorLeft F) ⊣ (ihom F)`. -/
@[simps]
def closedUnit (F : D ⥤ C) : 𝟭 (D ⥤ C) ⟶ tensorLeft F ⋙ closedIhom F where
  app G :=
  { app := fun X => (ihom.coev (F.obj X)).app (G.obj X)
    naturality := by
      intro X Y f
      dsimp
      

Proof state:
D : Type u_1
C : Type u_2
inst✝³ : Groupoid D
inst✝² : Category.{?u.4489, u_2} C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalClosed C
F G : D ⥤ C
X Y : D
f : X ⟶ Y
⊢ G.map f ≫ (ihom.coev (F.obj Y)).app (G.obj Y) =
    (ihom.coev (F.obj X)).app (G.obj X) ≫ ((closedIhom F).obj (F ⊗ G)).map f

Next tactic:
simp only [ihom.coev_naturality, closedIhom_obj_map, Monoidal.tensorObj_map]
/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The unit for the adjunction `(tensorLeft F) ⊣ (ihom F)`. -/
@[simps]
def closedUnit (F : D ⥤ C) : 𝟭 (D ⥤ C) ⟶ tensorLeft F ⋙ closedIhom F where
  app G :=
  { app := fun X => (ihom.coev (F.obj X)).app (G.obj X)
    naturality := by
      intro X Y f
      dsimp
      simp only [ihom.coev_naturality, closedIhom_obj_map, Monoidal.tensorObj_map]
      

Proof state:
D : Type u_1
C : Type u_2
inst✝³ : Groupoid D
inst✝² : Category.{?u.4489, u_2} C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalClosed C
F G : D ⥤ C
X Y : D
f : X ⟶ Y
⊢ (ihom.coev (F.obj Y)).app (G.obj X) ≫ (ihom (F.obj Y)).map (𝟙 (F.obj Y) ⊗ G.map f) =
    (ihom.coev (F.obj X)).app (G.obj X) ≫
      (pre (CategoryTheory.inv (F.map f))).app ((F ⊗ G).obj X) ≫ (ihom (F.obj Y)).map (F.map f ⊗ G.map f)

Next tactic:
dsimp
/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The unit for the adjunction `(tensorLeft F) ⊣ (ihom F)`. -/
@[simps]
def closedUnit (F : D ⥤ C) : 𝟭 (D ⥤ C) ⟶ tensorLeft F ⋙ closedIhom F where
  app G :=
  { app := fun X => (ihom.coev (F.obj X)).app (G.obj X)
    naturality := by
      intro X Y f
      dsimp
      simp only [ihom.coev_naturality, closedIhom_obj_map, Monoidal.tensorObj_map]
      dsimp
      

Proof state:
D : Type u_1
C : Type u_2
inst✝³ : Groupoid D
inst✝² : Category.{?u.4489, u_2} C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalClosed C
F G : D ⥤ C
X Y : D
f : X ⟶ Y
⊢ (ihom.coev (F.obj Y)).app (G.obj X) ≫ (ihom (F.obj Y)).map (𝟙 (F.obj Y) ⊗ G.map f) =
    (ihom.coev (F.obj X)).app (G.obj X) ≫
      (pre (CategoryTheory.inv (F.map f))).app (F.obj X ⊗ G.obj X) ≫ (ihom (F.obj Y)).map (F.map f ⊗ G.map f)

Next tactic:
rw [coev_app_comp_pre_app_assoc, ← Functor.map_comp]
/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The unit for the adjunction `(tensorLeft F) ⊣ (ihom F)`. -/
@[simps]
def closedUnit (F : D ⥤ C) : 𝟭 (D ⥤ C) ⟶ tensorLeft F ⋙ closedIhom F where
  app G :=
  { app := fun X => (ihom.coev (F.obj X)).app (G.obj X)
    naturality := by
      intro X Y f
      dsimp
      simp only [ihom.coev_naturality, closedIhom_obj_map, Monoidal.tensorObj_map]
      dsimp
      rw [coev_app_comp_pre_app_assoc, ← Functor.map_comp]
      

Proof state:
D : Type u_1
C : Type u_2
inst✝³ : Groupoid D
inst✝² : Category.{?u.4489, u_2} C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalClosed C
F G : D ⥤ C
X Y : D
f : X ⟶ Y
⊢ (ihom.coev (F.obj Y)).app (G.obj X) ≫ (ihom (F.obj Y)).map (𝟙 (F.obj Y) ⊗ G.map f) =
    (ihom.coev (F.obj Y)).app (G.obj X) ≫
      (ihom (F.obj Y)).map ((CategoryTheory.inv (F.map f) ⊗ 𝟙 (G.obj X)) ≫ (F.map f ⊗ G.map f))

Next tactic:
simp