Lemmas about inequalities #
This file contains some lemmas about ≤
/≥
/<
/>
, and cmp
.
-
We simplify
a ≥ b
anda > b
tob ≤ a
andb < a
, respectively. This way we can formulate all lemmas using≤
/<
avoiding duplication. -
In some cases we introduce dot syntax aliases so that, e.g., from
(hab : a ≤ b) (hbc : b ≤ c) (hbc' : b < c)
one can provehab.trans hbc : a ≤ c
andhab.trans_lt hbc' : a < c
.
Alias of lt_of_le_of_lt
.
Alias of le_antisymm
.
Alias of lt_of_le_of_ne
.
Alias of lt_of_le_not_le
.
Alias of lt_or_eq_of_le
.
Alias of decidable.lt_or_eq_of_le
.
Alias of lt_of_lt_of_le
.
Alias of not_le_of_lt
.
Alias of not_lt_of_le
.
Alias of decidable.eq_or_lt_of_le
.
Alias of eq_or_lt_of_le
.
Like cmp
, but uses a ≤
on the type instead of <
. Given two elements
x
and y
, returns a three-way comparison result ordering
.
Equations
- cmp_le x y = ite (x ≤ y) (ite (y ≤ x) ordering.eq ordering.lt) ordering.gt
compares o a b
means that a
and b
have the ordering relation
o
between them, assuming that the relation a < b
is defined
Equations
- ordering.gt.compares a b = (a > b)
- ordering.eq.compares a b = (a = b)
- ordering.lt.compares a b = (a < b)
Generate a linear order structure from a preorder and cmp
function.
Equations
- linear_order_of_compares cmp h = {le := preorder.le _inst_1, lt := preorder.lt _inst_1, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := λ (a b : α), decidable_of_iff (cmp a b ≠ ordering.gt) _, decidable_eq := λ (a b : α), decidable_of_iff (cmp a b = ordering.eq) _, decidable_lt := λ (a b : α), decidable_of_iff (cmp a b = ordering.lt) _}