Orders #
Defines classes for preorders, partial orders, and linear orders and proves some basic lemmas about them.
- le_refl : ∀ (a : α), a ≤ a
A preorder is a reflexive, transitive relation ≤≤
with a < b
defined in the obvious way.
Instances
Equations
- One or more equations did not get rendered due to their size.
Definition of PartialOrder
and lemmas about types with a partial order #
Definition of LinearOrder
and lemmas about types with a linear order #
Default definition of max
.
Equations
- maxDefault a b = if a ≤ b then b else a
Default definition of min
.
Equations
- minDefault a b = if a ≤ b then a else b
A linear order is total.
In a linearly ordered type, we assume the order relations are all decidable.
decidable_le : DecidableRel fun x x_1 => x ≤ x_1In a linearly ordered type, we assume the order relations are all decidable.
decidable_eq : DecidableEq αIn a linearly ordered type, we assume the order relations are all decidable.
decidable_lt : DecidableRel fun x x_1 => x < x_1The minimum function is equivalent to the one you get from
minOfLe
.The minimum function is equivalent to the one you get from
maxOfLe
.
A linear order is reflexive, transitive, antisymmetric and total relation ≤≤
.
We assume that every linear ordered type has decidable (≤)≤)
, (<)
, and (=)
.
Instances
Equations
Equations
Equations
- instDecidableEq a b = LinearOrder.decidable_eq a b
Perform a case-split on the ordering of x
and y
in a decidable linear order.
Equations
- lt_by_cases x y h₁ h₂ h₃ = if h : x < y then h₁ h else if h' : y < x then h₃ h' else h₂ (_ : x = y)