Portability | non-portable (class-associated types) |
---|---|

Stability | experimental |

Maintainer | Edward Kmett <ekmett@gmail.com> |

- module Control.Category.Associative
- module Control.Category.Monoidal
- class (Associative k p, Coassociative k p, Braided k p) => PreCartesian k p | k -> p where
- bimapPreCartesian :: PreCartesian k p => k a c -> k b d -> k (p a b) (p c d)
- braidPreCartesian :: PreCartesian k p => k (p a b) (p b a)
- associatePreCartesian :: PreCartesian k p => k (p (p a b) c) (p a (p b c))
- coassociatePreCartesian :: PreCartesian k p => k (p a (p b c)) (p (p a b) c)
- class (Associative k s, Coassociative k s, Braided k s) => PreCoCartesian k s | k -> s where
- bimapPreCoCartesian :: PreCoCartesian k s => k a c -> k b d -> k (s a b) (s c d)
- braidPreCoCartesian :: PreCoCartesian k s => k (s a b) (s b a)
- associatePreCoCartesian :: PreCoCartesian k s => k (s (s a b) c) (s a (s b c))
- coassociatePreCoCartesian :: PreCoCartesian k s => k (s a (s b c)) (s (s a b) c)
- class (Monoidal k p i, PreCartesian k p) => Cartesian k p i | k -> p i
- class (Comonoidal k s i, PreCoCartesian k s) => CoCartesian k s i | k -> s i

# Documentation

module Control.Category.Associative

module Control.Category.Monoidal

# Pre-(Co)Cartesian categories

class (Associative k p, Coassociative k p, Braided k p) => PreCartesian k p | k -> p whereSource

NB: This is weaker than traditional category with products! That is Cartesian, below.
The problem is `(->)`

lacks an initial object, since every type is inhabited in Haskell.
Consequently its coproduct is merely a semigroup, not a monoid as it has no identity, and
since we want to be able to describe its dual category, which has this non-traditional
form being built over a category with an associative bifunctor rather than as a monoidal category
for the product monoid.

Minimum definition:

fst, snd, diag fst, snd, (&&&)

bimapPreCartesian :: PreCartesian k p => k a c -> k b d -> k (p a b) (p c d)Source

braidPreCartesian :: PreCartesian k p => k (p a b) (p b a)Source

associatePreCartesian :: PreCartesian k p => k (p (p a b) c) (p a (p b c))Source

free construction of `Associative`

for the product `Bifunctor`

`Prod k`

coassociatePreCartesian :: PreCartesian k p => k (p a (p b c)) (p (p a b) c)Source

free construction of `Coassociative`

for the product `Bifunctor`

`Prod k`

class (Associative k s, Coassociative k s, Braided k s) => PreCoCartesian k s | k -> s whereSource

bimapPreCoCartesian :: PreCoCartesian k s => k a c -> k b d -> k (s a b) (s c d)Source

braidPreCoCartesian :: PreCoCartesian k s => k (s a b) (s b a)Source

associatePreCoCartesian :: PreCoCartesian k s => k (s (s a b) c) (s a (s b c))Source

free construction of `Associative`

for the coproduct `Bifunctor`

`Sum k`

coassociatePreCoCartesian :: PreCoCartesian k s => k (s a (s b c)) (s (s a b) c)Source

free construction of `Coassociative`

for the coproduct `Bifunctor`

`Sum k`

# (Co)Cartesian categories

class (Monoidal k p i, PreCartesian k p) => Cartesian k p i | k -> p iSource

(Monoidal k p i, PreCartesian k p) => Cartesian k p i |

class (Comonoidal k s i, PreCoCartesian k s) => CoCartesian k s i | k -> s iSource

(Comonoidal k s i, PreCoCartesian k s) => CoCartesian k s i |