FiniteCategories-0.6.0.1: Finite categories and usual categorical constructions on them.
CopyrightGuillaume Sabbagh 2022
LicenseGPL-3
Maintainerguillaumesabbagh@protonmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.FiniteCategoryError

Description

Provide a function to test the structure of a FiniteCategory.

Synopsis

Check structure

data FiniteCategoryError m o Source #

A data type to represent an incoherence inside a finite category.

Instances

Instances details
(PrettyPrint m, PrettyPrint o) => PrettyPrint (FiniteCategoryError m o) Source # 
Instance details

Defined in Math.FiniteCategoryError

(Simplifiable m, Simplifiable o) => Simplifiable (FiniteCategoryError m o) Source # 
Instance details

Defined in Math.FiniteCategoryError

Generic (FiniteCategoryError m o) Source # 
Instance details

Defined in Math.FiniteCategoryError

Associated Types

type Rep (FiniteCategoryError m o) :: Type -> Type #

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

Defined in Math.FiniteCategoryError

(Eq o, Eq m) => Eq (FiniteCategoryError m o) Source # 
Instance details

Defined in Math.FiniteCategoryError

type Rep (FiniteCategoryError m o) Source # 
Instance details

Defined in Math.FiniteCategoryError

type Rep (FiniteCategoryError m o) = D1 ('MetaData "FiniteCategoryError" "Math.FiniteCategoryError" "FiniteCategories-0.6.0.1-L2v014CZIYe4CTCeXkyH5k" 'False) (((C1 ('MetaCons "CompositionNotAssociative" 'PrefixI 'True) ((S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "g") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)) :*: (S1 ('MetaSel ('Just "h") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: (S1 ('MetaSel ('Just "fg_h") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "f_gh") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)))) :+: C1 ('MetaCons "WrongSource" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "realSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 o))) :+: (C1 ('MetaCons "WrongTarget" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "realTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 o)) :+: (C1 ('MetaCons "IdentityNotLeftNeutral" 'PrefixI 'True) (S1 ('MetaSel ('Just "idL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "foidL") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m))) :+: C1 ('MetaCons "IdentityNotRightNeutral" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: (S1 ('MetaSel ('Just "idR") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "idRof") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)))))) :+: ((C1 ('MetaCons "MorphismsShouldNotBeEqual" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "g") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)) :+: C1 ('MetaCons "NotTransitive" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel ('Just "g") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m))) :+: (C1 ('MetaCons "GeneratorIsNotAMorphism" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)) :+: (C1 ('MetaCons "MorphismDoesntDecomposesIntoGenerators" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: (S1 ('MetaSel ('Just "decomp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [m]) :*: S1 ('MetaSel ('Just "notGen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m))) :+: C1 ('MetaCons "WrongDecomposition" 'PrefixI 'True) (S1 ('MetaSel ('Just "f") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: (S1 ('MetaSel ('Just "decomp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [m]) :*: S1 ('MetaSel ('Just "comp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)))))))

checkFiniteCategory :: (FiniteCategory c m o, Morphism m o, Eq m, Eq o) => c -> Maybe (FiniteCategoryError m o) Source #

Checks the category axioms for a FiniteCategory.

If an error is found in the category, Just a FiniteCategoryError is returned. Otherwise, Nothing is returned.