Documentation

Std.Data.RBMap.Lemmas

Additional lemmas for Red-black trees #

def Std.RBNode.depth {α : Type u_1} :

O(n). depth t is the maximum number of nodes on any path to a leaf. It is an upper bound on most tree operations.

Equations
Instances For

    depthLB c n is the best upper bound on the depth of any balanced red-black tree with root colored c and black-height n.

    Equations
    Instances For

      depthUB c n is the best upper bound on the depth of any balanced red-black tree with root colored c and black-height n.

      Equations
      Instances For
        theorem Std.RBNode.WF.depth_bound {α : Type u_1} {cmp : ααOrdering} {t : Std.RBNode α} (h : Std.RBNode.WF cmp t) :

        A well formed tree has t.depth ∈ O(log t.size), that is, it is well balanced. This justifies the O(log n) bounds on most searching operations of RBSet.

        @[simp]
        theorem Std.RBNode.mem_nil {α : Type u_1} {x : α} :
        ¬x Std.RBNode.nil
        @[simp]
        theorem Std.RBNode.mem_node {α : Type u_1} {y : α} {c : Std.RBColor} {a : Std.RBNode α} {x : α} {b : Std.RBNode α} :
        y Std.RBNode.node c a x b y = x y a y b
        theorem Std.RBNode.All_def {α : Type u_1} {p : αProp} {t : Std.RBNode α} :
        Std.RBNode.All p t ∀ (x : α), x tp x
        theorem Std.RBNode.Any_def {α : Type u_1} {p : αProp} {t : Std.RBNode α} :
        Std.RBNode.Any p t ∃ (x : α), x t p x
        theorem Std.RBNode.memP_def :
        ∀ {α : Type u_1} {cut : αOrdering} {t : Std.RBNode α}, Std.RBNode.MemP cut t ∃ (x : α), x t cut x = Ordering.eq
        theorem Std.RBNode.mem_def :
        ∀ {α : Type u_1} {cmp : ααOrdering} {x : α} {t : Std.RBNode α}, Std.RBNode.Mem cmp x t ∃ (y : α), y t cmp x y = Ordering.eq
        theorem Std.RBNode.mem_congr {α : Type u_1} {cmp : ααOrdering} {x : α} {y : α} [Std.TransCmp cmp] {t : Std.RBNode α} (h : cmp x y = Ordering.eq) :
        theorem Std.RBNode.isOrdered_iff' {α : Type u_1} {cmp : ααOrdering} {L : Option α} {R : Option α} [Std.TransCmp cmp] {t : Std.RBNode α} :
        Std.RBNode.isOrdered cmp t L R = true (∀ (a : α), a LStd.RBNode.All (fun (x : α) => Std.RBNode.cmpLT cmp a x) t) (∀ (a : α), a RStd.RBNode.All (fun (x : α) => Std.RBNode.cmpLT cmp x a) t) (∀ (a : α), a L∀ (b : α), b RStd.RBNode.cmpLT cmp a b) Std.RBNode.Ordered cmp t
        theorem Std.RBNode.isOrdered_iff {α : Type u_1} {cmp : ααOrdering} [Std.TransCmp cmp] {t : Std.RBNode α} :
        class Std.RBNode.IsCut {α : Sort u_1} (cmp : ααOrdering) (cut : αOrdering) :

        A cut is like a homomorphism of orderings: it is a monotonic predicate with respect to cmp, but it can make things that are distinguished by cmp equal. This is sufficient for find? to locate an element on which cut returns .eq, but there may be other elements, not returned by find?, on which cut also returns .eq.

        Instances
          theorem Std.RBNode.IsCut.lt_trans :
          ∀ {α : Sort u_1} {cmp : ααOrdering} {cut : αOrdering} {x y : α} [inst : Std.RBNode.IsCut cmp cut] [inst : Std.TransCmp cmp], cmp x y = Ordering.ltcut x = Ordering.ltcut y = Ordering.lt
          theorem Std.RBNode.IsCut.gt_trans :
          ∀ {α : Sort u_1} {cmp : ααOrdering} {cut : αOrdering} {x y : α} [inst : Std.RBNode.IsCut cmp cut] [inst : Std.TransCmp cmp], cmp x y = Ordering.ltcut y = Ordering.gtcut x = Ordering.gt
          theorem Std.RBNode.IsCut.congr :
          ∀ {α : Sort u_1} {cmp : ααOrdering} {cut : αOrdering} {x y : α} [inst : Std.RBNode.IsCut cmp cut] [inst : Std.TransCmp cmp], cmp x y = Ordering.eqcut x = cut y
          class Std.RBNode.IsStrictCut {α : Sort u_1} (cmp : ααOrdering) (cut : αOrdering) extends Std.RBNode.IsCut :

          IsStrictCut upgrades the IsCut property to ensure that at most one element of the tree can match the cut, and hence find? will return the unique such element if one exists.

          Instances
            instance Std.RBNode.instIsStrictCut {α : Sort u_1} (cmp : ααOrdering) (a : α) :

            A "representable cut" is one generated by cmp a for some a. This is always a valid cut.

            Equations
            • =
            theorem Std.RBNode.find?_some_eq_eq {α : Type u_1} {x : α} {cut : αOrdering} {t : Std.RBNode α} :
            x Std.RBNode.find? cut tcut x = Ordering.eq
            theorem Std.RBNode.find?_some_mem {α : Type u_1} {x : α} {cut : αOrdering} {t : Std.RBNode α} :
            x Std.RBNode.find? cut tx t
            theorem Std.RBNode.find?_some_memP {α : Type u_1} {x : α} {cut : αOrdering} {t : Std.RBNode α} (h : x Std.RBNode.find? cut t) :
            theorem Std.RBNode.Ordered.memP_iff_find? {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {t : Std.RBNode α} [Std.TransCmp cmp] [Std.RBNode.IsCut cmp cut] (ht : Std.RBNode.Ordered cmp t) :
            Std.RBNode.MemP cut t ∃ (x : α), Std.RBNode.find? cut t = some x
            theorem Std.RBNode.Ordered.unique {α : Type u_1} {cmp : ααOrdering} {t : Std.RBNode α} {x : α} {y : α} [Std.TransCmp cmp] (ht : Std.RBNode.Ordered cmp t) (hx : x t) (hy : y t) (e : cmp x y = Ordering.eq) :
            x = y
            theorem Std.RBNode.Ordered.find?_some {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {t : Std.RBNode α} {x : α} [Std.TransCmp cmp] [Std.RBNode.IsStrictCut cmp cut] (ht : Std.RBNode.Ordered cmp t) :
            theorem Std.RBNode.lowerBound?_le' {α : Type u_1} {lb : Option α} {cut : αOrdering} {x : α} {t : Std.RBNode α} (H : ∀ {x : α}, x lbcut x Ordering.lt) :

            The value x returned by lowerBound? is less or equal to the cut.

            theorem Std.RBNode.lowerBound?_le {α : Type u_1} {cut : αOrdering} {x : α} {t : Std.RBNode α} :

            The value x returned by lowerBound? is less or equal to the cut.

            theorem Std.RBNode.All.lowerBound?_lb {α : Type u_1} {p : αProp} {lb : Option α} {cut : αOrdering} {x : α} {t : Std.RBNode α} (hp : Std.RBNode.All p t) (H : ∀ {x : α}, x lbp x) :
            Std.RBNode.lowerBound? cut t lb = some xp x
            theorem Std.RBNode.All.lowerBound? {α : Type u_1} {p : αProp} {cut : αOrdering} {x : α} {t : Std.RBNode α} (hp : Std.RBNode.All p t) :
            Std.RBNode.lowerBound? cut t none = some xp x
            theorem Std.RBNode.lowerBound?_mem_lb {α : Type u_1} {cut : αOrdering} {lb : Option α} {x : α} {t : Std.RBNode α} (h : Std.RBNode.lowerBound? cut t lb = some x) :
            x t x lb
            theorem Std.RBNode.lowerBound?_mem {α : Type u_1} {cut : αOrdering} {x : α} {t : Std.RBNode α} (h : Std.RBNode.lowerBound? cut t none = some x) :
            x t
            theorem Std.RBNode.lowerBound?_of_some {α : Type u_1} {cut : αOrdering} {y : α} {t : Std.RBNode α} :
            ∃ (x : α), Std.RBNode.lowerBound? cut t (some y) = some x
            theorem Std.RBNode.Ordered.lowerBound?_exists {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {t : Std.RBNode α} [Std.TransCmp cmp] [Std.RBNode.IsCut cmp cut] (h : Std.RBNode.Ordered cmp t) :
            (∃ (x : α), Std.RBNode.lowerBound? cut t none = some x) ∃ (x : α), x t cut x Ordering.lt
            theorem Std.RBNode.Ordered.lowerBound?_least_lb {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {t : Std.RBNode α} {lb : Option α} {x : α} {y : α} [Std.TransCmp cmp] [Std.RBNode.IsCut cmp cut] (h : Std.RBNode.Ordered cmp t) (hlb : ∀ {x : α}, lb = some xStd.RBNode.All (fun (x_1 : α) => Std.RBNode.cmpLT cmp x x_1) t) :
            Std.RBNode.lowerBound? cut t lb = some xy tcut x = Ordering.gtcmp x y = Ordering.ltcut y = Ordering.lt
            theorem Std.RBNode.Ordered.lowerBound?_least {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {t : Std.RBNode α} {x : α} {y : α} [Std.TransCmp cmp] [Std.RBNode.IsCut cmp cut] (ht : Std.RBNode.Ordered cmp t) (H : Std.RBNode.lowerBound? cut t none = some x) (hy : y t) (xy : cmp x y = Ordering.lt) (hx : cut x = Ordering.gt) :

            A statement of the least-ness of the result of lowerBound?. If x is the return value of lowerBound? and it is strictly less than the cut, then any other y > x in the tree is in fact strictly greater than the cut (so there is no exact match, and nothing closer to the cut).

            theorem Std.RBNode.Ordered.memP_iff_lowerBound? {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {t : Std.RBNode α} [Std.TransCmp cmp] [Std.RBNode.IsCut cmp cut] (ht : Std.RBNode.Ordered cmp t) :
            Std.RBNode.MemP cut t ∃ (x : α), Std.RBNode.lowerBound? cut t none = some x cut x = Ordering.eq
            theorem Std.RBNode.Ordered.lowerBound?_lt {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {t : Std.RBNode α} {x : α} {y : α} [Std.TransCmp cmp] [Std.RBNode.IsStrictCut cmp cut] (ht : Std.RBNode.Ordered cmp t) (H : Std.RBNode.lowerBound? cut t none = some x) (hy : y t) :
            cmp x y = Ordering.lt cut y = Ordering.lt

            A stronger version of lowerBound?_least that holds when the cut is strict.

            theorem Std.RBNode.foldr_cons {α : Type u_1} (t : Std.RBNode α) (l : List α) :
            Std.RBNode.foldr (fun (x : α) (x_1 : List α) => x :: x_1) t l = Std.RBNode.toList t ++ l
            @[simp]
            theorem Std.RBNode.toList_nil {α : Type u_1} :
            Std.RBNode.toList Std.RBNode.nil = []
            @[simp]
            theorem Std.RBNode.mem_toList {α : Type u_1} {x : α} {t : Std.RBNode α} :
            theorem Std.RBNode.foldr_eq_foldr_toList {α : Type u_1} :
            ∀ {α_1 : Type u_2} {f : αα_1α_1} {init : α_1} {t : Std.RBNode α}, Std.RBNode.foldr f t init = List.foldr f init (Std.RBNode.toList t)
            theorem Std.RBNode.foldl_eq_foldl_toList {α : Type u_1} :
            ∀ {α_1 : Type u_2} {f : α_1αα_1} {init : α_1} {t : Std.RBNode α}, Std.RBNode.foldl f init t = List.foldl f init (Std.RBNode.toList t)
            theorem Std.RBNode.forM_eq_forM_toList {m : Type u_1 → Type u_2} {α : Type u_3} {f : αm PUnit} [Monad m] [LawfulMonad m] {t : Std.RBNode α} :
            theorem Std.RBNode.foldlM_eq_foldlM_toList {m : Type u_1 → Type u_2} {α : Type u_3} :
            ∀ {a : Type u_1} {f : aαm a} {init : a} [inst : Monad m] [inst_1 : LawfulMonad m] {t : Std.RBNode α}, Std.RBNode.foldlM f init t = List.foldlM f init (Std.RBNode.toList t)
            theorem Std.RBNode.forIn_visit_eq_bindList {m : Type u_1 → Type u_2} {α : Type u_3} :
            ∀ {α_1 : Type u_1} {f : αα_1m (ForInStep α_1)} {init : α_1} [inst : Monad m] [inst_1 : LawfulMonad m] {t : Std.RBNode α}, Std.RBNode.forIn.visit f t init = ForInStep.bindList f (Std.RBNode.toList t) (ForInStep.yield init)
            theorem Std.RBNode.forIn_eq_forIn_toList {m : Type u_1 → Type u_2} {α : Type u_3} :
            ∀ {α_1 : Type u_1} {init : α_1} {f : αα_1m (ForInStep α_1)} [inst : Monad m] [inst_1 : LawfulMonad m] {t : Std.RBNode α}, forIn t init f = forIn (Std.RBNode.toList t) init f
            theorem Std.RBNode.Stream.foldr_cons {α : Type u_1} (t : Std.RBNode.Stream α) (l : List α) :
            Std.RBNode.Stream.foldr (fun (x : α) (x_1 : List α) => x :: x_1) t l = Std.RBNode.Stream.toList t ++ l
            @[simp]
            theorem Std.RBNode.Stream.toList_nil {α : Type u_1} :
            Std.RBNode.Stream.toList Std.RBNode.Stream.nil = []
            theorem Std.RBNode.Stream.foldr_eq_foldr_toList {α : Type u_1} :
            ∀ {α_1 : Type u_2} {f : αα_1α_1} {init : α_1} {s : Std.RBNode.Stream α}, Std.RBNode.Stream.foldr f s init = List.foldr f init (Std.RBNode.Stream.toList s)
            theorem Std.RBNode.Stream.foldl_eq_foldl_toList {α : Type u_1} :
            ∀ {α_1 : Type u_2} {f : α_1αα_1} {init : α_1} {t : Std.RBNode.Stream α}, Std.RBNode.Stream.foldl f init t = List.foldl f init (Std.RBNode.Stream.toList t)
            theorem Std.RBNode.Stream.forIn_eq_forIn_toList {m : Type u_1 → Type u_2} {α : Type u_3} :
            ∀ {α_1 : Type u_1} {init : α_1} {f : αα_1m (ForInStep α_1)} [inst : Monad m] [inst_1 : LawfulMonad m] {t : Std.RBNode α}, forIn t init f = forIn (Std.RBNode.toList t) init f

            The list of elements to the left of the hole. (This function is intended for specification purposes only.)

            Equations
            Instances For

              The list of elements to the right of the hole. (This function is intended for specification purposes only.)

              Equations
              Instances For
                @[inline, reducible]
                abbrev Std.RBNode.Path.withList {α : Type u_1} (p : Std.RBNode.Path α) (l : List α) :
                List α

                Wraps a list of elements with the left and right elements of the path.

                Equations
                Instances For
                  theorem Std.RBNode.Path.rootOrdered_iff {α : Type u_1} {cmp : ααOrdering} {v : α} {p : Std.RBNode.Path α} (hp : Std.RBNode.Path.Ordered cmp p) :
                  Std.RBNode.Path.RootOrdered cmp p v (∀ (a : α), a Std.RBNode.Path.listL pStd.RBNode.cmpLT cmp a v) ∀ (a : α), a Std.RBNode.Path.listR pStd.RBNode.cmpLT cmp v a
                  theorem Std.RBNode.zoom_toList {α : Type u_1} {cut : αOrdering} {t' : Std.RBNode α} {p' : Std.RBNode.Path α} {t : Std.RBNode α} (eq : Std.RBNode.zoom cut t = (t', p')) :
                  theorem Std.RBNode.insert_toList_zoom {α : Type u_1} {c : Std.RBColor} {n : Nat} {cmp : ααOrdering} {t' : Std.RBNode α} {p : Std.RBNode.Path α} {v : α} {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (e : Std.RBNode.zoom (cmp v) t = (t', p)) :
                  theorem Std.RBNode.insert_toList_zoom_nil {α : Type u_1} {c : Std.RBColor} {n : Nat} {cmp : ααOrdering} {p : Std.RBNode.Path α} {v : α} {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (e : Std.RBNode.zoom (cmp v) t = (Std.RBNode.nil, p)) :
                  theorem Std.RBNode.exists_insert_toList_zoom_nil {α : Type u_1} {c : Std.RBColor} {n : Nat} {cmp : ααOrdering} {p : Std.RBNode.Path α} {v : α} {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (e : Std.RBNode.zoom (cmp v) t = (Std.RBNode.nil, p)) :
                  ∃ (L : List α), ∃ (R : List α), Std.RBNode.toList t = L ++ R Std.RBNode.toList (Std.RBNode.insert cmp t v) = L ++ v :: R
                  theorem Std.RBNode.insert_toList_zoom_node {α : Type u_1} {c : Std.RBColor} {n : Nat} {cmp : ααOrdering} {c' : Std.RBColor} {l : Std.RBNode α} {v' : α} {r : Std.RBNode α} {p : Std.RBNode.Path α} {v : α} {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (e : Std.RBNode.zoom (cmp v) t = (Std.RBNode.node c' l v' r, p)) :
                  theorem Std.RBNode.exists_insert_toList_zoom_node {α : Type u_1} {c : Std.RBColor} {n : Nat} {cmp : ααOrdering} {c' : Std.RBColor} {l : Std.RBNode α} {v' : α} {r : Std.RBNode α} {p : Std.RBNode.Path α} {v : α} {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (e : Std.RBNode.zoom (cmp v) t = (Std.RBNode.node c' l v' r, p)) :
                  ∃ (L : List α), ∃ (R : List α), Std.RBNode.toList t = L ++ v' :: R Std.RBNode.toList (Std.RBNode.insert cmp t v) = L ++ v :: R
                  theorem Std.RBNode.mem_insert_self {α : Type u_1} {c : Std.RBColor} {n : Nat} {v : α} {cmp : ααOrdering} {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) :
                  theorem Std.RBNode.mem_insert_of_mem {α : Type u_1} {c : Std.RBColor} {n : Nat} {v' : α} {cmp : ααOrdering} {v : α} {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (h : v' t) :
                  v' Std.RBNode.insert cmp t v cmp v v' = Ordering.eq
                  theorem Std.RBNode.exists_find?_insert_self {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {c : Std.RBColor} {n : Nat} {v : α} [Std.TransCmp cmp] [Std.RBNode.IsCut cmp cut] {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (ht₂ : Std.RBNode.Ordered cmp t) (hv : cut v = Ordering.eq) :
                  ∃ (x : α), Std.RBNode.find? cut (Std.RBNode.insert cmp t v) = some x
                  theorem Std.RBNode.find?_insert_self {α : Type u_1} {cmp : ααOrdering} {cut : αOrdering} {c : Std.RBColor} {n : Nat} {v : α} [Std.TransCmp cmp] [Std.RBNode.IsStrictCut cmp cut] {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (ht₂ : Std.RBNode.Ordered cmp t) (hv : cut v = Ordering.eq) :
                  theorem Std.RBNode.mem_insert {α : Type u_1} {cmp : ααOrdering} {c : Std.RBColor} {n : Nat} {v' : α} {v : α} [Std.TransCmp cmp] {t : Std.RBNode α} (ht : Std.RBNode.Balanced t c n) (ht₂ : Std.RBNode.Ordered cmp t) :
                  v' Std.RBNode.insert cmp t v v' t Std.RBNode.find? (cmp v) t some v' v' = v
                  @[simp]
                  theorem Std.RBSet.val_toList {α : Type u_1} {cmp : ααOrdering} {t : Std.RBSet α cmp} :
                  @[simp]
                  theorem Std.RBSet.mkRBSet_eq {α : Type u_1} {cmp : ααOrdering} :
                  @[simp]
                  theorem Std.RBSet.empty_eq {α : Type u_1} {cmp : ααOrdering} :
                  Std.RBSet.empty =
                  @[simp]
                  theorem Std.RBSet.default_eq {α : Type u_1} {cmp : ααOrdering} :
                  default =
                  @[simp]
                  theorem Std.RBSet.empty_toList {α : Type u_1} {cmp : ααOrdering} :
                  @[simp]
                  theorem Std.RBSet.single_toList {α : Type u_1} {cmp : ααOrdering} {a : α} :
                  theorem Std.RBSet.mem_toList {α : Type u_1} {cmp : ααOrdering} {x : α} {t : Std.RBSet α cmp} :
                  theorem Std.RBSet.mem_congr {α : Type u_1} {cmp : ααOrdering} {x : α} {y : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} (h : cmp x y = Ordering.eq) :
                  x t y t
                  theorem Std.RBSet.mem_iff_mem_toList {α : Type u_1} {cmp : ααOrdering} {x : α} {t : Std.RBSet α cmp} :
                  x t ∃ (y : α), y Std.RBSet.toList t cmp x y = Ordering.eq
                  theorem Std.RBSet.mem_of_mem_toList {α : Type u_1} {cmp : ααOrdering} {x : α} [Std.OrientedCmp cmp] {t : Std.RBSet α cmp} (h : x Std.RBSet.toList t) :
                  x t
                  theorem Std.RBSet.foldl_eq_foldl_toList {α : Type u_1} {cmp : ααOrdering} :
                  ∀ {α_1 : Type u_2} {f : α_1αα_1} {init : α_1} {t : Std.RBSet α cmp}, Std.RBSet.foldl f init t = List.foldl f init (Std.RBSet.toList t)
                  theorem Std.RBSet.foldr_eq_foldr_toList {α : Type u_1} {cmp : ααOrdering} :
                  ∀ {α_1 : Type u_2} {f : αα_1α_1} {init : α_1} {t : Std.RBSet α cmp}, Std.RBSet.foldr f init t = List.foldr f init (Std.RBSet.toList t)
                  theorem Std.RBSet.foldlM_eq_foldlM_toList {m : Type u_1 → Type u_2} {α : Type u_3} {cmp : ααOrdering} :
                  ∀ {a : Type u_1} {f : aαm a} {init : a} [inst : Monad m] [inst_1 : LawfulMonad m] {t : Std.RBSet α cmp}, Std.RBSet.foldlM f init t = List.foldlM f init (Std.RBSet.toList t)
                  theorem Std.RBSet.forIn_eq_forIn_toList {m : Type u_1 → Type u_2} {α : Type u_3} {cmp : ααOrdering} :
                  ∀ {α_1 : Type u_1} {init : α_1} {f : αα_1m (ForInStep α_1)} [inst : Monad m] [inst_1 : LawfulMonad m] {t : Std.RBSet α cmp}, forIn t init f = forIn (Std.RBSet.toList t) init f
                  theorem Std.RBSet.toStream_eq {α : Type u_1} {cmp : ααOrdering} {t : Std.RBSet α cmp} :
                  @[simp]
                  theorem Std.RBSet.toStream_toList {α : Type u_1} {cmp : ααOrdering} {t : Std.RBSet α cmp} :
                  theorem Std.RBSet.toList_sorted {α : Type u_1} {cmp : ααOrdering} {t : Std.RBSet α cmp} :
                  theorem Std.RBSet.find?_some_eq_eq {α : Type u_1} {cmp : ααOrdering} {x : α} {y : α} {t : Std.RBSet α cmp} :
                  Std.RBSet.find? t x = some ycmp x y = Ordering.eq
                  theorem Std.RBSet.find?_some_mem_toList {α : Type u_1} {cmp : ααOrdering} {x : α} {y : α} {t : Std.RBSet α cmp} (h : Std.RBSet.find? t x = some y) :
                  theorem Std.RBSet.find?_some_mem {α : Type u_1} {cmp : ααOrdering} {x : α} {y : α} {t : Std.RBSet α cmp} (h : Std.RBSet.find? t x = some y) :
                  x t
                  theorem Std.RBSet.mem_toList_unique {α : Type u_1} {cmp : ααOrdering} {x : α} {y : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} (hx : x Std.RBSet.toList t) (hy : y Std.RBSet.toList t) (e : cmp x y = Ordering.eq) :
                  x = y
                  theorem Std.RBSet.find?_some {α : Type u_1} {cmp : ααOrdering} {x : α} {y : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} :
                  theorem Std.RBSet.mem_iff_find? {α : Type u_1} {cmp : ααOrdering} {x : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} :
                  x t ∃ (y : α), Std.RBSet.find? t x = some y
                  @[simp]
                  theorem Std.RBSet.contains_iff {α : Type u_1} {cmp : ααOrdering} {x : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} :
                  instance Std.RBSet.instDecidableMemRBSetInstMembershipRBSet {α : Type u_1} {cmp : ααOrdering} {x : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} :
                  Equations
                  theorem Std.RBSet.size_eq {α : Type u_1} {cmp : ααOrdering} (t : Std.RBSet α cmp) :
                  theorem Std.RBSet.mem_toList_insert_self {α : Type u_1} {cmp : ααOrdering} (v : α) (t : Std.RBSet α cmp) :
                  theorem Std.RBSet.mem_insert_self {α : Type u_1} {cmp : ααOrdering} [Std.OrientedCmp cmp] (v : α) (t : Std.RBSet α cmp) :
                  theorem Std.RBSet.mem_insert_of_eq {α : Type u_1} {cmp : ααOrdering} {v : α} {v' : α} [Std.TransCmp cmp] (t : Std.RBSet α cmp) (h : cmp v v' = Ordering.eq) :
                  theorem Std.RBSet.mem_toList_insert_of_mem {α : Type u_1} {cmp : ααOrdering} {v' : α} (v : α) {t : Std.RBSet α cmp} (h : v' Std.RBSet.toList t) :
                  theorem Std.RBSet.mem_insert_of_mem_toList {α : Type u_1} {cmp : ααOrdering} {v' : α} [Std.OrientedCmp cmp] (v : α) {t : Std.RBSet α cmp} (h : v' Std.RBSet.toList t) :
                  theorem Std.RBSet.mem_insert_of_mem {α : Type u_1} {cmp : ααOrdering} {v' : α} [Std.TransCmp cmp] (v : α) {t : Std.RBSet α cmp} (h : v' t) :
                  theorem Std.RBSet.mem_toList_insert {α : Type u_1} {cmp : ααOrdering} {v' : α} {v : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} :
                  theorem Std.RBSet.mem_insert {α : Type u_1} {cmp : ααOrdering} {v' : α} {v : α} [Std.TransCmp cmp] {t : Std.RBSet α cmp} :
                  v' Std.RBSet.insert t v v' t cmp v v' = Ordering.eq
                  theorem Std.RBSet.find?_congr {α : Type u_1} {cmp : ααOrdering} {v₁ : α} {v₂ : α} [Std.TransCmp cmp] (t : Std.RBSet α cmp) (h : cmp v₁ v₂ = Ordering.eq) :
                  theorem Std.RBSet.find?_insert_of_eq {α : Type u_1} {cmp : ααOrdering} {v' : α} {v : α} [Std.TransCmp cmp] (t : Std.RBSet α cmp) (h : cmp v' v = Ordering.eq) :
                  theorem Std.RBSet.find?_insert_of_ne {α : Type u_1} {cmp : ααOrdering} {v' : α} {v : α} [Std.TransCmp cmp] (t : Std.RBSet α cmp) (h : cmp v' v Ordering.eq) :
                  theorem Std.RBSet.find?_insert {α : Type u_1} {cmp : ααOrdering} [Std.TransCmp cmp] (t : Std.RBSet α cmp) (v : α) (v' : α) :
                  Std.RBSet.find? (Std.RBSet.insert t v) v' = if cmp v' v = Ordering.eq then some v else Std.RBSet.find? t v'