Copyright | Guillaume Sabbagh 2022 |
---|---|
License | GPL-3 |
Maintainer | guillaumesabbagh@protonmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The FinSet
category has finite sets as objects and functions as morphisms.
Finite sets are represented by weak sets from Data.WeakSet and functions by enriched weak maps from Data.WeakMap.
These structures are homogeneous, meaning you can only have sets containing one type of objects in a given FinSet
category.
See the category PureSet
for the category of sets which can be arbitrarily nested.
Function
A Function
(finite function) is a weak map enriched with a codomain.
We have to store the codomain to retrieve the target set of a morphism in FinSet
.