Copyright | Guillaume Sabbagh 2021 |
---|---|
License | GPL-3 |
Maintainer | guillaumesabbagh@protonmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Same as FinOrdSet
but using Data.Set as objects, it is more optimized but needs its elements to be ordered.
The morphism of the category : FinOrdMap
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.
Instances
Eq a => Eq (FinOrdMap a) Source # | |
Show a => Show (FinOrdMap a) Source # | |
(PrettyPrintable a, Ord a) => PrettyPrintable (FinOrdMap a) Source # | |
Ord a => Morphism (FinOrdMap a) (Set a) Source # | |
Ord a => GeneratedFiniteCategory (FinOrdSet a) (FinOrdMap a) (Set a) Source # | |
Ord a => FiniteCategory (FinOrdSet a) (FinOrdMap a) (Set a) Source # | |
The category itself : FinOrdSet
FinOrdSet
stores the sets which constitutes its objects.
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.