Documentation

CslibFrontier.DataStructure.Dictionary.SuccinctWhpFastProb

Per-Operation Fast-Path Hit Probability for the WHP Succinct Dynamic Dictionary #

This module connects the trailing-window hash-seed event GoodSeedOnWindow (proved to hold with probability at least 1 - (max n_max 1)⁻¹ ^ c in SuccinctWhpProb) to the deterministic pure transition machine whpRunPure / whpStepPure (SuccinctWhpModelTick):

  1. Epoch rebuild potential (stageWorkRemaining): tracks remaining background ticks across Stages 0 .. 5 of epochTick. Under GoodSeedOnWindow, every dirty bucket admits a collision-free salt < sMaxWhp c n_max, bounding total rebuild ticks per epoch by stageWorkMax c n_max < qEpochWhp n_max so epochTick never aborts at rollover.
  2. Clean-epoch invariant (CleanWindowFast): bounds (fs.buf fs.curEp).itemAlloc by the number of colliding window insertions already encountered (< 2 * sMaxWhp c n_max), ensuring none of the capacity, backyard-pool, Stage-1 rKey, buffer-cap, or rollover guards in fastStepPure ever fires inside a clean epoch.
  3. Self-healing / rollover burn-in (HasBurnInBudget): within at most qEpochWhp n_max operations of entering the trailing window windowSuffix (length = 2 * qEpochWhp n_max + 2), either trySelfHeal or an epoch rollover deterministically places whpRunPure into CleanWindowFast, where it remains through the target operation op.
  4. Master per-operation fast-branch probability theorem (toOuterMeasure_not_isFastStepHit_le): for every c, U, V, n_max with n_max ≤ U and every admissible oblivious sequence ops_prev ++ [op], the probability over θ ~ seedLawWhp c U n_max that step op fails to take the fast branch (.small below whpThreshold c, or .fast with fastStepPure = some _ at or above whpThreshold c) is at most (max n_max 1 : ℝ≥0∞)⁻¹ ^ c.

Main definitions #

Main results #

def Cslib.DataStructure.Dictionary.SuccinctWhp.IsFastStepHit (c U n_max : ℕ) (ops_prev : List (Dynamic.Op U)) (op : Dynamic.Op U) (θ : SeedWhp c U n_max) :

Predicate stating that on seed θ after history ops_prev, executing op takes the fast branch (either .small mode when n_max < whpThreshold c, or .fast mode with fastStepPure = some _ when whpThreshold c ≤ n_max).

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.isFastStepHit_of_goodSeedOnWindow {c U V n_max : ℕ} (hth : whpThreshold c ≤ n_max) (hnU : n_max ≤ U) {ops_prev : List (Dynamic.Op U)} {op : Dynamic.Op U} (hvh : (Dynamic.spec U V n_max).ValidHistory (empty U) (ops_prev ++ [op])) {θ : SeedWhp c U n_max} (hg : GoodSeedOnWindow c U n_max (ops_prev ++ [op]) θ) :
IsFastStepHit c U n_max ops_prev op θ

Deterministic bridge: for every whpThreshold c ≤ n_max, if θ satisfies GoodSeedOnWindow on ops_prev ++ [op], then whpRunPure reaches .fast fs after ops_prev and fastStepPure succeeds (some _) on op.

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.toOuterMeasure_not_isFastStepHit_le {c U V n_max : ℕ} (hnU : n_max ≤ U) {ops_prev : List (Dynamic.Op U)} {op : Dynamic.Op U} (hvh : (Dynamic.spec U V n_max).ValidHistory (empty U) (ops_prev ++ [op])) :
(seedLawWhp c U n_max).toOuterMeasure {θ : SeedWhp c U n_max | ¬IsFastStepHit c U n_max ops_prev op θ} ≤ (max (↑n_max) 1)⁻¹ ^ c

Master per-operation slow-fallback probability bound: Across all capacities n_max ≤ U (both < whpThreshold c and ≥ whpThreshold c), on any admissible oblivious operation history ops_prev ++ [op], the probability over θ ~ seedLawWhp that op fails to take the fast branch (IsFastStepHit) is at most (max n_max 1 : ℝ≥0∞)⁻¹ ^ c.