diff options
Diffstat (limited to 'Category/Monoidal')
-rw-r--r-- | Category/Monoidal/Coherence.agda | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/Category/Monoidal/Coherence.agda b/Category/Monoidal/Coherence.agda new file mode 100644 index 0000000..7603860 --- /dev/null +++ b/Category/Monoidal/Coherence.agda @@ -0,0 +1,132 @@ +{-# OPTIONS --without-K --safe #-} + +open import Categories.Category.Core using (Category) +open import Categories.Category.Monoidal.Core using (Monoidal) + +module Category.Monoidal.Coherence {o β e} {π : Category o β e} (monoidal : Monoidal π) where + +import Categories.Morphism as Morphism +import Categories.Morphism.IsoEquiv as IsoEquiv +import Categories.Morphism.Reasoning as β-Reasoning +import Categories.Category.Monoidal.Reasoning as β-Reasoning + +open import Categories.Functor.Properties using ([_]-resp-β
) + +open Monoidal monoidal +open Category π + +open β-Reasoning π +open β-Reasoning monoidal +open Morphism π using (_β
_) +open IsoEquiv π using (to-unique) + +open Equiv + +π : Obj +π = unit + +module Ξ±β
= associator +module Ξ»β
= unitorΛ‘ +module Οβ
= unitorΚ³ + +private + variable + A B C D : Obj + +Ξ±β : (A ββ B) ββ C β A ββ B ββ C +Ξ±β = Ξ±β
.from + +Ξ±β : A ββ B ββ C β (A ββ B) ββ C +Ξ±β = Ξ±β
.to + +Ξ»β : π ββ A β A +Ξ»β = Ξ»β
.from + +Ξ»β : A β π ββ A +Ξ»β = Ξ»β
.to + +Οβ : A ββ π β A +Οβ = Οβ
.from + +Οβ : A β A ββ π +Οβ = Οβ
.to + +Ξ±βid : ((A ββ B) ββ C) ββ D β
(A ββ B ββ C) ββ D +Ξ±βid {A} {B} {C} {D} = [ -β D ]-resp-β
(associator {A} {B} {C}) + +module Ξ±βid {A} {B} {C} {D} = _β
_ (Ξ±βid {A} {B} {C} {D}) + +perimeter + :Β Ξ±β {π} {A} {B} β (Οβ {π} ββ id {A}) ββ id {B} + β id {π} ββ Ξ»β {A ββ B} β id {π} ββ Ξ±β {π} {A} {B} β Ξ±β {π} {π ββΒ A} {B} β Ξ±β {π} {π} {A} ββ id {B} +perimeter = begin + Ξ±β β (Οβ ββ id) ββ id ββ¨ assoc-commute-from β© + Οβ ββ id ββ id β Ξ±β ββ¨ reflβ©ββ¨ β.identity β©ββ¨refl β© + Οβ ββ id β Ξ±β ββ¨ pullΛ‘ triangle β¨ + id ββ Ξ»β β Ξ±β β Ξ±β ββ¨ reflβ©ββ¨ pentagon β¨ + id ββ Ξ»β β id ββ Ξ±β β Ξ±β β Ξ±β ββ id β + +perimeter-triangle + : Ξ±β {π} {A} {C} β (id {π} ββ Ξ»β {A}) ββ id {C} + β id {π} ββ Ξ»β {A ββ C} β id {π} ββ Ξ±β {π} {A} {C} β Ξ±β {π} {π ββΒ A} {C} +perimeter-triangle = begin + Ξ±β β (id ββ Ξ»β) ββ id ββ¨ reflβ©ββ¨ identityΚ³ β¨ + Ξ±β β (id ββ Ξ»β) ββ id β id ββ¨ reflβ©ββ¨ reflβ©ββ¨ Ξ±βid.isoΚ³ β¨ + Ξ±β β (id ββ Ξ»β) ββ id β Ξ±β ββ id β Ξ±β ββ id ββ¨ reflβ©ββ¨ pushΛ‘ splitβΛ‘ β¨ + Ξ±β β (id ββ Ξ»β β Ξ±β) ββ id β Ξ±β ββ id ββ¨ reflβ©ββ¨ triangle β©ββ¨refl β©ββ¨refl β© + Ξ±β β (Οβ ββ id) ββ id β Ξ±β ββ id ββ¨ extendΚ³ perimeter β© + id ββ Ξ»β β (id ββ Ξ±β β Ξ±β β Ξ±β ββ id) β Ξ±β ββ id ββ¨ reflβ©ββ¨ assoc β© + id ββ Ξ»β β id ββ Ξ±β β (Ξ±β β Ξ±β ββ id) β Ξ±β ββ id ββ¨ reflβ©ββ¨ reflβ©ββ¨ assoc β© + id ββ Ξ»β β id ββ Ξ±β β Ξ±β β Ξ±β ββ id β Ξ±β ββ id ββ¨ reflβ©ββ¨ reflβ©ββ¨ reflβ©ββ¨ Ξ±βid.isoΚ³ β© + id ββ Ξ»β β id ββ Ξ±β β Ξ±β β id ββ¨ reflβ©ββ¨ reflβ©ββ¨ identityΚ³ β© + id ββ Ξ»β β id ββ Ξ±β β Ξ±β β + +perimeter-triangle-square + :Β β {A C : Obj} + β id {π} ββ Ξ»β {A} ββ id {C} + β id {π} ββ Ξ»β {A ββ C} β id {π} ββ Ξ±β {π} {A} {C} +perimeter-triangle-square = begin + id ββ Ξ»β ββ id ββ¨ identityΚ³ β¨ + id ββ Ξ»β ββ id β id ββ¨ reflβ©ββ¨ associator.isoΚ³ β¨ + id ββ Ξ»β ββ id β Ξ±β β Ξ±β ββ¨ extendΚ³ assoc-commute-from β¨ + Ξ±β β (id ββ Ξ»β) ββ id β Ξ±β ββ¨ extendΚ³ perimeter-triangle β© + id ββ Ξ»β β (id ββ Ξ±β β Ξ±β) β Ξ±β ββ¨ reflβ©ββ¨ assoc β© + id ββ Ξ»β β id ββ Ξ±β β Ξ±β β Ξ±β ββ¨ reflβ©ββ¨ reflβ©ββ¨ associator.isoΚ³ β© + id ββ Ξ»β β id ββ Ξ±β β id ββ¨ reflβ©ββ¨ identityΚ³ β© + id ββ Ξ»β β id ββ Ξ±β β + +Ξ»βiβΞ»βα΅’βΞ±ββα΅’Β :Β Ξ»β {A} ββ id {C} β Ξ»β {A ββ C} β Ξ±β {π} {A} {C} +Ξ»βiβΞ»βα΅’βΞ±ββα΅’ = begin + Ξ»β ββ id ββ¨ insertΚ³ unitorΛ‘.isoΚ³ β© + (Ξ»β ββ id β Ξ»β) β Ξ»β ββ¨ unitorΛ‘-commute-from β©ββ¨refl β¨ + (Ξ»β β id ββ Ξ»β ββ id) β Ξ»β ββ¨ (reflβ©ββ¨ perimeter-triangle-square) β©ββ¨refl β© + (Ξ»β β id ββ Ξ»β β id ββ Ξ±β) β Ξ»β ββ¨ (reflβ©ββ¨ mergeβΛ‘) β©ββ¨refl β© + (Ξ»β β id ββ (Ξ»β β Ξ±β)) β Ξ»β ββ¨ unitorΛ‘-commute-from β©ββ¨refl β© + ((Ξ»β β Ξ±β) β Ξ»β) β Ξ»β ββ¨ cancelΚ³ unitorΛ‘.isoΚ³ β© + Ξ»β β Ξ±β β + +1Ξ»ββΞ»ββΒ : id {π} ββ Ξ»β {π} β Ξ»β {π ββ π} +1Ξ»ββΞ»ββ = begin + id ββ Ξ»β ββ¨ insertΛ‘ unitorΛ‘.isoΛ‘ β© + Ξ»β β Ξ»β β id ββ Ξ»β ββ¨ reflβ©ββ¨ unitorΛ‘-commute-from β© + Ξ»β β Ξ»β β Ξ»β ββ¨ cancelΛ‘ unitorΛ‘.isoΛ‘ β© + Ξ»β β + +Ξ»βπβΟβπ : Ξ»β {π} ββ id {π} β Οβ {π} ββ id {π} +Ξ»βπβΟβπ = begin + Ξ»β ββ id ββ¨ Ξ»βiβΞ»βα΅’βΞ±ββα΅’ β© + Ξ»β β Ξ±β ββ¨ 1Ξ»ββΞ»ββ β©ββ¨refl β¨ + id ββ Ξ»β β Ξ±β ββ¨ triangle β© + Οβ ββ id β + +Ξ»ββ
Οββ : Ξ»β {π} β Οβ {π} +Ξ»ββ
Οββ = begin + Ξ»β ββ¨ insertΚ³ unitorΚ³.isoΚ³ β© + (Ξ»β β Οβ) β Οβ ββ¨ unitorΚ³-commute-from β©ββ¨refl β¨ + (Οβ β Ξ»β ββ id) β Οβ ββ¨ (reflβ©ββ¨ Ξ»βπβΟβπ) β©ββ¨refl β© + (Οβ β Οβ ββ id) β Οβ ββ¨ unitorΚ³-commute-from β©ββ¨refl β© + (Οβ β Οβ) β Οβ ββ¨ cancelΚ³ unitorΚ³.isoΚ³ β© + Οβ β + +Ξ»ββ
Οββ : Ξ»β {π} β Οβ {π} +Ξ»ββ
Οββ = to-unique Ξ»β
.iso Οβ
.iso Ξ»ββ
Οββ |