Insertion, Global Epoch Ticks, and Sequence Refinement for the Pure WHP Succinct Dictionary #
This module completes the deterministic step-correctness proofs for SuccinctWhpModel
(Bender, Farach-Colton, J. Kuszmaul, and W. Kuszmaul, SOSA 2024,
Sections 3–5).
Main results #
Cslib.DataStructure.Dictionary.SuccinctWhp.ValidFastState.fastInsert_spec: fast-mode insertion / overwrite refinesDynamic.step dict (.insert u v)and yieldsCoreFastInv,OvermarsBucketInv, andValidEpochStagewheneverfastInsertreturnssome fs'.Cslib.DataStructure.Dictionary.SuccinctWhp.epochTick_spec: global deamortization across Stages0 .. 5and epoch rollover restores fullValidFastStatefromCoreFastInv+OvermarsBucketInv+ValidEpochStagePreTickwheneverepochTickreturnssome fs'.Cslib.DataStructure.Dictionary.SuccinctWhp.ValidFastState.fastStepPure_spec,whpStepPure_spec,whpRunFrom_spec,whpRunPure_spec: exactDynamic.step/Dynamic.runrefinement for every static seedθacross all modes (.small,.fast,.fallback, and seamlessfastToCsr/trySelfHealtransitions).
References #
Section 3: fastStepPure_spec, whpStepPure_spec, whpRunFrom_spec, whpRunPure_spec #
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.ValidFastState.fastStepPure_spec {c U V n_max : ℕ} (hnU : n_max ≤ U) {θ : SeedWhp c U n_max} {fs fs' : FastState} {dict : State U} {res : Option ℕ} (hv : ValidFastState c U V n_max θ fs dict) {op : Dynamic.Op U} (hvalid : Dynamic.valid V n_max dict op) (hstep : fastStepPure c U n_max θ fs op = some (fs', res)) :
ValidFastState c U V n_max θ fs' (Dynamic.step dict op).1 ∧ res = opResultOpt op (Dynamic.step dict op).2
Whenever fastStepPure returns some (fs', res), fs' satisfies ValidFastState for
(Dynamic.step dict op).1 and res = opResultOpt op (Dynamic.step dict op).2.
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.whpStepPure_spec {c U V n_max : ℕ} (hnU : n_max ≤ U) (θ : SeedWhp c U n_max) {st : WhpDictState} {dict : State U} (hv : ValidWhpState c U V n_max θ st dict) {op : Dynamic.Op U} (hvalid : Dynamic.valid V n_max dict op) :
match whpStepPure c U n_max θ st op with
| (st', res) => ValidWhpState c U V n_max θ st' (Dynamic.step dict op).1 ∧ res = opResultOpt op (Dynamic.step dict op).2
Exact single-step Dynamic.step refinement of whpStepPure for every static seed θ
across .small, .fast (both hit and fallback), and .fallback (including trySelfHeal).
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.whpRunFrom_spec {c U V n_max : ℕ} (hnU : n_max ≤ U) (θ : SeedWhp c U n_max) {st : WhpDictState} {dict : State U} (hv : ValidWhpState c U V n_max θ st dict) {ops : List (Dynamic.Op U)} (hvh : (Dynamic.spec U V n_max).ValidHistory dict ops) :
ValidWhpState c U V n_max θ (whpRunFrom c U n_max θ st ops) ((Dynamic.spec U V n_max).run dict ops).1
Multi-step sequence refinement from any ValidWhpState.
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.whpRunPure_spec {c U V n_max : ℕ} (hnU : n_max ≤ U) (θ : SeedWhp c U n_max) {ops : List (Dynamic.Op U)} (hvh : (Dynamic.spec U V n_max).ValidHistory (empty U) ops) :
ValidWhpState c U V n_max θ (whpRunPure c U n_max θ ops) ((Dynamic.spec U V n_max).run (empty U) ops).1
Multi-step sequence refinement starting from whpInitPure c n_max (Dictionary.empty U).