Monoidal categories #
A monoidal category is a category equipped with a tensor product, unitors, and an associator. In the definition, we provide the tensor product as a pair of functions
tensorObj : C ā C ā C
tensorHom : (Xā ā¶ Yā) ā (Xā ā¶ Yā) ā ((Xā ā Xā) ā¶ (Yā ā Yā))
and allow use of the overloaded notationā
for both. The unitors and associator are provided componentwise.
The tensor product can be expressed as a functor via tensor : C Ć C ā„¤ C
.
The unitors and associator are gathered together as natural
isomorphisms in leftUnitor_nat_iso
, rightUnitor_nat_iso
and associator_nat_iso
.
Some consequences of the definition are proved in other files after proving the coherence theorem,
e.g. (Ī»_ (š_ C)).hom = (Ļ_ (š_ C)).hom
in CategoryTheory.Monoidal.CoherenceLemmas
.
Implementation notes #
In the definition of monoidal categories, we also provide the whiskering operators:
whiskerLeft (X : C) {Yā Yā : C} (f : Yā ā¶ Yā) : X ā Yā ā¶ X ā Yā
, denoted byX ā f
,whiskerRight {Xā Xā : C} (f : Xā ā¶ Xā) (Y : C) : Xā ā Y ā¶ Xā ā Y
, denoted byf ā· Y
. These are products of an object and a morphism (the terminology "whiskering" is borrowed from 2-category theory). The tensor product of morphismstensorHom
can be defined in terms of the whiskerings. There are two possible such definitions, which are related by the exchange property of the whiskerings. These two definitions are accessed bytensorHom_def
andtensorHom_def'
. By default,tensorHom
is defined so thattensorHom_def
holds definitionally.
If you want to provide tensorHom
and define whiskerLeft
and whiskerRight
in terms of it,
you can use the alternative constructor CategoryTheory.MonoidalCategory.ofTensorHom
.
The whiskerings are useful when considering simp-normal forms of morphisms in monoidal categories.
Simp-normal form for morphisms #
Rewriting involving associators and unitors could be very complicated. We try to ease this
complexity by putting carefully chosen simp lemmas that rewrite any morphisms into the simp-normal
form defined below. Rewriting into simp-normal form is especially useful in preprocessing
performed by the coherence
tactic.
The simp-normal form of morphisms is defined to be an expression that has the minimal number of parentheses. More precisely,
- it is a composition of morphisms like
fā ā« fā ā« fā ā« fā ā« fā
such that eachfįµ¢
is either a structural morphisms (morphisms made up only of identities, associators, unitors) or non-structural morphisms, and - each non-structural morphism in the composition is of the form
Xā ā Xā ā Xā ā f ā· Xā ā· Xā
, where eachXįµ¢
is a object that is not the identity or a tensor andf
is a non-structural morphisms that is not the identity or a composite.
Note that Xā ā Xā ā Xā ā f ā· Xā ā· Xā
is actually Xā ā (Xā ā (Xā ā ((f ā· Xā) ā· Xā
)))
.
Currently, the simp lemmas don't rewrite š X ā f
and f ā š Y
into X ā f
and f ā· Y
,
respectively, since it requires a huge refactoring. We hope to add these simp lemmas soon.
References #
- Tensor categories, Etingof, Gelaki, Nikshych, Ostrik, http://www-math.mit.edu/~etingof/egnobookfinal.pdf
- https://stacks.math.columbia.edu/tag/0FFK.
Auxiliary structure to carry only the data fields of (and provide notation for)
MonoidalCategory
.
- tensorObj : C ā C ā C
curried tensor product of objects
- whiskerLeft : (X : C) ā {Yā Yā : C} ā (Yā ā¶ Yā) ā (CategoryTheory.MonoidalCategory.tensorObj X Yā ā¶ CategoryTheory.MonoidalCategory.tensorObj X Yā)
left whiskering for morphisms
- whiskerRight : {Xā Xā : C} ā (Xā ā¶ Xā) ā (Y : C) ā CategoryTheory.MonoidalCategory.tensorObj Xā Y ā¶ CategoryTheory.MonoidalCategory.tensorObj Xā Y
right whiskering for morphisms
- tensorHom : {Xā Yā Xā Yā : C} ā (Xā ā¶ Yā) ā (Xā ā¶ Yā) ā (CategoryTheory.MonoidalCategory.tensorObj Xā Xā ā¶ CategoryTheory.MonoidalCategory.tensorObj Yā Yā)
Tensor product of identity maps is the identity:
(š Xā ā š Xā) = š (Xā ā Xā)
- tensorUnit : C
The tensor unity in the monoidal structure
š_ C
- associator : (X Y Z : C) ā CategoryTheory.MonoidalCategory.tensorObj (CategoryTheory.MonoidalCategory.tensorObj X Y) Z ā CategoryTheory.MonoidalCategory.tensorObj X (CategoryTheory.MonoidalCategory.tensorObj Y Z)
The associator isomorphism
(X ā Y) ā Z ā X ā (Y ā Z)
- leftUnitor : (X : C) ā CategoryTheory.MonoidalCategory.tensorObj (š_ C) X ā X
The left unitor:
š_ C ā X ā X
- rightUnitor : (X : C) ā CategoryTheory.MonoidalCategory.tensorObj X (š_ C) ā X
The right unitor:
X ā š_ C ā X
Instances
Used to ensure that š_
notation is used, as the ascription makes this not automatic.
Equations
- One or more equations did not get rendered due to their size.
Instances For
In a monoidal category, we can take the tensor product of objects, X ā Y
and of morphisms f ā g
.
Tensor product does not need to be strictly associative on objects, but there is a
specified associator, Ī±_ X Y Z : (X ā Y) ā Z ā
X ā (Y ā Z)
. There is a tensor unit š_ C
,
with specified left and right unitor isomorphisms Ī»_ X : š_ C ā X ā
X
and Ļ_ X : X ā š_ C ā
X
.
These associators and unitors satisfy the pentagon and triangle equations.
See https://stacks.math.columbia.edu/tag/0FFK.
- tensorObj : C ā C ā C
- whiskerLeft : (X : C) ā {Yā Yā : C} ā (Yā ā¶ Yā) ā (CategoryTheory.MonoidalCategory.tensorObj X Yā ā¶ CategoryTheory.MonoidalCategory.tensorObj X Yā)
- whiskerRight : {Xā Xā : C} ā (Xā ā¶ Xā) ā (Y : C) ā CategoryTheory.MonoidalCategory.tensorObj Xā Y ā¶ CategoryTheory.MonoidalCategory.tensorObj Xā Y
- tensorHom : {Xā Yā Xā Yā : C} ā (Xā ā¶ Yā) ā (Xā ā¶ Yā) ā (CategoryTheory.MonoidalCategory.tensorObj Xā Xā ā¶ CategoryTheory.MonoidalCategory.tensorObj Yā Yā)
- tensorUnit : C
- associator : (X Y Z : C) ā CategoryTheory.MonoidalCategory.tensorObj (CategoryTheory.MonoidalCategory.tensorObj X Y) Z ā CategoryTheory.MonoidalCategory.tensorObj X (CategoryTheory.MonoidalCategory.tensorObj Y Z)
- leftUnitor : (X : C) ā CategoryTheory.MonoidalCategory.tensorObj (š_ C) X ā X
- rightUnitor : (X : C) ā CategoryTheory.MonoidalCategory.tensorObj X (š_ C) ā X
- tensorHom_def : ā {Xā Yā Xā Yā : C} (f : Xā ā¶ Yā) (g : Xā ā¶ Yā), CategoryTheory.MonoidalCategory.tensorHom f g = CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f Xā) (CategoryTheory.MonoidalCategory.whiskerLeft Yā g)
- tensor_id : ā (Xā Xā : C), CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id Xā) (CategoryTheory.CategoryStruct.id Xā) = CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj Xā Xā)
Tensor product of identity maps is the identity:
(š Xā ā š Xā) = š (Xā ā Xā)
- tensor_comp : ā {Xā Yā Zā Xā Yā Zā : C} (fā : Xā ā¶ Yā) (fā : Xā ā¶ Yā) (gā : Yā ā¶ Zā) (gā : Yā ā¶ Zā), CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.comp fā gā) (CategoryTheory.CategoryStruct.comp fā gā) = CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom fā fā) (CategoryTheory.MonoidalCategory.tensorHom gā gā)
Composition of tensor products is tensor product of compositions:
(fā ā gā) ā (fā ā gā) = (fā ā fā) ā (gā ā gā)
- whiskerLeft_id : ā (X Y : C), CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.CategoryStruct.id Y) = CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj X Y)
- id_whiskerRight : ā (X Y : C), CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.CategoryStruct.id X) Y = CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj X Y)
- associator_naturality : ā {Xā Xā Xā Yā Yā Yā : C} (fā : Xā ā¶ Yā) (fā : Xā ā¶ Yā) (fā : Xā ā¶ Yā), CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.MonoidalCategory.tensorHom fā fā) fā) (CategoryTheory.MonoidalCategory.associator Yā Yā Yā).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator Xā Xā Xā).hom (CategoryTheory.MonoidalCategory.tensorHom fā (CategoryTheory.MonoidalCategory.tensorHom fā fā))
Naturality of the associator isomorphism:
(fā ā fā) ā fā ā fā ā (fā ā fā)
- leftUnitor_naturality : ā {X Y : C} (f : X ā¶ Y), CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerLeft (š_ C) f) (CategoryTheory.MonoidalCategory.leftUnitor Y).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.leftUnitor X).hom f
Naturality of the left unitor, commutativity of
š_ C ā X ā¶ š_ C ā Y ā¶ Y
andš_ C ā X ā¶ X ā¶ Y
- rightUnitor_naturality : ā {X Y : C} (f : X ā¶ Y), CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f (š_ C)) (CategoryTheory.MonoidalCategory.rightUnitor Y).hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.rightUnitor X).hom f
Naturality of the right unitor: commutativity of
X ā š_ C ā¶ Y ā š_ C ā¶ Y
andX ā š_ C ā¶ X ā¶ Y
- pentagon : ā (W X Y Z : C), CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.associator W X Y).hom Z) (CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator W (CategoryTheory.MonoidalCategory.tensorObj X Y) Z).hom (CategoryTheory.MonoidalCategory.whiskerLeft W (CategoryTheory.MonoidalCategory.associator X Y Z).hom)) = CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator (CategoryTheory.MonoidalCategory.tensorObj W X) Y Z).hom (CategoryTheory.MonoidalCategory.associator W X (CategoryTheory.MonoidalCategory.tensorObj Y Z)).hom
The pentagon identity relating the isomorphism between
X ā (Y ā (Z ā W))
and((X ā Y) ā Z) ā W
- triangle : ā (X Y : C), CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X (š_ C) Y).hom (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.MonoidalCategory.leftUnitor Y).hom) = CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.rightUnitor X).hom Y
The identity relating the isomorphisms between
X ā (š_ C ā Y)
,(X ā š_ C) ā Y
andX ā Y
Instances
Tensor product of identity maps is the identity: (š Xā ā š Xā) = š (Xā ā Xā)
Composition of tensor products is tensor product of compositions:
(fā ā gā) ā (fā ā gā) = (fā ā fā) ā (gā ā gā)
Naturality of the associator isomorphism: (fā ā fā) ā fā ā fā ā (fā ā fā)
Naturality of the left unitor, commutativity of š_ C ā X ā¶ š_ C ā Y ā¶ Y
and š_ C ā X ā¶ X ā¶ Y
Naturality of the right unitor: commutativity of X ā š_ C ā¶ Y ā š_ C ā¶ Y
and X ā š_ C ā¶ X ā¶ Y
The pentagon identity relating the isomorphism between X ā (Y ā (Z ā W))
and ((X ā Y) ā Z) ā W
The identity relating the isomorphisms between X ā (š_ C ā Y)
, (X ā š_ C) ā Y
and X ā Y
The left whiskering of an isomorphism is an isomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- āÆ = āÆ
The right whiskering of an isomorphism is an isomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- āÆ = āÆ
The tensor product of two isomorphisms is an isomorphism.
Equations
- f ā g = { hom := CategoryTheory.MonoidalCategory.tensorHom f.hom g.hom, inv := CategoryTheory.MonoidalCategory.tensorHom f.inv g.inv, hom_inv_id := āÆ, inv_hom_id := āÆ }
Instances For
Equations
- āÆ = āÆ
The lemmas in the next section are true by coherence, but we prove them directly as they are used in proving the coherence theorem.
We state it as a simp lemma, which is regarded as an involved version of
id_whiskerRight X Y : š X ā· Y = š (X ā Y)
.
A constructor for monoidal categories that requires tensorHom
instead of whiskerLeft
and
whiskerRight
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The tensor product expressed as a functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The left-associated triple tensor product as a functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The right-associated triple tensor product as a functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The tensor product bifunctor C ā„¤ C ā„¤ C
of a monoidal category.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Tensoring on the left with a fixed object, as a functor.
Equations
Instances For
Tensoring on the right with a fixed object, as a functor.
Equations
Instances For
The functor fun X ā¦ š_ C ā X
.
Equations
Instances For
The functor fun X ā¦ X ā š_ C
.
Equations
Instances For
The associator as a natural isomorphism.
Equations
- CategoryTheory.MonoidalCategory.associatorNatIso C = CategoryTheory.NatIso.ofComponents (fun (x : C Ć C Ć C) => CategoryTheory.MonoidalCategory.associator x.1 x.2.1 x.2.2) āÆ
Instances For
The left unitor as a natural isomorphism.
Equations
- CategoryTheory.MonoidalCategory.leftUnitorNatIso C = CategoryTheory.NatIso.ofComponents CategoryTheory.MonoidalCategory.leftUnitor āÆ
Instances For
The right unitor as a natural isomorphism.
Equations
- CategoryTheory.MonoidalCategory.rightUnitorNatIso C = CategoryTheory.NatIso.ofComponents CategoryTheory.MonoidalCategory.rightUnitor āÆ
Instances For
The associator as a natural isomorphism between trifunctors C ā„¤ C ā„¤ C ā„¤ C
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Tensoring on the left with X ā Y
is naturally isomorphic to
tensoring on the left with Y
, and then again with X
.
Equations
Instances For
Tensoring on the left, as a functor from C
into endofunctors of C
.
TODO: show this is an op-monoidal functor.
Equations
Instances For
Equations
- āÆ = āÆ
Tensoring on the right, as a functor from C
into endofunctors of C
.
We later show this is a monoidal functor.
Equations
Instances For
Equations
- āÆ = āÆ
Tensoring on the right with X ā Y
is naturally isomorphic to
tensoring on the right with X
, and then again with Y
.
Equations
- CategoryTheory.MonoidalCategory.tensorRightTensor X Y = CategoryTheory.NatIso.ofComponents (fun (Z : C) => (CategoryTheory.MonoidalCategory.associator Z X Y).symm) āÆ
Instances For
Equations
- CategoryTheory.MonoidalCategory.prodMonoidal Cā Cā = CategoryTheory.MonoidalCategory.mk āÆ āÆ āÆ āÆ āÆ āÆ āÆ āÆ āÆ āÆ