l3lab/ntp-mathlib huggingface dataset:
/-- If the reflector preserves binary products, the subcategory is an exponential ideal.
This is the converse of `preservesBinaryProductsOfExponentialIdeal`.
-/
instance (priority := 10) exponentialIdeal_of_preservesBinaryProducts
    [PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)] : ExponentialIdeal i := by
  let ir := Adjunction.ofRightAdjoint i
  let L : C ⥤ D := leftAdjoint i
  let η : 𝟭 C ⟶ L ⋙ i := ir.unit
  let ε : i ⋙ L ⟶ 𝟭 D := ir.counit
  apply ExponentialIdeal.mk'
  intro B A
  let q : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B
  apply CartesianClosed.curry (ir.homEquiv _ _ _)
  apply _ ≫ (ir.homEquiv _ _).symm ((exp.ev A).app (i.obj B))
  refine' prodComparison L A _ ≫ Limits.prod.map (𝟙 _) (ε.app _) ≫ inv (prodComparison _ _ _)
  have : η.app (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B) := by
    dsimp
    rw [← curry_natural_left, curry_eq_iff, uncurry_id_eq_ev, ← ir.homEquiv_naturality_left,
      ir.homEquiv_apply_eq, assoc, assoc, prodComparison_natural_assoc, L.map_id,
      ← prod.map_id_comp_assoc, ir.left_triangle_components, prod.map_id_id, id_comp]
    apply IsIso.hom_inv_id_assoc
  

Proof state:
case h
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)
ir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i
L : C ⥤ D := leftAdjoint i
η : 𝟭 C ⟶ L ⋙ i := ir.unit
ε : i ⋙ L ⟶ 𝟭 D := ir.counit
B : D
A : C
q : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=
  CartesianClosed.curry
    ((Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)
      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫
          prod.map (𝟙 (L.obj A)) (ε.app (L.obj (A ⟹ i.obj B))) ≫ inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫
        (Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm ((exp.ev A).app (i.obj B))))
this : η.app (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B)
⊢ (A ⟹ i.obj B) ∈ Functor.essImage i

Next tactic:
haveI : IsSplitMono (η.app (A ⟹ i.obj B)) := IsSplitMono.mk' ⟨_, this⟩
/-- If the reflector preserves binary products, the subcategory is an exponential ideal.
This is the converse of `preservesBinaryProductsOfExponentialIdeal`.
-/
instance (priority := 10) exponentialIdeal_of_preservesBinaryProducts
    [PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)] : ExponentialIdeal i := by
  let ir := Adjunction.ofRightAdjoint i
  let L : C ⥤ D := leftAdjoint i
  let η : 𝟭 C ⟶ L ⋙ i := ir.unit
  let ε : i ⋙ L ⟶ 𝟭 D := ir.counit
  apply ExponentialIdeal.mk'
  intro B A
  let q : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B
  apply CartesianClosed.curry (ir.homEquiv _ _ _)
  apply _ ≫ (ir.homEquiv _ _).symm ((exp.ev A).app (i.obj B))
  refine' prodComparison L A _ ≫ Limits.prod.map (𝟙 _) (ε.app _) ≫ inv (prodComparison _ _ _)
  have : η.app (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B) := by
    dsimp
    rw [← curry_natural_left, curry_eq_iff, uncurry_id_eq_ev, ← ir.homEquiv_naturality_left,
      ir.homEquiv_apply_eq, assoc, assoc, prodComparison_natural_assoc, L.map_id,
      ← prod.map_id_comp_assoc, ir.left_triangle_components, prod.map_id_id, id_comp]
    apply IsIso.hom_inv_id_assoc
  haveI : IsSplitMono (η.app (A ⟹ i.obj B)) := IsSplitMono.mk' ⟨_, this⟩
  

Proof state:
case h
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)
ir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i
L : C ⥤ D := leftAdjoint i
η : 𝟭 C ⟶ L ⋙ i := ir.unit
ε : i ⋙ L ⟶ 𝟭 D := ir.counit
B : D
A : C
q : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=
  CartesianClosed.curry
    ((Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)
      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫
          prod.map (𝟙 (L.obj A)) (ε.app (L.obj (A ⟹ i.obj B))) ≫ inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫
        (Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm ((exp.ev A).app (i.obj B))))
this✝ : η.app (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B)
this : IsSplitMono (η.app (A ⟹ i.obj B))
⊢ (A ⟹ i.obj B) ∈ Functor.essImage i

Next tactic:
apply mem_essImage_of_unit_isSplitMono
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B : D
⊢ MonoidalCategory.tensorLeft B ⊣ i ⋙ exp (i.obj B) ⋙ leftAdjoint i

Next tactic:
apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
              · 

Proof state:
case comm1
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B : D
⊢ i ⋙ prod.functor.obj (i.obj B) ≅ MonoidalCategory.tensorLeft B ⋙ i

Next tactic:
symm
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
              · symm
                

Proof state:
case comm1
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B : D
⊢ MonoidalCategory.tensorLeft B ⋙ i ≅ i ⋙ prod.functor.obj (i.obj B)

