FiniteCategories-0.1.0.0: Finite categories and usual categorical constructions on them.
CopyrightGuillaume Sabbagh 2021
LicenseGPL-3
Maintainerguillaumesabbagh@protonmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Set.FinOrdSet

Description

Same as FinOrdSet but using Data.Set as objects, it is more optimized but needs its elements to be ordered.

Synopsis

The morphism of the category : FinOrdMap

data FinOrdMap a Source #

FinOrdMap is the morphism of the FinOrdSet category.

It is represented by a Map. The domain is the list of keys. We need to store the codomain of the map in order to differentiate different maps which would be the same if we couldn't compare codomains. For example, f : {1,2,3} -> {1,2,3} and g : {1,2,3} -> {1,2,3,4} would have the same Map but are different.

Constructors

FinOrdMap 

Fields

Instances

Instances details
Eq a => Eq (FinOrdMap a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

(==) :: FinOrdMap a -> FinOrdMap a -> Bool

(/=) :: FinOrdMap a -> FinOrdMap a -> Bool

Show a => Show (FinOrdMap a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

showsPrec :: Int -> FinOrdMap a -> ShowS

show :: FinOrdMap a -> String

showList :: [FinOrdMap a] -> ShowS

(PrettyPrintable a, Ord a) => PrettyPrintable (FinOrdMap a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

pprint :: FinOrdMap a -> String Source #

Ord a => Morphism (FinOrdMap a) (Set a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

(@) :: FinOrdMap a -> FinOrdMap a -> FinOrdMap a Source #

source :: FinOrdMap a -> Set a Source #

target :: FinOrdMap a -> Set a Source #

Ord a => GeneratedFiniteCategory (FinOrdSet a) (FinOrdMap a) (Set a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

genAr :: FinOrdSet a -> Set a -> Set a -> [FinOrdMap a] Source #

decompose :: FinOrdSet a -> FinOrdMap a -> [FinOrdMap a] Source #

genArrows :: FinOrdSet a -> [FinOrdMap a] Source #

Ord a => FiniteCategory (FinOrdSet a) (FinOrdMap a) (Set a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

ob :: FinOrdSet a -> [Set a] Source #

identity :: FinOrdSet a -> Set a -> FinOrdMap a Source #

ar :: FinOrdSet a -> Set a -> Set a -> [FinOrdMap a] Source #

arrows :: FinOrdSet a -> [FinOrdMap a] Source #

The category itself : FinOrdSet

data FinOrdSet a Source #

FinOrdSet stores the sets which constitutes its objects.

Constructors

FinOrdSet 

Fields

Instances

Instances details
Ord a => Eq (FinOrdSet a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

(==) :: FinOrdSet a -> FinOrdSet a -> Bool

(/=) :: FinOrdSet a -> FinOrdSet a -> Bool

Show a => Show (FinOrdSet a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

showsPrec :: Int -> FinOrdSet a -> ShowS

show :: FinOrdSet a -> String

showList :: [FinOrdSet a] -> ShowS

PrettyPrintable a => PrettyPrintable (FinOrdSet a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

pprint :: FinOrdSet a -> String Source #

Ord a => GeneratedFiniteCategory (FinOrdSet a) (FinOrdMap a) (Set a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

genAr :: FinOrdSet a -> Set a -> Set a -> [FinOrdMap a] Source #

decompose :: FinOrdSet a -> FinOrdMap a -> [FinOrdMap a] Source #

genArrows :: FinOrdSet a -> [FinOrdMap a] Source #

Ord a => FiniteCategory (FinOrdSet a) (FinOrdMap a) (Set a) Source # 
Instance details

Defined in Set.FinOrdSet

Methods

ob :: FinOrdSet a -> [Set a] Source #

identity :: FinOrdSet a -> Set a -> FinOrdMap a Source #

ar :: FinOrdSet a -> Set a -> Set a -> [FinOrdMap a] Source #

arrows :: FinOrdSet a -> [FinOrdMap a] Source #

powerFinOrdSet :: Ord a => Set a -> FinOrdSet a Source #

Returns the FinOrdSet category such that every subset of the set given is an object of the category.