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

Language | Haskell2010 |

Multiplicate structure Many treatments of a numeric tower treat multiplication differently to addition. NumHask treats these two as exactly symmetrical, and thus departs from the usual mathematical terminology.

- class MultiplicativeMagma a where
- class MultiplicativeMagma a => MultiplicativeUnital a where
- class MultiplicativeMagma a => MultiplicativeAssociative a
- class MultiplicativeMagma a => MultiplicativeCommutative a
- class MultiplicativeMagma a => MultiplicativeInvertible a where
- class MultiplicativeMagma b => MultiplicativeHomomorphic a b where
- class (MultiplicativeUnital a, MultiplicativeAssociative a) => MultiplicativeMonoidal a
- class (MultiplicativeCommutative a, MultiplicativeUnital a, MultiplicativeAssociative a) => Multiplicative a where
- class (MultiplicativeUnital a, MultiplicativeAssociative a, MultiplicativeInvertible a) => MultiplicativeRightCancellative a where
- class (MultiplicativeUnital a, MultiplicativeAssociative a, MultiplicativeInvertible a) => MultiplicativeLeftCancellative a where
- class (Multiplicative a, MultiplicativeInvertible a) => MultiplicativeGroup a where

## Multiplicative Structure

class MultiplicativeMagma a where Source #

class MultiplicativeMagma a => MultiplicativeUnital a where Source #

MultiplicativeUnital

one `times` a == a a `times` one == a

class MultiplicativeMagma a => MultiplicativeAssociative a Source #

MultiplicativeAssociative

(a `times` b) `times` c == a `times` (b `times` c)

class MultiplicativeMagma a => MultiplicativeCommutative a Source #

MultiplicativeCommutative

a `times` b == b `times` a

class MultiplicativeMagma a => MultiplicativeInvertible a where Source #

MultiplicativeInvertible

∀ a ∈ A: recip a ∈ A

law is true by construction in Haskell

class MultiplicativeMagma b => MultiplicativeHomomorphic a b where Source #

MultiplicativeHomomorphic

∀ a ∈ A: timeshom a ∈ B

law is true by construction in Haskell

class (MultiplicativeUnital a, MultiplicativeAssociative a) => MultiplicativeMonoidal a Source #

MultiplicativeMonoidal

class (MultiplicativeCommutative a, MultiplicativeUnital a, MultiplicativeAssociative a) => Multiplicative a where Source #

Multiplicative is commutative, associative and unital under multiplication

a * b = b * a

(a * b) * c = a * (b * c)

one * a = a

a * one = a

class (MultiplicativeUnital a, MultiplicativeAssociative a, MultiplicativeInvertible a) => MultiplicativeRightCancellative a where Source #

Non-commutative right divide

class (MultiplicativeUnital a, MultiplicativeAssociative a, MultiplicativeInvertible a) => MultiplicativeLeftCancellative a where Source #

Non-commutative left divide

class (Multiplicative a, MultiplicativeInvertible a) => MultiplicativeGroup a where Source #

MultiplicativeGroup

a / a = one

recip a = one / a

recip a * a = one