Documentation

Std.Data.DTreeMap.Internal.Balanced

Balanced predicate #

This file defines what it means for a tree map to be balanced. This definition is encoded in the Balanced predicate.

Predicate for local balance at a node of the tree. We don't provide API for this, preferring instead to use automation to dispatch goals about balance.

Equations
Instances For
    inductive Std.DTreeMap.Internal.Impl.Balanced {α : Type u} {β : α → Type v} :
    Impl α β → Prop

    Predicate that states that the stored size information in a tree is correct and that it is balanced.

    Instances For
      theorem Std.DTreeMap.Internal.Impl.balanced_inner_iff {α : Type u} {β : α → Type v} {sz : Nat} {k : α} {v : β k} {l r : Impl α β} :
      theorem Std.DTreeMap.Internal.Impl.balanced_one_leaf_leaf {α : Type u} {β : α → Type v} {k : α} {v : β k} :
      theorem Std.DTreeMap.Internal.Impl.Balanced.one_le {α : Type u} {β : α → Type v} {sz : Nat} {k : α} {v : β k} {l r : Impl α β} (h : (Impl.inner sz k v l r).Balanced) :
      1 ≤ sz
      theorem Std.DTreeMap.Internal.Impl.Balanced.eq {α : Type u} {β : α → Type v} {sz : Nat} {k : α} {v : β k} {l r : Impl α β} :
      (Impl.inner sz k v l r).Balanced → sz = l.size + 1 + r.size
      theorem Std.DTreeMap.Internal.Impl.Balanced.left {α : Type u} {β : α → Type v} {sz : Nat} {k : α} {v : β k} {l r : Impl α β} :
      (Impl.inner sz k v l r).Balanced → l.Balanced
      theorem Std.DTreeMap.Internal.Impl.Balanced.right {α : Type u} {β : α → Type v} {sz : Nat} {k : α} {v : β k} {l r : Impl α β} :
      (Impl.inner sz k v l r).Balanced → r.Balanced
      theorem Std.DTreeMap.Internal.Impl.Balanced.at_root {α : Type u} {β : α → Type v} {sz : Nat} {k : α} {v : β k} {l r : Impl α β} :