Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
NumHask.Algebra.Ring
Description
Ring classes. A distinguishment is made between Rings and Commutative Rings.
- class (MultiplicativeAssociative a, MultiplicativeUnital a, Distribution a) => Semiring a
- class (Semiring a, AdditiveGroup a) => Ring a
- class (Multiplicative a, Ring a) => CRing a
- class Semiring a => StarSemiring a where
- class (StarSemiring a, AdditiveIdempotent a) => KleeneAlgebra a
Documentation
class (MultiplicativeAssociative a, MultiplicativeUnital a, Distribution a) => Semiring a Source #
Semiring
class (Semiring a, AdditiveGroup 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.
class Semiring a => StarSemiring a where Source #
StarSemiring
star a = one + a `times` star a
class (StarSemiring a, AdditiveIdempotent a) => KleeneAlgebra a Source #
KleeneAlgebra
a `times` x + x = a ==> star a `times` x + x = x x `times` a + x = a ==> x `times` star a + x = x