The areas / V01. The language of Mathlib
Mathlib.Data.Ordering.Basic
6 declarations. Mathlib docs · Source
def Ordering.Compares E1 #
{α : Type u_1} → [LT α] → Ordering → α → α → Prop
Compares o a b means that a and b have the ordering relation o between them, assuming
that the relation a < b is defined.
theorem Ordering.compares_lt E0 #
∀ {α : Type u_1} [inst : LT α] (a b : α), Ordering.lt.Compares a b = (a < b)
theorem Ordering.compares_eq E0 #
∀ {α : Type u_1} [inst : LT α] (a b : α), Ordering.eq.Compares a b = (a = b)
theorem Ordering.compares_gt E0 #
∀ {α : Type u_1} [inst : LT α] (a b : α), Ordering.gt.Compares a b = (a > b)
def cmpUsing E1 #
{α : Type u} → (lt : α → α → Prop) → [DecidableRel lt] → α → α → Ordering
Lift a decidable relation to an Ordering,
assuming that incomparable terms are Ordering.eq.
def cmp E1 #
{α : Type u} → [inst : LT α] → [DecidableLT α] → α → α → Ordering
Construct an Ordering from a type with a decidable LT instance,
assuming that incomparable terms are Ordering.eq.