Processing math: 100%

lawz-0.0.1: Common mathematical laws.

Safe HaskellSafe
LanguageHaskell2010

Test.Relation.Connex

Description

Synopsis

Documentation

connex :: (r -> r -> Bool) -> r -> r -> Bool Source #

a,b:((a#b)(b#a))

For example, ≥ is a connex relation, while 'divides evenly' is not.

A connex relation cannot be symmetric, except for the universal relation.

semiconnex :: Eq r => (r -> r -> Bool) -> r -> r -> Bool Source #

a,b:¬(ab)((a#b)(b#a))

A binary relation is semiconnex if it relates all pairs of _distinct_ elements in some way.

A relation is connex if and only if it is semiconnex and reflexive.

semiconnex_on :: (r -> r -> Bool) -> (r -> r -> Bool) -> r -> r -> Bool Source #

a,b:¬(ab)((a#b)(b#a))

trichotomous :: Eq r => (r -> r -> Bool) -> r -> r -> Bool Source #

a,b,c:((a#b)(ab)(b#a))¬((a#b)(ab)(b#a))

Note that trichotomous (>) should hold for any Ord instance.

trichotomous_on :: (r -> r -> Bool) -> (r -> r -> Bool) -> r -> r -> Bool Source #

a,b,c:((a#b)(ab)(b#a))¬((a#b)(ab)(b#a))

In other words, exactly one of a#b, ab, or b#a holds.

For example, > is a trichotomous relation, while ≥ is not.