Documentation

CslibFrontier.DataStructure.Dictionary.SuccinctWhpFastProb.WorkPotential

Epoch Rebuild Potential and Clean-Window Invariant for SuccinctWhpFastProb #

Internal definitions and potential bounds (stageWorkRemaining, stageWorkMax_add_one_le_qEpoch, stageWorkRemaining_le_max, SaltBoundAt, and CleanWindowFast) used across the deterministic SuccinctWhpFastProb fast-path proof submodules (not re-exported by SuccinctWhpFastProb).

Maximum Stage-4 remaining work 1 + cTabWhp c * (2 * sMaxWhp c n_max).

Maximum Stage-3 remaining work.

Per-dirty-bucket Stage-2 work budget sMaxWhp c n_max * (3 * L ^ 12 + 1).

Maximum Stage-2 remaining work across ≤ 2 * sMaxWhp c n_max dirty buckets.

Maximum Stage-1 remaining work.

Maximum Stage-0..4 remaining background rebuild work per epoch.

Monotone remaining-work potential for epochTick across Stages 0 .. 5.

stageWorkMax c n_max + 1 ≤ qEpochWhp n_max whenever whpThreshold c ≤ n_max.

Closed-form rewrite splitting the last bucket's Stage-2 work off bktWorkUnit.

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.stageWorkRemaining_le_max {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} {dict : State U} (hc : CoreFastInv c U V n_max θ fs dict) (hstg : ValidEpochStage c U n_max θ fs) :

Every valid FastState has stageWorkRemaining c n_max fs ≤ stageWorkMax c n_max.

def Cslib.DataStructure.Dictionary.SuccinctWhp.SaltBoundAt (c U n_max : ℕ) (θ : SeedWhp c U n_max) (W_keys : Finset (Fin U)) (fs : FastState) :

Active Stage-2 salt search bound: candidate salt has not yet passed the collision-free salt.

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.stageWorkRemaining_eq_of_meta (c n_max : ℕ) {s₁ s₂ : FastState} (h1 : s₁.rebStage = s₂.rebStage) (h2 : s₁.stageCursor = s₂.stageCursor) (h3 : s₁.dirtyCount = s₂.dirtyCount) (h4 : s₁.dirtyIdx = s₂.dirtyIdx) (h5 : s₁.rebCandSalt = s₂.rebCandSalt) (h6 : s₁.rebScanCursor = s₂.rebScanCursor) (h7 : (s₁.buf s₁.oldEp).nodeAlloc = (s₂.buf s₂.oldEp).nodeAlloc) :
stageWorkRemaining c n_max s₁ = stageWorkRemaining c n_max s₂
structure Cslib.DataStructure.Dictionary.SuccinctWhp.CleanWindowFast (c U V n_max : ℕ) (θ : SeedWhp c U n_max) (W_keys BadIns : Finset (Fin U)) (fs : FastState) (dict : State U) :

Clean-epoch fast-mode invariant along the trailing window (W_keys, BadIns).

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.CleanWindowFast.of_clean_fast {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {W_keys BadIns : Finset (Fin U)} {fs : FastState} {dict : State U} (hv : ValidFastState c U V n_max θ fs dict) (hia0 : (fs.buf fs.curEp).itemAlloc = 0) (hclk0 : fs.epochClock = 0) (hno2 : fs.rebStage ≠ 2) :
CleanWindowFast c U V n_max θ W_keys BadIns fs dict