Cartesian closed categories #
We define exponentiable objects to be closed objects in a cartesian monoidal category,
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 CartesianMonoidalCategory instance. If one wishes to state
that a category that hasFiniteProducts is cartesian closed, they should first promote the
hasFiniteProducts instance to a CartesianMonoidalCategory one using
CategoryTheory.ofChosenFiniteProducts.
TODO #
Some of the results here are true more generally for closed objects and for closed monoidal categories, and these could be generalised.
An object X is exponentiable if (X × -) is a left adjoint.
We define this as being Closed in the cartesian monoidal structure.
Equations
Constructor for Exponentiable X which takes as an input an adjunction
MonoidalCategory.tensorLeft X ⊣ exp for some functor exp : C ⥤ C.
Equations
- CategoryTheory.Exponentiable.mk X exp adj = { rightAdj := exp, adj := adj }
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
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.
A category C is cartesian closed if it has finite products and every object is exponentiable.
We define this as MonoidalClosed with respect to the cartesian monoidal structure.
Equations
Constructor for CartesianClosed C.
Equations
- CategoryTheory.CartesianClosed.mk C exp = { closed := fun (X : C) => exp X }
This is (-)^A.
Equations
The adjunction between A ⨯ - and (-)^A.
Equations
The evaluation natural transformation.
Equations
The coevaluation natural transformation.
Equations
Morphisms obtained using an exponentiable object.
Equations
- One or more equations did not get rendered due to their size.
Delaborator for Prefunctor.obj
Equations
- One or more equations did not get rendered due to their size.
Morphisms from an exponentiable object.
Equations
- One or more equations did not get rendered due to their size.
Currying in a cartesian closed category.
Equations
Uncurrying in a cartesian closed category.
Equations
The exponential with the terminal object is naturally isomorphic to the identity. The typeclass argument is explicit: any instance can be used.
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
The internal element which points at the given morphism.
Equations
- One or more equations did not get rendered due to their size.
Pre-compose an internal hom with an external hom.
The internal hom functor given by the cartesian closed structure.
Equations
- CategoryTheory.internalHom = { obj := fun (X : Cᵒᵖ) => CategoryTheory.exp (Opposite.unop X), map := fun {X Y : Cᵒᵖ} (f : X ⟶ Y) => CategoryTheory.pre f.unop, map_id := ⋯, map_comp := ⋯ }
If an initial object I exists in a CCC, then A ⨯ I ≅ I.
Equations
- CategoryTheory.zeroMul t = { hom := CategoryTheory.CartesianMonoidalCategory.snd A I, inv := t.to (CategoryTheory.MonoidalCategoryStruct.tensorObj A I), hom_inv_id := ⋯, inv_hom_id := ⋯ }
If an initial object 0 exists in a CCC, then 0 ⨯ A ≅ 0.
Equations
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.
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.
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.
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.