Clean-Window Stepping and Burn-In Countdown for SuccinctWhpFastProb #
Internal closure (CleanWindowFast.step) and bounded burn-in convergence
(HasBurnInBudget.run) along the trailing window windowSuffix,
plus small-regime invariance whpRunFrom_small (not re-exported by SuccinctWhpFastProb).
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.CleanWindowFast.step {c U V n_max : ℕ} (hnU : n_max ≤ U) {θ : SeedWhp c U n_max} {W_keys W_ins BadIns : Finset (Fin U)} {fs : FastState} {dict : State U} (hcw : CleanWindowFast c U V n_max θ W_keys BadIns fs dict) {op : Dynamic.Op U} (hval : Dynamic.valid V n_max dict op) (hdom_sub : ↑(dom dict) ⊆ ↑W_keys) (hdom_nxt : ↑(dom (Dynamic.step dict op).1) ⊆ ↑W_keys) (hop_ins : ∀ (u : Fin U) (v : ℕ), op = Dynamic.Op.insert u v → u ∈ W_ins ∧ u ∈ W_keys) (hinj_rkey : Set.InjOn (fpReducedKey c U n_max θ.2) ↑W_keys) (hbal_nxt : BalancedBuckets U n_max (bktHash c U n_max θ.1) (dom (Dynamic.step dict op).1)) (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})) (hbad_def :
∀ x ∈ W_ins,
(∃
y ∈
{w ∈ W_keys |
FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑w = FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑x},
x ≠ y ∧ ∃ (salt : Fin (sMaxWhp c n_max)), fpHash c U n_max θ.2 salt x = fpHash c U n_max θ.2 salt y) →
x ∈ BadIns) (hbad_lt : BadIns.card < 2 * sMaxWhp c n_max) :
∃ (fs' : FastState) (res : Option ℕ),
fastStepPure c U n_max θ fs op = some (fs', res) ∧ CleanWindowFast c U V n_max θ W_keys BadIns fs' (Dynamic.step dict op).1
Inside the trailing window under GoodSeedOnWindow, every admissible operation op from a
CleanWindowFast state succeeds with fastStepPure = some (fs', res) and preserves
CleanWindowFast.
def Cslib.DataStructure.Dictionary.SuccinctWhp.HasBurnInBudget (c U V n_max : ℕ) (θ : SeedWhp c U n_max) (W_keys BadIns : Finset (Fin U)) (st : WhpDictState) (dict : State U) (b : ℕ) :
Burn-in countdown budget to reach CleanWindowFast within the trailing window.
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.HasBurnInBudget.of_validWhpState {c U V n_max : ℕ} (hth : whpThreshold c ≤ n_max) {θ : SeedWhp c U n_max} {W_keys BadIns : Finset (Fin U)} {st : WhpDictState} {dict : State U} (hv : ValidWhpState c U V n_max θ st dict) :
HasBurnInBudget c U V n_max θ W_keys BadIns st dict (qEpochWhp n_max)
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.validHistory_take {U V n_max : ℕ} {s : State U} {ops : List (Dynamic.Op U)} (k : ℕ) (hvh : (Dynamic.spec U V n_max).ValidHistory s ops) :
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.opInsKeys_append {U : ℕ} (l₁ l₂ : List (Dynamic.Op U)) :
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.HasBurnInBudget.run {c U V n_max : ℕ} (hnU : n_max ≤ U) {ops : List (Dynamic.Op U)} {θ : SeedWhp c U n_max} (hg : GoodSeedOnWindow c U n_max ops θ) {BadIns : Finset (Fin U)} (hbad_def :
∀ x ∈ opInsKeys (windowSuffix U n_max ops),
(∃
y ∈
{w ∈ dom (windowStartState U n_max ops) ∪ opInsKeys (windowSuffix U n_max ops) |
FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑w = FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑x},
x ≠ y ∧ ∃ (salt : Fin (sMaxWhp c n_max)), fpHash c U n_max θ.2 salt x = fpHash c U n_max θ.2 salt y) →
x ∈ BadIns) (hbad_lt : BadIns.card < 2 * sMaxWhp c n_max) (l : List (Dynamic.Op U)) {st : WhpDictState} {dict : State U} {b : ℕ} :
HasBurnInBudget c U V n_max θ (dom (windowStartState U n_max ops) ∪ opInsKeys (windowSuffix U n_max ops)) BadIns st dict
b →
(Dynamic.spec U V n_max).ValidHistory dict l →
(∀ s ∈ stateSeq dict l, s ∈ stateSeq (windowStartState U n_max ops) (windowSuffix U n_max ops)) →
opInsKeys l ⊆ opInsKeys (windowSuffix U n_max ops) →
HasBurnInBudget c U V n_max θ (dom (windowStartState U n_max ops) ∪ opInsKeys (windowSuffix U n_max ops)) BadIns
(whpRunFrom c U n_max θ st l) ((Dynamic.spec U V n_max).run dict l).1 (b - l.length)
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.whpRunFrom_small {c U n_max : ℕ} (θ : SeedWhp c U n_max) (ops : List (Dynamic.Op U)) (sm : SmallDictState) :
∃ (sm' : SmallDictState), whpRunFrom c U n_max θ (WhpDictState.small sm) ops = WhpDictState.small sm'