Copyright | Guillaume Sabbagh 2022 |
---|---|
License | GPL-3 |
Maintainer | guillaumesabbagh@protonmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Provide a function to test the structure of a FiniteCategory
.
Synopsis
- data FiniteCategoryError m o
- checkFiniteCategory :: (FiniteCategory c m o, Morphism m o, Eq m, Eq o) => c -> Maybe (FiniteCategoryError m o)
Check structure
data FiniteCategoryError m o Source #
A data type to represent an incoherence inside a finite category.
Instances
(PrettyPrint m, PrettyPrint o) => PrettyPrint (FiniteCategoryError m o) Source # | |
Defined in Math.FiniteCategoryError pprint :: Int -> FiniteCategoryError m o -> String Source # pprintWithIndentations :: Int -> Int -> String -> FiniteCategoryError m o -> String Source # pprintIndent :: Int -> FiniteCategoryError m o -> String Source # | |
(Simplifiable m, Simplifiable o) => Simplifiable (FiniteCategoryError m o) Source # | |
Defined in Math.FiniteCategoryError simplify :: FiniteCategoryError m o -> FiniteCategoryError m o # | |
Generic (FiniteCategoryError m o) Source # | |
Defined in Math.FiniteCategoryError type Rep (FiniteCategoryError m o) :: Type -> Type from :: FiniteCategoryError m o -> Rep (FiniteCategoryError m o) x to :: Rep (FiniteCategoryError m o) x -> FiniteCategoryError m o | |
(Show o, Show m) => Show (FiniteCategoryError m o) Source # | |
Defined in Math.FiniteCategoryError showsPrec :: Int -> FiniteCategoryError m o -> ShowS show :: FiniteCategoryError m o -> String showList :: [FiniteCategoryError m o] -> ShowS | |
(Eq o, Eq m) => Eq (FiniteCategoryError m o) Source # | |
Defined in Math.FiniteCategoryError (==) :: FiniteCategoryError m o -> FiniteCategoryError m o -> Bool (/=) :: FiniteCategoryError m o -> FiniteCategoryError m o -> Bool | |
type Rep (FiniteCategoryError m o) Source # | |
Defined in Math.FiniteCategoryError type Rep (FiniteCategoryError m o) = D1 ('MetaData "FiniteCategoryError" "Math.FiniteCategoryError" "FiniteCategories-0.6.4.0-inplace" '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.