This module provides utilities for the creation of order-related typeclass instances.
Creates a Min α instance from LE α and DecidableLE α so that min a b is either a or b,
preferring a over b when in doubt.
Has a LawfulOrderLeftLeaningMin α instance.
Instances For
Creates a Max α instance from LE α and DecidableLE α so that max a b is either a or b,
preferring a over b when in doubt.
Has a LawfulOrderLeftLeaningMax α instance.
Instances For
If an LE α instance is reflexive and transitive, then it represents a preorder.
If an LE α instance is transitive and total, then it represents a linear preorder.
If an LE α is reflexive, antisymmetric and transitive, then it represents a partial order.
If an LE α instance is antisymmetric, transitive and total, then it represents a linear order.
Returns a LawfulOrderMin α instance given certain properties.
This lemma derives a LawfulOrderMin α instance from two properties involving LE α and Min α
instances.
The produced instance entails LawfulOrderInf α and MinEqOr α.
Returns a LawfulOrderMin α instance given that max a b returns either a or b and that
it is less than or equal to both of them. The ≤ relation needs to be transitive.
The produced instance entails LawfulOrderInf α and MinEqOr α.
Returns a LawfulOrderMax α instance given certain properties.
This lemma derives a LawfulOrderMax α instance from two properties involving LE α and Max α
instances.
The produced instance entails LawfulOrderSup α and MaxEqOr α.
Equations
- ⋯ = ⋯
Instances For
Returns a LawfulOrderMax α instance given that max a b returns either a or b and that
it is larger than or equal to both of them. The ≤ relation needs to be transitive.
The produced instance entails LawfulOrderSup α and MaxEqOr α.
If an LT α instance is asymmetric and its negation is transitive, then LE.ofLT α represents a
linear preorder.
If an LT α instance is asymmetric and its negation is transitive and antisymmetric, then
LE.ofLT α represents a linear order.
Derives a LawfulOrderMin α instance for LE.ofLT from two properties involving
LT α and Min α instances.
The produced instance entails LawfulOrderInf α and MinEqOr α.
Derives a LawfulOrderMax α instance for LE.ofLT from two properties involving LT α and
Max α instances.
The produced instance entails LawfulOrderSup α and MaxEqOr α.
Equations
- ⋯ = ⋯