- class Eq a => Morphism a where
- data FuncT
- data Mor a
- nrm :: Eq t => Mor t -> Mor t
- atomary :: Eq t => Mor t -> Bool
- arrow :: a -> Mor a -> Mor a -> Mor a
- element :: a -> Mor a -> Mor a
- coelement :: a -> Mor a -> Mor a
- object :: a -> Mor a
- objectId :: a -> Mor a
- tid :: Mor a
- vert :: Eq a => Mor a -> Mor a
- horz :: Eq a => Mor a -> Mor a
- collect :: (Num b, Ord a) => Mor a -> Map (Mor a) b
- data Rule a = DefEqual (Mor a) (Mor a)
- (\==) :: Mor a -> Mor a -> Rule a
- apply :: Eq a => Rule String -> Mor a -> Mor a
Morphism
class Eq a => Morphism a whereSource
Class of morphisms.
Returns domain of the given morphism.
Returns codomain of the given morphism.
Checks whether morphism is id.
Composition of two morphisms (should be associative).
Tensor product of two morphisms.
Types of the functional modifier.
Morphism data type
Basic functions on morphisms
nrm :: Eq t => Mor t -> Mor tSource
Normalizes the term representing morphism, e.g. turns ((a * b) * c)
to (a * b * c)
arrow :: a -> Mor a -> Mor a -> Mor aSource
Creates Arrow
by morphism information (e.g. name), domain and codomain.
element :: a -> Mor a -> Mor aSource
Creates generalized element, i.e. an arrow from the tensorial Id to the given object.
coelement :: a -> Mor a -> Mor aSource
Creates generalized coelement, i.e. an arrow from the the given object to the tensorial Id.
Tensor product functoriality
Utilities
collect :: (Num b, Ord a) => Mor a -> Map (Mor a) bSource
Collects atomary subterms of the given arrow as keys of the map.
Rules
Rule type