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

Cat.PartialFinCat

Description

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

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.

Constructors

PartialFunctor 

Fields

Instances

Instances details
(Eq c, Eq o, Eq m) => Eq (PartialFunctor c m o) Source # 
Instance details

Defined in Cat.PartialFinCat

Methods

(==) :: PartialFunctor c m o -> PartialFunctor c m o -> Bool

(/=) :: PartialFunctor c m o -> PartialFunctor c m o -> Bool

(Show c, Show o, Show m) => Show (PartialFunctor c m o) Source # 
Instance details

Defined in Cat.PartialFinCat

Methods

showsPrec :: Int -> PartialFunctor c m o -> ShowS

show :: PartialFunctor c m o -> String

showList :: [PartialFunctor c m o] -> ShowS

(FiniteCategory c m o, Morphism m o, PrettyPrintable c, PrettyPrintable m, PrettyPrintable o, Eq m, Eq o) => PrettyPrintable (PartialFunctor c m o) Source # 
Instance details

Defined in Cat.PartialFinCat

Methods

pprint :: PartialFunctor c m o -> String Source #

(Eq c, Eq m, Eq o) => Morphism (PartialFunctor c m o) c Source # 
Instance details

Defined in Cat.PartialFinCat

Methods

(@) :: PartialFunctor c m o -> PartialFunctor c m o -> PartialFunctor c m o Source #

source :: PartialFunctor c m o -> c Source #

target :: PartialFunctor c m o -> c Source #

(FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => GeneratedFiniteCategory (PartialFinCat c m o) (PartialFunctor c m o) c Source # 
Instance details

Defined in Cat.PartialFinCat

Methods

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 # 
Instance details

Defined in Cat.PartialFinCat

Methods

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 #

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).

Constructors

PartialFinCat [c] 

Instances

Instances details
(FiniteCategory c m o, Morphism m o, Eq c, Eq m, Eq o) => GeneratedFiniteCategory (PartialFinCat c m o) (PartialFunctor c m o) c Source # 
Instance details

Defined in Cat.PartialFinCat

Methods

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 # 
Instance details

Defined in Cat.PartialFinCat

Methods

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.