Fast Deletion Substep 3 (fastDeleteShrinkGenProg) #
Clears locState b loc_last, decrements bktCount b, and returns any released backyard pool
slot to poolFreeStack.
Main definitions #
Main results #
@[irreducible]
Substep 3 (fastDeleteShrink): clear locState b loc_last := 0, set bktCount b := loc_last,
and return any backyard slot to poolFreeStack (d = (((cp, base), b), loc_last)).
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.realizes_fastDeleteShrinkGen :
WordRAM.Realization.Realizes WordRAM.Basis.exact fastDeleteShrinkGenProg WordRAM.Realization.WordEncoding.encode
WordRAM.Realization.WordEncoding.encode
(fun (w : ℕ) (x : ((WhpCoreParams × ℕ) × ℕ) × ℕ) (s : Memory.State) =>
match x with
| (((cp, base), b), loc_last) =>
∃ (c : ℕ) (U : ℕ) (V : ℕ) (w₀ : ℕ) (n_max : ℕ) (θ : SuccinctWhp.SeedWhp c U n_max) (fs2 : SuccinctWhp.FastState),
WhpLargeEnv c U V w₀ n_max w base ∧ cp = mkWhpCoreParams c U V w₀ n_max ∧ SeedWhpMemRep base c U w₀ n_max θ s.mem ∧ FastMemRep base c U V w₀ n_max fs2 s.mem ∧ b < SuccinctWhp.numBucketsWhp n_max ∧ loc_last < SuccinctWhp.totalLocalCoordsWhp n_max ∧ (SuccinctWhp.capFrontWhp n_max ≤ loc_last →
fs2.backPtr b (loc_last - SuccinctWhp.capFrontWhp n_max) < SuccinctWhp.poolSizeWhp n_max ∧ fs2.poolFreeTop < SuccinctWhp.poolSizeWhp n_max))
fun (x : ((WhpCoreParams × ℕ) × ℕ) × ℕ) (x_1 : Memory.State) => 0
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.fastDeleteShrinkGenProg_fastStep {c U V w n_max base b loc_last : ℕ} {θ : SuccinctWhp.SeedWhp c U n_max} {fs2 : SuccinctWhp.FastState} {s : Memory.State} (henv : WhpLargeEnv c U V w n_max w base) (hb : b < SuccinctWhp.numBucketsWhp n_max) (hll : loc_last < SuccinctWhp.totalLocalCoordsWhp n_max) (hcf_fn :
SuccinctWhp.capFrontWhp n_max ≤ loc_last →
fs2.backPtr b (loc_last - SuccinctWhp.capFrontWhp n_max) < SuccinctWhp.poolSizeWhp n_max ∧ fs2.poolFreeTop < SuccinctWhp.poolSizeWhp n_max) (hseed : SeedWhpMemRep base c U w n_max θ s.mem) (hrep2 : FastMemRep base c U V w n_max fs2 s.mem) :
have prog := fastDeleteShrinkGenProg (((mkWhpCoreParams c U V w n_max, base), b), loc_last);
have s' := (Memory.spec 0).clientState s prog;
WordRAM.Realization.memoryCost prog s ≤ 16 ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog ∧ FastStateStep base c U V w n_max θ (SuccinctWhp.fastDeleteShrink n_max b loc_last fs2) s s'