Comparability and incomparability relations #
Two values in a preorder are said to be comparable whenever a ≤ b
or b ≤ a
. We define both the
comparability and incomparability relations.
In a linear order, CompRel (· ≤ ·) a b
is always true, and IncompRel (· ≤ ·) a b
is always
false.
Implementation notes #
Although comparability and incomparability are negations of each other, both relations are
convenient in different contexts, and as such, it's useful to keep them distinct. To move from one
to the other, use not_compRel_iff
and not_incompRel_iff
.
Main declarations #
CompRel
: The comparability relation.CompRel r a b
means thata
andb
is related in either direction byr
.IncompRel
: The incomparability relation.IncompRel r a b
means thata
andb
are related in neither direction byr
.
Todo #
These definitions should be linked to IsChain
and IsAntichain
.
Comparability #
Equations
- CompRel.decidableRel x✝¹ x✝ = inferInstanceAs (Decidable (r x✝¹ x✝ ∨ r x✝ x✝¹))
Alias of CompRel.of_le
.
Alias of CompRel.of_ge
.
Alias of CompRel.of_lt
.
Alias of CompRel.of_gt
.
Alias of CompRel.of_compRel_of_antisymmRel
.
Equations
- instTransCompRelLeAntisymmRel = { trans := ⋯ }
Alias of CompRel.of_antisymmRel_of_compRel
.
Equations
- instTransAntisymmRelLeCompRel = { trans := ⋯ }
A partial order where any two elements are comparable is a linear order.
Equations
Instances For
Incomparability relation #
Equations
- IncompRel.decidableRel x✝¹ x✝ = inferInstanceAs (Decidable (¬r x✝¹ x✝ ∧ ¬r x✝ x✝¹))
Alias of incompRel_of_incompRel_of_antisymmRel
.
Equations
- instTransIncompRelLeAntisymmRel = { trans := ⋯ }
Alias of incompRel_of_antisymmRel_of_incompRel
.
Equations
- instTransAntisymmRelLeIncompRel = { trans := ⋯ }