| Copyright | (c) Erich Gut |
|---|---|
| License | BSD3 |
| Maintainer | zerich.gut@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
OAlg.Data.Dualisable
Description
defining the type of the co-object according to the kind of a given object.
Special care has been taken for objects of parameterized types over a structured type (see OAlg.Entity.Diagram.Definition which serves as a boiler plate for all dualities implemented here).
Synopsis
- type family Dual (x :: k) :: k
- type family Dual1 (c :: k -> Type) :: k -> Type
- newtype Dl1 (d :: k -> Type) (x :: k) = Dl1 (Dual1 d x)
- fromDl1 :: forall {k} (d :: k -> Type) (x :: k). Dl1 d x -> Dual1 d x
- mapDl1 :: forall {k} (d :: k -> Type) (x :: k) (y :: k). (Dual1 d x -> Dual1 d y) -> Dl1 d x -> Dl1 d y
- class Show (Dual1 d x) => ShowDual1 (d :: k -> Type) (x :: k)
- class Eq (Dual1 d x) => EqDual1 (d :: k -> Type) (x :: k)
- class Dualisable x where
- fromDual' :: Dualisable x => p x -> Dual x -> x
- class Reflexive x where
- fromBidual' :: Reflexive x => p x -> Dual (Dual x) -> x
- class Transposable x where
- transpose :: x -> x
- data Site
- type family ToSite (s :: k) :: Site
- data Side
- data Direction
Dual
type family Dual (x :: k) :: k Source #
the kind of the co-object according to the kind of given object.
Instances
type family Dual1 (c :: k -> Type) :: k -> Type Source #
the parameterized kind of the co-object according to the parameterized kind of a given object.
Instances
mapDl1 :: forall {k} (d :: k -> Type) (x :: k) (y :: k). (Dual1 d x -> Dual1 d y) -> Dl1 d x -> Dl1 d y Source #
mapping Dl1.
class Show (Dual1 d x) => ShowDual1 (d :: k -> Type) (x :: k) Source #
helper class to avoid undecidable instances.
Instances
| (Show a, ShowPoint a) => ShowDual1 (Diagram t n m :: Type -> Type) (a :: Type) Source # | |
Defined in OAlg.Entity.Diagram.Definition | |
| (Show a, ShowPoint a) => ShowDual1 (DiagramTrafo t n m :: Type -> Type) (a :: Type) Source # | |
Defined in OAlg.Entity.Diagram.Transformation | |
| Oriented x => ShowDual1 (DiagramG Diagram t n m :: Type -> Type) (x :: Type) Source # | |
Defined in OAlg.Entity.Diagram.Diagrammatic | |
| (Show x, ShowPoint x) => ShowDual1 (Cone s p Diagram t n m :: Type -> Type) (x :: Type) Source # | |
Defined in OAlg.Limes.Cone.Duality | |
class Eq (Dual1 d x) => EqDual1 (d :: k -> Type) (x :: k) Source #
helper class to avoid undecidable instances.
Instances
| (Eq a, EqPoint a) => EqDual1 (Diagram t n m :: Type -> Type) (a :: Type) Source # | |
Defined in OAlg.Entity.Diagram.Definition | |
| (Eq a, EqPoint a) => EqDual1 (DiagramTrafo t n m :: Type -> Type) (a :: Type) Source # | |
Defined in OAlg.Entity.Diagram.Transformation | |
| Oriented x => EqDual1 (DiagramG Diagram t n m :: Type -> Type) (x :: Type) Source # | |
Defined in OAlg.Entity.Diagram.Diagrammatic | |
| (Eq x, EqPoint x) => EqDual1 (Cone s p Diagram t n m :: Type -> Type) (x :: Type) Source # | |
Defined in OAlg.Limes.Cone.Duality | |
Dualisable
class Dualisable x where Source #
admitting a duality.
Property Let x be Dualisable, than holds: toDual is a bijection
with its inverse fromDual.
Instances
fromDual' :: Dualisable x => p x -> Dual x -> x Source #
Reflexive
class Reflexive x where Source #
admitting reflection.
Property Let x be Reflexive, than holds:
toBidualis a bijection with its inversefromBidual.
fromBidual' :: Reflexive x => p x -> Dual (Dual x) -> x Source #
fromBidual enriched with a parameterized type p which serves as a proxy -
e.g. Proxy or Id will serve - and will not be evaluated.
It serves for the type checker to pick the right fromBidual.
Transposable
class Transposable x where Source #
transposable types.
Property Let x be a Transposable, then holds:
For all x in x holds: .transpose (transpose x) == x
Instances
| Transposable Direction Source # | |
| Transposable Side Source # | |
| Transposable Site Source # | |
| Transposable N Source # | |
| Transposable Q Source # | |
| Transposable Z Source # | |
| (Distributive x, TransposableDistributive x) => Transposable (Matrix x) Source # | |
| (Galoisian x, TransposableDistributive x) => Transposable (GL2 x) Source # | |
| TransposableMultiplicative c => Transposable (Inv c) Source # | |
| Transposable (Orientation p) Source # | |
Defined in OAlg.Structure.Oriented.Orientation Methods transpose :: Orientation p -> Orientation p Source # | |
| (Transposable x, Ord n) => Transposable (Entries n n x) Source # | |
Site
Instances
| Bounded Site Source # | |
| Enum Site Source # | |
| Show Site Source # | |
| Eq Site Source # | |
| Ord Site Source # | |
| Transposable Site Source # | |
| type Dual 'From Source # | |
Defined in OAlg.Data.Dualisable | |
| type Dual 'To Source # | |
Defined in OAlg.Data.Dualisable | |
| type ToPerspective 'From Source # | |
Defined in OAlg.Limes.Perspective | |
| type ToPerspective 'To Source # | |
Defined in OAlg.Limes.Perspective | |
type family ToSite (s :: k) :: Site Source #
mapping to Site.
Instances
| type ToSite 'Injective Source # | |
Defined in OAlg.Limes.Perspective | |
| type ToSite 'Projective Source # | |
Defined in OAlg.Limes.Perspective | |
Side
Direction
concept of the directions LeftToRight and RightToLeft.
Constructors
| LeftToRight | |
| RightToLeft |
Instances
| Bounded Direction Source # | |
| Enum Direction Source # | |
Defined in OAlg.Data.Dualisable Methods succ :: Direction -> Direction # pred :: Direction -> Direction # fromEnum :: Direction -> Int # enumFrom :: Direction -> [Direction] # enumFromThen :: Direction -> Direction -> [Direction] # enumFromTo :: Direction -> Direction -> [Direction] # enumFromThenTo :: Direction -> Direction -> Direction -> [Direction] # | |
| Show Direction Source # | |
| Eq Direction Source # | |
| Ord Direction Source # | |
| Transposable Direction Source # | |
| type Dual 'LeftToRight Source # | |
Defined in OAlg.Data.Dualisable | |
| type Dual 'RightToLeft Source # | |
Defined in OAlg.Data.Dualisable | |