Equations
- instInhabitedOrdering = { default := Ordering.lt }
@[inline]
Equations
- compareOfLessAndEq x y = if x < y then Ordering.lt else if x = y then Ordering.eq else Ordering.gt
Instances For
Equations
- instOrdNat = { compare := fun (x y : Nat) => compareOfLessAndEq x y }
Equations
- instOrdInt = { compare := fun (x y : Int) => compareOfLessAndEq x y }
Equations
- instOrdBool = { compare := fun (x x_1 : Bool) => match x, x_1 with | false, true => Ordering.lt | true, false => Ordering.gt | x, x_2 => Ordering.eq }
Equations
- instOrdString = { compare := fun (x y : String) => compareOfLessAndEq x y }
Equations
- instOrdFin n = { compare := fun (x y : Fin n) => compare x.val y.val }
Equations
- instOrdUInt8 = { compare := fun (x y : UInt8) => compareOfLessAndEq x y }
Equations
- instOrdUInt16 = { compare := fun (x y : UInt16) => compareOfLessAndEq x y }
Equations
- instOrdUInt32 = { compare := fun (x y : UInt32) => compareOfLessAndEq x y }
Equations
- instOrdUInt64 = { compare := fun (x y : UInt64) => compareOfLessAndEq x y }
Equations
- instOrdUSize = { compare := fun (x y : USize) => compareOfLessAndEq x y }
Equations
- instOrdChar = { compare := fun (x y : Char) => compareOfLessAndEq x y }
Equations
- instDecidableRelLtLtOfOrd = inferInstanceAs (DecidableRel fun (a b : α) => (compare a b == Ordering.lt) = true)
Equations
- Ordering.isLE x = match x with | Ordering.lt => true | Ordering.eq => true | Ordering.gt => false
Instances For
Equations
- instDecidableRelLeLeOfOrd = inferInstanceAs (DecidableRel fun (a b : α) => Ordering.isLE (compare a b) = true)