Low-level implementation of the size-bounded tree #
This file contains the basic definition implementing the functionality of the size-bounded trees.
def
Std.DTreeMap.Internal.instInhabitedImpl.default
{a✝ : Type u_1}
{a✝¹ : a✝ → Type u_2}
:
Impl a✝ a✝¹
Instances For
Equations
@[inline]
The "delta" parameter of the size-bounded tree. Controls how imbalanced the tree can be.
Equations
Instances For
@[inline]
The "ratio" parameter of the size-bounded tree. Controls how aggressive the rebalancing operations are.
Equations
Instances For
size #
In contrast to other functions, size is defined here because it is required to define the
Balanced predicate (see Std.Data.DTreeMap.Internal.Balanced).
@[inline]
The size information stored in the tree.
Equations
- (Std.DTreeMap.Internal.Impl.inner sz k v l r).size = sz
- Std.DTreeMap.Internal.Impl.leaf.size = 0
Instances For
toListModel #
toListModel is defined here because it is required to define the Ordered predicate.
Flattens a tree into a list of key-value pairs. This function is defined for verification purposes and should not be executed because it is very inefficient.
Equations
- Std.DTreeMap.Internal.Impl.leaf.toListModel = []
- (Std.DTreeMap.Internal.Impl.inner size k v l r).toListModel = l.toListModel ++ ⟨k, v⟩ :: r.toListModel
Instances For
@[simp]
@[simp]
theorem
Std.DTreeMap.Internal.Impl.toListModel_inner
{α : Type u}
{β : α → Type v}
{sz : Nat}
{k : α}
{v : β k}
{l r : Impl α β}
: