|
| 1 | +<!-- |
| 2 | +```agda |
| 3 | +open import Cat.Functor.Bifunctor.Duality |
| 4 | +open import Cat.Functor.Naturality |
| 5 | +open import Cat.Monoidal.Base |
| 6 | +open import Cat.Prelude |
| 7 | +
|
| 8 | +import Cat.Reasoning |
| 9 | +
|
| 10 | +open Monoidal-category |
| 11 | +``` |
| 12 | +--> |
| 13 | + |
| 14 | +```agda |
| 15 | +module Cat.Monoidal.Opposite {o ℓ} |
| 16 | + {C : Precategory o ℓ} (Cᵐ : Monoidal-category C) |
| 17 | + where |
| 18 | +``` |
| 19 | + |
| 20 | +<!-- |
| 21 | +```agda |
| 22 | +private module C where |
| 23 | + open Monoidal-category Cᵐ public |
| 24 | + open Cat.Reasoning C public |
| 25 | +open _=>_ |
| 26 | +``` |
| 27 | +--> |
| 28 | + |
| 29 | +# Opposite monoidal categories {defines="opposte-monoidal-category"} |
| 30 | + |
| 31 | +If $\cC$ has the structure of a [[monoidal category]], then there is |
| 32 | +a natural monoidal structure on its [[opposite category]] $\cC\op$, |
| 33 | +with the same unit and the [[opposite bifunctor]] for the tensor |
| 34 | +product. |
| 35 | + |
| 36 | +```agda |
| 37 | +_^mop : Monoidal-category (C ^op) |
| 38 | +_^mop .-⊗- = bop C.-⊗- |
| 39 | +_^mop .Unit = C.Unit |
| 40 | +``` |
| 41 | + |
| 42 | +The coherence isomorphisms are straightforward to obtain from those of |
| 43 | +$\cC$: Since we only need morphisms in the opposite direction, we can |
| 44 | +can take the inverses of the coherence isomorphisms for $\cC$. |
| 45 | + |
| 46 | +```agda |
| 47 | +_^mop .unitor-l = to-natural-iso record where |
| 48 | + eta x = C.λ← |
| 49 | + inv x = C.λ→ |
| 50 | + eta∘inv x = C.invl C.λ≅ |
| 51 | + inv∘eta x = C.invr C.λ≅ |
| 52 | + natural x y f = Isoⁿ.from C.unitor-l .is-natural y x f |
| 53 | +
|
| 54 | +_^mop .unitor-r = to-natural-iso record where |
| 55 | + eta x = C.ρ← |
| 56 | + inv x = C.ρ→ |
| 57 | + eta∘inv x = C.invl C.ρ≅ |
| 58 | + inv∘eta x = C.invr C.ρ≅ |
| 59 | + natural x y f = Isoⁿ.from C.unitor-r .is-natural y x f |
| 60 | +
|
| 61 | +_^mop .associator = to-natural-iso record where |
| 62 | + iso : (x y z : C.Ob) → (x C.⊗ y) C.⊗ z C.≅ x C.⊗ (y C.⊗ z) |
| 63 | + iso x y z = (isoⁿ→iso C.associator) (x , y , z) |
| 64 | +
|
| 65 | + eta (x , y , z) = C.α← x y z |
| 66 | + inv (x , y , z) = C.α→ x y z |
| 67 | + eta∘inv (x , y , z) = C.invl C.α≅ |
| 68 | + inv∘eta (x , y , z) = C.invr C.α≅ |
| 69 | + natural (x , y , z) (x' , y' , z') f = Isoⁿ.from C.associator .is-natural _ _ f |
| 70 | +``` |
| 71 | + |
| 72 | +The triangle and pentagon identities are acquired from those of $\cC$ |
| 73 | +by inverting both sides. In the latter case we need to take care to |
| 74 | +reassociate composition. |
| 75 | + |
| 76 | +```agda |
| 77 | +_^mop .triangle = C.inverse-unique refl refl |
| 78 | + (C.α≅ C.Iso⁻¹ C.∙Iso C.◀.F-map-iso C.ρ≅ C.Iso⁻¹) |
| 79 | + (C.▶.F-map-iso C.λ≅ C.Iso⁻¹) |
| 80 | + C.triangle |
| 81 | + |
| 82 | +_^mop .pentagon = sym (C.assoc _ _ _) ∙ C.inverse-unique refl refl |
| 83 | + ( C.▶.F-map-iso (C.α≅ C.Iso⁻¹) |
| 84 | + C.∙Iso (C.α≅ C.Iso⁻¹) |
| 85 | + C.∙Iso C.◀.F-map-iso (C.α≅ C.Iso⁻¹)) |
| 86 | + (C.α≅ C.Iso⁻¹ C.∙Iso C.α≅ C.Iso⁻¹) |
| 87 | + (sym (C.assoc _ _ _) ∙ C.pentagon) |
| 88 | +``` |
0 commit comments