Parameter-Free bufEverPresentGenProg Subroutine #
Certified O_c(1) bufEverPresent query checking whether rKey has ever been inserted into
the epoch character-trie buffer ep.
Main definitions #
Main results #
@[irreducible]
Parameter-free bufEverPresent (d = (((cp, base), ep), rKey)), returning 1 or 0.
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.bufEverPresentGenProg_spec {c U V w n_max base ep rKey : ℕ} {tr : SuccinctWhp.BufTrie} {mapFn : ℕ → Option (ℕ × ℕ)} {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) (hv : SuccinctWhp.ValidBufTrie (SuccinctWhp.cTabWhp c) (SuccinctWhp.bCharWhp n_max) tr mapFn) :
have prog := bufEverPresentGenProg (((mkWhpCoreParams c U V w n_max, base), ep), rKey);
(Memory.spec 0).clientState s prog = s ∧ ((Memory.spec 0).clientResult s prog = if SuccinctWhp.bufEverPresent (SuccinctWhp.cTabWhp c) (SuccinctWhp.bCharWhp n_max) tr rKey = true then 1 else 0) ∧ WordRAM.Realization.memoryCost prog s ≤ 2 * SuccinctWhp.cTabWhp c + 2 ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog