genvalidity-hspec-0.3.0.0: Standard spec's for GenValidity instances

Safe HaskellSafe
LanguageHaskell2010

Test.Validity.Relations.Antisymmetry

Synopsis

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) -> Property Source #

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

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

antisymmetryOnValid ((>) @Double)
antisymmetryOnValid ((>=) @Double)
antisymmetryOnValid ((<=) @Double)
antisymmetryOnValid ((<) @Double)
antisymmetryOnValid (Data.List.isPrefixOf @Double)
antisymmetryOnValid (Data.List.isSuffixOf @Double)
antisymmetryOnValid (Data.List.isInfixOf @Double)
antisymmetryOnValid (Data.List.isSubsequenceOf @Double)

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

antisymmetry ((>) @Int)
antisymmetry ((>=) @Int)
antisymmetry ((<=) @Int)
antisymmetry ((<) @Int)
antisymmetry (Data.List.isPrefixOf @Int)
antisymmetry (Data.List.isSuffixOf @Int)
antisymmetry (Data.List.isInfixOf @Int)
antisymmetry (Data.List.isSubsequenceOf @Int)
antisymmetry ((\x y -> even x && odd y) :: Int -> Int -> Bool)

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

antisymmetryOnArbitrary ((>) @Int)
antisymmetryOnArbitrary ((>=) @Int)
antisymmetryOnArbitrary ((<=) @Int)
antisymmetryOnArbitrary ((<) @Int)
antisymmetryOnArbitrary (Data.List.isPrefixOf @Int)
antisymmetryOnArbitrary (Data.List.isSuffixOf @Int)
antisymmetryOnArbitrary (Data.List.isInfixOf @Int)
antisymmetryOnArbitrary (Data.List.isSubsequenceOf @Int)
antisymmetryOnArbitrary ((\x y -> even x && odd y) :: Int -> Int -> Bool)