discokitty-0.1.0: DisCoCat implementation.

LicenseGPL-3
Safe HaskellSafe
LanguageHaskell2010

Discokitty.Models.Rel

Description

|

Synopsis

Documentation

data Rel u Source #

A relation hom(1,a) is given by a subset of the universe with elements in a. We model this using the Data.Set library.

Instances
Show u => Show (Rel u) Source # 
Instance details

Defined in Discokitty.Models.Rel

Methods

showsPrec :: Int -> Rel u -> ShowS #

show :: Rel u -> String #

showList :: [Rel u] -> ShowS #

Dim (Words (Rel u)) Source # 
Instance details

Defined in Discokitty.Models.Rel

Methods

dim :: Words (Rel u) -> Int Source #

Dim (Rel u) Source # 
Instance details

Defined in Discokitty.Models.Rel

Methods

dim :: Rel u -> Int Source #

Ord u => HasCups (Rel u) Source # 
Instance details

Defined in Discokitty.Models.Rel

Methods

cup :: Int -> Rel u -> Rel u -> Rel u Source #

cunit :: Rel u Source #

relation :: Ord u => [[u]] -> Rel u Source #

fromList :: Ord u => [[u]] -> Rel u Source #

toList :: Rel u -> [[u]] Source #

relCup :: Ord u => Int -> Rel u -> Rel u -> Rel u Source #

agrees :: Eq u => Int -> ([u], [u]) -> Maybe [u] Source #