Documentation

Lake.Util.Compare

class Lake.EqOfCmp (α : Type u) (cmp : ααOrdering) :

Proof that the equality of a compare function corresponds to propositional equality.

Instances
    class Lake.LawfulCmpEq (α : Type u) (cmp : ααOrdering) extends Lake.EqOfCmp α cmp :

    Proof that the equality of a compare function corresponds to propositional equality and vice versa.

    Instances
      @[simp]
      theorem Lake.cmp_iff_eq {α : Type u_1} {cmp : ααOrdering} {a a' : α} [Lake.LawfulCmpEq α cmp] :
      cmp a a' = Ordering.eq a = a'
      class Lake.EqOfCmpWrt (α : Type u) {β : Type v} (f : αβ) (cmp : ααOrdering) :

      Proof that the equality of a compare function corresponds to propositional equality with respect to a given function.

      • eq_of_cmp_wrt : ∀ {a a' : α}, cmp a a' = Ordering.eqf a = f a'
      Instances
        instance Lake.instEqOfCmpWrtOfEqOfCmp {α : Type u_1} {cmp : ααOrdering} {β✝ : Type u_2} {f : αβ✝} [Lake.EqOfCmp α cmp] :
        Equations
        • =
        theorem Lake.eq_of_compareOfLessAndEq {α : Type u_1} [LT α] [DecidableEq α] {a a' : α} [Decidable (a < a')] (h : compareOfLessAndEq a a' = Ordering.eq) :
        a = a'
        theorem Lake.compareOfLessAndEq_rfl {α : Type u_1} [LT α] [DecidableEq α] {a : α} [Decidable (a < a)] (lt_irrefl : ¬a < a) :