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

Safe Haskell | None
Language | Haskell2010

Test.Validity.Relations.Antisymmetry

Synopsis

- antisymmetricOnElemsWithEquality :: (a -> a -> Bool) -> (a -> a -> Bool) -> a -> a -> Bool
- antisymmetryOnGensWithEquality :: Show a => (a -> a -> Bool) -> Gen (a, a) -> (a -> a -> Bool) -> (a -> [a]) -> Property
- antisymmetryOnGens :: (Show a, Eq a) => (a -> a -> Bool) -> Gen (a, a) -> (a -> [a]) -> Property
- antisymmetry :: (Show a, Eq a, GenValid a) => (a -> a -> Bool) -> Property
- antisymmetryOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> a -> Bool) -> Property

# Documentation

antisymmetricOnElemsWithEquality Source #

Arguments

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

\[ Antisymmetric(\prec, \doteq) \quad\equiv\quad \forall a, b: ((a \prec b) \wedge (b \prec a)) \Rightarrow (a \doteq b) \]

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

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

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

    antisymmetry ((>) :: Int -> Int -> Bool)

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

    antisymmetry ((<=) :: Int -> Int -> Bool)

    antisymmetry ((<) :: Int -> Int -> Bool)

    antisymmetry (Data.List.isPrefixOf :: [Int] -> [Int] -> Bool)

    antisymmetry (Data.List.isSuffixOf :: [Int] -> [Int] -> Bool)

    antisymmetry (Data.List.isInfixOf :: [Int] -> [Int] -> Bool)

    antisymmetry ((\x y -> even x && odd y) :: Int -> Int -> Bool)

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

    antisymmetryOnArbitrary ((>) :: Int -> Int -> Bool)

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

    antisymmetryOnArbitrary ((<=) :: Int -> Int -> Bool)

    antisymmetryOnArbitrary ((<) :: Int -> Int -> Bool)

    antisymmetryOnArbitrary (Data.List.isPrefixOf :: [Int] -> [Int] -> Bool)

    antisymmetryOnArbitrary (Data.List.isSuffixOf :: [Int] -> [Int] -> Bool)

    antisymmetryOnArbitrary (Data.List.isInfixOf :: [Int] -> [Int] -> Bool)

    antisymmetryOnArbitrary ((\x y -> even x && odd y) :: Int -> Int -> Bool)