Equations
- instReprOrdering_mathlib = { reprPrec := reprOrdering✝ }
@[inline]
Combine two Ordering
s lexicographically.
Equations
- Ordering.lt.orElse x = Ordering.lt
- Ordering.eq.orElse x = x
- Ordering.gt.orElse x = Ordering.gt
Instances For
The relation corresponding to each Ordering
constructor (e.g. .lt.toProp a b
is a < b
).
Equations
- Ordering.lt.toRel = fun (x1 x2 : α) => x1 < x2
- Ordering.eq.toRel = Eq
- Ordering.gt.toRel = fun (x1 x2 : α) => x1 > x2
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