module Cat.Cartesian where
Cartesian categoriesπ
A Cartesian category is one that admits all binary products and a terminal object, hence all finite products.
record Cartesian-category {o β} (C : Precategory o β) : Type (o β β) where
field
: has-products C
products : Terminal C terminal
open Cat.Reasoning C public
open Binary-products C products public
open Terminal terminal public
module
_ {o β o' β'} {C : Precategory o β} {D : Precategory o' β'}
(F : Functor C D) (ccart : Cartesian-category C) (dcart : Cartesian-category D)
where
private
module F = Cat.Functor.Reasoning F
module C = Cartesian-category ccart
module D = Cartesian-category dcart
If is a functor between Cartesian categories, we can define a product comparison map which is an isomorphism precisely when preserves products, in the coherent sense that the image under of a product diagram in i.e.Β the span becomes a product diagram in We say that is a Cartesian functor if it preserves the terminal object, and its product comparison map is an isomorphism.
: β a b β D.Hom (F.β (a C.ββ b)) (F.β a D.ββ F.β b)
product-comparison = D.β¨ F.β C.Οβ , F.β C.Οβ β©
product-comparison a b
record Cartesian-functor : Type (o β o' β β β β') where
field
: β a b β D.is-invertible (product-comparison a b)
pres-products : is-terminal D (F.β C.top)
pres-terminal
image-is-product: β {a b} β is-product D {A = F.β a} {B = F.β b} (F.β C.Οβ) (F.β C.Οβ)
= is-product-iso-apex (pres-products _ _)
image-is-product .Οβββ¨β© D.Οβββ¨β© D.has-is-product D
module comparison {a} {b} = D.is-invertible (pres-products a b)
module preserved {a} {b} = is-product (image-is-product {a} {b})
We can establish some useful algebraic properties of the
inverse of the comparison map, namely that composing it with
the projections
and
recovers the product projections in
This is a corollary of image-is-product
.
: β {a} {b} β F.β C.Οβ D.β comparison.inv {a} {b} β‘ D.Οβ
Οβinv =
Οβinv .β C.Οβ D.β comparison.inv β‘β¨ apβ D._β_ refl (D.intror (sym (D.β¨β©-unique (D.idr _) (D.idr _)))) β©
F.β C.Οβ D.β comparison.inv D.β D.β¨ D.Οβ , D.Οβ β© β‘β¨ preserved.Οβββ¨β© β©
F.Οβ β
D
: β {a} {b} β F.β C.Οβ D.β comparison.inv {a} {b} β‘ D.Οβ
Οβinv =
Οβinv .β C.Οβ D.β comparison.inv β‘β¨ apβ D._β_ refl (D.intror (sym (D.β¨β©-unique (D.idr _) (D.idr _)))) β©
F.β C.Οβ D.β comparison.inv D.β D.β¨ D.Οβ , D.Οβ β© β‘β¨ preserved.Οβββ¨β© β©
F.Οβ β D
Finally, we can show that, if each product comparison map is an isomorphism, then this becomes a natural isomorphism between the two functors obtained by respectively taking a product in and applying and applying and taking a product in
: is-natural-transformation
comparison-nat (D.Γ-functor Fβ (F FΓ F)) (F Fβ C.Γ-functor)
Ξ» (a , b) β comparison.inv {a} {b}
(a , b) (a' , b') (f , g) = Product.uniqueβ
comparison-nat record { has-is-product = image-is-product }
.Οβββ¨β© preserved.Οβββ¨β©
preserved(F.extendl C.Οβββ¨β© β apβ D._β_ refl Οβinv)
(F.extendl C.Οβββ¨β© β apβ D._β_ refl Οβinv)