Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.Trifunctor.Monoidal
Contents
Synopsis
- class (Associative cat t1, Associative cat t2, Associative cat t3, Associative cat to) => Semigroupal cat t1 t2 t3 to f where
- combine :: to (f x y z) (f x' y' z') `cat` f (t1 x x') (t2 y y') (t3 z z')
- class Unital cat i1 i2 i3 o f where
- introduce :: o `cat` f i1 i2 i3
- class (Tensor cat t1 i1, Tensor cat t2 i2, Tensor cat t3 i3, Tensor cat to io, Semigroupal cat t1 t2 t3 to f, Unital cat i1 i2 i3 io f) => Monoidal cat t1 i1 t2 i2 t3 i3 to io f
Semigroupal
class (Associative cat t1, Associative cat t2, Associative cat t3, Associative cat to) => Semigroupal cat t1 t2 t3 to f where Source #
Given monoidal categories (C,⊗,IC) and (D,∙,ID).
A bifunctor F:C1×C2×C3→D is Semigroupal
if it supports a
natural transformation ϕABC,XYZ:F A B C∙F X Y Z→F (A⊗X) (B⊗Y) (C⊗Z), which we call combine
.
Laws
Associativity:
(FABC∙FXYZ)∙FPQR→αDFABC∙(FXYZ∙FPQR)↓ϕABC,XYZ∙1↓1∙ϕXYZ,PQRF(A⊗X)(B⊗Y)(C⊗Z)∙FPQRFABC∙(F(X⊗P)(Y⊗Q)(Z⊗R)↓ϕ(A⊗X)(B⊗Y)(C⊗Z),PQR↓ϕABC,(X⊗P)(Y⊗Q)(Z⊗R)F((A⊗X)⊗P)((B⊗Y)⊗Q)((C⊗Z)⊗R)→FαC1αC2αC3F(A⊗(X⊗P))(B⊗(Y⊗Q))(C⊗(Z⊗R))
combine
.
grmap
combine
.
bwd
assoc
≡fmap
(bwd
assoc
).
combine
.
glmap
combine
Unital
Monoidal
class (Tensor cat t1 i1, Tensor cat t2 i2, Tensor cat t3 i3, Tensor cat to io, Semigroupal cat t1 t2 t3 to f, Unital cat i1 i2 i3 io f) => Monoidal cat t1 i1 t2 i2 t3 i3 to io f Source #
Given monoidal categories (C,⊗,IC) and (D,∙,ID).
A bifunctor F:C1×C2×C3→D is Monoidal
if it maps between
C1×C2 ×C3 and D while preserving their monoidal structure.
Eg., a homomorphism of monoidal categories.
See NCatlab for more details.
Laws
Right Unitality:
FABC∙ID1∙ϕ→FAB∙FIC1IC2IC3↓ρD↓ϕABC,IC1IC2IC3FABC←FρC1ρC2ρC3F(A⊗IC1)(B⊗IC2)(C⊗IC3)
combine
.
grmap
introduce
≡bwd
unitr
.
fwd
unitr
Left Unitality:
ID∙FABCϕ∙1→FIC1IC2∙FABC↓λD↓IC1IC2IC3,ϕABCFABC←FλC1λC2λC3F(IC1⊗A)(IC2⊗B)(IC3⊗C)
combine
.
glmap
introduce
≡fmap
(bwd
unitl
).
fwd
unitl