Next tactic:
refine' NatIso.ofComponents (fun X => _) (fun f => _)
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
              · symm
                refine' NatIso.ofComponents (fun X => _) (fun f => _)
                · 

Proof state:
case comm1.refine'_1
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B X : D
⊢ (MonoidalCategory.tensorLeft B ⋙ i).obj X ≅ (i ⋙ prod.functor.obj (i.obj B)).obj X

Next tactic:
haveI :=
                    Adjunction.rightAdjointPreservesLimits.{0, 0} (Adjunction.ofRightAdjoint i)
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
              · symm
                refine' NatIso.ofComponents (fun X => _) (fun f => _)
                · haveI :=
                    Adjunction.rightAdjointPreservesLimits.{0, 0} (Adjunction.ofRightAdjoint i)
                  

Proof state:
case comm1.refine'_1
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B X : D
this : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i
⊢ (MonoidalCategory.tensorLeft B ⋙ i).obj X ≅ (i ⋙ prod.functor.obj (i.obj B)).obj X

Next tactic:
apply asIso (prodComparison i B X)
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
              · symm
                refine' NatIso.ofComponents (fun X => _) (fun f => _)
                · haveI :=
                    Adjunction.rightAdjointPreservesLimits.{0, 0} (Adjunction.ofRightAdjoint i)
                  apply asIso (prodComparison i B X)
                · 

Proof state:
case comm1.refine'_2
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B X✝ Y✝ : D
f : X✝ ⟶ Y✝
⊢ (MonoidalCategory.tensorLeft B ⋙ i).map f ≫ ((fun X => asIso (prodComparison i B X)) Y✝).hom =
    ((fun X => asIso (prodComparison i B X)) X✝).hom ≫ (i ⋙ prod.functor.obj (i.obj B)).map f

Next tactic:
dsimp [asIso]
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
              · symm
                refine' NatIso.ofComponents (fun X => _) (fun f => _)
                · haveI :=
                    Adjunction.rightAdjointPreservesLimits.{0, 0} (Adjunction.ofRightAdjoint i)
                  apply asIso (prodComparison i B X)
                · dsimp [asIso]
                  

Proof state:
case comm1.refine'_2
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B X✝ Y✝ : D
f : X✝ ⟶ Y✝
⊢ i.map (prod.map (𝟙 B) f) ≫ prodComparison i B Y✝ = prodComparison i B X✝ ≫ prod.map (𝟙 (i.obj B)) (i.map f)

