| Copyright | (c) Erich Gut |
|---|---|
| License | BSD3 |
| Maintainer | zerich.gut@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
OAlg.Structure.Oriented.Definition
Description
definition of Oriented structures.
Synopsis
- class (Entity q, Entity (Point q)) => Oriented q where
- type Point q
- orientation :: q -> Orientation (Point q)
- start :: q -> Point q
- end :: q -> Point q
- class Singleton (Point x) => Total x
- class Entity (Point x) => EntityPoint x
- class Ord (Point x) => OrdPoint x
- isEndo :: Oriented q => q -> Bool
- isEndoAt :: Oriented a => Point a -> a -> Bool
- type OS = Orientation Symbol
- data Ort
- structOrtOp :: Struct Ort x -> Struct Ort (Op x)
- class Transformable s Ort => ForgetfulOrt s
- class (Transposable q, Oriented q) => TransposableOriented q
- data Orientation p = p :> p
- opposite :: Orientation p -> Orientation p
- data Path q = Path (Point q) [q]
- pthLength :: Path q -> N
- pthOne :: Point q -> Path q
- pthMlt :: Oriented q => Path q -> Path q -> Path q
- data XOrtSite s q where
- class XStandardOrtSite s a where
- xStandardOrtSite :: XOrtSite s a
- class XStandardOrtSite To a => XStandardOrtSiteTo a
- class XStandardOrtSite From a => XStandardOrtSiteFrom a
- coXOrtSite :: XOrtSite s q -> Dual (XOrtSite s q)
- coXOrtSiteInv :: (Dual (Dual s) :~: s) -> Dual (XOrtSite s q) -> XOrtSite s q
- xosFromOpOp :: XOrtSite s (Op (Op q)) -> XOrtSite s q
- xosStart :: XOrtSite From q -> Point q -> X q
- xosEnd :: XOrtSite To q -> Point q -> X q
- xosPathMaxAt :: Oriented q => XOrtSite s q -> N -> Point q -> X (Path q)
- xosPathMax :: Oriented q => XOrtSite s q -> N -> X (Path q)
- data XOrtOrientation q = XOrtOrientation (X (Orientation (Point q))) (Orientation (Point q) -> X q)
- xoOrientation :: XOrtOrientation q -> X (Orientation (Point q))
- xoArrow :: XOrtOrientation q -> Orientation (Point q) -> X q
- xoPoint :: Oriented q => XOrtOrientation q -> X (Point q)
- coXOrtOrientation :: XOrtOrientation q -> Dual (XOrtOrientation q)
- xoTo :: Oriented q => XOrtOrientation q -> XOrtSite To q
- xoFrom :: Oriented q => XOrtOrientation q -> XOrtSite From q
- xoTtl :: Total q => X q -> XOrtOrientation q
- xoOrnt :: X p -> XOrtOrientation (Orientation p)
- class XStandardOrtOrientation q where
- class XStandard (Point a) => XStandardPoint a
- xStartOrnt :: X p -> XOrtSite From (Orientation p)
- xEndOrnt :: X p -> XOrtSite To (Orientation p)
Oriented
class (Entity q, Entity (Point q)) => Oriented q where Source #
types with a Oriented structure. The values of an Oriented structure will
be called arrows and the values of the associated Point type points. To each
arrow there is a start and a end point assigned.
Property Let q be a type instance of the class Oriented, then holds:
- For all
ainqholds:.orientationa==starta:>enda
Note
- If the types
qandare interpreted as setsPointqAandPandstart,endas functions fromAtoPthen this structure forms a quiver with arrows inAand points inP. Morphisms can be interpreted asOrientedstructures viaSomeMorphism. The bad thing about this is that we lose the check for composability of twoMorphisms given by the type checker, but we gain all the functionality ofOrientedstructures, i.e we can define homomorphisms, limits etc onMorphisms.
Minimal complete definition
orientation | start, end
Methods
orientation :: q -> Orientation (Point q) Source #
the orientation of an arrow.
start :: q -> Point q Source #
the start point of an arrow.
the end point of an arrow.
Instances
class Singleton (Point x) => Total x Source #
structures where its associated Point type is singleton. They yield
globally defiend algebraic operations.
Instances
| Total N Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Total Q Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Total Z Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Total N' Source # | |
Defined in OAlg.Entity.Natural | |
| Total W' Source # | |
Defined in OAlg.Entity.Natural | |
| Total Integer Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Total () Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Total Int Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Total x => Total (Op x) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Galoisian x => Total (GL2 x) Source # | |
Defined in OAlg.Entity.Matrix.GeneralLinearGroup | |
| Total (Permutation i) Source # | |
Defined in OAlg.Entity.Sequence.Permutation | |
| Total q => Total (Path q) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| Total (Dim x p) Source # | |
Defined in OAlg.Entity.Matrix.Dim | |
class Entity (Point x) => EntityPoint x Source #
helper class to avoid undecidable instances.
Instances
| EntityPoint N Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EntityPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EntityPoint Z Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EntityPoint Integer Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EntityPoint () Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EntityPoint Int Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EntityPoint x => EntityPoint (Op x) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| EntityPoint q => EntityPoint (Path q) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
class Ord (Point x) => OrdPoint x Source #
helper class to circumvent undecidable instances.
Instances
| OrdPoint N Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| OrdPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| OrdPoint Z Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| OrdPoint Integer Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| OrdPoint () Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| OrdPoint Int Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| OrdPoint (U x) Source # | |
Defined in OAlg.Entity.Product.ProductSymbol | |
| OrdPoint q => OrdPoint (Path q) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
type OS = Orientation Symbol Source #
as is an instance of almost every structured class it
serves as a standard type for validating.Orientation p
type representing the class of Oriented structures.
Instances
class Transformable s Ort => ForgetfulOrt s Source #
transformable to Oriented structure.
Instances
| ForgetfulOrt Dst Source # | |
Defined in OAlg.Structure.Distributive.Definition | |
| ForgetfulOrt FbrOrt Source # | |
Defined in OAlg.Structure.Fibred.Definition | |
| ForgetfulOrt Mlt Source # | |
Defined in OAlg.Structure.Multiplicative.Definition | |
| ForgetfulOrt Ort Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| ForgetfulOrt (Alg k) Source # | |
Defined in OAlg.Structure.Algebraic.Definition | |
Transposable
class (Transposable q, Oriented q) => TransposableOriented q Source #
transposable oriented structures.
Property Let q be a TransposableOriented structure, then holds:
For all a in q holds:
.orientation (transpose a) == opposite (orientation a)
Instances
| TransposableOriented N Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| TransposableOriented Q Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| TransposableOriented Z Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| (Distributive x, TransposableDistributive x) => TransposableOriented (Matrix x) Source # | |
Defined in OAlg.Entity.Matrix.Definition | |
| (Galoisian x, TransposableDistributive x) => TransposableOriented (GL2 x) Source # | |
Defined in OAlg.Entity.Matrix.GeneralLinearGroup | |
| TransposableMultiplicative c => TransposableOriented (Inv c) Source # | |
Defined in OAlg.Structure.Multiplicative.Definition | |
| Entity p => TransposableOriented (Orientation p) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
Orientation
data Orientation p Source #
orientation given by the start point as its first component and the end point as its second.
Property For all o in holds:
Orientation po .== start o :> end o
Note As Orientations are instances of almost all algebraic structures
defined here, they serve as a proof that this structures are instanceable.
Constructors
| p :> p infix 5 |
Instances
opposite :: Orientation p -> Orientation p Source #
the opposite orientation.
Path
a path in a Oriented structure q starting at a given point.
Definition Let q be a Oriented structure and p = a
path in Path s [a 0..a (n-1)]q, then p is valid if and only if
sisvalidanda iarevalidfor alli = 0..n-1.andstart(a (n-1))==sfor allstart(a i)==end(a (n+1))i = 0..n-2.
furthermore n is called the length of p.
Note Paths admit a canonical embedding in to Product.
Instances
X
Site
data XOrtSite s q where Source #
random variables and X q for
X (Point q)Oriented structure q.
Properties Let q be an instance of the class Oriented, then holds:
- Let
be inXStartxp xStart, then holds: For allXOrtSiteFromqpinandPointqxin the range ofxStart pholds:.startx==p - Let
be inXEndxp xEnd, then holds: For allXOrtSiteToqpinandPointqxin the range ofxEnd pholds:.endx==p
Note The random variables xp should have a bias to non trivial random variables
xp or >>= xStartxp .>>= xEnd
Constructors
| XStart :: X (Point q) -> (Point q -> X q) -> XOrtSite From q | |
| XEnd :: X (Point q) -> (Point q -> X q) -> XOrtSite To q |
class XStandardOrtSite s a where Source #
standard random variable for XOrtSite.
Methods
xStandardOrtSite :: XOrtSite s a Source #
Instances
class XStandardOrtSite To a => XStandardOrtSiteTo a Source #
Instances
| XStandard p => XStandardOrtSiteTo (Orientation p) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| (Multiplicative c, Sliced i c, XStandardOrtSite 'To c) => XStandardOrtSiteTo (SliceFactor 'To i c) Source # | |
Defined in OAlg.Entity.Slice.Definition | |
class XStandardOrtSite From a => XStandardOrtSiteFrom a Source #
Instances
| XStandardOrtSiteFrom (Matrix Z) Source # | |
Defined in OAlg.Entity.Matrix.Definition | |
| XStandard p => XStandardOrtSiteFrom (Orientation p) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| (Multiplicative c, Sliced i c, XStandardOrtSite 'From c) => XStandardOrtSiteFrom (SliceFactor 'From i c) Source # | |
Defined in OAlg.Entity.Slice.Definition | |
| XStandardOrtSiteFrom (SliceFactor 'To (Proxy :: Type -> Type) OS) Source # | |
Defined in OAlg.Entity.Slice.Definition | |
coXOrtSite :: XOrtSite s q -> Dual (XOrtSite s q) Source #
to the dual of a , with inverse XOrtSite s qcoXOrtSiteInv.
coXOrtSiteInv :: (Dual (Dual s) :~: s) -> Dual (XOrtSite s q) -> XOrtSite s q Source #
from the dual of a , with inverse Dual (XOrtSite s q)coXOrtSite.
xosStart :: XOrtSite From q -> Point q -> X q Source #
the random variable of arrows in q having all as start the given point.
xosEnd :: XOrtSite To q -> Point q -> X q Source #
the random variable of arrows in q having all as end the given point.
xosPathMaxAt :: Oriented q => XOrtSite s q -> N -> Point q -> X (Path q) Source #
tries to make a path at the given point with maximal length of the given length.
Properties Let xPath = , then holds:xosPathMaxAt xos n x
xosPathMax :: Oriented q => XOrtSite s q -> N -> X (Path q) Source #
random variable of paths with maximal length of the given length.
Orientation
data XOrtOrientation q Source #
random variable of arrows given by an orientation.
Properties Let be in XOrtOrientation xo xArrow for a
XOrtOrientation qOriented structure q, then holds: For all o in and Orientation qx in the
range of xArrow o holds: .orientation x == o
Note The random variable xo should have a bias to non trivial random variables
xo and as such the range of >>= xArrowxo should be included in one connection component
of q.
Constructors
| XOrtOrientation (X (Orientation (Point q))) (Orientation (Point q) -> X q) |
Instances
| Oriented q => Validable (XOrtOrientation q) Source # | |
Defined in OAlg.Structure.Oriented.Definition Methods valid :: XOrtOrientation q -> Statement Source # | |
| type Dual (XOrtOrientation q :: Type) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
xoOrientation :: XOrtOrientation q -> X (Orientation (Point q)) Source #
the underlying random variable of orientations.
xoArrow :: XOrtOrientation q -> Orientation (Point q) -> X q Source #
the underlying random variable of arrow given by the orientation.
xoPoint :: Oriented q => XOrtOrientation q -> X (Point q) Source #
the underlying random variable of points, i.e. the union of the induced start and end
random variable of xoOrientation.
coXOrtOrientation :: XOrtOrientation q -> Dual (XOrtOrientation q) Source #
to the dual.
xoTtl :: Total q => X q -> XOrtOrientation q Source #
random variable of for a total XOrtOrientation qq.
xoOrnt :: X p -> XOrtOrientation (Orientation p) Source #
the induced random variable of .Orientation q
class XStandardOrtOrientation q where Source #
standard random variable for XOrtOrientation.
Methods
Instances
| XStandardOrtOrientation Z Source # | |
Defined in OAlg.Structure.Oriented.Definition Methods | |
| (Additive x, FibredOriented x, XStandardOrtOrientation x, XStandardOrientationMatrix x) => XStandardOrtOrientation (Matrix x) Source # | |
Defined in OAlg.Entity.Matrix.Definition Methods xStandardOrtOrientation :: XOrtOrientation (Matrix x) Source # | |
| XStandard p => XStandardOrtOrientation (Orientation p) Source # | |
Defined in OAlg.Structure.Oriented.Definition Methods xStandardOrtOrientation :: XOrtOrientation (Orientation p) Source # | |
Orientation
class XStandard (Point a) => XStandardPoint a Source #
standard random variable of Points of a.
Instances
| XStandardPoint N Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| XStandardPoint Q Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| XStandardPoint Z Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| XStandardPoint (Matrix Z) Source # | |
Defined in OAlg.Entity.Matrix.Definition | |
| XStandard p => XStandardPoint (Orientation p) Source # | |
Defined in OAlg.Structure.Oriented.Definition | |
| (Multiplicative c, Sliced i c, XStandardOrtSite 'From c) => XStandardPoint (SliceFactor 'From i c) Source # | |
Defined in OAlg.Entity.Slice.Definition | |
| (Multiplicative c, Sliced i c, XStandardOrtSite 'To c) => XStandardPoint (SliceFactor 'To i c) Source # | |
Defined in OAlg.Entity.Slice.Definition | |
xStartOrnt :: X p -> XOrtSite From (Orientation p) Source #
the for XOrtSite From of the given random variable.Orientation p
xEndOrnt :: X p -> XOrtSite To (Orientation p) Source #
the of XOrtSite To of the given random variable.Orientation p