module Cat.Monoidal.Instances.Cartesian whereCartesian 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  Cartesian-monoidal : Monoidal-category C
  Cartesian-monoidal .-β- = Γ-functor
  Cartesian-monoidal .Unit = topThereβ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:
  Cartesian-monoidal .unitor-l = to-natural-iso ni where
    ni : make-natural-iso _ _
    ni .eta x = β¨ ! , id β©
    ni .inv x = Οβ
    ni .etaβinv x = Product.uniqueβ (prods _ _)
      (pulll Οβββ¨β© β sym (!-unique _)) (cancell Οβββ¨β©) (!-uniqueβ _ _) (idr _)
    ni .invβeta x = Οβββ¨β©
    ni .natural x y f = Product.uniqueβ (prods _ _)
      (pulll Οβββ¨β© β pullr Οβββ¨β© β idl _) (pulll Οβββ¨β© β cancelr Οβββ¨β©)
      (!-uniqueβ _ _) (pulll Οβββ¨β© β idl f)
  Cartesian-monoidal .unitor-r = to-natural-iso ni where
    ni : make-natural-iso _ _
    ni .eta x = β¨ id , ! β©
    ni .inv x = Οβ
    ni .etaβinv x = Product.uniqueβ (prods _ _)
      (pulll Οβββ¨β© β idl _) (pulll Οβββ¨β© β sym (!-unique _))
      (idr _) (sym (!-unique _))
    ni .invβeta x = Οβββ¨β©
    ni .natural x y f = Product.uniqueβ (prods _ _)
      (pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· idr f)
      (pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· idl !)
      (pulll Οβββ¨β© β idl f)
      (!-uniqueβ _ _)
  Cartesian-monoidal .associator = to-natural-iso ni where
    ni : make-natural-iso _ _
    ni .eta x = β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β©
    ni .inv x = β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β©
    ni .etaβinv x =
      β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β© β β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β‘β¨ products! C prods β©
      id β
    ni .invβeta x =
      β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β© β‘β¨ products! C prods β©
      id β
    ni .natural x y f =
      β¨ f .fst β Οβ , β¨ f .snd .fst β Οβ , f .snd .snd β Οβ β© β Οβ β© β β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β©     β‘β¨ products! C prods β©
      β¨ Οβ β Οβ , β¨ Οβ β Οβ , Οβ β© β© β β¨ (β¨ f .fst β Οβ , f .snd .fst β Οβ β© β Οβ) , (f .snd .snd β Οβ) β© β
  Cartesian-monoidal .triangle = Product.unique (prods _ _) _
    (pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· Οβββ¨β© β introl refl)
    (pulll Οβββ¨β© Β·Β· pullr Οβββ¨β© Β·Β· idl _)
  Cartesian-monoidal .pentagon =
    β¨ β¨ β¨ Οβ , Οβ β Οβ β© , Οβ β Οβ β© β Οβ , 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.
  Cartesian-symmetric : Symmetric-monoidal Cartesian-monoidal
  Cartesian-symmetric = to-symmetric-monoidal mk where
    swap-natural
      : β {A B C D} ((f , g) : Hom A C Γ Hom B D)
      β (g ββ f) β swap β‘ swap β (f ββ g)
    swap-natural (f , g) =
      (g ββ f) β swap                       β‘β¨ β¨β©β _ β©
      β¨ (g β Οβ) β swap , (f β Οβ) β swap β© β‘β¨ apβ β¨_,_β© (pullr Οβββ¨β©) (pullr Οβββ¨β©) β©
      β¨ g β Οβ , f β Οβ β©                   β‘Λβ¨ apβ β¨_,_β© Οβββ¨β© Οβββ¨β© β©
      β¨ Οβ β (f ββ g) , Οβ β (f ββ g) β©     β‘Λβ¨ β¨β©β _ β©
      swap β (f ββ g)                       β
    open make-symmetric-monoidal
    mk : make-symmetric-monoidal Cartesian-monoidal
    mk .has-braiding = isoβisoβΏ
      (Ξ» _ β invertibleβiso swap swap-is-iso) swap-natural
    mk .symmetric = β¨β©β _ β apβ β¨_,_β© Οβββ¨β© Οβββ¨β© β β¨β©-Ξ·
    mk .has-braiding-Ξ±β = products! C prodsWe also have a system of diagonal morphisms:
  Cartesian-diagonal : Diagonals Cartesian-monoidal
  Cartesian-diagonal .diagonals ._=>_.Ξ· A = Ξ΄
  Cartesian-diagonal .diagonals ._=>_.is-natural A B f = products! C prods
  Cartesian-diagonal .diagonal-Ξ»β = ap β¨_, id β© (sym (!-unique _))