Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

Additive Structure

- class AdditiveMagma a where
- class AdditiveMagma a => AdditiveUnital a where
- class AdditiveMagma a => AdditiveAssociative a
- class AdditiveMagma a => AdditiveCommutative a
- class AdditiveMagma a => AdditiveInvertible a where
- class AdditiveMagma b => AdditiveHomomorphic a b where
- class AdditiveMagma a => AdditiveIdempotent a
- class (AdditiveUnital a, AdditiveAssociative a) => AdditiveMonoidal a
- class (AdditiveCommutative a, AdditiveUnital a, AdditiveAssociative a) => Additive a where
- class (AdditiveUnital a, AdditiveAssociative a, AdditiveInvertible a) => AdditiveRightCancellative a where
- class (AdditiveUnital a, AdditiveAssociative a, AdditiveInvertible a) => AdditiveLeftCancellative a where
- class (Additive a, AdditiveInvertible a) => AdditiveGroup a where

## Additive Structure

class AdditiveMagma a where Source #

class AdditiveMagma a => AdditiveUnital a where Source #

AdditiveUnital

zero `plus` a == a a `plus` zero == a

class AdditiveMagma a => AdditiveAssociative a Source #

AdditiveAssociative

(a `plus` b) `plus` c == a `plus` (b `plus` c)

class AdditiveMagma a => AdditiveCommutative a Source #

AdditiveCommutative

a `plus` b == b `plus` a

class AdditiveMagma a => AdditiveInvertible a where Source #

AdditiveInvertible

∀ a ∈ A: negate a ∈ A

law is true by construction in Haskell

class AdditiveMagma b => AdditiveHomomorphic a b where Source #

AdditiveHomomorphic

∀ a ∈ A: plushom a ∈ B

law is true by construction in Haskell

AdditiveMagma a => AdditiveHomomorphic a a Source # | |

class AdditiveMagma a => AdditiveIdempotent a Source #

AdditiveIdempotent

a `plus` a == a

class (AdditiveUnital a, AdditiveAssociative a) => AdditiveMonoidal a Source #

AdditiveMonoidal

class (AdditiveCommutative a, AdditiveUnital a, AdditiveAssociative a) => Additive a where Source #

Additive is commutative, unital and associative under addition

a + b = b + a

(a + b) + c = a + (b + c)

zero + a = a

a + zero = a

class (AdditiveUnital a, AdditiveAssociative a, AdditiveInvertible a) => AdditiveRightCancellative a where Source #

Non-commutative right minus

class (AdditiveUnital a, AdditiveAssociative a, AdditiveInvertible a) => AdditiveLeftCancellative a where Source #

Non-commutative left minus

class (Additive a, AdditiveInvertible a) => AdditiveGroup a where Source #

AdditiveGroup

a - a = zero

negate a = zero - a

negate a + a = zero