Documentation

CslibFrontier.DataStructure.Dictionary.SubconstantRedundancy.NodeSeeds

Regime-Switched Child-Router and Node-Level Hash Seeds #

This file formalizes the regime-switched child-router seed family (RouterSeed), grouped per-node hash-seed spaces (NodeSeed), and unified seed-failure concentration bounds for the multi-level dictionary tree of Tianxiao Li, Jingxun Liang, Huacheng Yu, and Renfei Zhou, Dynamic Dictionary with Subconstant Wasted Bits per Key ([LiLiangYuZhou2024, Sections 5.4 and 5.5]; arXiv:2310.20536v1, PDF pp. 32–34 / printed pp. 31–33). Pure node storage structures, Section 5.6 metadata separation, and deterministic tree operations follow in Stage 2 (#5349).

Regime-switched child routing (formalization adaptation) #

In [LiLiangYuZhou2024, Section 5.4, Lemma 5.1 & Appendix B, Claim B.2], child routing uses Mikkel Thorup's double-tabulation family [Tho13] uniformly across all tree levels under an idealized asymptotic threshold. In FeistelPerm, the explicit finite-size uniqueness threshold FeistelPerm.childRouterThreshold epsInv alphaInv is doubly exponential, so deep internal levels can satisfy nLow ℓ < childRouterThreshold epsInv alphaInv at moderate n. We therefore switch statically per level 0 ≤ ℓ < depth via TreeSchedule.usesDoubleTabRouter:

Both regimes satisfy the identical bucket-window failure bound ≤ 1 / (nFloor ℓ) ^ 2 (TreeSchedule.dens_routerRound_outside_bounds_le) and exact bit-budget match Fintype.card (P.RouterSeed ℓ) = 2 ^ P.routerSeedBits ℓ.

Main definitions #

Main results #

References #

Capacity-independent upper bound on the polynomial degree 2 * childRouterHalfInd (nHigh ℓ) whenever nLow ℓ < childRouterThreshold epsInv alphaInv (Section 5.4 small-node adaptation).

Section 1: Regime-switched child-router seed family and load concentration #

Static level predicate selecting DoubleTabulation (childRouterThreshold ≤ nLow ℓ) versus small-node trinomialPolyHash (nLow ℓ < childRouterThreshold).

Instances For
    @[reducible, inline]

    Double-tabulation child-router seed type at level ℓ above childRouterThreshold.

    @[reducible, inline]

    Exact (2 * childRouterHalfInd (nHigh ℓ))-wise trinomial seed type at level ℓ below childRouterThreshold.

    Regime-switched child-router seed at level 0 ≤ ℓ < depth.

    Instances For

      RouterSeed P ℓ has exact cardinality 2 ^ P.routerSeedBits ℓ.

      Below childRouterThreshold, the trinomial child-router polynomial degree is bounded by the capacity-independent constant smallRouterMaxDegree P.epsInv P.alphaInv.

      Zero-pad a small-node trinomial router seed from 2 * childRouterHalfInd (nHigh ℓ) coefficients to the static capacity-independent degree smallRouterMaxDegree P.epsInv P.alphaInv, so Word-RAM polynomial evaluation (KWise.evalCode) can use a single O(1)-degree circuit across all small-node levels.

      Regime-switched Feistel round function Fin (routerRightUniv ℓ) → Fin (2 ^ branchBits ℓ).

      Below childRouterThreshold, evaluating routerRound on a .trinomial seed equals evaluating trinomialPolyHash at the static degree smallRouterMaxDegree P.epsInv P.alphaInv on padSmallRouterSeed ℓ seed.

      Regime-switched child-router Feistel involution on Fin (2 ^ branchBits ℓ) × Fin (routerRightUniv ℓ).

      theorem Cslib.DataStructure.Dictionary.SubconstantRedundancy.TreeSchedule.dens_routerRound_outside_bounds_le (P : TreeSchedule) (hcr : P.ConcentrationReady) {ℓ : ℕ} (hℓ : ℓ < P.depth) (S : Finset (Fin (2 ^ P.branchBits ℓ) × Fin (P.routerRightUniv ℓ))) (hlo : P.nLow ℓ ≤ S.card) (hhi : S.card ≤ P.nHigh ℓ) :
      ↑{θ : P.RouterSeed ℓ | ¬∀ (b : Fin (2 ^ P.branchBits ℓ)), P.nLow (ℓ + 1) ≤ FeistelPerm.bucketLoad (P.routerRound ℓ θ) S b ∧ FeistelPerm.bucketLoad (P.routerRound ℓ θ) S b ≤ P.nHigh (ℓ + 1)}.dens ≤ 1 / ↑(P.nFloor ℓ) ^ 2

      Unified child-router bucket-load concentration (Lemma 5.1(c) across both regimes): for any level 0 ≤ ℓ < depth and input set S with nLow ℓ ≤ #S ≤ nHigh ℓ, under P.ConcentrationReady, at most a 1 / (nFloor ℓ) ^ 2 fraction of seeds in P.RouterSeed ℓ let any child bucket load fall outside [nLow (ℓ + 1), nHigh (ℓ + 1)] ([LiLiangYuZhou2024, Section 5.4, Lemma 5.1(c)]; arXiv:2310.20536v1, PDF p. 32 / printed p. 31).

      Section 2: Grouped per-node hash seeds g_u and unified 3 / n_ℓ ^ 2 bound #

      @[reducible, inline]

      Level-ℓ primitive key-ID domain (Section 5.5 input x_prim to g_u): Fin (2 ^ branchBits 0) × Fin (routerRightUniv 0) at ℓ = 0, and Fin (2 ^ idBits ℓ) × Fin (idCompRightUniv ℓ) at ℓ ≥ 1.

      Instances For

        Grouped per-node hash seed g_u ∈ G_ℓ (Section 5.5, PDF p. 34 / printed p. 33): RouterSeed 0 at ℓ = 0, (IdCompressorSeed, RouterSeed ℓ) for 1 ≤ ℓ < depth, and IdCompressorSeed at leaf level ℓ ≥ depth.

        Instances For

          Equivalence (IdCompressorSeed × RouterSeed) ≃ NodeSeed (ℓ + 1) for ℓ + 1 < depth.

          Equivalence IdCompressorSeed ≃ NodeSeed (ℓ + 1) for ¬ (ℓ + 1 < depth).

          NodeSeed P ℓ has exact cardinality 2 ^ P.nodeHashSeedBits ℓ.

          Extract the ID-compressor seed component of g : P.NodeSeed (ℓ + 1).

          Extract the child-router seed component of g : P.NodeSeed ℓ when ℓ < P.depth.

          Node-seed goodness predicate (Section 5.5 "does not fail", PDF p. 34 / printed p. 33): no ID collision on S (ℓ ≥ 1), and every child bucket load lies in [nLow (ℓ + 1), nHigh (ℓ + 1)] (ℓ < depth).

          theorem Cslib.DataStructure.Dictionary.SubconstantRedundancy.TreeSchedule.dens_not_isGoodNodeSeed_le (P : TreeSchedule) (hcr : P.ConcentrationReady) {ℓ : ℕ} (hℓ : ℓ ≤ P.depth) (S : Finset (P.PrimId ℓ)) (hlo : P.nLow ℓ ≤ S.card) (hhi : S.card ≤ P.nHigh ℓ) :
          ↑{g : P.NodeSeed ℓ | ¬P.IsGoodNodeSeed ℓ g S}.dens ≤ 3 / ↑(P.nFloor ℓ) ^ 2

          Unified 3 / n_ℓ ^ 2 single-set node-seed failure bound (Section 5.5): for any 0 ≤ ℓ ≤ depth and primitive-ID set S with nLow ℓ ≤ #S ≤ nHigh ℓ, under P.ConcentrationReady, a uniform seed g : P.NodeSeed ℓ fails on S with density at most 3 / (nFloor ℓ) ^ 2 ([LiLiangYuZhou2024, Section 5.5]; arXiv:2310.20536v1, PDF p. 34 / printed p. 33).

          theorem Cslib.DataStructure.Dictionary.SubconstantRedundancy.TreeSchedule.card_isGoodNodeSeed_ge (P : TreeSchedule) (hcr : P.ConcentrationReady) {ℓ : ℕ} (hℓ : ℓ ≤ P.depth) (S : Finset (P.PrimId ℓ)) (hlo : P.nLow ℓ ≤ S.card) (hhi : S.card ≤ P.nHigh ℓ) :
          (P.nFloor ℓ ^ 2 - 3) * Fintype.card (P.NodeSeed ℓ) ≤ P.nFloor ℓ ^ 2 * {g : P.NodeSeed ℓ | P.IsGoodNodeSeed ℓ g S}.card

          Under P.ConcentrationReady, at least (1 - 3 / n_ℓ ^ 2) ≥ 11 / 12 of all seeds in P.NodeSeed ℓ satisfy IsGoodNodeSeed ℓ g S.

          theorem Cslib.DataStructure.Dictionary.SubconstantRedundancy.TreeSchedule.exists_isGoodNodeSeed (P : TreeSchedule) (hcr : P.ConcentrationReady) {ℓ : ℕ} (hℓ : ℓ ≤ P.depth) (S : Finset (P.PrimId ℓ)) (hlo : P.nLow ℓ ≤ S.card) (hhi : S.card ≤ P.nHigh ℓ) :
          ∃ (g : P.NodeSeed ℓ), P.IsGoodNodeSeed ℓ g S

          Every valid primitive-ID set S (nLow ℓ ≤ #S ≤ nHigh ℓ) admits at least one good seed g : P.NodeSeed ℓ.

          theorem Cslib.DataStructure.Dictionary.SubconstantRedundancy.TreeSchedule.exists_isGoodNodeSeed_pair (P : TreeSchedule) (hcr : P.ConcentrationReady) {ℓ : ℕ} (hℓ : ℓ ≤ P.depth) (S₁ S₂ : Finset (P.PrimId ℓ)) (hlo₁ : P.nLow ℓ ≤ S₁.card) (hhi₁ : S₁.card ≤ P.nHigh ℓ) (hlo₂ : P.nLow ℓ ≤ S₂.card) (hhi₂ : S₂.card ≤ P.nHigh ℓ) :
          ∃ (g : P.NodeSeed ℓ), P.IsGoodNodeSeed ℓ g S₁ ∧ P.IsGoodNodeSeed ℓ g S₂

          Every pair of valid primitive-ID sets S₁, S₂ (nLow ℓ ≤ #Sᵢ ≤ nHigh ℓ) admits a single seed g : P.NodeSeed ℓ simultaneously satisfying IsGoodNodeSeed on both S₁ and S₂.