Documentation

Lean.Data.RBTree

def Lean.RBTree (α : Type u) (cmp : ααOrdering) :
Equations
instance Lean.instInhabitedRBTree {α : Type u_1} {p : ααOrdering} :
Equations
  • Lean.instInhabitedRBTree = { default := Lean.RBMap.empty }
@[inline]
def Lean.mkRBTree (α : Type u) (cmp : ααOrdering) :
Equations
instance Lean.instEmptyCollectionRBTree (α : Type u) (cmp : ααOrdering) :
Equations
@[inline]
def Lean.RBTree.empty {α : Type u} {cmp : ααOrdering} :
Equations
  • Lean.RBTree.empty = Lean.RBMap.empty
@[inline]
def Lean.RBTree.depth {α : Type u} {cmp : ααOrdering} (f : NatNatNat) (t : Lean.RBTree α cmp) :
Equations
@[inline]
def Lean.RBTree.fold {α : Type u} {β : Type v} {cmp : ααOrdering} (f : βαβ) (init : β) (t : Lean.RBTree α cmp) :
β
Equations
@[inline]
def Lean.RBTree.revFold {α : Type u} {β : Type v} {cmp : ααOrdering} (f : βαβ) (init : β) (t : Lean.RBTree α cmp) :
β
Equations
@[inline]
def Lean.RBTree.foldM {α : Type u} {β : Type v} {cmp : ααOrdering} {m : Type v → Type w} [inst : Monad m] (f : βαm β) (init : β) (t : Lean.RBTree α cmp) :
m β
Equations
@[inline]
def Lean.RBTree.forM {α : Type u} {cmp : ααOrdering} {m : Type v → Type w} [inst : Monad m] (f : αm PUnit) (t : Lean.RBTree α cmp) :
Equations
@[inline]
def Lean.RBTree.forIn {α : Type u} {cmp : ααOrdering} {m : Type u_1 → Type u_2} {σ : Type u_1} [inst : Monad m] (t : Lean.RBTree α cmp) (init : σ) (f : ασm (ForInStep σ)) :
m σ
Equations
instance Lean.RBTree.instForInRBTree {α : Type u} {cmp : ααOrdering} {m : Type u_1 → Type u_2} :
ForIn m (Lean.RBTree α cmp) α
Equations
  • Lean.RBTree.instForInRBTree = { forIn := fun {β} [Monad m] => Lean.RBTree.forIn }
@[inline]
def Lean.RBTree.isEmpty {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
Equations
@[specialize #[]]
def Lean.RBTree.toList {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
List α
Equations
@[specialize #[]]
def Lean.RBTree.toArray {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
Equations
@[inline]
def Lean.RBTree.min {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
Equations
@[inline]
def Lean.RBTree.max {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) :
Equations
instance Lean.RBTree.instReprRBTree {α : Type u} {cmp : ααOrdering} [inst : Repr α] :
Repr (Lean.RBTree α cmp)
Equations
@[inline]
def Lean.RBTree.insert {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
Equations
@[inline]
def Lean.RBTree.erase {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
Equations
@[specialize #[]]
def Lean.RBTree.ofList {α : Type u} {cmp : ααOrdering} :
List αLean.RBTree α cmp
Equations
@[inline]
def Lean.RBTree.find? {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
Equations
@[inline]
def Lean.RBTree.contains {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (a : α) :
Equations
def Lean.RBTree.fromList {α : Type u} (l : List α) (cmp : ααOrdering) :
Equations
def Lean.RBTree.fromArray {α : Type u} (l : Array α) (cmp : ααOrdering) :
Equations
@[inline]
def Lean.RBTree.all {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (p : αBool) :
Equations
@[inline]
def Lean.RBTree.any {α : Type u} {cmp : ααOrdering} (t : Lean.RBTree α cmp) (p : αBool) :
Equations
def Lean.RBTree.subset {α : Type u} {cmp : ααOrdering} (t₁ : Lean.RBTree α cmp) (t₂ : Lean.RBTree α cmp) :
Equations
def Lean.RBTree.seteq {α : Type u} {cmp : ααOrdering} (t₁ : Lean.RBTree α cmp) (t₂ : Lean.RBTree α cmp) :
Equations
def Lean.RBTree.union {α : Type u} {cmp : ααOrdering} (t₁ : Lean.RBTree α cmp) (t₂ : Lean.RBTree α cmp) :
Equations
def Lean.RBTree.diff {α : Type u} {cmp : ααOrdering} (t₁ : Lean.RBTree α cmp) (t₂ : Lean.RBTree α cmp) :
Equations
def Lean.rbtreeOf {α : Type u} (l : List α) (cmp : ααOrdering) :
Equations