module Cat.Monoidal.Instances.Cartesian where
Cartesian monoidal categoriesπ
Unlike with categories and bicategories, there is no handy example of monoidal category that is as canonical as how the collection of all is an However, we do have a certain canonical pool of examples to draw from: all the Cartesian monoidal categories, also known as finite-products categories.
module _
{o β} {C : Precategory o β}
(prods : β A B β Product C A B) (term : Terminal C)
where
open Monoidal-category hiding (_ββ_)
open Braided-monoidal
open Symmetric-monoidal
open Diagonals hiding (Ξ΄)
open make-natural-iso
open Cr C
open Binary-products C prods
open Terminal term
: Monoidal-category C
Cartesian-monoidal .-β- = Γ-functor
Cartesian-monoidal .Unit = top Cartesian-monoidal
Thereβs nothing much to say about this result: Itβs pretty much just banging out the calculation. Our tensor product functor is the Cartesian product functor, and the tensor unit is the terminal object (the empty product). Associators and units are the evident maps, which are coherent by the properties of limits. Translating this intuitive explanation to a formal proof requires a lot of calculation, however:
.unitor-l = to-natural-iso ni where
Cartesian-monoidal : make-natural-iso _ _
ni .eta x = β¨ ! , id β©
ni .inv x = Οβ
ni .etaβinv x = Product.uniqueβ (prods _ _)
ni (pulll Οβββ¨β© β sym (!-unique _)) (cancell Οβββ¨β©) (!-uniqueβ _ _) (idr _)
.invβeta x = Οβββ¨β©
ni .natural x y f = Product.uniqueβ (prods _ _)
ni (pulll Οβββ¨β© β pullr Οβββ¨β© β idl _) (pulll Οβββ¨β© β cancelr Οβββ¨β©)
(!-uniqueβ _ _) (pulll Οβββ¨β© β idl f)
.unitor-r = to-natural-iso ni where
Cartesian-monoidal : make-natural-iso _ _
ni .eta x = β¨ id , ! β©
ni .inv x = Οβ
ni .etaβinv x = Product.uniqueβ (prods _ _)
ni (pulll Οβββ¨β© β idl _) (pulll Οβββ¨β© β sym (!-unique _))
(idr _) (sym (!-unique _))
.invβeta x = Οβββ¨β©
ni .natural x y f = Product.uniqueβ (prods _ _)
ni (pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· idr f)
(pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· idl !)
(pulll Οβββ¨β© β idl f)
(!-uniqueβ _ _)
.associator = to-natural-iso ni where
Cartesian-monoidal : make-natural-iso _ _
ni .eta x = β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β©
ni .inv x = β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β©
ni .etaβinv x =
ni
β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β© β β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β‘β¨ products! C prods β©
id β.invβeta x =
ni
β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β© β‘β¨ products! C prods β©
id β.natural x y f =
ni .fst β Οβ , β¨ f .snd .fst β Οβ , f .snd .snd β Οβ β© β Οβ β© β β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β© β‘β¨ products! C prods β©
β¨ f (β¨ f .fst β Οβ , f .snd .fst β Οβ β© β Οβ) , (f .snd .snd β Οβ) β© β
β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β© β β¨ .triangle = Product.unique (prods _ _)
Cartesian-monoidal (pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· Οβββ¨β© β introl refl)
(pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· idl _)
.pentagon =
Cartesian-monoidal
β¨ β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β Οβ , id β Οβ β© β β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β β¨ id β Οβ , β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β Οβ β© β‘β¨ products! C prods β© β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β
Cartesian monoidal categories also inherit a lot of additional structure from the categorical product. In particular, they are symmetric monoidal categories.
: Symmetric-monoidal Cartesian-monoidal
Cartesian-symmetric = to-symmetric-monoidal mk where
Cartesian-symmetric open make-symmetric-monoidal
: make-symmetric-monoidal Cartesian-monoidal
mk .has-braiding = isoβisoβΏ
mk (Ξ» _ β invertibleβiso swap swap-is-iso) swap-natural
.symmetric = β¨β©β _ β apβ β¨_,_β© Οβββ¨β© Οβββ¨β© β β¨β©-Ξ·
mk .has-braiding-Ξ±β = products! C prods mk
We also have a system of diagonal morphisms:
: Diagonals Cartesian-monoidal
Cartesian-diagonal .diagonals ._=>_.Ξ· A = Ξ΄
Cartesian-diagonal .diagonals ._=>_.is-natural = Ξ΄-natural
Cartesian-diagonal .diagonal-Ξ»β = ap β¨_, id β© (sym (!-unique _)) Cartesian-diagonal
: β {β} β Monoidal-category (Sets β)
Setsβ = Cartesian-monoidal Sets-products Sets-terminal Setsβ