oalg-base-1.1.4.0: Algebraic structures on oriented entities and limits as a tool kit to solve algebraic problems.
Copyright(c) Erich Gut
LicenseBSD3
Maintainerzerich.gut@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

OAlg.Structure.Additive.Definition

Description

additive structures, i.e. structures with a partially defined addition (+).

Synopsis

Additive

class Fibred a => Additive a where Source #

Fibred structures with a partialy defined addition and having zero as the neutral element of the summation. An entity of a Additive structure will be called a summand.

Properties Let a be a Additive structure, then holds:

  1. For all r in Root a holds: root (zero r) == r.
  2. For all f and g in a holds:

    1. If root f == root g then f + g is valid and root (f + g) == root f.
    2. If root f /= root g then f + g is not valid and its evaluation will end up in a NotAddable-exception.
  3. For all f, g in a with root f == root g holds: f + g == g + f.
  4. For all f in a holds: f + zero (root f) == f
  5. For all f, g, h in a with root f == root g == root h holds: (f + g) + h == f + (g + h).
  6. For all f in a and n in N holds: ntimes 0 f == zero (root f) and ntimes (n + 1) f == f + ntimes n f.

Minimal complete definition

zero, (+)

Methods

zero :: Root a -> a Source #

the neutral element associated to each root. If there is no ambiguity for zero r we will briefly denote it by 0 r or just 0.

(+) :: a -> a -> a infixl 6 Source #

the addition for two summands.

ntimes :: N -> a -> a Source #

n times of a summand.

Instances

Instances details
Additive N Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root N -> N Source #

(+) :: N -> N -> N Source #

ntimes :: N -> N -> N Source #

Additive Q Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root Q -> Q Source #

(+) :: Q -> Q -> Q Source #

ntimes :: N -> Q -> Q Source #

Additive Z Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root Z -> Z Source #

(+) :: Z -> Z -> Z Source #

ntimes :: N -> Z -> Z Source #

Additive N' Source # 
Instance details

Defined in OAlg.Entity.Natural

Methods

zero :: Root N' -> N' Source #

(+) :: N' -> N' -> N' Source #

ntimes :: N -> N' -> N' Source #

Additive W' Source # 
Instance details

Defined in OAlg.Entity.Natural

Methods

zero :: Root W' -> W' Source #

(+) :: W' -> W' -> W' Source #

ntimes :: N -> W' -> W' Source #

Additive Integer Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Additive () Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root () -> () Source #

(+) :: () -> () -> () Source #

ntimes :: N -> () -> () Source #

Additive Int Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root Int -> Int Source #

(+) :: Int -> Int -> Int Source #

ntimes :: N -> Int -> Int Source #

(Additive a, FibredOriented a) => Additive (Op a) Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root (Op a) -> Op a Source #

(+) :: Op a -> Op a -> Op a Source #

ntimes :: N -> Op a -> Op a Source #

