Documentation

CslibFrontier.DataStructure.Dictionary.SuccinctWhpFastProb.TickStages

Stage-by-Stage epochTick Work Decrease for SuccinctWhpFastProb #

Internal proof that Stages 0 .. 4 strictly decrease stageWorkRemaining and that epochTick always returns some fs' under bounded remaining work and collision-free trailing-window salts (not re-exported by SuccinctWhpFastProb).

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.epochTick_some_of_work_bound {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {W_keys : Finset (Fin U)} {fs : FastState} {dict : State U} (hc : CoreFastInv c U V n_max θ fs dict) (hom : ∀ b < numBucketsWhp n_max, OvermarsBucketInv c U n_max θ fs b) (hpre : ValidEpochStagePreTick c U n_max θ fs) (hdom_sub : ↑(dom dict) ⊆ ↑W_keys) (hsalt_all : ∀ (b : Fin (numBucketsWhp n_max)), ∃ (salt : Fin (sMaxWhp c n_max)), Set.InjOn (fpHash c U n_max θ.2 salt) ↑({u ∈ W_keys | FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑u = ↑b})) (hsalt_cur : SaltBoundAt c U n_max θ W_keys fs) (hwork : fs.epochClock + stageWorkRemaining c n_max fs + 1 ≤ qEpochWhp n_max) :
∃ (fs' : FastState), epochTick c U n_max θ fs = some fs' ∧ ValidFastState c U V n_max θ fs' dict ∧ fs'.epochClock + stageWorkRemaining c n_max fs' + 1 ≤ qEpochWhp n_max ∧ SaltBoundAt c U n_max θ W_keys fs' ∧ (fs'.buf fs'.curEp = fs.buf fs.curEp ∨ (fs'.buf fs'.curEp).itemAlloc = 0)

Under bounded remaining rebuild work and collision-free window salts < sMaxWhp c n_max, epochTick always returns some fs', preserves the work bound and Stage-2 salt invariant, and either leaves fs'.buf fs'.curEp untouched or rolls over to itemAlloc = 0.