Copyright | Guillaume Sabbagh 2021 |
---|---|
License | GPL-3 |
Maintainer | guillaumesabbagh@protonmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The PartialFinCat category has as objects finite categories and as morphisms partial functors between them.
A partial functor is a functor where the object map and the morphism map can be partial functions.
It is itself a large category (therefore not a finite one),
we only construct finite full subcategories of the mathematical infinite PartialFinCat category.
PartialFinCat
is the type of full finite subcategories of PartialFinCat.
To instantiate it, use the PartialFinCat
constructor on a list of categories.
To convert a PartialFunctor
into any other kind of functor, see Diagram.Conversion
.
For example, see ExampleCat.ExamplePartialFinCat
.
Synopsis
- data PartialFunctor c m o = PartialFunctor {
- srcPF :: c
- tgtPF :: c
- omapPF :: AssociationList o o
- mmapPF :: AssociationList m m
- newtype PartialFinCat c m o = PartialFinCat [c]
- domainObjects :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o]
- domainArrows :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m]
- codomainObjects :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o]
- codomainArrows :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m]
- objectsNotMapped :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o]
- arrowsNotMapped :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m]
- objectsNotMappedTo :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o]
- arrowsNotMappedTo :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m]
Documentation
data PartialFunctor c m o Source #
A PartialFunctor
F between two categories is a partial map between objects and a partial map between arrows of the two categories such that :
F (srcPF f) = srcPF (F f)
F (tgtPF f) = tgtPF (F f)
F (f @ g) = F(f) @ F(g)
F (identity a) = identity (F a)
It is meant to be a morphism between categories within PartialFinCat
, it is homogeneous, the type of the source category must be the same as the type of the target category.
To convert a PartialFunctor
into any other kind of functor, see Diagram.Conversion
.
PartialFunctor | |
|
Instances
newtype PartialFinCat c m o Source #
An instance of PartialFinCat
is a list of categories of interest.
Listing all arrows between two objects (i.e. listing PartialFunctors between two categories) is slow (there are a lot of candidates).
PartialFinCat [c] |
Instances
(FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => GeneratedFiniteCategory (PartialFinCat c m o) (PartialFunctor c m o) c Source # | |
Defined in Cat.PartialFinCat genAr :: PartialFinCat c m o -> c -> c -> [PartialFunctor c m o] Source # decompose :: PartialFinCat c m o -> PartialFunctor c m o -> [PartialFunctor c m o] Source # genArrows :: PartialFinCat c m o -> [PartialFunctor c m o] Source # | |
(FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => FiniteCategory (PartialFinCat c m o) (PartialFunctor c m o) c Source # | |
Defined in Cat.PartialFinCat ob :: PartialFinCat c m o -> [c] Source # identity :: PartialFinCat c m o -> c -> PartialFunctor c m o Source # ar :: PartialFinCat c m o -> c -> c -> [PartialFunctor c m o] Source # arrows :: PartialFinCat c m o -> [PartialFunctor c m o] Source # |
domainObjects :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o] Source #
Returns the objects mapped by a partial functor.
domainArrows :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m] Source #
Returns the arrows mapped by a partial functor.
codomainObjects :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o] Source #
Returns the objects mapped onto by a partial functor.
codomainArrows :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m] Source #
Returns the arrows mapped onto by a partial functor.
objectsNotMapped :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o] Source #
Returns the objects not mapped by a partial functor.
arrowsNotMapped :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m] Source #
Returns the arrows not mapped by a partial functor.
objectsNotMappedTo :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [o] Source #
Returns the objects not mapped onto by a partial functor.
arrowsNotMappedTo :: (FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => PartialFunctor c m o -> [m] Source #
Returns the arrows not mapped onto by a partial functor.