| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Numeric.Algebra.Rings.Quartaring
Description
Provides the Quartaring typeclass.
Since: 0.1
Synopsis
- class (ASemigroup r, MSemigroup r) => Quartaring r
Documentation
class (ASemigroup r, MSemigroup r) => Quartaring r Source #
Defines a Quartaring i.e. a structure with addition and multiplication.
In other words, a semiring that has no identity requirement. Should satisfy:
Distributive property:
a .*. (b .+. c) === (a .*. b) .+. (a .*. c) (b .+. c) .*. a === (b .*. a) .+. (c .*. a)
Examples:
- \( \mathbb{Z}^{\gt 1} \), the integers greater than one.
>>>:{-- Addition f1 :: (Quartaring r) => r -> r f1 x = x .+. x :}
>>>f1 510
>>>:{-- Multiplication f2 :: (Quartaring r) => r -> r f2 x = x .*. x :}
>>>f2 525
Since: 0.1