Next tactic:
rw [prodComparison_natural, Functor.map_id]
/-- If `i` witnesses that `D` is a reflective subcategory and an exponential ideal, then `D` is
itself cartesian closed.
-/
def cartesianClosedOfReflective : CartesianClosed D :=
  { monoidalOfHasFiniteProducts D with -- Porting note: Added this instance
    closed := fun B =>
      { isAdj :=
          { right := i ⋙ exp (i.obj B) ⋙ leftAdjoint i
            adj := by
              apply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))
              · symm
                refine' NatIso.ofComponents (fun X => _) (fun f => _)
                · haveI :=
                    Adjunction.rightAdjointPreservesLimits.{0, 0} (Adjunction.ofRightAdjoint i)
                  apply asIso (prodComparison i B X)
                · dsimp [asIso]
                  rw [prodComparison_natural, Functor.map_id]
              · 

Proof state:
case comm2
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
src✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D
B : D
⊢ i ⋙ exp (i.obj B) ≅ (i ⋙ exp (i.obj B) ⋙ leftAdjoint i) ⋙ i

Next tactic:
apply (exponentialIdealReflective i _).symm
theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ := by
  -- Porting note: added
  

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
A B : C
⊢ (bijection i A B ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm
      (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) =
    prodComparison (leftAdjoint i) A B

Next tactic:
have : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits
theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ := by
  -- Porting note: added
  have : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits
  

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
A B : C
this : PreservesLimits i
⊢ (bijection i A B ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm
      (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) =
    prodComparison (leftAdjoint i) A B

Next tactic:
have := preservesSmallestLimitsOfPreservesLimits i
theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ := by
  -- Porting note: added
  have : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits
  have := preservesSmallestLimitsOfPreservesLimits i
  

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
A B : C
this✝ : PreservesLimits i
this : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i
⊢ (bijection i A B ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm
      (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) =
    prodComparison (leftAdjoint i) A B

Next tactic:
dsimp [bijection]
theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ := by
  -- Porting note: added
  have : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits
  have := preservesSmallestLimitsOfPreservesLimits i
  dsimp [bijection]
  -- Porting note: added
  

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
A B : C
this✝ : PreservesLimits i
this : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i
⊢ (Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm
      (prod.lift prod.snd prod.fst ≫
        (Adjunction.homEquiv (exp.adjunction B) A (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))).symm
            ((unitCompPartialBijective A
                  (_ : (B ⟹ i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈ Functor.essImage i)).symm
              ((Adjunction.homEquiv (exp.adjunction B) (i.obj ((leftAdjoint i).obj A))
                  (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)))
                (prod.lift prod.snd prod.fst ≫
                  (Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A))) B
                          (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))).symm
                      ((unitCompPartialBijective B
                            (_ :
                              (i.obj ((leftAdjoint i).obj A) ⟹ i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈
                                Functor.essImage i)).symm
                        ((Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A)))
                            (i.obj ((leftAdjoint i).obj B)) (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)))
                          ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv ≫
                            i.map (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ≫
                              𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫
                    𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫
          𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))) =
    prodComparison (leftAdjoint i) A B

Next tactic:
erw [homEquiv_symm_apply_eq, homEquiv_symm_apply_eq, homEquiv_apply_eq, homEquiv_apply_eq]
theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ := by
  -- Porting note: added
  have : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits
  have := preservesSmallestLimitsOfPreservesLimits i
  dsimp [bijection]
  -- Porting note: added
  erw [homEquiv_symm_apply_eq, homEquiv_symm_apply_eq, homEquiv_apply_eq, homEquiv_apply_eq]
  

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
A B : C
this✝ : PreservesLimits i
this : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i
⊢ (Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm
      (prod.lift prod.snd prod.fst ≫
        CartesianClosed.uncurry
            ((unitCompPartialBijective A
                  (_ : (B ⟹ i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈ Functor.essImage i)).symm
              (CartesianClosed.curry
                (prod.lift prod.snd prod.fst ≫
                  CartesianClosed.uncurry
                      ((unitCompPartialBijective B
                            (_ :
                              (i.obj ((leftAdjoint i).obj A) ⟹ i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈
                                Functor.essImage i)).symm
                        (CartesianClosed.curry
                          ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv ≫
                            i.map (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ≫
                              𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫
                    𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫
          𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))) =
    prodComparison (leftAdjoint i) A B

Next tactic:
rw [comp_id, comp_id, comp_id, i.map_id, comp_id, unitCompPartialBijective_symm_apply,
    unitCompPartialBijective_symm_apply, uncurry_natural_left, uncurry_curry,
    uncurry_natural_left, uncurry_curry, prod.lift_map_assoc, comp_id, prod.lift_map_assoc, comp_id]
theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ := by
  -- Porting note: added
  have : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits
  have := preservesSmallestLimitsOfPreservesLimits i
  dsimp [bijection]
  -- Porting note: added
  erw [homEquiv_symm_apply_eq, homEquiv_symm_apply_eq, homEquiv_apply_eq, homEquiv_apply_eq]
  rw [comp_id, comp_id, comp_id, i.map_id, comp_id, unitCompPartialBijective_symm_apply,
    unitCompPartialBijective_symm_apply, uncurry_natural_left, uncurry_curry,
    uncurry_natural_left, uncurry_curry, prod.lift_map_assoc, comp_id, prod.lift_map_assoc, comp_id]
  -- Porting note: added
  

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
A B : C
this✝ : PreservesLimits i
this : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i
⊢ (Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm
      (prod.lift prod.snd (prod.fst ≫ (Adjunction.ofRightAdjoint i).unit.app A) ≫
        prod.lift prod.snd (prod.fst ≫ (Adjunction.ofRightAdjoint i).unit.app B) ≫
          (PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv) =
    prodComparison (leftAdjoint i) A B

Next tactic:
dsimp only [Functor.comp_obj]
theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _ := by
  -- Porting note: added
  have : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits
  have := preservesSmallestLimitsOfPreservesLimits i
  dsimp [bijection]
  -- Porting note: added
  erw [homEquiv_symm_apply_eq, homEquiv_symm_apply_eq, homEquiv_apply_eq, homEquiv_apply_eq]
  rw [comp_id, comp_id, comp_id, i.map_id, comp_id, unitCompPartialBijective_symm_apply,
    unitCompPartialBijective_symm_apply, uncurry_natural_left, uncurry_curry,
    uncurry_natural_left, uncurry_curry, prod.lift_map_assoc, comp_id, prod.lift_map_assoc, comp_id]
  -- Porting note: added
  dsimp only [Functor.comp_obj]
  

Proof state:
C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₁, u₂} D
i : D ⥤ C
inst✝⁴ : HasFiniteProducts C
inst✝³ : Reflective i
inst✝² : CartesianClosed C
inst✝¹ : HasFiniteProducts D
inst✝ : ExponentialIdeal i
A B : C
this✝ : PreservesLimits i
this : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i
⊢ (Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm
      (prod.lift prod.snd (prod.fst ≫ (Adjunction.ofRightAdjoint i).unit.app A) ≫
        prod.lift prod.snd (prod.fst ≫ (Adjunction.ofRightAdjoint i).unit.app B) ≫
          (PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv) =
    prodComparison (leftAdjoint i) A B

Next tactic:
rw [prod.comp_lift_assoc, prod.lift_snd, prod.lift_fst_assoc, prod.lift_fst_comp_snd_comp,
    ← Adjunction.eq_homEquiv_apply, Adjunction.homEquiv_unit, Iso.comp_inv_eq, assoc]