categories-1.0.7: Categories

Copyright | 2008-2012 Edward Kmett
License | BSD
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell2010

Control.Category.Braided

Description

Synopsis

- class Associative k p => Braided (k :: Type -> Type -> Type) (p :: Type -> Type -> Type) where
  - braid :: k (p a b) (p b a)
- class Braided k p => Symmetric (k :: Type -> Type -> Type) (p :: Type -> Type -> Type)
- swap :: Symmetric k p => k (p a b) (p b a)

# Documentation

class Associative k p => Braided (k :: Type -> Type -> Type) (p :: Type -> Type -> Type) where Source #

A braided (co)(monoidal or associative) category can commute the arguments of its bi-endofunctor. Obeys the laws:

    associate . braid . associate = second braid . associate . first braid
    disassociate . braid . disassociate = first braid . disassociate . second braid

If the category is Monoidal the following laws should be satisfied

    idr . braid = idl
    idl . braid = idr

If the category is Comonoidal the following laws should be satisfied

    braid . coidr = coidl
    braid . coidl = coidr

Methods

braid :: k (p a b) (p b a) Source #

#### Instances

Instances details

Braided (->) Either Source # |
Instance details Defined in Control.Category.Braided Methods braid :: Either a b -> Either b a Source #
Braided (->) (,) Source # |
Instance details Defined in Control.Category.Braided Methods braid :: (a, b) -> (b, a) Source #

class Braided k p => Symmetric (k :: Type -> Type -> Type) (p :: Type -> Type -> Type) Source #

If we have a symmetric (co)`Monoidal` category, you get the additional law:

    swap . swap = id

#### Instances

Instances details

Symmetric (->) Either Source # |
Instance details Defined in Control.Category.Braided
Symmetric (->) (,) Source # |
Instance details Defined in Control.Category.Braided

swap :: Symmetric k p => k (p a b) (p b a) Source #