Finite-set abstraction of recursive van Emde Boas trees #
The finite set below is a mathematical observation of the recursive representation. The operations do not enumerate this finite set. No execution-time bound is attached to constructing the observation.
Main definitions #
Tree.elements: the bounded keys represented by a tree.
Main results #
Tree.mem_elements_iff: the finite set agrees with the recursive mathematical interpretation.Tree.elements_insert,Tree.elements_erase: insertion and deletion commute with the finite-set observation.Tree.successor_elements_some_iff,Tree.successor_elements_none_iff: strict successor and its absence are characterized by the finite set.Tree.predecessor_elements_some_iff,Tree.predecessor_elements_none_iff: strict predecessor and its absence are characterized by the finite set.Tree.predecessor_eq_predecessor_elements: strict predecessor lookup computes the sharedOrderedSet.predecessorof the finite set.
References #
The representation and its source credit are described in
CslibFrontier.DataStructure.VanEmdeBoas.Basic.
theorem Cslib.DataStructure.VanEmdeBoas.Tree.elements_insert {d : ℕ} {t : Tree d} (ht : t.Valid) {x : ℕ} (hx : x < universeSize d) :
The finite-set observation commutes with bounded insertion.
theorem Cslib.DataStructure.VanEmdeBoas.Tree.predecessor_eq_predecessor_elements {d : ℕ} {t : Tree d} (ht : t.Valid) (x : ℕ) :
On a valid tree, strict predecessor lookup computes OrderedSet.predecessor of the stored
finite set.