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

Algebra.Category.Relation

Documentation

newtype Rel s a b Source #

Constructors

Rel (a -> b -> s) 

Instances

Instances details
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 #

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 => 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 #

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 #

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 #

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 #

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

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

Defined in Algebra.Category.Relation

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 #

Additive s => Additive (Rel s a b) Source # 
Instance details

Defined in Algebra.Category.Relation

Methods

(+) :: Rel s a b -> Rel s a b -> Rel s a b Source #

zero :: Rel s a b Source #

times :: Natural -> Rel s a b -> Rel s a b Source #

type Obj (Rel s :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category.Relation

type Obj (Rel s :: Type -> Type -> Type) = Finite

indicate :: Ring s => Bool -> s Source #