Cartesian closed categories
Given a category with finite products, the cartesian monoidal structure is provided by the local
instance monoidal_of_has_finite_products
.
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.
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.
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
- category_theory.binary_product_exponentiable hX hY = {is_adj := category_theory.adjunction.left_adjoint_of_nat_iso (category_theory.monoidal_category.tensor_left_tensor X Y).symm (category_theory.adjunction.left_adjoint_of_comp (category_theory.monoidal_category.tensor_left Y) (category_theory.monoidal_category.tensor_left X))}
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 monoidal_closed
with respect to the cartesian monoidal structure.
This is (-)^A.
The adjunction between A ⨯ - and (-)^A.
The evaluation natural transformation.
Equations
The coevaluation natural transformation.
Equations
Currying in a cartesian closed category.
Uncurrying in a cartesian closed category.
Show that the exponential of the terminal object is isomorphic to itself, i.e. X^1 ≅ X
.
The typeclass argument is explicit: any instance can be used.
Equations
- category_theory.exp_terminal_iso_self = category_theory.yoneda.ext ((category_theory.exp (⊤_C)).obj X) X (λ (Y : C) (f : Y ⟶ (category_theory.exp (⊤_C)).obj X), (category_theory.limits.prod.left_unitor Y).inv ≫ category_theory.cartesian_closed.uncurry f) (λ (Y : C) (f : Y ⟶ X), category_theory.cartesian_closed.curry ((category_theory.limits.prod.left_unitor Y).hom ≫ f)) category_theory.exp_terminal_iso_self._proof_1 category_theory.exp_terminal_iso_self._proof_2 category_theory.exp_terminal_iso_self._proof_3
The internal element which points at the given morphism.
Pre-compose an internal hom with an external hom.
Equations
Precomposition is contrafunctorial.
The internal hom functor given by the cartesian closed structure.
Equations
- category_theory.internal_hom = {obj := λ (X : C), {obj := λ (Y : Cᵒᵖ), (category_theory.exp (opposite.unop Y)).obj X, map := λ (Y Y' : Cᵒᵖ) (f : Y ⟶ Y'), category_theory.pre X f.unop, map_id' := _, map_comp' := _}, map := λ (A B : C) (f : A ⟶ B), {app := λ (X : Cᵒᵖ), (category_theory.exp (opposite.unop X)).map f, naturality' := _}, map_id' := _, map_comp' := _}
If an initial object 0
exists in a CCC, then A ⨯ 0 ≅ 0
.
Equations
If an initial object 0
exists in a CCC, then 0 ⨯ A ≅ 0
.
If an initial object 0
exists in a CCC then 0^B ≅ 1
for any B
.
Equations
- category_theory.pow_zero B = {hom := inhabited.default ((category_theory.exp (⊥_C)).obj B ⟶ ⊤_C) unique.inhabited, inv := category_theory.cartesian_closed.curry (category_theory.mul_zero.hom ≫ inhabited.default (⊥_C ⟶ B)), hom_inv_id' := _, inv_hom_id' := _}
In a CCC with binary coproducts, the distribution morphism is an isomorphism.
Equations
- category_theory.prod_coprod_distrib X Y Z = {hom := category_theory.limits.coprod.desc (category_theory.limits.prod.map (𝟙 Z) category_theory.limits.coprod.inl) (category_theory.limits.prod.map (𝟙 Z) category_theory.limits.coprod.inr), inv := category_theory.cartesian_closed.uncurry (category_theory.limits.coprod.desc (category_theory.cartesian_closed.curry category_theory.limits.coprod.inl) (category_theory.cartesian_closed.curry category_theory.limits.coprod.inr)), hom_inv_id' := _, inv_hom_id' := _}
If an initial object 0
exists in a CCC then it is a strict initial object,
i.e. any morphism to 0
is an iso.
If an initial object 0
exists in a CCC then every morphism from it is monic.
Equations
- _ = _
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 prod_comparison
isomorphism.
Equations
- category_theory.cartesian_closed_of_equiv e = {closed := λ (X : D), {is_adj := category_theory.adjunction.left_adjoint_of_nat_iso (category_theory.iso_whisker_right e.counit_iso (category_theory.limits.prod_functor.obj X ⋙ e.inverse ⋙ e.functor) ≪≫ id (category_theory.iso_whisker_left (category_theory.limits.prod_functor.obj X) e.counit_iso)) (category_theory.adjunction.left_adjoint_of_comp (e.inverse ⋙ e.functor ⋙ category_theory.limits.prod_functor.obj X ⋙ e.inverse) e.functor)}}
The exponential comparison map.
F
is a cartesian closed functor if this is an iso for all A,B
.
Equations
The exponential comparison map is natural in its left argument.
The exponential comparison map is natural in its right argument.