File: Mathlib/CategoryTheory/Closed/Functor.lean

full_name: CategoryTheory.frobeniusMorphism
code: /-- The Frobenius morphism for an adjunction `L ⊣ F` at `A` is given by the morphism

    L(FA ⨯ B) ⟶ LFA ⨯ LB ⟶ A ⨯ LB

natural in `B`, where the first morphism is the product comparison and the latter uses the counit
of the adjunction.

We will show that if `C` and `D` are cartesian closed, then this morphism is an isomorphism for all
`A` iff `F` is a cartesian closed functor, i.e. it preserves exponentials.
-/
def frobeniusMorphism (h : L ⊣ F) (A : C) :
    prod.functor.obj (F.obj A) ⋙ L ⟶ L ⋙ prod.functor.obj A 
goal: (CategoryTheory.Limits.prod.functor.obj (F.obj A)).comp L ⟶ L.comp (CategoryTheory.Limits.prod.functor.obj A)

full_name: CategoryTheory.frobeniusMorphism_iso_of_preserves_binary_products
code: /-- If `F` is full and faithful and has a left adjoint `L` which preserves binary products, then the
Frobenius morphism is an isomorphism.
-/
instance frobeniusMorphism_iso_of_preserves_binary_products (h : L ⊣ F) (A : C)
    [PreservesLimitsOfShape (Discrete WalkingPair) L] [F.Full] [F.Faithful] :
    IsIso (frobeniusMorphism F h A) 
goal: CategoryTheory.IsIso (CategoryTheory.frobeniusMorphism F h A)

full_name: CategoryTheory.expComparison
code: /-- The exponential comparison map.
`F` is a cartesian closed functor if this is an iso for all `A`.
-/
def expComparison (A : C) : exp A ⋙ F ⟶ F ⋙ exp (F.obj A) 
goal: (CategoryTheory.exp A).comp F ⟶ F.comp (CategoryTheory.exp (F.obj A))

full_name: CategoryTheory.expComparison_ev
code: theorem expComparison_ev (A B : C) :
    Limits.prod.map (𝟙 (F.obj A)) ((expComparison F A).app B) ≫ (exp.ev (F.obj A)).app (F.obj B) =
      inv (prodComparison F _ _) ≫ F.map ((exp.ev _).app _) 
goal: CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.id (F.obj A))
      ((CategoryTheory.expComparison F A).app B))
    ((CategoryTheory.exp.ev (F.obj A)).app (F.obj B)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.inv (CategoryTheory.Limits.prodComparison F A (A ⟹ B)))
    (F.map ((CategoryTheory.exp.ev A).app B))

full_name: CategoryTheory.coev_expComparison
code: theorem coev_expComparison (A B : C) :
    F.map ((exp.coev A).app B) ≫ (expComparison F A).app (A ⨯ B) =
      (exp.coev _).app (F.obj B) ≫ (exp (F.obj A)).map (inv (prodComparison F A B)) 
goal: CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.exp.coev A).app B))
    ((CategoryTheory.expComparison F A).app (A ⨯ B)) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.exp.coev (F.obj A)).app (F.obj B))
    ((CategoryTheory.exp (F.obj A)).map (CategoryTheory.inv (CategoryTheory.Limits.prodComparison F A B)))

full_name: CategoryTheory.uncurry_expComparison
code: theorem uncurry_expComparison (A B : C) :
    CartesianClosed.uncurry ((expComparison F A).app B) =
      inv (prodComparison F _ _) ≫ F.map ((exp.ev _).app _) 
goal: CategoryTheory.CartesianClosed.uncurry ((CategoryTheory.expComparison F A).app B) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.inv (CategoryTheory.Limits.prodComparison F A (A ⟹ B)))
    (F.map ((CategoryTheory.exp.ev A).app B))

full_name: CategoryTheory.expComparison_whiskerLeft
code: /-- The exponential comparison map is natural in `A`. -/
theorem expComparison_whiskerLeft {A A' : C} (f : A' ⟶ A) :
    expComparison F A ≫ whiskerLeft _ (pre (F.map f)) =
      whiskerRight (pre f) _ ≫ expComparison F A' 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.expComparison F A)
    (CategoryTheory.whiskerLeft F (CategoryTheory.pre (F.map f))) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight (CategoryTheory.pre f) F)
    (CategoryTheory.expComparison F A')

full_name: CategoryTheory.CartesianClosedFunctor.comparison_iso
code: /-- The functor `F` is cartesian closed (ie preserves exponentials) if each natural transformation
`exp_comparison F A` is an isomorphism
-/
class CartesianClosedFunctor : Prop where
  comparison_iso : ∀ A, IsIso (expComparison F A)
goal: CategoryTheory.IsIso (CategoryTheory.expComparison F A)

full_name: CategoryTheory.CartesianClosedFunctor
code: /-- The functor `F` is cartesian closed (ie preserves exponentials) if each natural transformation
`exp_comparison F A` is an isomorphism
-/
class CartesianClosedFunctor : Prop where
  comparison_iso : ∀ A, IsIso (expComparison F A)
goal: Prop

full_name: CategoryTheory.frobeniusMorphism_mate
code: theorem frobeniusMorphism_mate (h : L ⊣ F) (A : C) :
    conjugateEquiv (h.comp (exp.adjunction A)) ((exp.adjunction (F.obj A)).comp h)
        (frobeniusMorphism F h A) =
      expComparison F A 
goal: (CategoryTheory.conjugateEquiv (h.comp (CategoryTheory.exp.adjunction A))
      ((CategoryTheory.exp.adjunction (F.obj A)).comp h))
    (CategoryTheory.frobeniusMorphism F h A) =
  CategoryTheory.expComparison F A

full_name: CategoryTheory.frobeniusMorphism_iso_of_expComparison_iso
code: /--
If the exponential comparison transformation (at `A`) is an isomorphism, then the Frobenius morphism
at `A` is an isomorphism.
-/
theorem frobeniusMorphism_iso_of_expComparison_iso (h : L ⊣ F) (A : C)
    [i : IsIso (expComparison F A)] : IsIso (frobeniusMorphism F h A) 
goal: CategoryTheory.IsIso (CategoryTheory.frobeniusMorphism F h A)

full_name: CategoryTheory.expComparison_iso_of_frobeniusMorphism_iso
code: /--
If the Frobenius morphism at `A` is an isomorphism, then the exponential comparison transformation
(at `A`) is an isomorphism.
-/
theorem expComparison_iso_of_frobeniusMorphism_iso (h : L ⊣ F) (A : C)
    [i : IsIso (frobeniusMorphism F h A)] : IsIso (expComparison F A) 
goal: CategoryTheory.IsIso (CategoryTheory.expComparison F A)

full_name: CategoryTheory.cartesianClosedFunctorOfLeftAdjointPreservesBinaryProducts
code: /-- If `F` is full and faithful, and has a left adjoint which preserves binary products, then it is
cartesian closed.

TODO: Show the converse, that if `F` is cartesian closed and its left adjoint preserves binary
products, then it is full and faithful.
-/
theorem cartesianClosedFunctorOfLeftAdjointPreservesBinaryProducts (h : L ⊣ F) [F.Full] [F.Faithful]
    [PreservesLimitsOfShape (Discrete WalkingPair) L] : CartesianClosedFunctor F 
goal: CategoryTheory.CartesianClosedFunctor F