module Cat.Monoidal.Strength where
Strong functorsð
module _ {o â} {C : Precategory o â} (Cáµ : Monoidal-category C) (F : Functor C C) where open Cat.Reasoning C open Monoidal-category Cáµ open Functor F private module F = Cat.Functor.Reasoning F
A left strength for a functor on a monoidal category is a natural transformation
interacting nicely with the left unitor and associator.
record Left-strength : Type (o â â) where field left-strength : -â- Fâ (Id Fà F) => F Fâ -â- module Ï = _=>_ left-strength Ï : â {A B} â Hom (A â Fâ B) (Fâ (A â B)) Ï = Ï.η _ field left-strength-λâ : â {A} â Fâ (λâ {A}) â Ï â¡ Î»â left-strength-αâ : â {A B C} â Fâ (αâ A B C) â Ï â¡ Ï â (id ââ Ï) â αâ A B (Fâ C)
Reversely1, a right strength is a natural transformation
interacting nicely with the right unitor and associator.
record Right-strength : Type (o â â) where field right-strength : -â- Fâ (F Fà Id) => F Fâ -â- module Ï = _=>_ right-strength Ï : â {A B} â Hom (Fâ A â B) (Fâ (A â B)) Ï = Ï.η _ field right-strength-Ïâ : â {A} â Fâ (Ïâ {A}) â Ï â¡ Ïâ right-strength-αâ : â {A B C} â Fâ (αâ A B C) â Ï â¡ Ï â (Ï ââ id) â αâ (Fâ A) B C
right-strength-αâ : â {A B C} â Ï â αâ (Fâ A) B C â¡ Fâ (αâ A B C) â Ï â (Ï ââ id) right-strength-αâ = sym $ swizzle (sym (right-strength-αâ â assoc _ _ _)) (αâ .invr) (F.F-map-iso αâ .invl)
A strength for is a pair of a left strength and a right strength inducing a single operation i.e. making the following diagram commute:
record Strength : Type (o â â) where field strength-left : Left-strength strength-right : Right-strength open Left-strength strength-left public open Right-strength strength-right public field strength-αâ : â {A B C} â Fâ (αâ A B C) â Ï â (Ï ââ id) â¡ Ï â (id ââ Ï) â αâ A (Fâ B) C
A functor equipped with a strength is called a strong functor.
private unquoteDecl left-eqv = declare-record-iso left-eqv (quote Left-strength) Left-strength-path : â {a b} â a .Left-strength.left-strength â¡ b .Left-strength.left-strength â a â¡ b Left-strength-path p = Iso.injective left-eqv (Σ-prop-path (λ _ â hlevel 1) p) private unquoteDecl right-eqv = declare-record-iso right-eqv (quote Right-strength) Right-strength-path : â {a b} â a .Right-strength.right-strength â¡ b .Right-strength.right-strength â a â¡ b Right-strength-path p = Iso.injective right-eqv (Σ-prop-path (λ _ â hlevel 1) p)
Symmetryð
In a symmetric monoidal category (or even just a braided monoidal category, if one is careful about directions), there is an equivalence between the notions of left and right strength: we can obtain one from the other by âconjugatingâ with the braiding, as illustrated by this diagram.
Therefore, the literature usually speaks of âstrengthâ in a symmetric
monoidal category to mean either a left or a right strength, but note
that this is not quite the same as a Strength
as defined above, which
has left and right strengths not necessarily related by the
braiding. If they are, we will say that the strength is
symmetric; such a strength contains exactly the information of
a left (or right) strength.
is-symmetric-strength : Strength â Type (o â â) is-symmetric-strength s = â {A B} â Ï {A} {B} â βâ â¡ Fâ βâ â Ï where open Strength s
The construction of the equivalence between left and right strengths
is extremely tedious, so we leave the details to the curious reader.
leftâright : Iso Left-strength Right-strength
leftâright .fst l = r where open Left-strength l open Right-strength r : Right-strength r .right-strength .η _ = Fâ βâ â Ï â βâ r .right-strength .is-natural _ _ (f , g) = (Fâ βâ â Ï â βâ) â (Fâ f ââ g) â¡âš pullr (pullr (βâ.is-natural _ _ _)) â©â¡ Fâ βâ â Ï â (g ââ Fâ f) â βâ â¡âš reflâ©ââš extendl (Ï.is-natural _ _ _) â©â¡ Fâ βâ â Fâ (g ââ f) â Ï â βâ â¡âš F.extendl (βâ.is-natural _ _ _) â©â¡ Fâ (f ââ g) â Fâ βâ â Ï â βâ â r .right-strength-Ïâ = Fâ Ïâ â Fâ βâ â Ï â βâ â¡âš F.pulll Ïâ-βâ â©â¡ Fâ λâ â Ï â βâ â¡âš pulll left-strength-λâ â©â¡ λâ â βâ â¡âš λâ-βâ â©â¡ Ïâ â r .right-strength-αâ = Fâ (αâ _ _ _) â Fâ βâ â Ï â βâ â¡âš reflâ©ââš reflâ©ââš pushl3 (sym (lswizzle (Ï.is-natural _ _ _) (F.annihilate (â.annihilate (βâ .invl))))) â©â¡ Fâ (αâ _ _ _) â Fâ βâ â Fâ (βâ ââ id) â Ï â (βâ ââ â Fâ id â) â βâ â¡âš ap! F-id â©â¡ Fâ (αâ _ _ _) â Fâ βâ â Fâ (βâ ââ id) â Ï â (βâ ââ id) â βâ â¡âš F.extendl3 (sym βâ-idâβâ-αâ) â©â¡ Fâ βâ â Fâ (id ââ βâ) â Fâ (αâ _ _ _) â Ï â (βâ ââ id) â βâ â¡âš reflâ©ââš reflâ©ââš pulll left-strength-αâ â©â¡ Fâ βâ â Fâ (id ââ βâ) â (Ï â (id ââ Ï) â αâ _ _ _) â (βâ ââ id) â βâ â¡âš reflâ©ââš reflâ©ââš pullr (pullr refl) â©â¡ Fâ βâ â Fâ (id ââ βâ) â Ï â (id ââ Ï) â αâ _ _ _ â (βâ ââ id) â βâ â¡âš reflâ©ââš pushr (pushr (reflâ©ââš sym βâ-βââid-αâ)) â©â¡ Fâ βâ â (Fâ (id ââ βâ) â Ï â (id ââ Ï)) â βâ â (βâ ââ id) â αâ _ _ _ â¡Ëâš reflâ©ââš pulll (â¶.shufflel (Ï.is-natural _ _ _)) â©â¡Ë Fâ βâ â Ï â (id ââ (Fâ βâ â Ï)) â βâ â (βâ ââ id) â αâ _ _ _ â¡âš pushr (pushr (extendl (sym (βâ.is-natural _ _ _)))) â©â¡ (Fâ βâ â Ï â βâ) â ((Fâ βâ â Ï) ââ id) â (βâ ââ id) â αâ _ _ _ â¡âš reflâ©ââš â.pulll (sym (assoc _ _ _)) â©â¡ (Fâ βâ â Ï â βâ) â ((Fâ βâ â Ï â βâ) ââ id) â αâ _ _ _ â leftâright .snd .inv r = l where open Right-strength r open Left-strength l : Left-strength l .left-strength .η _ = Fâ βâ â Ï â βâ l .left-strength .is-natural _ _ (f , g) = (Fâ βâ â Ï â βâ) â (f ââ Fâ g) â¡âš pullr (pullr (βâ.is-natural _ _ _)) â©â¡ Fâ βâ â Ï â (Fâ g ââ f) â βâ â¡âš reflâ©ââš extendl (Ï.is-natural _ _ _) â©â¡ Fâ βâ â Fâ (g ââ f) â Ï â βâ â¡âš F.extendl (βâ.is-natural _ _ _) â©â¡ Fâ (f ââ g) â Fâ βâ â Ï â βâ â l .left-strength-λâ = Fâ λâ â Fâ βâ â Ï â βâ â¡âš F.pulll λâ-βâ â©â¡ Fâ Ïâ â Ï â βâ â¡âš pulll right-strength-Ïâ â©â¡ Ïâ â βâ â¡âš Ïâ-βâ â©â¡ λâ â l .left-strength-αâ = Fâ (αâ _ _ _) â Fâ βâ â Ï â βâ â¡âš reflâ©ââš reflâ©ââš pushl3 (sym (lswizzle (Ï.is-natural _ _ _) (F.annihilate (â¶.annihilate (βâ .invr))))) â©â¡ Fâ (αâ _ _ _) â Fâ βâ â Fâ (id ââ βâ) â Ï â (â Fâ id â ââ βâ) â βâ â¡âš ap! F-id â©â¡ Fâ (αâ _ _ _) â Fâ βâ â Fâ (id ââ βâ) â Ï â (id ââ βâ) â βâ â¡âš F.extendl3 ((reflâ©â⚠βâ.is-natural _ _ _) â sym βâ-βââid-αâ) â©â¡ Fâ βâ â Fâ (βâ ââ id) â Fâ (αâ _ _ _) â Ï â (id ââ βâ) â βâ â¡âš reflâ©ââš reflâ©ââš pulll right-strength-αâ â©â¡ Fâ βâ â Fâ (βâ ââ id) â (Ï â (Ï ââ id) â αâ _ _ _) â (id ââ βâ) â βâ â¡âš reflâ©ââš reflâ©ââš pullr (pullr refl) â©â¡ Fâ βâ â Fâ (βâ ââ id) â Ï â (Ï ââ id) â αâ _ _ _ â (id ââ βâ) â βâ â¡âš reflâ©ââš pushr (pushr (reflâ©ââš ((reflâ©ââš sym (βâ.is-natural _ _ _)) â sym βâ-idâβâ-αâ))) â©â¡ Fâ βâ â (Fâ (βâ ââ id) â Ï â (Ï ââ id)) â βâ â (id ââ βâ) â αâ _ _ _ â¡Ëâš reflâ©ââš pulll (â.shufflel (Ï.is-natural _ _ _)) â©â¡Ë Fâ βâ â Ï â ((Fâ βâ â Ï) ââ id) â βâ â (id ââ βâ) â αâ _ _ _ â¡âš pushr (pushr (extendl (sym (βâ.is-natural _ _ _)))) â©â¡ (Fâ βâ â Ï â βâ) â (id ââ (Fâ βâ â Ï)) â (id ââ βâ) â αâ _ _ _ â¡âš reflâ©ââš â¶.pulll (sym (assoc _ _ _)) â©â¡ (Fâ βâ â Ï â βâ) â (id ââ (Fâ βâ â Ï â βâ)) â αâ _ _ _ â leftâright .snd .rinv r = Right-strength-path $ ext λ (A , B) â Fâ βâ â (Fâ βâ â Ï â βâ) â βâ â¡âš extendl (F.cancell (βâ .invl)) â©â¡ Ï â βâ â βâ â¡âš elimr (βâ .invl) â©â¡ Ï â where open Right-strength r leftâright .snd .linv l = Left-strength-path $ ext λ (A , B) â Fâ βâ â (Fâ βâ â Ï â βâ) â βâ â¡âš extendl (F.cancell (βâ .invr)) â©â¡ Ï â βâ â βâ â¡âš elimr (βâ .invr) â©â¡ Ï â where open Left-strength l
Dualityð
As hinted to above, a right strength for on can equivalently be defined as a left strength on the reverse monoidal category It is entirely trivial to show that the two definitions are equivalent:
module _ {o â} {C : Precategory o â} (M : Monoidal-category C) (F : Functor C C) where open is-iso
strength^rev : Left-strength (M ^rev) F â Right-strength M F strength^rev = IsoâEquiv is where is : Iso _ _ is .fst l = record { right-strength = NT (λ _ â Ï) λ _ _ _ â Ï.is-natural _ _ _ ; right-strength-Ïâ = left-strength-λâ ; right-strength-αâ = left-strength-αâ } where open Left-strength l is .snd .inv r = record { left-strength = NT (λ _ â Ï) λ _ _ _ â Ï.is-natural _ _ _ ; left-strength-λâ = right-strength-Ïâ ; left-strength-αâ = right-strength-αâ } where open Right-strength r is .snd .rinv _ = Right-strength-path _ _ trivial! is .snd .linv _ = Left-strength-path _ _ trivial!
Sets-endofunctors are strongð
Every endofunctor on seen as a cartesian monoidal category, can be equipped with a canonical symmetric strength: the tensor product is the actual product of sets, so, given we can simply apply the functorial action of on the function yielding a function
Sets-strength : Left-strength Setsâ F Sets-strength .left-strength .η (A , B) (a , Fb) = Fâ (a ,_) Fb Sets-strength .left-strength .is-natural (A , B) (C , D) (ac , bd) = ext λ a Fb â (sym (F-â _ _) â F-â _ _) $â Fb Sets-strength .left-strength-λâ = ext λ _ Fa â (sym (F-â _ _) â F-id) $â Fa Sets-strength .left-strength-αâ = ext λ a b Fc â (sym (F-â _ _) â F-â _ _) $â Fc
This is an instance of a more general fact: in a closed monoidal category (that is, one with an adjunction for example coming from a cartesian closed category), left strengths for endofunctors are equivalent to enrichments of F: that is, natural transformations
internalising the functorial action Then, what we have shown boils down to the fact that every endofunctor on is trivially
That is, on the other side of the reverse monoidal category duality.â©ïž