Documentation

CslibFrontier.DataStructure.Dictionary.WordRAM.SuccinctWhpEpochTickProg

Global Epoch Ticks and Fast-Mode Step Memory.Prog Subroutines #

This module exports the parameter-free combined fast-mode operation dispatcher fastStepPureGenProg, its Realizes .exact certificate realizes_fastStepPureGen, and the c-only cost and FastStateStep bound fastStepPureGenProg_spec for SuccinctWhpModel.

The underlying global deamortized epoch-rebuild subroutines and proofs live under CslibFrontier.DataStructure.Dictionary.WordRAM.SuccinctWhpEpochTickProg.Internal (built on shared header and step combinators in Internal.Common):

  1. Internal.RebScan (rebScanLoopGenProg): 16-coordinate Stage-2 candidate-salt scan loop via Realizes.iterate₀, refining rebScanSteps c U n_max θ b 16 fs in O_c(1) worst-case memoryCost.
  2. Internal.Stage0 .. Internal.Stage4 and Internal.Tick (epochTickGenProg): Stage 0 .. 5 deamortization and epoch rollover, refining epochTick c U n_max θ fs = some fs' whenever epochTickWillSucceed n_max fs holds.
  3. Internal.CheckOk (checkEpochTickOkGenProg) and this module (fastStepPureGenProg): O(1) read-only rollover pre-check and combined fastQuery / fastDelete / fastInsert + epochTick execution, guaranteeing clientState s prog = s whenever fastStepPure c U n_max θ fs op = none.

Main definitions #

Main results #

References #

c-only worst-case memoryCost bound for a fast-mode operation (fastStepPureGenProg).

@[irreducible]

Combined fast-mode operation dispatcher (d = ((wp, base), (opTag, (u_val, v_val)))), returning (1, encodeOptRes res) when fastStepPure = some (fs', res) and (0, (0, 0)) without mutating memory when fastStepPure = none.

theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.realizes_fastStepPureGen :
WordRAM.Realization.Realizes WordRAM.Basis.exact fastStepPureGenProg WordRAM.Realization.WordEncoding.encode WordRAM.Realization.WordEncoding.encode (fun (w : ℕ) (x : (WhpParams × ℕ) × ℕ × ℕ × ℕ) (s : Memory.State) => match x with | ((wp, base), opTag, u_val, v_val) => ∃ (c : ℕ) (U : ℕ) (V : ℕ) (w₀ : ℕ) (n_max : ℕ) (θ : SuccinctWhp.SeedWhp c U n_max) (fs : SuccinctWhp.FastState) (dict : State U) (op : Dynamic.Op U), WhpLargeEnv c U V w₀ n_max w base ∧ wp = mkWhpParams c U V w₀ n_max ∧ SeedWhpMemRep base c U w₀ n_max θ s.mem ∧ FastMemRep base c U V w₀ n_max fs s.mem ∧ SuccinctWhp.ValidFastState c U V n_max θ fs dict ∧ Dynamic.valid V n_max dict op ∧ encodeOpWhp op = (opTag, u_val, v_val)) fun (x : (WhpParams × ℕ) × ℕ × ℕ × ℕ) (x_1 : Memory.State) => 0
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.fastStepPureGenProg_spec {c U V w n_max base : ℕ} {θ : SuccinctWhp.SeedWhp c U n_max} {fs : SuccinctWhp.FastState} {dict : State U} {s : Memory.State} (henv : WhpLargeEnv c U V w n_max w base) (hseed : SeedWhpMemRep base c U w n_max θ s.mem) (hrep : FastMemRep base c U V w n_max fs s.mem) (hv : SuccinctWhp.ValidFastState c U V n_max θ fs dict) {op : Dynamic.Op U} (hval_op : Dynamic.valid V n_max dict op) :
have prog := fastStepPureGenProg ((mkWhpParams c U V w n_max, base), encodeOpWhp op); have s' := (Memory.spec 0).clientState s prog; WordRAM.Realization.memoryCost prog s ≤ fastOpCostWhp c ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog ∧ match SuccinctWhp.fastStepPure c U n_max θ fs op with | some (fs', res) => (Memory.spec 0).clientResult s prog = (1, encodeOptRes res) ∧ FastStateStep base c U V w n_max θ fs' s s' | none => (Memory.spec 0).clientResult s prog = (0, 0, 0) ∧ s' = s