Pure Multi-Level Subconstant-Redundancy Dictionary Tree Model #
This module serves as the top-level entry point for the pure multi-level dictionary tree of Tianxiao Li, Jingxun Liang, Huacheng Yu, and Renfei Zhou, Dynamic Dictionary with Subconstant Wasted Bits per Key ([LiLiangYuZhou2024, Section 5, Sections 5.1–5.6]; arXiv:2310.20536v1, PDF pp. 25–36 / printed pp. 24–35).
It publicly re-exports the parameter schedule and infoBits + O(R) bit budget (Params.lean),
pure node-level storage structures and Section 5.6 metadata separation (StorageNode.lean),
sentinel-padded routing (TreeRouting.lean), tree invariants and Section 5.6 DFS subtree metadata
(TreeCore.lean), canonical tree construction and good-seed existence (TreeBuild.lean),
root-to-leaf query and rawOverwrite (TreeQuery.lean), normal-path insertion
(TreeInsert.lean), Algorithm 3 (deleteAndGetQuotient, PDF p. 31 / printed p. 30,
TreeDelete.lean), and the pure reconstruction/local-splice step of Algorithm 4 under supplied
validated seeds (rehashSubtree, PDF p. 34 / printed p. 33, TreeRehash.lean).
In addition, this file provides:
- Internal single-key padded updates
rawInsertFreshandrawDeleteMemcombining localized subtree reconstruction (TreeState.rehashSubtree,exists_allGoodSeeds_localized_pair) with the normalO(depth)update path (normalInsertFresh,normalDeleteMem) under their fresh-key / member-key raw contracts. - The external dictionary interface
TreeSchedule.initTree,TreeState.insert, andTreeState.deletemaintaining sentinel padding (|S_padded| ∈ {cap - 1, cap},Section 4, Footnote 5, PDF p. 12 / printed p. 11;Section 5, PDF p. 26 / printed p. 25) and satisfying the exactDictionary.StateFunction.updatelaws (query_initTree,query_insert,query_delete). On valid (WellFormed) states, absent externaldeleteand capacity-rejected fresh externalinsertare guarded no-ops; arbitrary malformed states and raw-helper calls carry no blanket no-op guarantee.
Formalization adaptations and explicit scope boundaries #
- Clamped redundancy (
effRedundancy): clampsRinternally tomin R (max 1 (n / max 256 (2 ^ log* n)))(Section 5, PDF p. 26 / printed p. 25) so inverse redundancyr ≥ max 256 (2 ^ log* n)holds across alln / log₂ ^ 0.1 n ≤ R ≤ nwithout inflatingthresholdN. - Small-node child-router regime switch (
NodeSeeds.lean): nodes withFeistelPerm.childRouterThreshold P.epsInv P.alphaInv ≤ P.nLow ℓuseFeistelPerm.ChildRouterSeed(DoubleTabulation), while deeper nodes withP.nLow ℓ < FeistelPerm.childRouterThreshold P.epsInv P.alphaInvswitch to exact(2 * m)-wiseCslib.Probability.trinomialPolyHash(m = FeistelPerm.childRouterHalfInd (P.nHigh ℓ) = O(1), adapting[LiLiangYuZhou2024, Sections 5.1 & 5.4, Claim B.2], PDF pp. 27, 32–33, 41 / printed pp. 26, 31–32, 40). - Out of scope: uniform seed sampling, failed-seed rejection, recursive
Algorithm 4sampling, randomized operation histories, Claim 5.4 multi-step seed survival, and Lemma 5.3 expected rehashing work bounds (Stage 3 of#5349;initTree,TreeState.insert, andTreeState.deletehere are pure mathematicalnoncomputablespecifications selecting validated seeds viaClassical.choose), Word-RAMMemory.Progcompilation and lookup-table realization, Section 4 small-parameter variable-length adapter trees (R < n / log₂ ^ 0.1 n), strong history independence, dynamic capacity resizing in|S|, and super-polynomial key universes (U > n ^ (1 + α_max)).
Main definitions #
TreeSchedule.TreeState.rawInsertFresh,TreeSchedule.TreeState.rawDeleteMem: internal padded fresh insertion and member deletion with localized seed repair.TreeSchedule.initTree,TreeSchedule.TreeState.insert,TreeSchedule.TreeState.delete: external dictionary initialization, insertion, and deletion.
Main results #
TreeSchedule.TreeState.wellFormedPadded_rawInsertFresh,TreeSchedule.TreeState.wellFormedPadded_rawDeleteMem: internalWellFormedPaddedpreservation and localized subtree seed-preservation clauses.TreeSchedule.wellFormed_initTree,TreeSchedule.query_initTree: initialization correctness.TreeSchedule.TreeState.wellFormed_insert,TreeSchedule.TreeState.query_insert,TreeSchedule.TreeState.wellFormed_delete,TreeSchedule.TreeState.query_delete: invariant preservation andFunction.updatelookup specifications.
References #
Section 1: Internal padded updates with localized subtree seed repair #
Internal fresh-key insertion on st (contract: WellFormedPadded, x ∉ paddedDom d, and
#S' ∈ [nLow 0, nHigh 0]): runs normalInsertFresh when st.seeds stays good on
Insert.insert x S, and otherwise invokes st.rehashSubtree (the pure reconstruction/local-splice
step of Algorithm 4) at the highest failing node (ℓ₀, nodeAt ℓ₀ x) using Classical.choose to
supply validated replacement seeds, followed by normalInsertFresh. Carries no blanket no-op
guarantee on arbitrary malformed states.
Internal member-only deletion on st (contract: WellFormedPadded, z ∈ paddedDom d,
and #S' ∈ [nLow 0, nHigh 0]): runs normalDeleteMem (Algorithm 3) when st.seeds stays good
on S.erase z, and otherwise invokes st.rehashSubtree (the pure reconstruction/local-splice step
of Algorithm 4) at (ℓ₀, nodeAt ℓ₀ z) using Classical.choose to supply validated replacement
seeds, followed by normalDeleteMem. Because the AllGoodSeeds S' branch runs normalDeleteMem
by compressed ID without checking membership or WellFormedPadded, this raw helper is not a no-op
on absent keys or malformed states (external TreeState.delete guards exact membership first).
Initialize an empty external dictionary (Dictionary.empty P.univ) padded with P.cap
sentinel keys (Section 4, Footnote 5 & Section 5).
initTree satisfies WellFormed for Dictionary.empty P.univ.
Insert or overwrite external key u : Fin P.univ with bounded value v : Fin P.valBound,
maintaining sentinel padding in {cap - 1, cap} (Section 5.3). On valid (WellFormed) states,
fresh insertion at full capacity ((dom dict).card = P.cap, where sentCount = 0 and
#(paddedDom d) = P.cap) is a guarded no-op via the final else branch; arbitrary malformed
states have no blanket no-op guarantee. Uses Classical.choose inside rawInsertFresh /
rawDeleteMem to select validated replacement seeds on subtree-reconstruction branches.
External insert preserves WellFormed (either overwriting an existing key u ∈ dom dict
or inserting a fresh key when (dom dict).card < P.cap).
Lookup after insert satisfies Function.update.
Delete external key u : Fin P.univ, maintaining sentinel padding in {cap - 1, cap}
(Section 5.3 & Algorithm 3). On valid (WellFormed) states, deleting an absent key is a
guarded no-op via the exact rawQuery membership check before invoking member-only
rawDeleteMem; arbitrary malformed states have no blanket no-op guarantee. Uses
Classical.choose inside rawInsertFresh / rawDeleteMem to select validated replacement seeds
on subtree-reconstruction branches.
External delete preserves WellFormed.
Lookup after delete satisfies Function.update.