module Cat.Monoidal.Braided {o β} {C : Precategory o β} (Cα΅ : Monoidal-category C) where
Braided and symmetric monoidal categoriesπ
A braided monoidal category is a monoidal category equipped with a braiding: a natural isomorphism satisfying some coherence conditions explained below.
record Braided-monoidal : Type (o β β) where field braiding : -β- β βΏ Flip -β-
module Ξ²β = _=>_ (braiding .IsoβΏ.to) module Ξ²β = _=>_ (braiding .IsoβΏ.from) Ξ²β : β {A B} β Hom (A β B) (B β A) Ξ²β = braiding .IsoβΏ.to ._=>_.Ξ· _ Ξ²β : β {A B} β Hom (A β B) (B β A) Ξ²β = braiding .IsoβΏ.from ._=>_.Ξ· _ Ξ²β : β {A B} β A β B β B β A Ξ²β = isoβΏβiso braiding _
The name βbraidingβ is meant to suggest that flipping twice in the same direction is not necessarily trivial, which we may represent using braid diagrams like this one:
The above diagram represents the morphism if the braiding is symmetric in the sense that this morphism is an identity (that is, if we can βuntangleβ the braid above by pulling the strands through each other), then we have a symmetric monoidal category, and it does not matter which direction we braid in.
Our definition of a braided monoidal category is not complete yet: we also require coherences saying that the braiding interacts nicely with the associator, in the sense that the following hexagon commutes:
field braiding-Ξ±β : β {A B C} β (id ββ Ξ²β) β Ξ±β B A C β (Ξ²β ββ id) β‘ Ξ±β B C A β Ξ²β β Ξ±β A B C
If the braiding is symmetric, then weβre done. However, in general we also need a second hexagon expressing the same condition with the βbackwardsβ braiding (or, equivalently, with the braiding and the backwards associator), which might not be the same as the forward braiding.
field unbraiding-Ξ±β : β {A B C} β (id ββ Ξ²β) β Ξ±β B A C β (Ξ²β ββ id) β‘ Ξ±β B C A β Ξ²β β Ξ±β A B C
Ξ²β-Ξ±β : β {A B C} β (Ξ²β ββ id) β Ξ±β B A C β (id ββ Ξ²β) β‘ Ξ±β A B C β Ξ²β β Ξ±β B C A Ξ²β-Ξ±β = inverse-unique refl refl (β.F-map-iso Ξ²β βIso Ξ±β βIso βΆ.F-map-iso Ξ²β ) (Ξ±β βIso Ξ²β βIso Ξ±β ) (sym (assoc _ _ _) Β·Β· braiding-Ξ±β Β·Β· assoc _ _ _)
A symmetric monoidal category simply bundles up a braided monoidal category with the property that its braiding is symmetric.
is-symmetric-braiding : -β- β βΏ Flip -β- β Type (o β β) is-symmetric-braiding braiding = β {A B} β Ξ²β β Ξ²β {A} {B} β‘ id where Ξ²β : β {A B} β Hom (A β B) (B β A) Ξ²β = braiding .IsoβΏ.to ._=>_.Ξ· _ record Symmetric-monoidal : Type (o β β) where field Cα΅ : Braided-monoidal open Braided-monoidal Cα΅ hiding (Ξ²β ) public field has-is-symmetric : is-symmetric-braiding braiding Ξ²β : β {A B} β A β B β B β A Ξ²β = make-iso Ξ²β Ξ²β has-is-symmetric has-is-symmetric
In order to construct a symmetric monoidal category, as we discussed above, it is sufficient to give one of the hexagons: the other one follows by uniqueness of inverses.
record make-symmetric-monoidal : Type (o β β) where field has-braiding : -β- β βΏ Flip -β- symmetric : is-symmetric-braiding has-braiding
Ξ²β : β {A B} β Hom (A β B) (B β A) Ξ²β = has-braiding .IsoβΏ.to ._=>_.Ξ· _ Ξ²β : β {A B} β Hom (A β B) (B β A) Ξ²β = has-braiding .IsoβΏ.from ._=>_.Ξ· _ Ξ²ββ‘Ξ²β : Path (β {A B} β Hom (A β B) (B β A)) Ξ²β Ξ²β Ξ²ββ‘Ξ²β = ext Ξ» {_} {_} β inverse-unique refl refl (make-iso Ξ²β Ξ²β symmetric symmetric) (isoβΏβiso has-braiding _) refl open Braided-monoidal hiding (Ξ²β) open Symmetric-monoidal hiding (Ξ²β)
field has-braiding-Ξ±β : β {A B C} β (id ββ Ξ²β) β Ξ±β B A C β (Ξ²β ββ id) β‘ Ξ±β B C A β Ξ²β β Ξ±β A B C to-symmetric-monoidal : Symmetric-monoidal to-symmetric-monoidal .Cα΅ .braiding = has-braiding to-symmetric-monoidal .Cα΅ .braiding-Ξ±β = has-braiding-Ξ±β to-symmetric-monoidal .Cα΅ .unbraiding-Ξ±β {A} {B} {C} = subst (Ξ» Ξ² β (id ββ Ξ² {_} {_}) β Ξ±β B A C β (Ξ² {_} {_} ββ id) β‘ Ξ±β _ _ _ β Ξ² {_} {_} β Ξ±β _ _ _) Ξ²ββ‘Ξ²β has-braiding-Ξ±β to-symmetric-monoidal .has-is-symmetric = symmetric open make-symmetric-monoidal using (to-symmetric-monoidal) public
Propertiesπ
Just like with monoidal categories, the two hexagons relating the braiding with the associator automatically give us a whole lot of extra coherence, but it still takes a bit of work.
We start by proving the Yang-Baxter equation, which says, pictorially, that the following two ways of going from to are the same:
That is, morally, except we have to insert associators everywhere in order for this equation to make sense.
yang-baxter : β {A B C} β (id ββ Ξ²β) β Ξ±β C A B β (Ξ²β ββ id) β Ξ±β A C B β (id ββ Ξ²β) β Ξ±β A B C β‘ Ξ±β C B A β (Ξ²β ββ id) β Ξ±β B C A β (id ββ Ξ²β) β Ξ±β B A C β (Ξ²β ββ id) yang-baxter = (id ββ Ξ²β) β Ξ±β _ _ _ β (Ξ²β ββ id) β Ξ±β _ _ _ β (id ββ Ξ²β) β Ξ±β _ _ _ β‘β¨ pushr (pushr refl) β©β‘ ((id ββ Ξ²β) β Ξ±β _ _ _ β (Ξ²β ββ id)) β Ξ±β _ _ _ β (id ββ Ξ²β) β Ξ±β _ _ _ β‘β¨ extendl (rswizzle (braiding-Ξ±β β assoc _ _ _) (Ξ±β .invl)) β©β‘ Ξ±β _ _ _ β Ξ²β β (id ββ Ξ²β) β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ extendl (Ξ²β.is-natural _ _ _) β©β‘ Ξ±β _ _ _ β (Ξ²β ββ id) β Ξ²β β Ξ±β _ _ _ β‘Λβ¨ reflβ©ββ¨ reflβ©ββ¨ lswizzle braiding-Ξ±β (Ξ±β .invr) β©β‘Λ Ξ±β _ _ _ β (Ξ²β ββ id) β Ξ±β _ _ _ β (id ββ Ξ²β) β Ξ±β _ _ _ β (Ξ²β ββ id) β
We also derive more equations relating the braiding with the associator.
Ξ²β-Ξ²ββid-Ξ±β : β {A B C} β Ξ²β β (Ξ²β ββ id) β Ξ±β A B C β‘ Ξ±β C B A β (Ξ²β ββ id) β Ξ²β Ξ²β-Ξ²ββid-Ξ±β = Ξ²β β (Ξ²β ββ id) β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ sym (swizzle (sym (assoc _ _ _) β sym unbraiding-Ξ±β β assoc _ _ _) (Ξ±β .invl) (pullr (βΆ.cancell (Ξ²β .invl)) β Ξ±β .invr)) β©β‘ Ξ²β β (Ξ±β _ _ _ β (id ββ Ξ²β)) β Ξ±β _ _ _ β Ξ²β β‘β¨ pushr (pullr (pushr refl)) β©β‘ (Ξ²β β Ξ±β _ _ _) β ((id ββ Ξ²β) β Ξ±β _ _ _) β Ξ²β β‘β¨ extendl (sym (swizzle Ξ²β-Ξ±β (pullr (βΆ.cancell (Ξ²β .invr)) β Ξ±β .invr) (Ξ±β .invl))) β©β‘ Ξ±β _ _ _ β (Ξ²β ββ id) β Ξ²β β Ξ²β-idβΞ²β-Ξ±β : β {A B C} β Ξ²β β (id ββ Ξ²β) β Ξ±β A B C β‘ Ξ±β _ _ _ β Ξ²β β (Ξ²β ββ id) Ξ²β-idβΞ²β-Ξ±β = Ξ²β β (id ββ Ξ²β) β Ξ±β _ _ _ β‘β¨ pulll (Ξ²β.is-natural _ _ _) β©β‘ ((Ξ²β ββ id) β Ξ²β) β Ξ±β _ _ _ β‘β¨ swizzle (sym Ξ²β-Ξ²ββid-Ξ±β β assoc _ _ _) (pullr (cancell (Ξ²β .invr)) β β.annihilate (Ξ²β .invr)) (pullr (cancell (Ξ²β .invl)) β β.annihilate (Ξ²β .invl)) β©β‘ Ξ±β _ _ _ β Ξ²β β (Ξ²β ββ id) β
We can also show that the unitors are related to each other via the braiding, which requires a surprising amount of work.
These proofs are adapted from braiding-coherenceβunit
in the agda-categories library: see there for an explanation and
diagram.
Ξ»β-Ξ²β : β {A} β Ξ»β {A} β Ξ²β β‘ Οβ Ξ»β-Ξ²β = push-eqβΏ (unitor-r niβ»ΒΉ) $ (Ξ»β β Ξ²β) ββ id β‘β¨ insertl (Ξ²β .invr) β©β‘ Ξ²β β Ξ²β β ((Ξ»β β Ξ²β) ββ id) β‘β¨ reflβ©ββ¨ reflβ©ββ¨ β.F-β _ _ β (sym triangle-Ξ»β β©ββ¨refl) β©β‘ Ξ²β β Ξ²β β (Ξ»β β Ξ±β _ _ _) β (Ξ²β ββ id) β‘β¨ reflβ©ββ¨ extendl (pulll (sym (unitor-l .IsoβΏ.from .is-natural _ _ _))) β©β‘ Ξ²β β (Ξ»β β (id ββ Ξ²β)) β Ξ±β _ _ _ β (Ξ²β ββ id) β‘β¨ reflβ©ββ¨ pullr braiding-Ξ±β β©β‘ Ξ²β β Ξ»β β Ξ±β _ _ _ β Ξ²β β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ pulll triangle-Ξ»β β©β‘ Ξ²β β (Ξ»β ββ id) β Ξ²β β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ extendl (sym (Ξ²β.is-natural _ _ _)) β©β‘ Ξ²β β Ξ²β β (id ββ Ξ»β) β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ reflβ©ββ¨ triangle-Ξ±β β©β‘ Ξ²β β Ξ²β β (Οβ ββ id) β‘β¨ cancell (Ξ²β .invr) β©β‘ Οβ ββ id β Ξ»β-Ξ²β : β {A} β Ξ»β {A} β Ξ²β β‘ Οβ Ξ»β-Ξ²β = push-eqβΏ (unitor-r niβ»ΒΉ) $ (Ξ»β β Ξ²β) ββ id β‘β¨ insertl (Ξ²β .invl) β©β‘ Ξ²β β Ξ²β β ((Ξ»β β Ξ²β) ββ id) β‘β¨ reflβ©ββ¨ reflβ©ββ¨ β.F-β _ _ β (sym triangle-Ξ»β β©ββ¨refl) β©β‘ Ξ²β β Ξ²β β (Ξ»β β Ξ±β _ _ _) β (Ξ²β ββ id) β‘β¨ reflβ©ββ¨ extendl (pulll (sym (unitor-l .IsoβΏ.from .is-natural _ _ _))) β©β‘ Ξ²β β (Ξ»β β (id ββ Ξ²β)) β Ξ±β _ _ _ β (Ξ²β ββ id) β‘β¨ reflβ©ββ¨ pullr unbraiding-Ξ±β β©β‘ Ξ²β β Ξ»β β Ξ±β _ _ _ β Ξ²β β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ pulll triangle-Ξ»β β©β‘ Ξ²β β (Ξ»β ββ id) β Ξ²β β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ extendl (sym (Ξ²β.is-natural _ _ _)) β©β‘ Ξ²β β Ξ²β β (id ββ Ξ»β) β Ξ±β _ _ _ β‘β¨ reflβ©ββ¨ reflβ©ββ¨ triangle-Ξ±β β©β‘ Ξ²β β Ξ²β β (Οβ ββ id) β‘β¨ cancell (Ξ²β .invl) β©β‘ Οβ ββ id β Οβ-Ξ²β : β {A} β Οβ {A} β Ξ²β β‘ Ξ»β Οβ-Ξ²β = rswizzle (sym Ξ»β-Ξ²β) (Ξ²β .invl) Οβ-Ξ²β : β {A} β Οβ {A} β Ξ²β β‘ Ξ»β Οβ-Ξ²β = rswizzle (sym Ξ»β-Ξ²β) (Ξ²β .invr)