Orders #
Defines classes for linear orders and proves some basic lemmas about them.
Definition of LinearOrder and lemmas about types with a linear order #
Default definition of max.
Instances For
Default definition of min.
Instances For
This attempts to prove that a given instance of compare is equal to compareOfLessAndEq by
introducing the arguments and trying the following approaches in order:
- seeing if rflworks
- seeing if the compareat hand is nonetheless essentiallycompareOfLessAndEq, but, because of implicit arguments, requires us to unfold the defs and split theifs in the definition ofcompareOfLessAndEq
- seeing if we can split by cases on the arguments, then see if the defs work themselves out
(useful when compareis defined via amatchstatement, as it is forBool)
Equations
- tacticCompareOfLessAndEq_rfl = Lean.ParserDescr.node `tacticCompareOfLessAndEq_rfl 1024 (Lean.ParserDescr.nonReservedSymbol "compareOfLessAndEq_rfl" false)
Instances For
A linear order is reflexive, transitive, antisymmetric and total relation ≤.
We assume that every linear ordered type has decidable (≤), (<), and (=).
- min : α → α → α
- max : α → α → α
- A linear order is total. 
- toDecidableLE : DecidableLE αIn a linearly ordered type, we assume the order relations are all decidable. 
- toDecidableEq : DecidableEq αIn a linearly ordered type, we assume the order relations are all decidable. 
- toDecidableLT : DecidableLT αIn a linearly ordered type, we assume the order relations are all decidable. 
- The minimum function is equivalent to the one you get from - minOfLe.
- The minimum function is equivalent to the one you get from - maxOfLe.
- Comparison via - compareis equal to the canonical comparison given decidable- <and- =.
Instances
Alias of le_of_not_ge.
Alias of le_of_not_gt.
Alias of eq_or_gt_of_not_lt.
Alias of eq_or_gt_of_not_lt.