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 : Binary-products C) (term : Terminal C)
where
: 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. Luckily, this calculation is rote enough that we can automate it away!
.unitor-l = to-natural-iso ni where
Cartesian-monoidal : make-natural-iso _ _
ni .eta x = ⟨ ! , id ⟩
ni .inv x = π₂
ni .eta∘inv x = cartesian! term prods
ni .inv∘eta x = π₂∘⟨⟩
ni .natural x y f = cartesian! term prods
ni .unitor-r = to-natural-iso ni where
Cartesian-monoidal : make-natural-iso _ _
ni .eta x = ⟨ id , ! ⟩
ni .inv x = π₁
ni .eta∘inv x = cartesian! term prods
ni .inv∘eta x = π₁∘⟨⟩
ni .natural x y f = cartesian! term prods
ni .associator = to-natural-iso ni where
Cartesian-monoidal : make-natural-iso _ _
ni .eta x = ⟨ π₁ ∘ π₁ , ⟨ π₂ ∘ π₁ , π₂ ⟩ ⟩
ni .inv x = ⟨ ⟨ π₁ , π₁ ∘ π₂ ⟩ , π₂ ∘ π₂ ⟩
ni .eta∘inv x = cartesian! term prods
ni .inv∘eta x = cartesian! term prods
ni .natural x y f = cartesian! term prods
ni .triangle = cartesian! term prods
Cartesian-monoidal .pentagon = cartesian! term prods Cartesian-monoidal
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-α→ = cartesian! term 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