Copyright | (c) Erich Gut |
---|---|
License | BSD3 |
Maintainer | zerich.gut@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Diagram t n m a where
- DiagramEmpty :: Diagram 'Empty N0 N0 a
- DiagramDiscrete :: FinList n (Point a) -> Diagram Discrete n N0 a
- DiagramChainTo :: Point a -> FinList m a -> Diagram (Chain To) (m + 1) m a
- DiagramChainFrom :: Point a -> FinList m a -> Diagram (Chain From) (m + 1) m a
- DiagramParallelLR :: Point a -> Point a -> FinList m a -> Diagram (Parallel LeftToRight) N2 m a
- DiagramParallelRL :: Point a -> Point a -> FinList m a -> Diagram (Parallel RightToLeft) N2 m a
- DiagramSink :: Point a -> FinList m a -> Diagram (Star To) (m + 1) m a
- DiagramSource :: Point a -> FinList m a -> Diagram (Star From) (m + 1) m a
- DiagramGeneral :: FinList n (Point a) -> FinList m (a, Orientation N) -> Diagram General n m a
- data DiagramType
- rt' :: forall (t :: DiagramType). (Dual (Dual t) :~: t) -> Dual (Dual (Dual t)) :~: Dual t
- dgType :: Diagram t n m a -> DiagramType
- dgTypeRefl :: Diagram t n m a -> Dual (Dual t) :~: t
- dgPoints :: Oriented a => Diagram t n m a -> FinList n (Point a)
- dgCenter :: Diagram (Star t) n m c -> Point c
- dgArrows :: Diagram t n m a -> FinList m a
- dgMap :: Hom Ort h => h a b -> Diagram t n m a -> Diagram t n m b
- dgQuiver :: Diagram t n m a -> Quiver n m
- chnToStart :: Oriented a => Diagram (Chain To) n m a -> Point a
- chnFromStart :: Diagram (Chain From) n m a -> Point a
- dgPrlAdjZero :: Distributive a => Diagram (Parallel LeftToRight) n m a -> Diagram (Parallel LeftToRight) n (m + 1) a
- dgPrlTail :: Diagram (Parallel d) n (m + 1) a -> Diagram (Parallel d) n m a
- dgPrlDiffHead :: Abelian a => Diagram (Parallel d) n (m + 1) a -> Diagram (Parallel d) n (m + 1) a
- dgPrlDiffTail :: Abelian a => Diagram (Parallel d) n (m + 1) a -> Diagram (Parallel d) n m a
- dgToOp :: DiagramDuality f g a -> f a -> g (Op a)
- dgFromOp :: DiagramDuality f g a -> g (Op a) -> f a
- data DiagramDuality f g a where
- coDiagram :: Diagram t n m a -> Dual (Diagram t n m a)
- coDiagramInv :: Oriented a => (Dual (Dual t) :~: t) -> Dual (Diagram t n m a) -> Diagram t n m a
- dgFromOpOp :: Oriented a => Diagram t n m (Op (Op a)) -> Diagram t n m a
- data SomeDiagram a where
- SomeDiagram :: Diagram t n m a -> SomeDiagram a
- sdgMap :: Hom Ort h => h a b -> SomeDiagram a -> SomeDiagram b
- sdgFromOpOp :: Oriented a => SomeDiagram (Op (Op a)) -> SomeDiagram a
- coSomeDiagram :: SomeDiagram a -> Dual (SomeDiagram a)
- coSomeDiagramInv :: Oriented a => Dual (SomeDiagram a) -> SomeDiagram a
- data XDiagram t n m a where
- XDiagramEmpty :: XDiagram 'Empty N0 N0 a
- XDiagramDiscrete :: Any n -> X (Point a) -> XDiagram Discrete n N0 a
- XDiagramChainTo :: Any m -> XOrtSite To a -> XDiagram (Chain To) (m + 1) m a
- XDiagramChainFrom :: Any m -> XOrtSite From a -> XDiagram (Chain From) (m + 1) m a
- XDiagramParallelLR :: Any m -> XOrtOrientation a -> XDiagram (Parallel LeftToRight) N2 m a
- XDiagramParallelRL :: Any m -> XOrtOrientation a -> XDiagram (Parallel RightToLeft) N2 m a
- XDiagramSink :: Any m -> XOrtSite To a -> XDiagram (Star To) (m + 1) m a
- XDiagramSource :: Any m -> XOrtSite From a -> XDiagram (Star From) (m + 1) m a
- xDiagram :: Oriented a => (Dual (Dual t) :~: t) -> XDiagram t n m a -> X (Diagram t n m a)
- xSomeDiagram :: Oriented a => X SomeNatural -> XOrtSite To a -> XOrtSite From a -> XOrtOrientation a -> X (SomeDiagram a)
- dstSomeDiagram :: Oriented a => Int -> X (SomeDiagram a) -> IO ()
- xSomeDiagramOrnt :: Entity p => X SomeNatural -> X p -> X (SomeDiagram (Orientation p))
Diagram
data Diagram t n m a where Source #
diagram for a Oriented
structure a
of type t
having n
points
and m
arrows.
Properties Let d
be in
for a Diagram
t n m aOriented
structure a
, then holds:
- If
d
matches
then holds:DiagramChainTo
e ase
and==
end
a0
for allstart
ai==
end
ai+1i = 0..m-2
wherea0
.:|
..:|
ai:|
..:|
am-1:|
Nil
= as - If
d
matches
then holds:DiagramChainFrom
s ass
and==
start
a0
for allend
ai==
start
ai+1i = 0..m-2
wherea0
.:|
..:|
ai:|
..:|
am-1:|
Nil
= as - If
d
matches
then holds:DiagramParallelLR
l r as
for allorientation
a==
l:>
ra
inas
. - If
d
matches
then holds:DiagramParallelRL
l r as
for allorientation
a==
r:>
la
inas
. - If
d
matches
then holds:DiagramSink
e ase
for all==
end
aa
inas
. - If
d
matches
then holds:DiagramSource
s ass
for all==
start
aa
inas
. - If
d
matches
then holdsDiagramGeneral
ps aijs==
start
aijand
pj==
end
aijfor all
aijin
aijsand
ps = p0..pn-1@.
DiagramEmpty :: Diagram 'Empty N0 N0 a | |
DiagramDiscrete :: FinList n (Point a) -> Diagram Discrete n N0 a | |
DiagramChainTo :: Point a -> FinList m a -> Diagram (Chain To) (m + 1) m a | |
DiagramChainFrom :: Point a -> FinList m a -> Diagram (Chain From) (m + 1) m a | |
DiagramParallelLR :: Point a -> Point a -> FinList m a -> Diagram (Parallel LeftToRight) N2 m a | |
DiagramParallelRL :: Point a -> Point a -> FinList m a -> Diagram (Parallel RightToLeft) N2 m a | |
DiagramSink :: Point a -> FinList m a -> Diagram (Star To) (m + 1) m a | |
DiagramSource :: Point a -> FinList m a -> Diagram (Star From) (m + 1) m a | |
DiagramGeneral :: FinList n (Point a) -> FinList m (a, Orientation N) -> Diagram General n m a |
Instances
data DiagramType Source #
the types of a Diagram
.
Instances
rt' :: forall (t :: DiagramType). (Dual (Dual t) :~: t) -> Dual (Dual (Dual t)) :~: Dual t Source #
Dual
is well defined on diagram types.
dgType :: Diagram t n m a -> DiagramType Source #
the type of a diagram.
dgTypeRefl :: Diagram t n m a -> Dual (Dual t) :~: t Source #
reflexivity of the underlying diagram type.
dgMap :: Hom Ort h => h a b -> Diagram t n m a -> Diagram t n m b Source #
mapping of a diagram via a homomorphism on Oriented
structures.
Chain
chnToStart :: Oriented a => Diagram (Chain To) n m a -> Point a Source #
the last point of the chain.
Parallel
dgPrlAdjZero :: Distributive a => Diagram (Parallel LeftToRight) n m a -> Diagram (Parallel LeftToRight) n (m + 1) a Source #
adjoins a zero
arrow as the first parallel arrow.
dgPrlTail :: Diagram (Parallel d) n (m + 1) a -> Diagram (Parallel d) n m a Source #
the _tail__ of a parallel diagram.
dgPrlDiffHead :: Abelian a => Diagram (Parallel d) n (m + 1) a -> Diagram (Parallel d) n (m + 1) a Source #
subtracts to every arrow of the parallel diagram the first arrow.
dgPrlDiffTail :: Abelian a => Diagram (Parallel d) n (m + 1) a -> Diagram (Parallel d) n m a Source #
subtracts the first arrow to all the others an drops it.
Duality
data DiagramDuality f g a where Source #
Op
-duality between diagrams.
coDiagramInv :: Oriented a => (Dual (Dual t) :~: t) -> Dual (Diagram t n m a) -> Diagram t n m a Source #
from the dual diagram, with inverse of coDiagram
.
SomeDiagram
data SomeDiagram a where Source #
some diagram.
SomeDiagram :: Diagram t n m a -> SomeDiagram a |
Instances
Oriented a => Show (SomeDiagram a) Source # | |
Defined in OAlg.Entity.Diagram.Definition showsPrec :: Int -> SomeDiagram a -> ShowS # show :: SomeDiagram a -> String # showList :: [SomeDiagram a] -> ShowS # | |
Oriented a => Validable (SomeDiagram a) Source # | |
Defined in OAlg.Entity.Diagram.Definition valid :: SomeDiagram a -> Statement Source # | |
type Dual (SomeDiagram a :: Type) Source # | |
Defined in OAlg.Entity.Diagram.Definition |
sdgMap :: Hom Ort h => h a b -> SomeDiagram a -> SomeDiagram b Source #
mapping of some diagram via a homomorphism on Oriented
structures.
sdgFromOpOp :: Oriented a => SomeDiagram (Op (Op a)) -> SomeDiagram a Source #
coSomeDiagram :: SomeDiagram a -> Dual (SomeDiagram a) Source #
the dual of some diagram, with inverse coSomeDiagramInv
.
coSomeDiagramInv :: Oriented a => Dual (SomeDiagram a) -> SomeDiagram a Source #
from the dual of some diagram, with inverse coSomeDiagram
.
X
data XDiagram t n m a where Source #
generator for random variables of diagrams.
XDiagramEmpty :: XDiagram 'Empty N0 N0 a | |
XDiagramDiscrete :: Any n -> X (Point a) -> XDiagram Discrete n N0 a | |
XDiagramChainTo :: Any m -> XOrtSite To a -> XDiagram (Chain To) (m + 1) m a | |
XDiagramChainFrom :: Any m -> XOrtSite From a -> XDiagram (Chain From) (m + 1) m a | |
XDiagramParallelLR :: Any m -> XOrtOrientation a -> XDiagram (Parallel LeftToRight) N2 m a | |
XDiagramParallelRL :: Any m -> XOrtOrientation a -> XDiagram (Parallel RightToLeft) N2 m a | |
XDiagramSink :: Any m -> XOrtSite To a -> XDiagram (Star To) (m + 1) m a | |
XDiagramSource :: Any m -> XOrtSite From a -> XDiagram (Star From) (m + 1) m a |
xDiagram :: Oriented a => (Dual (Dual t) :~: t) -> XDiagram t n m a -> X (Diagram t n m a) Source #
the induced random variables of diagrams.
xSomeDiagram :: Oriented a => X SomeNatural -> XOrtSite To a -> XOrtSite From a -> XOrtOrientation a -> X (SomeDiagram a) Source #
the induced random variable of some diagrams.
dstSomeDiagram :: Oriented a => Int -> X (SomeDiagram a) -> IO () Source #
distribution of a random variable of some diagrams.
xSomeDiagramOrnt :: Entity p => X SomeNatural -> X p -> X (SomeDiagram (Orientation p)) Source #
random variable of some diagram of
.Orientation
p