gasp-1.4.0.0: A framework of algebraic classes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Algebra.Category

Synopsis

Documentation

type O2 k a b = (Obj k a, Obj k b) Source #

type O3 k a b c = (Obj k a, Obj k b, Obj k c) Source #

type O4 k a b c d = (Obj k a, Obj k b, Obj k c, Obj k d) Source #

class Category (cat :: k -> k -> Type) where Source #

A class for categories. Instances should satisfy the laws

f . id  =  f  -- (right identity)
id . f  =  f  -- (left identity)
f . (g . h)  =  (f . g) . h  -- (associativity)

Associated Types

type Obj cat :: k -> Constraint Source #

Methods

(.) :: (Obj cat a, Obj cat b, Obj cat c) => (b `cat` c) -> (a `cat` b) -> a `cat` c infixr 9 Source #

id :: Obj cat a => a `cat` a Source #

Instances

Instances details
Ring s => Category (M s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.BlockMatrix

Associated Types

type Obj (M s) :: k -> Constraint Source #

Methods

(.) :: forall (a :: k) (b :: k) (c :: k). (Obj (M s) a, Obj (M s) b, Obj (M s) c) => M s b c -> M s a b -> M s a c Source #

id :: forall (a :: k). Obj (M s) a => M s a a Source #

Ring s => Category (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Associated Types

type Obj (Rel s) :: k -> Constraint Source #

Methods

(.) :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s b c -> Rel s a b -> Rel s a c Source #

id :: forall (a :: k). Obj (Rel s) a => Rel s a a Source #

Category (->) Source # 
Instance details

Defined in Algebra.Category

Associated Types

type Obj (->) :: k -> Constraint Source #

Methods

(.) :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => (b -> c) -> (a -> b) -> a -> c Source #

id :: forall (a :: k). Obj (->) a => a -> a Source #

Category k2 => Category (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Associated Types

type Obj (Op k2) :: k -> Constraint Source #

Methods

(.) :: forall (a :: k) (b :: k) (c :: k). (Obj (Op k2) a, Obj (Op k2) b, Obj (Op k2) c) => Op k2 b c -> Op k2 a b -> Op k2 a c Source #

id :: forall (a :: k). Obj (Op k2) a => Op k2 a a Source #

Category NatTrans Source # 
Instance details

Defined in Algebra.Category.NatTrans

Associated Types

type Obj NatTrans :: k -> Constraint Source #

Methods

(.) :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans b c -> NatTrans a b -> NatTrans a c Source #

id :: forall (a :: k). Obj NatTrans a => NatTrans a a Source #

Ring s => Category (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Associated Types

type Obj (Mat s) :: k -> Constraint Source #

Methods

(.) :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s b c -> Mat s a b -> Mat s a c Source #

id :: forall (a :: k). Obj (Mat s) a => Mat s a a Source #

class Category cat => Dagger cat where Source #

Methods

dagger :: O2 cat a b => (a `cat` b) -> b `cat` a Source #

Instances

Instances details
Ring s => Dagger (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

dagger :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s a b -> Rel s b a Source #

Ring s => Dagger (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

dagger :: forall (a :: k) (b :: k). O2 (Mat s) a b => Mat s a b -> Mat s b a Source #

(∘) :: forall {k} (cat :: k -> k -> Type) a b c con. (Category cat, con ~ Obj cat, con a, con b, con c) => cat b c -> cat a b -> cat a c Source #

class Category cat => Monoidal x i (cat :: k -> k -> Type) | x -> i, i -> x where Source #

Minimal complete definition

(⊗), assoc, assoc_, unitorR, unitorR_

Methods

(⊗) :: (Obj cat a, Obj cat b, Obj cat c, Obj cat d) => (a `cat` b) -> (c `cat` d) -> (a `x` c) `cat` (b `x` d) Source #

assoc :: (Obj cat a, Obj cat b, Obj cat c) => ((a `x` b) `x` c) `cat` (a `x` (b `x` c)) Source #

assoc_ :: (Obj cat a, Obj cat b, Obj cat c) => (a `x` (b `x` c)) `cat` ((a `x` b) `x` c) Source #

unitorR :: (Obj cat a, Obj cat i) => a `cat` (a `x` i) Source #

unitorR_ :: (Obj cat a, Obj cat i) => (a `x` i) `cat` a Source #

unitorL :: (Obj cat a, Obj cat i) => a `cat` (i `x` a) Source #

default unitorL :: forall a con. (con ~ Obj cat, con i, con (x a i), con (x i a), Symmetric x i cat, Obj cat a) => a `cat` (i `x` a) Source #

unitorL_ :: (Obj cat a, Obj cat i) => (i `x` a) `cat` a Source #

default unitorL_ :: forall a con. (con ~ Obj cat, Symmetric x i cat, con i, con (x a i), con (x i a), Obj cat a) => (i `x` a) `cat` a Source #

Instances

Instances details
Monoidal (,) () (->) Source # 
Instance details

Defined in Algebra.Category

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (->) a, Obj (->) b, Obj (->) c, Obj (->) d) => (a -> b) -> (c -> d) -> (a, c) -> (b, d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => ((a, b), c) -> (a, (b, c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => (a, (b, c)) -> ((a, b), c) Source #

unitorR :: forall (a :: k). (Obj (->) a, Obj (->) ()) => a -> (a, ()) Source #

unitorR_ :: forall (a :: k). (Obj (->) a, Obj (->) ()) => (a, ()) -> a Source #

unitorL :: forall (a :: k). (Obj (->) a, Obj (->) ()) => a -> ((), a) Source #

unitorL_ :: forall (a :: k). (Obj (->) a, Obj (->) ()) => ((), a) -> a Source #

Monoidal x i k2 => Monoidal (x :: k1 -> k1 -> k1) (i :: k1) (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (Op k2) a, Obj (Op k2) b, Obj (Op k2) c, Obj (Op k2) d) => Op k2 a b -> Op k2 c d -> Op k2 (x a c) (x b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (Op k2) a, Obj (Op k2) b, Obj (Op k2) c) => Op k2 (x (x a b) c) (x a (x b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (Op k2) a, Obj (Op k2) b, Obj (Op k2) c) => Op k2 (x a (x b c)) (x (x a b) c) Source #

unitorR :: forall (a :: k). (Obj (Op k2) a, Obj (Op k2) i) => Op k2 a (x a i) Source #

unitorR_ :: forall (a :: k). (Obj (Op k2) a, Obj (Op k2) i) => Op k2 (x a i) a Source #

unitorL :: forall (a :: k). (Obj (Op k2) a, Obj (Op k2) i) => Op k2 a (x i a) Source #

unitorL_ :: forall (a :: k). (Obj (Op k2) a, Obj (Op k2) i) => Op k2 (x i a) a Source #

Ring s => Monoidal ((⊕) :: Type -> Type -> Type) (Zero :: Type) (M s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.BlockMatrix

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (M s) a, Obj (M s) b, Obj (M s) c, Obj (M s) d) => M s a b -> M s c d -> M s (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (M s) a, Obj (M s) b, Obj (M s) c) => M s ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (M s) a, Obj (M s) b, Obj (M s) c) => M s (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (M s) a, Obj (M s) Zero) => M s a (a Zero) Source #

unitorR_ :: forall (a :: k). (Obj (M s) a, Obj (M s) Zero) => M s (a Zero) a Source #

unitorL :: forall (a :: k). (Obj (M s) a, Obj (M s) Zero) => M s a (Zero a) Source #

unitorL_ :: forall (a :: k). (Obj (M s) a, Obj (M s) Zero) => M s (Zero a) a Source #

Ring s => Monoidal ((⊕) :: Type -> Type -> Type) (Zero :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c, Obj (Rel s) d) => Rel s a b -> Rel s c d -> Rel s (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) Zero) => Rel s a (a Zero) Source #

unitorR_ :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) Zero) => Rel s (a Zero) a Source #

unitorL :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) Zero) => Rel s a (Zero a) Source #

unitorL_ :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) Zero) => Rel s (Zero a) a Source #

Ring s => Monoidal ((⊗) :: Type -> Type -> Type) (One :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c, Obj (Rel s) d) => Rel s a b -> Rel s c d -> Rel s (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) One) => Rel s a (a One) Source #

