Parameter-Free bufClearStepsGenProg Subroutine #
Certified O(k) bufClearSteps incremental trie reset subroutine preserving BufEpFrame and
opposite-buffer invariants.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.BufClearStepsGenPreCslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.bufClearStepsGenProg
Main results #
Precondition for bufClearStepsGenProg (d = (((cp, base), ep), k)).
@[irreducible]
def Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.bufClearStepsGenProg (d : ((WhpCoreParams × ℕ) × ℕ) × ℕ) :
Parameter-free bufClearSteps (d = (((cp, base), ep), k)).
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.bufClearStepsGenProg_spec {c U V w n_max base ep k : ℕ} {tr : SuccinctWhp.BufTrie} {s : Memory.State} (henv : WhpLargeEnv c U V w n_max w base) (hep : ep = 0 ∨ ep = 1) (hrep : BufTrieMemRep base c U V w n_max ep tr s.mem) (hclr : SuccinctWhp.ClearableBufTrie tr) :
have prog := bufClearStepsGenProg (((mkWhpCoreParams c U V w n_max, base), ep), k);
have s' := (Memory.spec 0).clientState s prog;
have tr' := SuccinctWhp.bufClearSteps k tr;
s'.frontier = s.frontier ∧ WordRAM.Realization.memoryCost prog s ≤ 15 * k ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog ∧ BufTrieMemRep base c U V w n_max ep tr' s'.mem ∧ BufEpFrame base c U V w n_max ep s.mem s'.mem