This library provides properties for the Semiring
type class that
can be checked using libraries like QuickCheck or SmallCheck.
- module Data.Semiring
- plus'comm :: Semiring s => s -> s -> Bool
- left'zero :: Semiring s => s -> Bool
- add'assoc :: Semiring s => s -> s -> s -> Bool
- left'one :: Semiring s => s -> Bool
- right'one :: Semiring s => s -> Bool
- mul'assoc :: Semiring s => s -> s -> s -> Bool
- left'distr :: Semiring s => s -> s -> s -> Bool
- right'distr :: Semiring s => s -> s -> s -> Bool
- left'ann :: Semiring s => s -> Bool
- right'ann :: Semiring s => s -> Bool
Documentation
module Data.Semiring
left'distr :: Semiring s => s -> s -> s -> BoolSource
a .*. (b .+. c) == (a .*. b) .+. (a .*. c)
right'distr :: Semiring s => s -> s -> s -> BoolSource
(a .+. b) .*. c == (a .*. c) .+. (b .*. c)