verigraph-1.1.1: Software specification and verification tool based on graph rewriting.

Safe HaskellSafe
LanguageHaskell2010

Abstract.Morphism

Synopsis

Documentation

class Eq m => Morphism m where Source #

Associated Types

type Obj m :: * Source #

Methods

compose :: m -> m -> m Source #

Apply the first argument first (compose f g = g . f)

domain :: m -> Obj m Source #

codomain :: m -> Obj m Source #

id :: Obj m -> 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 # 

type Span m = (m, m) Source #

class Morphism m => FindMorphism m where Source #

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.