{-# OPTIONS --without-K --safe #-}
open import Categories.Category using (Category; module Commutation)
open import Categories.Category.Monoidal
open import Categories.Category.Monoidal.Braided using (Braided)
module Categories.Category.Monoidal.Braided.Properties
{o ℓ e} {C : Category o ℓ e} {M : Monoidal C} (BM : Braided M) where
open import Data.Product using (_,_)
import Categories.Category.Construction.Core C as Core
open import Categories.Category.Monoidal.Properties M
open import Categories.Category.Monoidal.Reasoning M
import Categories.Category.Monoidal.Utilities M as MonoidalUtilities
open import Categories.Functor using (Functor)
open import Categories.Morphism.Reasoning C hiding (push-eq)
open import Categories.NaturalTransformation.NaturalIsomorphism using (niHelper)
open import Categories.NaturalTransformation.NaturalIsomorphism.Properties
using (push-eq)
open Category C
open Commutation C
open Braided BM
open MonoidalUtilities using (_⊗ᵢ_; unitorʳ-naturalIsomorphism)
open MonoidalUtilities.Shorthands
open Core.Shorthands
open Commutationᵢ
private
variable
X Y Z : Obj
module Shorthands where
σ⇒ : ∀ {X Y} → X ⊗₀ Y ⇒ Y ⊗₀ X
σ⇒ {X} {Y} = braiding.⇒.η (X , Y)
σ⇐ : ∀ {X Y} → Y ⊗₀ X ⇒ X ⊗₀ Y
σ⇐ {X} {Y} = braiding.⇐.η (X , Y)
σ = braiding.FX≅GX
open Shorthands
private
braiding-coherence⊗unit : [ (X ⊗₀ unit) ⊗₀ unit ⇒ X ⊗₀ unit ]⟨
σ⇒ ⊗₁ id ⇒⟨ (unit ⊗₀ X) ⊗₀ unit ⟩
λ⇒ ⊗₁ id
≈ ρ⇒ ⊗₁ id
⟩
braiding-coherence⊗unit = cancel-fromˡ braiding.FX≅GX (begin
σ⇒ ∘ λ⇒ ⊗₁ id ∘ σ⇒ ⊗₁ id ≈⟨ pullˡ (⟺ (glue◽◃ unitorˡ-commute-from coherence₁)) ⟩
(λ⇒ ∘ id ⊗₁ σ⇒ ∘ α⇒) ∘ σ⇒ ⊗₁ id ≈⟨ assoc²βε ⟩
λ⇒ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id ≈⟨ refl⟩∘⟨ hexagon₁ ⟩
λ⇒ ∘ α⇒ ∘ σ⇒ ∘ α⇒ ≈⟨ pullˡ coherence₁ ⟩
λ⇒ ⊗₁ id ∘ σ⇒ ∘ α⇒ ≈˘⟨ pushˡ (braiding.⇒.commute _) ⟩
(σ⇒ ∘ id ⊗₁ λ⇒) ∘ α⇒ ≈⟨ pullʳ triangle ⟩
σ⇒ ∘ ρ⇒ ⊗₁ id ∎)
braiding-coherence : [ X ⊗₀ unit ⇒ X ]⟨
σ⇒ ⇒⟨ unit ⊗₀ X ⟩
λ⇒
≈ ρ⇒
⟩
braiding-coherence = push-eq unitorʳ-naturalIsomorphism (begin
(λ⇒ ∘ σ⇒) ⊗₁ id ≈⟨ homomorphism ⟩
(λ⇒ ⊗₁ id) ∘ (σ⇒ ⊗₁ id) ≈⟨ braiding-coherence⊗unit ⟩
ρ⇒ ⊗₁ id ∎)
where open Functor (-⊗ unit)
hexagon₁-iso : idᵢ ⊗ᵢ σ ∘ᵢ associator ∘ᵢ σ {X , Y} ⊗ᵢ idᵢ {Z} ≈ᵢ
associator ∘ᵢ σ {X , Y ⊗₀ Z} ∘ᵢ associator
hexagon₁-iso = ⌞ hexagon₁ ⌟
hexagon₁-inv : (σ⇐ {X} {Y} ⊗₁ id {Z} ∘ α⇐) ∘ id ⊗₁ σ⇐ ≈
(α⇐ ∘ σ⇐ {X} {Y ⊗₀ Z}) ∘ α⇐
hexagon₁-inv = to-≈ hexagon₁-iso
hexagon₂-iso : (σ ⊗ᵢ idᵢ ∘ᵢ associator ⁻¹) ∘ᵢ idᵢ {X} ⊗ᵢ σ {Y , Z} ≈ᵢ
(associator ⁻¹ ∘ᵢ σ {X ⊗₀ Y , Z}) ∘ᵢ associator ⁻¹
hexagon₂-iso = ⌞ hexagon₂ ⌟
hexagon₂-inv : id {X} ⊗₁ σ⇐ {Y} {Z} ∘ α⇒ ∘ σ⇐ ⊗₁ id ≈
α⇒ ∘ σ⇐ {X ⊗₀ Y} {Z} ∘ α⇒
hexagon₂-inv = to-≈ hexagon₂-iso
braiding-coherence-iso : unitorˡ ∘ᵢ σ ≈ᵢ unitorʳ {X}
braiding-coherence-iso = ⌞ braiding-coherence ⌟
braiding-coherence-inv : σ⇐ ∘ λ⇐ ≈ ρ⇐ {X}
braiding-coherence-inv = to-≈ braiding-coherence-iso
inv-Braided : Braided M
inv-Braided = record
{ braiding = niHelper (record
{ η = λ _ → σ⇐
; η⁻¹ = λ _ → σ⇒
; commute = λ{ (f , g) → braiding.⇐.commute (g , f) }
; iso = λ{ (X , Y) → record
{ isoˡ = braiding.iso.isoʳ (Y , X)
; isoʳ = braiding.iso.isoˡ (Y , X) } }
})
; hexagon₁ = hexagon₂-inv
; hexagon₂ = hexagon₁-inv
}
inv-braiding-coherence : [ unit ⊗₀ X ⇒ X ]⟨
σ⇐ ⇒⟨ X ⊗₀ unit ⟩
ρ⇒
≈ λ⇒
⟩
inv-braiding-coherence = ⟺ (switch-fromtoʳ σ braiding-coherence)
assoc-reverse : [ X ⊗₀ (Y ⊗₀ Z) ⇒ (X ⊗₀ Y) ⊗₀ Z ]⟨
id ⊗₁ σ⇒ ⇒⟨ X ⊗₀ (Z ⊗₀ Y) ⟩
σ⇒ ⇒⟨ (Z ⊗₀ Y) ⊗₀ X ⟩
α⇒ ⇒⟨ Z ⊗₀ (Y ⊗₀ X) ⟩
id ⊗₁ σ⇐ ⇒⟨ Z ⊗₀ (X ⊗₀ Y) ⟩
σ⇐
≈ α⇐
⟩
assoc-reverse = begin
σ⇐ ∘ id ⊗₁ σ⇐ ∘ α⇒ ∘ σ⇒ ∘ id ⊗₁ σ⇒ ≈⟨ refl⟩∘⟨ assoc²εβ ⟩
σ⇐ ∘ (id ⊗₁ σ⇐ ∘ α⇒ ∘ σ⇒) ∘ id ⊗₁ σ⇒ ≈⟨ refl⟩∘⟨ pushˡ hex₁' ⟩
σ⇐ ∘ (α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐ ∘ id ⊗₁ σ⇒ ≈⟨ refl⟩∘⟨ pullʳ (sym-assoc ○ hexagon₂) ⟩
σ⇐ ∘ α⇒ ∘ (α⇐ ∘ σ⇒) ∘ α⇐ ≈⟨ refl⟩∘⟨ pullˡ (cancelˡ associator.isoʳ) ⟩
σ⇐ ∘ σ⇒ ∘ α⇐ ≈⟨ cancelˡ (braiding.iso.isoˡ _) ⟩
α⇐ ∎
where
hex₁' = conjugate-from associator (idᵢ ⊗ᵢ σ) (⟺ (hexagon₁ ○ sym-assoc))