unitorR_ :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) One) => Rel s (a One) a Source #

unitorL :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) One) => Rel s a (One a) Source #

unitorL_ :: forall (a :: k). (Obj (Rel s) a, Obj (Rel s) One) => Rel s (One a) a Source #

Monoidal ((⊕) :: Type -> Type -> Type) (Zero :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (->) a, Obj (->) b, Obj (->) c, Obj (->) d) => (a -> b) -> (c -> d) -> (a c) -> (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => ((a b) c) -> (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => (a (b c)) -> ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (->) a, Obj (->) Zero) => a -> (a Zero) Source #

unitorR_ :: forall (a :: k). (Obj (->) a, Obj (->) Zero) => (a Zero) -> a Source #

unitorL :: forall (a :: k). (Obj (->) a, Obj (->) Zero) => a -> (Zero a) Source #

unitorL_ :: forall (a :: k). (Obj (->) a, Obj (->) Zero) => (Zero a) -> a Source #

Monoidal ((⊗) :: Type -> Type -> Type) (One :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (->) a, Obj (->) b, Obj (->) c, Obj (->) d) => (a -> b) -> (c -> d) -> (a c) -> (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => ((a b) c) -> (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => (a (b c)) -> ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (->) a, Obj (->) One) => a -> (a One) Source #

unitorR_ :: forall (a :: k). (Obj (->) a, Obj (->) One) => (a One) -> a Source #

unitorL :: forall (a :: k). (Obj (->) a, Obj (->) One) => a -> (One a) Source #

unitorL_ :: forall (a :: k). (Obj (->) a, Obj (->) One) => (One a) -> a Source #

Monoidal ((⊗) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) (One :: Type -> Type) NatTrans Source # 
Instance details

Defined in Algebra.Category.NatTrans

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c, Obj NatTrans d) => NatTrans a b -> NatTrans c d -> NatTrans (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj NatTrans a, Obj NatTrans One) => NatTrans a (a One) Source #

unitorR_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans One) => NatTrans (a One) a Source #

