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

ConeCategory.ConeCategory

Description

A cone is an object in the comma category (D|1_F) where D is the diagonal functor and 1_F is the diagram that selects the diagram of interest in the functor category.

A cocone is an object in the comma category (1_F|D).

Synopsis

Cone related functions and types.

type Cone c1 m1 o1 c2 m2 o2 = CommaObject o2 One (NaturalTransformation c1 m1 o1 c2 m2 o2) Source #

A Cone is a CommaObject in the CommaCategory (D|1_F).

type ConeMorphism c1 m1 o1 c2 m2 o2 = CommaMorphism o2 One m2 One (NaturalTransformation c1 m1 o1 c2 m2 o2) Source #

A ConeMorphism is a morphism between cones.

type ConeCategory c1 m1 o1 c2 m2 o2 = CommaCategory c2 m2 o2 One One One (FunctorCategory c1 m1 o1 c2 m2 o2) (NaturalTransformation c1 m1 o1 c2 m2 o2) (Diagram c1 m1 o1 c2 m2 o2) Source #

ConeCategory is the type of the cone category, it is a CommaCategory (D|1_F).

apex :: Cone c1 m1 o1 c2 m2 o2 -> o2 Source #

Returns the apex of a Cone.

coneToNaturalTransformation :: Cone c1 m1 o1 c2 m2 o2 -> NaturalTransformation c1 m1 o1 c2 m2 o2 Source #

Returns the Cone as a NaturalTransformation.

naturalTransformationToCone . coneToNaturalTransformation = id
coneToNaturalTransformation . naturalTransformationToCone = id

naturalTransformationToCone :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2) => NaturalTransformation c1 m1 o1 c2 m2 o2 -> Cone c1 m1 o1 c2 m2 o2 Source #

Returns a NaturalTransformation as a Cone.

naturalTransformationToCone . coneToNaturalTransformation = id
coneToNaturalTransformation . naturalTransformationToCone = id

mkConeCategory :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq c1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2, Eq c2, Eq m2, Eq o2) => Diagram c1 m1 o1 c2 m2 o2 -> ConeCategory c1 m1 o1 c2 m2 o2 Source #

Constructs the category of cones of a diagram. Objects of the category are CommaObject objects with the apex of the cone in the indexSrc field and the natural transformation in the arrow field.

conesOfApex :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq c1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2, Eq c2, Eq m2, Eq o2) => Diagram c1 m1 o1 c2 m2 o2 -> o2 -> [Cone c1 m1 o1 c2 m2 o2] Source #

Returns all cones of a given apex.

terminalObjects :: (FiniteCategory c m o, Morphism m o) => c -> [o] Source #

Returns the list of terminal objects in a category.

limits :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq c1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2, Eq c2, Eq m2, Eq o2) => Diagram c1 m1 o1 c2 m2 o2 -> [Cone c1 m1 o1 c2 m2 o2] Source #

Returns limits of a diagram (terminal cones).

Cocone related functions and types.

type Cocone c1 m1 o1 c2 m2 o2 = CommaObject One o2 (NaturalTransformation c1 m1 o1 c2 m2 o2) Source #

A Cocone is a CommaObject in the CommaCategory (1_F|D).

type CoconeMorphism c1 m1 o1 c2 m2 o2 = CommaMorphism One o2 One m2 (NaturalTransformation c1 m1 o1 c2 m2 o2) Source #

A CoconeMorphism is a morphism between cocones.

type CoconeCategory c1 m1 o1 c2 m2 o2 = CommaCategory One One One c2 m2 o2 (FunctorCategory c1 m1 o1 c2 m2 o2) (NaturalTransformation c1 m1 o1 c2 m2 o2) (Diagram c1 m1 o1 c2 m2 o2) Source #

CoconeCategory is the type of the cocone category, it is a CommaCategory (1_F|D).

nadir :: Cocone c1 m1 o1 c2 m2 o2 -> o2 Source #

Returns the nadir of a Cocone.

coconeToNaturalTransformation :: Cocone c1 m1 o1 c2 m2 o2 -> NaturalTransformation c1 m1 o1 c2 m2 o2 Source #

Returns the Cocone as a NaturalTransformation.

naturalTransformationToCocone :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2) => NaturalTransformation c1 m1 o1 c2 m2 o2 -> Cocone c1 m1 o1 c2 m2 o2 Source #

Returns a NaturalTransformation as a Cocone.

naturalTransformationToCocone . coconeToNaturalTransformation = id
coconeToNaturalTransformation . naturalTransformationToCocone = id

mkCoconeCategory :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq c1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2, Eq c2, Eq m2, Eq o2) => Diagram c1 m1 o1 c2 m2 o2 -> CoconeCategory c1 m1 o1 c2 m2 o2 Source #

Constructs the category of cocones of a diagram. Objects of the category are CommaObject objects with the nadir of the cone in the indexTgt field and the natural transformation in the arrow field.

coconesOfNadir :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq c1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2, Eq c2, Eq m2, Eq o2) => Diagram c1 m1 o1 c2 m2 o2 -> o2 -> [Cocone c1 m1 o1 c2 m2 o2] Source #

Returns all cocones of a given nadir.

initialObjects :: (FiniteCategory c m o, Morphism m o) => c -> [o] Source #

Returns the list of intial objects in a category.

colimits :: (FiniteCategory c1 m1 o1, Morphism m1 o1, Eq c1, Eq m1, Eq o1, FiniteCategory c2 m2 o2, Morphism m2 o2, Eq c2, Eq m2, Eq o2) => Diagram c1 m1 o1 c2 m2 o2 -> [Cocone c1 m1 o1 c2 m2 o2] Source #

Returns colimits of a diagram (initial cocones).