Equations
- instReprOrdering = { reprPrec := reprOrdering✝ }
@[inline]
Combine two Ordering
s lexicographically.
Equations
- Ordering.orElse x x = match x, x with | Ordering.lt, x => Ordering.lt | Ordering.eq, o => o | Ordering.gt, x => Ordering.gt
Instances For
The relation corresponding to each Ordering
constructor (e.g. .lt.toProp a b
is a < b
).
Equations
- Ordering.toRel x = match (motive := Ordering → α → α → Prop) x with | Ordering.lt => fun x x_1 => x < x_1 | Ordering.eq => Eq | Ordering.gt => fun x x_1 => x > x_1
Instances For
Lift a decidable relation to an Ordering
,
assuming that incomparable terms are Ordering.eq
.
Equations
- cmpUsing lt a b = if lt a b then Ordering.lt else if lt b a then Ordering.gt else Ordering.eq