unitorL :: forall (a :: k). (Obj NatTrans a, Obj NatTrans One) => NatTrans a (One a) Source #

unitorL_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans One) => NatTrans (One a) a Source #

Ring s => Monoidal ((⊗) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) (One :: Type -> Type) (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c, Obj (Mat s) d) => Mat s a b -> Mat s c d -> Mat s (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) One) => Mat s a (a One) Source #

unitorR_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) One) => Mat s (a One) a Source #

unitorL :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) One) => Mat s a (One a) Source #

unitorL_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) One) => Mat s (One a) a Source #

Monoidal ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id NatTrans Source # 
Instance details

Defined in Algebra.Category.NatTrans

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c, Obj NatTrans d) => NatTrans a b -> NatTrans c d -> NatTrans (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans a (a Id) Source #

unitorR_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans (a Id) a Source #

unitorL :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans a (Id a) Source #

unitorL_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans (Id a) a Source #

Ring s => Monoidal ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c, Obj (Mat s) d) => Mat s a b -> Mat s c d -> Mat s (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s a (a Id) Source #

unitorR_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s (a Id) a Source #

unitorL :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s a (Id a) Source #

unitorL_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s (Id a) a Source #

monoidalRec :: forall x cat i. Monoidal x i cat => MonoidalRec x i (Obj cat) cat Source #

class Monoidal x i cat => Braided x i cat where Source #

Minimal complete definition

swap

Methods

swap :: (Obj cat a, Obj cat b) => (a `x` b) `cat` (b `x` a) Source #

swap_ :: (Obj cat a, Obj cat b) => (a `x` b) `cat` (b `x` a) Source #

default swap_ :: (Symmetric x i cat, Obj cat a, Obj cat b) => (a `x` b) `cat` (b `x` a) Source #

Instances

Instances details
Braided (,) () (->) Source # 
Instance details

Defined in Algebra.Category

Methods

swap :: forall (a :: k) (b :: k). (Obj (->) a, Obj (->) b) => (a, b) -> (b, a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (->) a, Obj (->) b) => (a, b) -> (b, a) Source #

Braided x i k2 => Braided (x :: k1 -> k1 -> k1) (i :: k1) (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Methods

swap :: forall (a :: k) (b :: k). (Obj (Op k2) a, Obj (Op k2) b) => Op k2 (x a b) (x b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (Op k2) a, Obj (Op k2) b) => Op k2 (x a b) (x b a) Source #

Ring s => Braided ((⊕) :: Type -> Type -> Type) (Zero :: Type) (M s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.BlockMatrix

Methods

swap :: forall (a :: k) (b :: k). (Obj (M s) a, Obj (M s) b) => M s (a b) (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (M s) a, Obj (M s) b) => M s (a b) (b a) Source #

Ring s => Braided ((⊕) :: Type -> Type -> Type) (Zero :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

swap :: forall (a :: k) (b :: k). (Obj (Rel s) a, Obj (Rel s) b) => Rel s (a b) (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (Rel s) a, Obj (Rel s) b) => Rel s (a b) (b a) Source #

Ring s => Braided ((⊗) :: Type -> Type -> Type) (One :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

swap :: forall (a :: k) (b :: k). (Obj (Rel s) a, Obj (Rel s) b) => Rel s (a b) (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (Rel s) a, Obj (Rel s) b) => Rel s (a b) (b a) Source #

Braided ((⊕) :: Type -> Type -> Type) (Zero :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Methods

swap :: forall (a :: k) (b :: k). (Obj (->) a, Obj (->) b) => (a b) -> (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (->) a, Obj (->) b) => (a b) -> (b a) Source #

Braided ((⊗) :: Type -> Type -> Type) (One :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Methods

swap :: forall (a :: k) (b :: k). (Obj (->) a, Obj (->) b) => (a b) -> (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (->) a, Obj (->) b) => (a b) -> (b a) Source #

Ring s => Braided ((⊗) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) (One :: Type -> Type) (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

swap :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

Ring s => Braided ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

swap :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

braidedRec :: forall x cat i. Braided x i cat => BraidedRec x i (Obj cat) cat Source #

class Braided x i cat => Symmetric x i cat Source #

Instances

Instances details
Symmetric (,) () (->) Source # 
Instance details

Defined in Algebra.Category

Symmetric x i k2 => Symmetric (x :: k1 -> k1 -> k1) (i :: k1) (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Ring s => Symmetric ((⊕) :: Type -> Type -> Type) (Zero :: Type) (M s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.BlockMatrix

Ring s => Symmetric ((⊕) :: Type -> Type -> Type) (Zero :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Ring s => Symmetric ((⊗) :: Type -> Type -> Type) (One :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Symmetric ((⊕) :: Type -> Type -> Type) (Zero :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Symmetric ((⊗) :: Type -> Type -> Type) (One :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Ring s => Symmetric ((⊗) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) (One :: Type -> Type) (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Ring s => Symmetric ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

class Symmetric x i cat => Cartesian x i cat where Source #

Minimal complete definition

exl, exr, dup | exl, exr, (▵) | dis, dup | dis, (▵)

Methods

exl :: forall a b. O2 cat a b => (a `x` b) `cat` a Source #

default exl :: forall a b con. (con ~ Obj cat, con i, Con' x con, con a, con b) => (a `x` b) `cat` a Source #

exr :: forall a b. O2 cat a b => (a `x` b) `cat` b Source #

default exr :: forall a b con. (con ~ Obj cat, con i, Con' x con, con a, con b) => (a `x` b) `cat` b Source #

dis :: forall a. Obj cat a => a `cat` i Source #

default dis :: forall a con. (con ~ Obj cat, con i, Con' x con, Obj cat a) => a `cat` i Source #

dup :: forall a. Obj cat a => a `cat` (a `x` a) Source #

default dup :: forall a con. (con ~ Obj cat, con i, Con' x con, Obj cat a) => a `cat` (a `x` a) Source #

(▵) :: forall a b c. (Obj cat a, Obj cat b, Obj cat c) => (a `cat` b) -> (a `cat` c) -> a `cat` (b `x` c) Source #

default (▵) :: forall a b c con. (con ~ Obj cat, con i, Con' x con, Obj cat a, Obj cat b, Obj cat c) => (a `cat` b) -> (a `cat` c) -> a `cat` (b `x` c) Source #

Instances

Instances details
Cartesian (,) () (->) Source # 
Instance details

Defined in Algebra.Category

Methods

exl :: forall (a :: k) (b :: k). O2 (->) a b => (a, b) -> a Source #

exr :: forall (a :: k) (b :: k). O2 (->) a b => (a, b) -> b Source #

dis :: forall (a :: k). Obj (->) a => a -> () Source #

dup :: forall (a :: k). Obj (->) a => a -> (a, a) Source #

(▵) :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => (a -> b) -> (a -> c) -> a -> (b, c) Source #

CoCartesian x i k2 => Cartesian (x :: k1 -> k1 -> k1) (i :: k1) (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Methods

exl :: forall (a :: k) (b :: k). O2 (Op k2) a b => Op k2 (x a b) a Source #

exr :: forall (a :: k) (b :: k). O2 (Op k2) a b => Op k2 (x a b) b Source #

dis :: forall (a :: k). Obj (Op k2) a => Op k2 a i Source #

dup :: forall (a :: k). Obj (Op k2) a => Op k2 a (x a a) Source #

(▵) :: forall (a :: k) (b :: k) (c :: k). (Obj (Op k2) a, Obj (Op k2) b, Obj (Op k2) c) => Op k2 a b -> Op k2 a c -> Op k2 a (x b c) Source #

Ring s => Cartesian ((⊕) :: Type -> Type -> Type) (Zero :: Type) (M s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.BlockMatrix

Methods

exl :: forall (a :: k) (b :: k). O2 (M s) a b => M s (a b) a Source #

exr :: forall (a :: k) (b :: k). O2 (M s) a b => M s (a b) b Source #

dis :: forall (a :: k). Obj (M s) a => M s a Zero Source #

dup :: forall (a :: k). Obj (M s) a => M s a (a a) Source #

(▵) :: forall (a :: k) (b :: k) (c :: k). (Obj (M s) a, Obj (M s) b, Obj (M s) c) => M s a b -> M s a c -> M s a (b c) Source #

Ring s => Cartesian ((⊕) :: Type -> Type -> Type) (Zero :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

exl :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s (a b) a Source #

exr :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s (a b) b Source #

dis :: forall (a :: k). Obj (Rel s) a => Rel s a Zero Source #

dup :: forall (a :: k). Obj (Rel s) a => Rel s a (a a) Source #

(▵) :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s a b -> Rel s a c -> Rel s a (b c) Source #

Ring s => Cartesian ((⊗) :: Type -> Type -> Type) (One :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

exl :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s (a b) a Source #

exr :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s (a b) b Source #

dis :: forall (a :: k). Obj (Rel s) a => Rel s a One Source #

dup :: forall (a :: k). Obj (Rel s) a => Rel s a (a a) Source #

(▵) :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s a b -> Rel s a c -> Rel s a (b c) Source #

Cartesian ((⊗) :: Type -> Type -> Type) (One :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Methods

exl :: forall (a :: k) (b :: k). O2 (->) a b => (a b) -> a Source #

exr :: forall (a :: k) (b :: k). O2 (->) a b => (a b) -> b Source #

dis :: forall (a :: k). Obj (->) a => a -> One Source #

dup :: forall (a :: k). Obj (->) a => a -> (a a) Source #

(▵) :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => (a -> b) -> (a -> c) -> a -> (b c) Source #

Ring s => Cartesian ((⊗) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) (One :: Type -> Type) (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

exl :: forall (a :: k) (b :: k). O2 (Mat s) a b => Mat s (a b) a Source #

exr :: forall (a :: k) (b :: k). O2 (Mat s) a b => Mat s (a b) b Source #

dis :: forall (a :: k). Obj (Mat s) a => Mat s a One Source #

dup :: forall (a :: k). Obj (Mat s) a => Mat s a (a a) Source #

(▵) :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s a b -> Mat s a c -> Mat s a (b c) Source #

cartesianRec :: forall x cat i. Cartesian x i cat => CartesianRec x i (Obj cat) cat Source #

cartesianCross :: (Obj k (b1 `x` b2), Obj k b3, Obj k c, Obj k b1, Obj k b2, Cartesian x i k) => k b1 b3 -> k b2 c -> k (b1 `x` b2) (b3 `x` c) Source #

cartesianUnitor :: forall a k x i. (Obj k a, Obj k i, Cartesian x i k) => a `k` (a `x` i) Source #

cartesianUnitor_ :: forall a k x i. (Obj k a, Obj k i, Cartesian x i k) => (a `x` i) `k` a Source #

cartesianSwap :: forall a b k x i con. (Obj k a, Obj k b, Cartesian x i k, Con' x con, con ~ Obj k) => (a `x` b) `k` (b `x` a) Source #

cartesianAssoc :: forall a b x i c k con. (Obj k a, Obj k b, Obj k c, Cartesian x i k, Con' x con, con ~ Obj k) => ((a `x` b) `x` c) `k` (a `x` (b `x` c)) Source #

cartesianAssoc_ :: forall a b x i c k con. (Obj k a, Obj k b, Obj k c, Cartesian x i k, Con' x con, con ~ Obj k) => (a `x` (b `x` c)) `k` ((a `x` b) `x` c) Source #

coCartesianExl :: (O2 cat a b, CoCartesian x i cat, Additive (cat b a)) => (a `x` b) `cat` a Source #

coCartesianExr :: (O2 cat a b, CoCartesian x i cat, Additive (cat a b)) => (a `x` b) `cat` b Source #

class Symmetric x i cat => CoCartesian x i cat where Source #

Minimal complete definition

inl, inr, jam | inl, inr, (▿) | new, jam | new, (▿)

Methods

inl :: O2 cat a b => a `cat` (a `x` b) Source #

default inl :: forall a b con. (con ~ Obj cat, con i, Con' x con, con a, con b) => a `cat` (a `x` b) Source #

inr :: O2 cat a b => b `cat` (a `x` b) Source #

default inr :: forall a b con. (con ~ Obj cat, con i, Con' x con, con a, con b) => b `cat` (a `x` b) Source #

new :: forall a. Obj cat a => i `cat` a Source #

default new :: forall a con. (con ~ Obj cat, con i, Con' x con, Obj cat a) => i `cat` a Source #

jam :: Obj cat a => (a `x` a) `cat` a Source #

default jam :: forall a con. (con ~ Obj cat, con i, Con' x con, Obj cat a) => (a `x` a) `cat` a Source #

(▿) :: forall a b c. (Obj cat a, Obj cat b, Obj cat c) => (b `cat` a) -> (c `cat` a) -> (b `x` c) `cat` a Source #

default (▿) :: forall a b c con. (con ~ Obj cat, con i, Con' x con, Obj cat a, Obj cat b, Obj cat c) => (b `cat` a) -> (c `cat` a) -> (b `x` c) `cat` a Source #

Instances

Instances details
Cartesian x i k2 => CoCartesian (x :: k1 -> k1 -> k1) (i :: k1) (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Methods

inl :: forall (a :: k) (b :: k). O2 (Op k2) a b => Op k2 a (x a b) Source #

inr :: forall (a :: k) (b :: k). O2 (Op k2) a b => Op k2 b (x a b) Source #

new :: forall (a :: k). Obj (Op k2) a => Op k2 i a Source #

jam :: forall (a :: k). Obj (Op k2) a => Op k2 (x a a) a Source #

(▿) :: forall (a :: k) (b :: k) (c :: k). (Obj (Op k2) a, Obj (Op k2) b, Obj (Op k2) c) => Op k2 b a -> Op k2 c a -> Op k2 (x b c) a Source #

Ring s => CoCartesian ((⊕) :: Type -> Type -> Type) (Zero :: Type) (M s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.BlockMatrix

Methods

inl :: forall (a :: k) (b :: k). O2 (M s) a b => M s a (a b) Source #

inr :: forall (a :: k) (b :: k). O2 (M s) a b => M s b (a b) Source #

new :: forall (a :: k). Obj (M s) a => M s Zero a Source #

jam :: forall (a :: k). Obj (M s) a => M s (a a) a Source #

(▿) :: forall (a :: k) (b :: k) (c :: k). (Obj (M s) a, Obj (M s) b, Obj (M s) c) => M s b a -> M s c a -> M s (b c) a Source #

Ring s => CoCartesian ((⊕) :: Type -> Type -> Type) (Zero :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

inl :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s a (a b) Source #

inr :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s b (a b) Source #

new :: forall (a :: k). Obj (Rel s) a => Rel s Zero a Source #

jam :: forall (a :: k). Obj (Rel s) a => Rel s (a a) a Source #

(▿) :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s b a -> Rel s c a -> Rel s (b c) a Source #

Ring s => CoCartesian ((⊗) :: Type -> Type -> Type) (One :: Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

inl :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s a (a b) Source #

inr :: forall (a :: k) (b :: k). O2 (Rel s) a b => Rel s b (a b) Source #

new :: forall (a :: k). Obj (Rel s) a => Rel s One a Source #

jam :: forall (a :: k). Obj (Rel s) a => Rel s (a a) a Source #

(▿) :: forall (a :: k) (b :: k) (c :: k). (Obj (Rel s) a, Obj (Rel s) b, Obj (Rel s) c) => Rel s b a -> Rel s c a -> Rel s (b c) a Source #

CoCartesian ((⊕) :: Type -> Type -> Type) (Zero :: Type) (->) Source # 
Instance details

Defined in Algebra.Category

Methods

inl :: forall (a :: k) (b :: k). O2 (->) a b => a -> (a b) Source #

inr :: forall (a :: k) (b :: k). O2 (->) a b => b -> (a b) Source #

new :: forall (a :: k). Obj (->) a => Zero -> a Source #

jam :: forall (a :: k). Obj (->) a => (a a) -> a Source #

(▿) :: forall (a :: k) (b :: k) (c :: k). (Obj (->) a, Obj (->) b, Obj (->) c) => (b -> a) -> (c -> a) -> (b c) -> a Source #

Ring s => CoCartesian ((⊗) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) (One :: Type -> Type) (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

inl :: forall (a :: k) (b :: k). O2 (Mat s) a b => Mat s a (a b) Source #

inr :: forall (a :: k) (b :: k). O2 (Mat s) a b => Mat s b (a b) Source #

new :: forall (a :: k). Obj (Mat s) a => Mat s One a Source #

jam :: forall (a :: k). Obj (Mat s) a => Mat s (a a) a Source #

(▿) :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s b a -> Mat s c a -> Mat s (b c) a Source #

type BiCartesian x i cat = (Cartesian x i cat, CoCartesian x i cat) Source #

class Monoidal x i cat => Autonomous x i l r cat | x -> l, x -> r where Source #

Methods

turn :: Obj cat a => i `cat` (l a `x` a) Source #

turn' :: Obj cat a => (a `x` r a) `cat` i Source #

Instances

Instances details
(con ~ Obj k2, Con' x con, UnCon r con, UnCon l con, con i, Autonomous x i r l k2, Braided x i k2) => Autonomous (x :: k1 -> k1 -> k1) (i :: k1) (l :: k1 -> k1) (r :: k1 -> k1) (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Methods

turn :: forall (a :: k). Obj (Op k2) a => Op k2 i (x (l a) a) Source #

turn' :: forall (a :: k). Obj (Op k2) a => Op k2 (x a (r a)) i Source #

Ring s => Autonomous ((⊗) :: Type -> Type -> Type) (One :: Type) (Dual :: Type -> Type) (Dual :: Type -> Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

turn :: forall (a :: k). Obj (Rel s) a => Rel s One (Dual a a) Source #

turn' :: forall (a :: k). Obj (Rel s) a => Rel s (a Dual a) One Source #

class (Symmetric x i cat, Autonomous x i d d cat) => Compact x i d cat Source #

Instances

Instances details
(con ~ Obj k2, Con' x con, UnCon d con, con i, Compact x i d k2, Braided x i k2) => Compact (x :: k1 -> k1 -> k1) (i :: k1) (d :: k1 -> k1) (Op k2 :: k1 -> k1 -> Type) Source # 
Instance details

Defined in Algebra.Category.Op

Ring s => Compact ((⊗) :: Type -> Type -> Type) (One :: Type) (Dual :: Type -> Type) (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation