genvalidity-property-1.0.0.0: Standard properties for functions on `Validity` types

Safe Haskell | None
Language | Haskell2010

Test.Validity.Relations.Symmetry

Synopsis

- symmetricOnElems :: (a -> a -> Bool) -> a -> a -> Bool
- symmetryOnGens :: Show a => (a -> a -> Bool) -> Gen (a, a) -> (a -> [a]) -> Property
- symmetry :: (Show a, GenValid a) => (a -> a -> Bool) -> Property
- symmetryOnArbitrary :: (Show a, Arbitrary a) => (a -> a -> Bool) -> Property

# Documentation

symmetricOnElems Source #

Arguments

:: (a -> a -> Bool) | A relation
-> a |
-> a | Two elements
-> Bool |

\[ Symmetric(\prec) \quad\equiv\quad \forall a, b: (a \prec b) \Leftrightarrow (b \prec a) \]

symmetryOnGens :: Show a => (a -> a -> Bool) -> Gen (a, a) -> (a -> [a]) -> Property Source #

symmetry :: (Show a, GenValid a) => (a -> a -> Bool) -> Property Source #

    symmetry ((==) :: Int -> Int -> Bool)

    symmetry ((/=) :: Int -> Int -> Bool)

symmetryOnArbitrary :: (Show a, Arbitrary a) => (a -> a -> Bool) -> Property Source #

    symmetryOnArbitrary ((==) :: Int -> Int -> Bool)

    symmetryOnArbitrary ((/=) :: Int -> Int -> Bool)