- leaf: {α : Type u} → {β : α → Type v} → Lean.RBNode α β
- node: {α : Type u} → {β : α → Type v} → Lean.RBColor → Lean.RBNode α β → (key : α) → β key → Lean.RBNode α β → Lean.RBNode α β
Instances For
Equations
- Lean.RBNode.depth f Lean.RBNode.leaf = 0
- Lean.RBNode.depth f (Lean.RBNode.node color l key val r) = Nat.succ (f (Lean.RBNode.depth f l) (Lean.RBNode.depth f r))
Instances For
Equations
- Lean.RBNode.min Lean.RBNode.leaf = none
- Lean.RBNode.min (Lean.RBNode.node color Lean.RBNode.leaf k v rchild) = some { fst := k, snd := v }
- Lean.RBNode.min (Lean.RBNode.node color l key val rchild) = Lean.RBNode.min l
Instances For
Equations
- Lean.RBNode.max Lean.RBNode.leaf = none
- Lean.RBNode.max (Lean.RBNode.node color lchild k v Lean.RBNode.leaf) = some { fst := k, snd := v }
- Lean.RBNode.max (Lean.RBNode.node color lchild key val r) = Lean.RBNode.max r
Instances For
Equations
- Lean.RBNode.fold f x Lean.RBNode.leaf = x
- Lean.RBNode.fold f x (Lean.RBNode.node color l k v r) = Lean.RBNode.fold f (f (Lean.RBNode.fold f x l) k v) r
Instances For
Equations
- Lean.RBNode.forM f Lean.RBNode.leaf = pure ()
- Lean.RBNode.forM f (Lean.RBNode.node color l key val r) = do Lean.RBNode.forM f l f key val Lean.RBNode.forM f r
Instances For
Equations
- Lean.RBNode.foldM f x Lean.RBNode.leaf = pure x
- Lean.RBNode.foldM f x (Lean.RBNode.node color l k v r) = do let b ← Lean.RBNode.foldM f x l let b ← f b k v Lean.RBNode.foldM f b r
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.forIn.visit f Lean.RBNode.leaf x = pure (ForInStep.yield x)
Instances For
Equations
- Lean.RBNode.revFold f x Lean.RBNode.leaf = x
- Lean.RBNode.revFold f x (Lean.RBNode.node color l k v r) = Lean.RBNode.revFold f (f (Lean.RBNode.revFold f x r) k v) l
Instances For
Equations
- Lean.RBNode.all p Lean.RBNode.leaf = true
- Lean.RBNode.all p (Lean.RBNode.node color l key val r) = (p key val && Lean.RBNode.all p l && Lean.RBNode.all p r)
Instances For
Equations
- Lean.RBNode.any p Lean.RBNode.leaf = false
- Lean.RBNode.any p (Lean.RBNode.node color l key val r) = (p key val || Lean.RBNode.any p l || Lean.RBNode.any p r)
Instances For
Instances For
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.ins cmp Lean.RBNode.leaf x x = Lean.RBNode.node Lean.RBColor.red Lean.RBNode.leaf x x Lean.RBNode.leaf
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
The number of nodes in the tree.
Equations
- Lean.RBNode.size Lean.RBNode.leaf = 0
- Lean.RBNode.size (Lean.RBNode.node color l key val r) = Lean.RBNode.size l + Lean.RBNode.size r + 1
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.appendTrees Lean.RBNode.leaf x = x
- Lean.RBNode.appendTrees x Lean.RBNode.leaf = x
- Lean.RBNode.appendTrees x (Lean.RBNode.node Lean.RBColor.red b kx vx c) = Lean.RBNode.node Lean.RBColor.red (Lean.RBNode.appendTrees x b) kx vx c
- Lean.RBNode.appendTrees (Lean.RBNode.node Lean.RBColor.red a kx vx b) x = Lean.RBNode.node Lean.RBColor.red a kx vx (Lean.RBNode.appendTrees b x)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.del cmp x Lean.RBNode.leaf = Lean.RBNode.leaf
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.findCore cmp Lean.RBNode.leaf x = none
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.find cmp Lean.RBNode.leaf x = none
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.lowerBound cmp Lean.RBNode.leaf x x = x
Instances For
- leafWff: ∀ {α : Type u} {β : α → Type v} {cmp : α → α → Ordering}, Lean.RBNode.WellFormed cmp Lean.RBNode.leaf
- insertWff: ∀ {α : Type u} {β : α → Type v} {cmp : α → α → Ordering} {n n' : Lean.RBNode α β} {k : α} {v : β k}, Lean.RBNode.WellFormed cmp n → n' = Lean.RBNode.insert cmp n k v → Lean.RBNode.WellFormed cmp n'
- eraseWff: ∀ {α : Type u} {β : α → Type v} {cmp : α → α → Ordering} {n n' : Lean.RBNode α β} {k : α}, Lean.RBNode.WellFormed cmp n → n' = Lean.RBNode.erase cmp k n → Lean.RBNode.WellFormed cmp n'
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.RBNode.mapM f Lean.RBNode.leaf = pure Lean.RBNode.leaf
Instances For
Equations
- Lean.RBNode.map f Lean.RBNode.leaf = Lean.RBNode.leaf
- Lean.RBNode.map f (Lean.RBNode.node color l key val r) = Lean.RBNode.node color (Lean.RBNode.map f l) key (f key val) (Lean.RBNode.map f r)
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Returns the kv pair (a,b)
such that a ≤ k
for all keys in the RBMap.
Instances For
Returns the kv pair (a,b)
such that a ≥ k
for all keys in the RBMap.
Instances For
Instances For
Instances For
Equations
- Lean.RBMap.ofList [] = Lean.mkRBMap α β cmp
- Lean.RBMap.ofList ((k, v) :: xs) = Lean.RBMap.insert (Lean.RBMap.ofList xs) k v
Instances For
Instances For
Instances For
Instances For
(lowerBound k) retrieves the kv pair of the largest key smaller than or equal to k
,
if it exists.
Instances For
Returns true if the given key a
is in the RBMap.
Instances For
Instances For
Instances For
Returns true if the given predicate is true for all items in the RBMap.
Instances For
Returns true if the given predicate is true for any item in the RBMap.
Instances For
The number of items in the RBMap.
Instances For
Instances For
Instances For
Instances For
Attempts to find the value with key k : α
in t
and panics if there is no such key.
Instances For
Merges the maps t₁
and t₂
, if a key a : α
exists in both,
then use mergeFn a b₁ b₂
to produce the new merged value.
Instances For
Intersects the maps t₁
and t₂
using mergeFn a b₁ b₂
to produce the new value.