Documentation

Mathlib.CategoryTheory.Closed.Cartesian

Cartesian closed categories #

Given a category with chosen finite products, the cartesian monoidal structure is provided by the instance monoidalOfChosenFiniteProducts.

We define exponentiable objects to be closed objects with respect to this monoidal structure, i.e. (X × -) is a left adjoint.

We say a category is cartesian closed if every object is exponentiable (equivalently, that the category equipped with the cartesian monoidal structure is closed monoidal).

Show that exponential forms a difunctor and define the exponential comparison morphisms.

Implementation Details #

Cartesian closed categories require a ChosenFiniteProducts instance. If one whishes to state that a category that hasFiniteProducts is cartesian closed, they should first promote the hasFiniteProducts instance to a ChosenFiniteProducts one using CategoryTheory.ChosenFiniteProducts.ofFiniteProducts.

TODO #

Some of the results here are true more generally for closed objects and for closed monoidal categories, and these could be generalised.

@[reducible, inline]

An object X is exponentiable if (X × -) is a left adjoint. We define this as being Closed in the cartesian monoidal structure.

Equations
Instances For
    @[reducible, inline]

    Constructor for Exponentiable X which takes as an input an adjunction MonoidalCategory.tensorLeft X ⊣ exp for some functor exp : C ⥤ C.

    Equations
    Instances For

      If X and Y are exponentiable then X ⨯ Y is. This isn't an instance because it's not usually how we want to construct exponentials, we'll usually prove all objects are exponential uniformly.

      Equations
      Instances For

        The terminal object is always exponentiable. This isn't an instance because most of the time we'll prove cartesian closed for all objects at once, rather than just for this one.

        Equations
        Instances For
          @[reducible, inline]

          A category C is cartesian closed if it has finite products and every object is exponentiable. We define this as monoidal_closed with respect to the cartesian monoidal structure.

          Equations
          Instances For

            Constructor for CartesianClosed C.

            Equations
            Instances For
              @[reducible, inline]

              This is (-)^A.

              Equations
              Instances For
                @[reducible, inline]

                The adjunction between A ⨯ - and (-)^A.

                Equations
                Instances For
                  @[reducible, inline]

                  The evaluation natural transformation.

                  Equations
                  Instances For
                    @[reducible, inline]

                    The coevaluation natural transformation.

                    Equations
                    Instances For

                      Morphisms obtained using an exponentiable object.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Delaborator for Prefunctor.obj

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Morphisms from an exponentiable object.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem CategoryTheory.exp.coev_ev {C : Type u} [Category.{v, u} C] (A B : C) [ChosenFiniteProducts C] [Exponentiable A] :
                            CategoryStruct.comp ((coev A).app (AB)) ((exp A).map ((ev A).app B)) = CategoryStruct.id (AB)
                            theorem CategoryTheory.exp.coev_ev_assoc {C : Type u} [Category.{v, u} C] (A B : C) [ChosenFiniteProducts C] [Exponentiable A] {Z : C} (h : AB Z) :
                            CategoryStruct.comp ((coev A).app (AB)) (CategoryStruct.comp ((exp A).map ((ev A).app B)) h) = h

                            Currying in a cartesian closed category.

                            Equations
                            Instances For

                              Uncurrying in a cartesian closed category.

                              Equations
                              Instances For
                                @[simp]
                                theorem CategoryTheory.CartesianClosed.homEquiv_symm_apply_eq {C : Type u} [Category.{v, u} C] {A X Y : C} [ChosenFiniteProducts C] [Exponentiable A] (f : Y AX) :
                                ((exp.adjunction A).homEquiv Y X).symm f = uncurry f
                                @[simp]

                                The exponential with the terminal object is naturally isomorphic to the identity. The typeclass argument is explicit: any instance can be used.

                                Equations
                                Instances For
                                  def CategoryTheory.expUnitIsoSelf {C : Type u} [Category.{v, u} C] {X : C} [ChosenFiniteProducts C] [Exponentiable (𝟙_ C)] :
                                  𝟙_ CX X

                                  The exponential of any object with the terminal object is isomorphic to itself, i.e. X^1 ≅ X. The typeclass argument is explicit: any instance can be used.

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem CategoryTheory.pre_map {C : Type u} [Category.{v, u} C] [ChosenFiniteProducts C] {A₁ A₂ A₃ : C} [Exponentiable A₁] [Exponentiable A₂] [Exponentiable A₃] (f : A₁ A₂) (g : A₂ A₃) :

                                    The internal hom functor given by the cartesian closed structure.

                                    Equations
                                    Instances For

                                      If an initial object I exists in a CCC, then A ⨯ I ≅ I.

                                      Equations
                                      Instances For

                                        If an initial object 0 exists in a CCC, then 0 ⨯ A ≅ 0.

                                        Equations
                                        Instances For
                                          def CategoryTheory.powZero {C : Type u} [Category.{v, u} C] (B : C) [ChosenFiniteProducts C] {I : C} (t : Limits.IsInitial I) [CartesianClosed C] :
                                          IB ⊤_ C

                                          If an initial object 0 exists in a CCC then 0^B ≅ 1 for any B.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            In a CCC with binary coproducts, the distribution morphism is an isomorphism.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              theorem CategoryTheory.strict_initial {C : Type u} [Category.{v, u} C] {A : C} [ChosenFiniteProducts C] [Exponentiable A] {I : C} (t : Limits.IsInitial I) (f : A I) :

                                              If an initial object I exists in a CCC then it is a strict initial object, i.e. any morphism to I is an iso. This actually shows a slightly stronger version: any morphism to an initial object from an exponentiable object is an isomorphism.

                                              theorem CategoryTheory.initial_mono {C : Type u} [Category.{v, u} C] [ChosenFiniteProducts C] {I : C} (B : C) (t : Limits.IsInitial I) [CartesianClosed C] :
                                              Mono (t.to B)

                                              If an initial object 0 exists in a CCC then every morphism from it is monic.

                                              Transport the property of being cartesian closed across an equivalence of categories.

                                              Note we didn't require any coherence between the choice of finite products here, since we transport along the prodComparison isomorphism.

                                              Equations
                                              Instances For