| Copyright | (c) Erich Gut |
|---|---|
| License | BSD3 |
| Maintainer | zerich.gut@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
OAlg.Category.Definition
Description
categories of morphisms. We adapted the concept of categories form Category to
better cover our needs.
Synopsis
- class Morphism c => Category c where
- cOne :: Struct (ObjectClass c) x -> c x x
- (.) :: c y z -> c x y -> c x z
- cOne' :: Category c => p c -> Struct (ObjectClass c) x -> c x x
- id :: x -> x
- const :: b -> a -> b
- curry :: ((a, b) -> c) -> a -> b -> c
- uncurry :: (a -> b -> c) -> (a, b) -> c
- fst :: (a, b) -> a
- snd :: (a, b) -> b
- curry3 :: ((a, b, c) -> d) -> a -> b -> c -> d
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
- class (Category c, Eq2 c) => Cayleyan2 c where
- invert2 :: c x y -> c y x
- class Morphism m where
- type ObjectClass m
- homomorphous :: m x y -> Homomorphous (ObjectClass m) x y
- domain :: m x y -> Struct (ObjectClass m) x
- range :: m x y -> Struct (ObjectClass m) y
- data Homomorphous s x y = (Struct s x) :>: (Struct s y)
- tauHom :: Transformable s t => Homomorphous s x y -> Homomorphous t x y
- tau1Hom :: Transformable1 f s => Homomorphous s x y -> Homomorphous s (f x) (f y)
- eqlDomain :: Struct Typ x -> Struct Typ x' -> m x y -> m x' y -> Maybe (x :~: x')
- eqlRange :: Struct Typ y -> Struct Typ y' -> m x y -> m x y' -> Maybe (y :~: y')
- eqlMorphism :: Typeable m => Struct Typ x -> Struct Typ x' -> Struct Typ y -> Struct Typ y' -> m x y -> m x' y' -> Maybe (m x y :~: m x' y')
- class Applicative h where
- amap :: h a b -> a -> b
- ($) :: Applicative h => h a b -> a -> b
- class Applicative1 h f where
- amap1 :: h a b -> f a -> f b
- class (Applicative c, Category c) => Functorial c
- data Forget t m x y where
- Forget :: Transformable (ObjectClass m) t => m x y -> Forget t m x y
- class (Morphism m, Transformable (ObjectClass m) t) => EmbeddableMorphism m t
- class EmbeddableMorphism m Typ => EmbeddableMorphismTyp m
Category
class Morphism c => Category c where Source #
category of morphisms.
Properties Let c be a type instance of the class Category, then
holds:
Instances
| Category (Homomorphous s) Source # | |
Defined in OAlg.Category.Definition Methods cOne :: Struct (ObjectClass (Homomorphous s)) x -> Homomorphous s x x Source # (.) :: Homomorphous s y z -> Homomorphous s x y -> Homomorphous s x z Source # | |
| Morphism m => Category (Path m) Source # | |
| Category c => Category (Op2 c) Source # | |
| Category (IdHom s) Source # | |
| Category (IsoOp s) Source # | |
| Category (IsoOpMap f s) Source # | |
| Category (->) Source # | |
Defined in OAlg.Category.Definition | |
cOne' :: Category c => p c -> Struct (ObjectClass c) x -> c x x Source #
the cOne to a given . The type Struct (ObjectClass c)p c serves only as
proxy and cOne' is lazy in it.
Note As ObjectClass may be a non-injective type family,
the type checker needs some times a little bit more information
to pic the right cOne.
Some basic definitions in the category (->)
the constant map given by a value in b.
Property Let y be in b then for all x in a holds: is identical
to const y xy.
Cayleyan
class (Category c, Eq2 c) => Cayleyan2 c where Source #
category of isomorphisms.
Property Let c be a type instance of Cayleyan2, then holds:
For all types x, y and f in c x y holds:
( and
invert2 f . f) == cOne (domain f)(f where . invert2 f) == cOne (range f)(==) = .eq2
Instances
| Cayleyan2 (Homomorphous m) Source # | |
Defined in OAlg.Category.Definition Methods invert2 :: Homomorphous m x y -> Homomorphous m y x Source # | |
| (Cayleyan2 m, EmbeddableMorphismTyp m) => Cayleyan2 (Path m) Source # | |
| Cayleyan2 c => Cayleyan2 (Op2 c) Source # | |
| Cayleyan2 (IdHom s) Source # | |
| ForgetfulTyp s => Cayleyan2 (IsoOp s) Source # | |
| ForgetfulTyp s => Cayleyan2 (IsoOpMap f s) Source # | |
Morphism
class Morphism m where Source #
morphism.
Minimal complete definition
Methods
homomorphous :: m x y -> Homomorphous (ObjectClass m) x y Source #
attests, that the types x and y fulfill the constraints given
by , i.e both fulfill the constraints
given by Homomorphous (ObjectClass m) x y and Structure (ObjectClass m) x
respectively.Structure (ObjectClass m) y
domain :: m x y -> Struct (ObjectClass m) x Source #
attests that the domain type x fulfills the constraints given
by .Structure (ObjectClass m) x
range :: m x y -> Struct (ObjectClass m) y Source #
attests that the range type y fulfills the constraints given
by .Structure (ObjectClass m) y
Instances
data Homomorphous s x y Source #
attest that both x and y have homomorphous structures, i.e.
both admit the same constraints given by the parameter s.
Instances
tauHom :: Transformable s t => Homomorphous s x y -> Homomorphous t x y Source #
transforming homomorphous structural attests.
tau1Hom :: Transformable1 f s => Homomorphous s x y -> Homomorphous s (f x) (f y) Source #
transforming homomorphous structural attests.
eqlDomain :: Struct Typ x -> Struct Typ x' -> m x y -> m x' y -> Maybe (x :~: x') Source #
gets for two Typeable types x and x' and for two parameterized types maybe an
attest that the domain types are equal.
eqlRange :: Struct Typ y -> Struct Typ y' -> m x y -> m x y' -> Maybe (y :~: y') Source #
gets for two Typeable types y and y' and for two parameterized types maybe an
attest that the range types are equal.
eqlMorphism :: Typeable m => Struct Typ x -> Struct Typ x' -> Struct Typ y -> Struct Typ y' -> m x y -> m x' y' -> Maybe (m x y :~: m x' y') Source #
gets maybe an attest that the two given morphisms types are equal.
Applicative
class Applicative h where Source #
family of types having a representation in (->).
Instances
($) :: Applicative h => h a b -> a -> b infixr 0 Source #
right associative application on values.
class Applicative1 h f where Source #
family of types having a representation in f a -> f b.
Instances
| HomDistributive h => Applicative1 h Matrix Source # | |
| HomOriented h => Applicative1 h (Diagram t n m) Source # | |
| HomDistributive h => Applicative1 h (Cone Dst p t n m) Source # | |
| HomMultiplicative h => Applicative1 h (Cone Mlt p t n m) Source # | |
| IsoMultiplicative h => Applicative1 h (Limes Mlt p t n m) Source # | |
| IsoDistributive h => Applicative1 h (Limits Dst p t n m) Source # | |
| IsoMultiplicative h => Applicative1 h (Limits Mlt p t n m) Source # | |
| Functor f => Applicative1 (->) f Source # | |
Defined in OAlg.Category.Applicative | |
Functorial
class (Applicative c, Category c) => Functorial c Source #
representable categories, i.e. covariant functors from an Applicative category
c to (.->)
Properties Let c be a type instance of the class Functorial then holds:
Instances
| (Applicative m, Morphism m) => Functorial (Path m) Source # | |
Defined in OAlg.Category.Path | |
| Functorial (IdHom s) Source # | |
Defined in OAlg.Hom.Oriented.Definition | |
| ForgetfulOrt s => Functorial (IsoOp s) Source # | |
Defined in OAlg.Hom.Oriented.Definition | |
| ForgetfulDst s => Functorial (IsoOpMap Matrix s) Source # | |
Defined in OAlg.Entity.Matrix.Definition | |
| ForgetfulOrt s => Functorial (IsoOpMap Path s) Source # | |
Defined in OAlg.Hom.Oriented.Definition | |
Forget
data Forget t m x y where Source #
forgets the ObjectClass of m and sets it to t, under the condition
that the ObjectClass of m is Transformable to t.
Constructors
| Forget :: Transformable (ObjectClass m) t => m x y -> Forget t m x y |
Instances
Embeddable
class (Morphism m, Transformable (ObjectClass m) t) => EmbeddableMorphism m t Source #
morphism for which its object class can be embedded into the given structure.
Instances
class EmbeddableMorphism m Typ => EmbeddableMorphismTyp m Source #
helper class to avoid undecidable instances.