| category-extras-0.53.6: Various modules and constructs inspired by category theory | Contents | Index |
|
Control.Category.Cartesian | Portability | non-portable (class-associated types) | Stability | experimental | Maintainer | Edward Kmett <ekmett@gmail.com> |
|
|
|
|
|
Description |
|
|
Synopsis |
|
|
|
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 where |
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, (&&&)
| | Methods | fst :: k (p a b) a | | snd :: k (p a b) b | | diag :: k a (p a a) | | (&&&) :: k a b -> k a c -> k a (p b c) |
|
|
|
bimapPreCartesian :: PreCartesian k p => k a c -> k b d -> k (p a b) (p c d) |
free construction of Bifunctor for the product Bifunctor Prod k if (&&&) is known
|
|
braidPreCartesian :: PreCartesian k p => k (p a b) (p b a) |
free construction of Braided for the product Bifunctor Prod k
|
|
associatePreCartesian :: PreCartesian k p => k (p (p a b) c) (p a (p b c)) |
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) |
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 where |
| Methods | inl :: k a (s a b) | | inr :: k b (s a b) | | codiag :: k (s a a) a | | (|||) :: k a c -> k b c -> k (s a b) c |
|
|
|
bimapPreCoCartesian :: PreCoCartesian k s => k a c -> k b d -> k (s a b) (s c d) |
free construction of Bifunctor for the coproduct Bifunctor Sum k if (|||) is known
|
|
braidPreCoCartesian :: PreCoCartesian k s => k (s a b) (s b a) |
free construction of Braided for the coproduct Bifunctor Sum k
|
|
associatePreCoCartesian :: PreCoCartesian k s => k (s (s a b) c) (s a (s b c)) |
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) |
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 i |
|
|
class (Comonoidal k s i, PreCoCartesian k s) => CoCartesian k s i | k -> s i |
|
|
Produced by Haddock version 2.1.0 |