(Additive x, FibredOriented x) => Additive (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

zero :: Root (Matrix x) -> Matrix x Source #

(+) :: Matrix x -> Matrix x -> Matrix x Source #

ntimes :: N -> Matrix x -> Matrix x Source #

Semiring r => Additive (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

zero :: Root (Vector r) -> Vector r Source #

(+) :: Vector r -> Vector r -> Vector r Source #

ntimes :: N -> Vector r -> Vector r Source #

Entity p => Additive (Orientation p) Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

(Fibred a, Ord a, Semiring r, Commutative r) => Additive (Sum r a) Source # 
Instance details

Defined in OAlg.Entity.Sum.Definition

Methods

zero :: Root (Sum r a) -> Sum r a Source #

(+) :: Sum r a -> Sum r a -> Sum r a Source #

ntimes :: N -> Sum r a -> Sum r a Source #

(Distributive r, Total r, Commutative r, Ord a, Entity a) => Additive (SumSymbol r a) Source # 
Instance details

Defined in OAlg.Entity.Sum.SumSymbol

Methods

zero :: Root (SumSymbol r a) -> SumSymbol r a Source #

(+) :: SumSymbol r a -> SumSymbol r a -> SumSymbol r a Source #

ntimes :: N -> SumSymbol r a -> SumSymbol r a Source #

(Distributive a, Typeable t, Typeable n, Typeable m) => Additive (Transformation t n m a) Source # 
Instance details

Defined in OAlg.Entity.Diagram.Transformation

Methods

zero :: Root (Transformation t n m a) -> Transformation t n m a Source #

(+) :: Transformation t n m a -> Transformation t n m a -> Transformation t n m a Source #

ntimes :: N -> Transformation t n m a -> Transformation t n m a Source #

zero' :: Additive a => p a -> Root a -> a Source #

the zero to a given root. The type p c serves only as proxy and zero' is lazy in it.

Note As Point may be a non-injective type family, the type checker needs some times a little bit more information to pic the right zero.

data Add Source #

type representing the class of Additive structures.

Instances

Instances details
ForgetfulAdd Add Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

ForgetfulTyp Add Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

ForgetfulFbr Add Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Transformable Abl Add Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Abl x -> Struct Add x Source #

Transformable Add Ent Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Add x -> Struct Ent x Source #

Transformable Add Typ Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Add x -> Struct Typ x Source #

Transformable Add Fbr Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Add x -> Struct Fbr x Source #

Transformable Dst Add Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

Methods

tau :: Struct Dst x -> Struct Add x Source #

(Semiring r, Commutative r) => EmbeddableMorphism (HomSymbol r) Add Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

EmbeddableMorphism h Add => EmbeddableMorphism (OpHom h) Add Source # 
Instance details

Defined in OAlg.Hom.Oriented.Definition

Transformable (Alg k) Add Source # 
Instance details

Defined in OAlg.Structure.Algebraic.Definition

Methods

tau :: Struct (Alg k) x -> Struct Add x Source #

Transformable (Vec k) Add Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Methods

tau :: Struct (Vec k) x -> Struct Add x Source #

type Hom Add h Source # 
Instance details

Defined in OAlg.Hom.Additive

type Hom Add h = HomAdditive h
type Structure Add x Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

class (ForgetfulFbr s, Transformable s Add) => ForgetfulAdd s Source #

transformable to Additive structure.

Instances

Instances details
ForgetfulAdd Abl Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

ForgetfulAdd Add Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

ForgetfulAdd Dst Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

ForgetfulAdd (Alg k) Source # 
Instance details

Defined in OAlg.Structure.Algebraic.Definition

ForgetfulAdd (Vec k) Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Abelian

class Additive a => Abelian a where Source #

Additive structures having for each summand an additve inverse.

Properties Let a be a Additive structure, then holds:

  1. For all f in a holds: root (negate f) == root f.
  2. For all f in a holds: f + negate f == zero (root f).
  3. For all f and g in a holds:

    1. If root f == root g then f - g is valid and root (f - g) == root f.
    2. If root f /= root g then f - g is not valid and its evaluation will end up in a NotAddable-exception.
  4. For f and g in a with root f == root g holds: f - g == f + negate g.
  5. For all z in Z and f in a holds:

    1. If 0 <= z then ztimes z f == ntimes (prj z) f.
    2. If z < 0 then ztimes z f == negate (ntimes (prj z) f).

Minimal complete definition

negate | (-)

Methods

negate :: a -> a Source #

negation of a summand.

(-) :: a -> a -> a infixl 6 Source #

subtraction of two summands.

Properties

ztimes :: Z -> a -> a Source #

z times of a sumand.

Instances

Instances details
Abelian Q Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: Q -> Q Source #

(-) :: Q -> Q -> Q Source #

ztimes :: Z -> Q -> Q Source #

Abelian Z Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: Z -> Z Source #

(-) :: Z -> Z -> Z Source #

ztimes :: Z -> Z -> Z Source #

Abelian Integer Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Abelian () Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: () -> () Source #

(-) :: () -> () -> () Source #

ztimes :: Z -> () -> () Source #

Abelian Int Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: Int -> Int Source #

(-) :: Int -> Int -> Int Source #

ztimes :: Z -> Int -> Int Source #

(Abelian a, FibredOriented a) => Abelian (Op a) Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: Op a -> Op a Source #

(-) :: Op a -> Op a -> Op a Source #

ztimes :: Z -> Op a -> Op a Source #

(Abelian x, FibredOriented x) => Abelian (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

negate :: Matrix x -> Matrix x Source #

(-) :: Matrix x -> Matrix x -> Matrix x Source #

ztimes :: Z -> Matrix x -> Matrix x Source #

Ring r => Abelian (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

negate :: Vector r -> Vector r Source #

(-) :: Vector r -> Vector r -> Vector r Source #

ztimes :: Z -> Vector r -> Vector r Source #

Entity p => Abelian (Orientation p) Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

(Fibred a, Ord a, Ring r, Commutative r) => Abelian (Sum r a) Source # 
Instance details

Defined in OAlg.Entity.Sum.Definition

Methods

negate :: Sum r a -> Sum r a Source #

(-) :: Sum r a -> Sum r a -> Sum r a Source #

ztimes :: Z -> Sum r a -> Sum r a Source #

(Distributive r, Total r, Commutative r, Ord a, Abelian r, Entity a) => Abelian (SumSymbol r a) Source # 
Instance details

Defined in OAlg.Entity.Sum.SumSymbol

Methods

negate :: SumSymbol r a -> SumSymbol r a Source #

(-) :: SumSymbol r a -> SumSymbol r a -> SumSymbol r a Source #

ztimes :: Z -> SumSymbol r a -> SumSymbol r a Source #

(Distributive a, Abelian a, Typeable t, Typeable n, Typeable m) => Abelian (Transformation t n m a) Source # 
Instance details

Defined in OAlg.Entity.Diagram.Transformation

Methods

negate :: Transformation t n m a -> Transformation t n m a Source #

(-) :: Transformation t n m a -> Transformation t n m a -> Transformation t n m a Source #

ztimes :: Z -> Transformation t n m a -> Transformation t n m a Source #

isZero :: Additive a => a -> Bool Source #

check for beeing zero.

data Abl Source #

type representing the class of Abelian structures.

Instances

Instances details
ForgetfulAbl Abl Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

ForgetfulAdd Abl Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

ForgetfulTyp Abl Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

ForgetfulFbr Abl Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Transformable Abl Ent Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Abl x -> Struct Ent x Source #

Transformable Abl Add Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Abl x -> Struct Add x Source #

Transformable Abl Typ Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Abl x -> Struct Typ x Source #

Transformable Abl Fbr Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

tau :: Struct Abl x -> Struct Fbr x Source #

type Structure Abl x Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

type Structure Abl x = Abelian x

class (ForgetfulFbr s, ForgetfulAdd s, Transformable s Abl) => ForgetfulAbl s Source #

transformable to Abelian structure.

Instances

Instances details
ForgetfulAbl Abl Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Orphan instances

Additive a => Projectible a (Sheaf a) Source # 
Instance details

Methods

prj :: Sheaf a -> a Source #