| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Abstract.Morphism
- class Eq m => Morphism m where
- data MorphismType
- type Span m = (m, m)
- class Morphism m => FindMorphism m where
Documentation
class Eq m => Morphism m where Source #
Minimal complete definition
compose, domain, codomain, id, isMonomorphism, isEpimorphism, isIsomorphism
Methods
compose :: m -> m -> m Source #
Apply the first argument first (compose f g = g . f)
codomain :: m -> Obj m Source #
isMonomorphism :: m -> Bool Source #
isEpimorphism :: m -> Bool Source #
isIsomorphism :: m -> Bool Source #
Instances
| Morphism (GraphMorphism a b) Source # | |
| Morphism (TypedGraphMorphism a b) Source # | |
| Morphism (RuleMorphism a b) Source # | |
data MorphismType Source #
Enum for the types of morphisms that can be used / found
Constructors
| GenericMorphism | |
| Monomorphism | |
| Epimorphism | |
| Isomorphism |
Instances
class Morphism m => FindMorphism m where Source #
Minimal complete definition
findMorphisms, induceSpanMorphism, partialInjectiveMatches, findCospanCommuter
Methods
findMorphisms :: MorphismType -> Obj m -> Obj m -> [m] Source #
Given a type t of MorphismType and two objects A and B, it finds all the matches
m : A -> B in which m is of the type t
findMonomorphisms :: Obj m -> Obj m -> [m] Source #
Given two objects A and B, finds all monomorphisms from A to B
findEpimorphisms :: Obj m -> Obj m -> [m] Source #
Given two objects A and B, finds all epimorphisms from A to B
findIsomorphisms :: Obj m -> Obj m -> [m] Source #
Given two objects A and B, finds all isomorphisms from A to B
findAllMorphisms :: Obj m -> Obj m -> [m] Source #
Given two objects A and B, finds all morphisms from A to B
induceSpanMorphism :: [m] -> [m] -> m Source #
Given two lists of TypedGraphMorphism fi : Ai -> B and gi : Ai -> C it induces a Morphism
h : B -> C shuch that h . fi = gi for all i. The lists must have the same length and must
not be empty.
partialInjectiveMatches :: m -> m -> [m] Source #
Given a NAC n : L -> N and a match m : L -> G, finds the morphisms from N to G that are injective out of the image of n
findCospanCommuter :: MorphismType -> m -> m -> [m] Source #
Given two TypedGraphMorphism f : B -> A and g : C -> A it finds a list of Morphisms
hi : B -> C shuch that f . ¬g = hi for all i.