Copyright | Guillaume Sabbagh 2022 |
---|---|
License | GPL-3 |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Math.Categories.FinSet
Description
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
.
Instances
(PrettyPrint a, Eq a) => PrettyPrint (Function a) Source # | |
Defined in Math.Categories.FinSet | |
(Simplifiable a, Eq a) => Simplifiable (Function a) Source # | |
Defined in Math.Categories.FinSet | |
Generic (Function a) Source # | |
Show a => Show (Function a) Source # | |
Eq a => Eq (Function a) Source # | |
Eq a => Morphism (Function a) (Set a) Source # | |
Eq a => Category (FinSet a) (Function a) (Set a) Source # | |
Eq a => HasCoequalizers (FinSet a) (Function a) (Set a) Source # | |
Defined in Math.Categories.FinSet Methods coequalize :: Diagram Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) -> Cocone Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) Source # | |
Eq a => HasEqualizers (FinSet a) (Function a) (Set a) Source # | |
Defined in Math.Categories.FinSet Methods equalize :: Diagram Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) -> Cone Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) Source # | |
(Eq a, Eq oIndex) => HasCoproducts (FinSet a) (Function a) (Set a) (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) oIndex Source # | |
Defined in Math.Categories.FinSet Methods coproduct :: Diagram (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet a) (Function a) (Set a) -> Cocone (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) Source # | |
(Eq a, Eq oIndex) => HasProducts (FinSet a) (Function a) (Set a) (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) oIndex Source # | |
Defined in Math.Categories.FinSet Methods product :: Diagram (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet a) (Function a) (Set a) -> Cone (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) Source # | |
(Eq a, Eq mIndex, Eq oIndex) => CocompleteCategory (FinSet a) (Function a) (Set a) (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) cIndex mIndex oIndex Source # | |
Defined in Math.Categories.FinSet Methods colimit :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Cocone cIndex mIndex oIndex (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) Source # coprojectBase :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Diagram (FinSet a) (Function a) (Set a) (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) Source # | |
(Eq a, Eq mIndex, Eq oIndex) => CompleteCategory (FinSet a) (Function a) (Set a) (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) cIndex mIndex oIndex Source # | |
Defined in Math.Categories.FinSet Methods limit :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Cone cIndex mIndex oIndex (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) Source # projectBase :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Diagram (FinSet a) (Function a) (Set a) (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) Source # | |
Eq a => CartesianClosedCategory (FinSet a) (Function a) (Set a) (FinSet (TwoProduct a)) (Function (TwoProduct a)) (Set (TwoProduct a)) (FinSet (Cartesian a)) (Function (Cartesian a)) (Set (Cartesian a)) Source # | |
type Rep (Function a) Source # | |
Defined in Math.Categories.FinSet type Rep (Function a) = D1 ('MetaData "Function" "Math.Categories.FinSet" "FiniteCategories-0.6.5.1-inplace" 'False) (C1 ('MetaCons "Function" 'PrefixI 'True) (S1 ('MetaSel ('Just "function") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a a)) :*: S1 ('MetaSel ('Just "codomain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set a)))) |
FinSet
FinSet
is the category of finite sets.
Constructors
FinSet |
Instances
PrettyPrint (FinSet a) Source # | |
Defined in Math.Categories.FinSet | |
Simplifiable (FinSet a) Source # | |
Defined in Math.Categories.FinSet | |
Generic (FinSet a) Source # | |
Show (FinSet a) Source # | |
Eq (FinSet a) Source # | |
Eq a => Category (FinSet a) (Function a) (Set a) Source # | |
Eq a => HasCoequalizers (FinSet a) (Function a) (Set a) Source # | |
Defined in Math.Categories.FinSet Methods coequalize :: Diagram Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) -> Cocone Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) Source # | |
Eq a => HasEqualizers (FinSet a) (Function a) (Set a) Source # | |
Defined in Math.Categories.FinSet Methods equalize :: Diagram Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) -> Cone Parallel ParallelAr ParallelOb (FinSet a) (Function a) (Set a) Source # | |
(Eq a, Eq oIndex) => HasCoproducts (FinSet a) (Function a) (Set a) (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) oIndex Source # | |
Defined in Math.Categories.FinSet Methods coproduct :: Diagram (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet a) (Function a) (Set a) -> Cocone (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) Source # | |
(Eq a, Eq oIndex) => HasProducts (FinSet a) (Function a) (Set a) (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) oIndex Source # | |
Defined in Math.Categories.FinSet Methods product :: Diagram (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet a) (Function a) (Set a) -> Cone (DiscreteCategory oIndex) (DiscreteMorphism oIndex) oIndex (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) Source # | |
(Eq a, Eq mIndex, Eq oIndex) => CocompleteCategory (FinSet a) (Function a) (Set a) (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) cIndex mIndex oIndex Source # | |
Defined in Math.Categories.FinSet Methods colimit :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Cocone cIndex mIndex oIndex (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) Source # coprojectBase :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Diagram (FinSet a) (Function a) (Set a) (FinSet (Colimit oIndex a)) (Function (Colimit oIndex a)) (Set (Colimit oIndex a)) Source # | |
(Eq a, Eq mIndex, Eq oIndex) => CompleteCategory (FinSet a) (Function a) (Set a) (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) cIndex mIndex oIndex Source # | |
Defined in Math.Categories.FinSet Methods limit :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Cone cIndex mIndex oIndex (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) Source # projectBase :: Diagram cIndex mIndex oIndex (FinSet a) (Function a) (Set a) -> Diagram (FinSet a) (Function a) (Set a) (FinSet (Limit oIndex a)) (Function (Limit oIndex a)) (Set (Limit oIndex a)) Source # | |
Eq a => CartesianClosedCategory (FinSet a) (Function a) (Set a) (FinSet (TwoProduct a)) (Function (TwoProduct a)) (Set (TwoProduct a)) (FinSet (Cartesian a)) (Function (Cartesian a)) (Set (Cartesian a)) Source # | |
type Rep (FinSet a) Source # | |
Defined in Math.Categories.FinSet type Rep (FinSet a) = D1 ('MetaData "FinSet" "Math.Categories.FinSet" "FiniteCategories-0.6.5.1-inplace" 'False) (C1 ('MetaCons "FinSet" 'PrefixI 'False) (U1 :: Type -> Type)) |