Skip to content

Commit 43250d9

Browse files
jajapersonplt-amy
authored andcommitted
defn: Opposite monoidal category
1 parent 5ccb010 commit 43250d9

File tree

2 files changed

+93
-5
lines changed

2 files changed

+93
-5
lines changed

src/Cat/Functor/Bifunctor/Duality.lagda.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ open import Cat.Prelude
99

1010
```agda
1111
module Cat.Functor.Bifunctor.Duality
12-
{o₁ h₁ o₂ h₂ o₃ h₃ : _}
12+
{o₁ h₁ o₂ h₂ o₃ h₃}
1313
{C : Precategory o₁ h₁}
1414
{D : Precategory o₂ h₂}
1515
{E : Precategory o₃ h₃}
@@ -31,11 +31,11 @@ private
3131
# Duality {defines="opposite-bifunctor"}
3232

3333
When considering the `opposite functor`{.Agda ident="Functor.op"} of a bifunctor,
34-
$\cC \times \cD \to \cE$ we would prefer to get a bifunctor
34+
$\cC \times \cD \to \cE$ we would prefer to get a bifunctor
3535
$\cC\op \times \cD\op \to \cE\op$ (see also [[opposite product category]]).
3636

3737
```agda
38-
bop : Functor ((C ^op) ×ᶜ (D ^op)) (E ^op)
38+
bop : Functor (C ^op ×ᶜ D ^op) (E ^op)
3939
bop .Functor.F₀ = F.F₀
4040
bop .Functor.F₁ = F.F₁
4141
bop .Functor.F-id = F.F-id
@@ -45,9 +45,9 @@ bop .Functor.F-∘ (f , f') (g , g') = F.F-∘ (g , g') (f , f')
4545
This is compatible with fixing objects in the following sense:
4646

4747
```agda
48-
bop-Left : ∀ {d : D.Ob} → Functor.op (F.Left d) ≡ (Left bop) d
48+
bop-Left : ∀ {d : D.Ob} → Functor.op (F.Left d) ≡ Left bop d
4949
bop-Left = Functor-path (λ x → refl) (λ f → refl)
5050
51-
bop-Right : ∀ {c : C.Ob} → Functor.op (F.Right c) ≡ (Right bop) c
51+
bop-Right : ∀ {c : C.Ob} → Functor.op (F.Right c) ≡ Right bop c
5252
bop-Right = Functor-path (λ x → refl) (λ f → refl)
5353
```

src/Cat/Monoidal/Opposite.lagda.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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

Comments
 (0)