weighted-regexp-0.3.0.1: Weighted Regular Expression Matcher

Data.Semiring.Properties

Description

This library provides properties for the Semiring type class that can be checked using libraries like QuickCheck or SmallCheck.

Synopsis

Documentation

plus'comm :: Semiring s => s -> s -> BoolSource

 a .+. b  ==  b .+. a

left'zero :: Semiring s => s -> BoolSource

 zero .+. a  ==  a

add'assoc :: Semiring s => s -> s -> s -> BoolSource

 (a .+. b) .+. c  ==  a .+. (b .+. c)

left'one :: Semiring s => s -> BoolSource

 one .*. a  ==  a

right'one :: Semiring s => s -> BoolSource

 a .*. one  ==  a

mul'assoc :: Semiring s => s -> s -> s -> BoolSource

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

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)

left'ann :: Semiring s => s -> BoolSource

 zero .*. a  ==  zero

right'ann :: Semiring s => s -> BoolSource

 a .*. zero  ==  zero