plankton-0.0.0.1: The core of a numeric prelude, taken from numhask

Safe HaskellSafe
LanguageHaskell2010

Plankton.Ring

Description

Ring classes. A distinguishment is made between Rings and Commutative Rings.

Synopsis

Documentation

class (AdditiveGroup a, MultiplicativeAssociative a, MultiplicativeUnital a, Distribution a) => Ring a Source #

Ring a summary of the laws inherited from the ring super-classes

zero + a == a
a + zero == a
(a + b) + c == a + (b + c)
a + b == b + a
a - a = zero
negate a = zero - a
negate a + a = zero
a + negate a = zero
one `times` a == a
a `times` one == a
(a `times` b) `times` c == a `times` (b `times` c)
a `times` (b + c) == a `times` b + a `times` c
(a + b) `times` c == a `times` c + b `times` c
a `times` zero == zero
zero `times` a == zero

class (Multiplicative a, Ring a) => CRing a Source #

CRing is a Ring with Multiplicative Commutation. It arises often due to * being defined as a multiplicative commutative operation.