Quotient-Recovering Deletion (Algorithm 3) in the Multi-Level Dictionary Tree #
This file formalizes Algorithm 3 (deleteAndGetQuotient) and normal-path deletion
(normalDeleteMem) of Tianxiao Li, Jingxun Liang, Huacheng Yu, and Renfei Zhou, Dynamic
Dictionary with Subconstant Wasted Bits per Key ([LiLiangYuZhou2024, Section 5.3, Algorithm 3];
arXiv:2310.20536v1, PDF p. 31 / printed p. 30).
Main definitions #
TreeSchedule.TreeState.deleteAndGetQuotient: recursive upward deletion and quotient recovery (Algorithm 3).TreeSchedule.TreeState.normalDeleteMem: normal-path deletion starting at leaf leveldepth.
Main results #
TreeSchedule.TreeState.deleteAndGetQuotient_spec: exact quotient-and-value recovery ((q_out, v_out) = (quotAt ℓ z, v_z)) and prefix invariant preservation across levels1 .. ℓ.TreeSchedule.TreeState.wellFormedPadded_normalDeleteMem: preservation ofWellFormedPaddedunder non-underflowing deletion.
References #
Section 2: Algorithm 3 (deleteAndGetQuotient) and normalDeleteMem #
Algorithm 3 (DeleteAndGetQuotient, [LiLiangYuZhou2024, Section 5.3], PDF p. 31 /
printed p. 30): recursively deletes z_id from levels 1 .. ℓ along u's ancestor path while
maintaining full capacity at levels 2 .. ℓ via waiting-list replacement and returning
(st', z_quot^[ℓ], z_val).
Inductive prefix postcondition of deleteAndGetQuotient at level ℓ (1 ≤ ℓ ≤ depth).
- storeLvl_zero_z : storeLvl' z = 0
- le_query_eq (j : ℕ) (hj1 : 1 ≤ j) (hjℓ : j ≤ ℓ) (u : Fin (P.numNodes j)) (w : Fin P.paddedUniv) (vw : Fin P.valBound) : Function.update d z none w = some vw → st.seeds.nodeAt j ⋯ w = u → storeLvl' w = j → nodeQuery scheme st' j hj1 ⋯ u (st.seeds.idAt j hj1 ⋯ w) = some (st.seeds.quotAt j hj1 ⋯ w, vw)
Algorithm 3 correctness (deleteAndGetQuotient_spec): for any active key z at (ℓ, u)
with storeLvl z ≤ ℓ whose ancestors at levels 2 .. ℓ strictly exceed nLow j,
deleteAndGetQuotient returns (quotAt ℓ z, v_z) and establishes DeletePrefixPost up to ℓ.
Normal-path deletion of an active internal key z ∈ P.paddedDom d, invoking Algorithm 3
starting at the leaf (depth, nodeAt depth z) (Section 5.3, PDF p. 31 / printed p. 30).
Carries a member-only contract (z ∈ P.paddedDom d on a WellFormedPadded state; Algorithm 3
routes by compressed ID and is not a no-op on absent keys or malformed states).
Normal-path deletion preserves WellFormedPadded whenever z ∈ P.paddedDom d and all
current node seeds remain good on (P.paddedDom d).erase z.