Documentation

CslibFrontier.DataStructure.Dictionary.WordRAM.SuccinctWhpFastOpProg.DelMoveLast

Fast Deletion Substep 2 (fastDeleteMoveLastGenProg) #

Assembles Substep 2 (fastDeleteMoveLast) swapping the last coordinate loc_last into the freed slot loc_del across epoch buffers, slices, and slot arrays.

Main definitions #

Main results #

@[irreducible]

Complete Substep 2 (fastDeleteMoveLast, when loc_del < loc_last): relocate loc_last into loc_del (d = ((((wp, base), b), (loc_del, loc_last)), rebAct)).

Precondition for fastDeleteMoveLastGenProg on fs1 = fastDeleteRemove c U n_max θ fs u b loc_del under ValidFastState ... fs dict.

theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.fastDeleteMoveLastGenProg_fastStep {c U V w n_max base b loc_del loc_last : ℕ} {θ : SuccinctWhp.SeedWhp c U n_max} {fs : SuccinctWhp.FastState} {dict : State U} {s : Memory.State} (u : Fin U) (henv : WhpLargeEnv c U V w n_max w base) (hv : SuccinctWhp.ValidFastState c U V n_max θ fs dict) (hb : b < SuccinctWhp.numBucketsWhp n_max) (hcnt : fs.bktCount b = loc_last + 1) (hlt : loc_del < loc_last) (hseed : SeedWhpMemRep base c U w n_max θ s.mem) (hrep1 : FastMemRep base c U V w n_max (SuccinctWhp.fastDeleteRemove c U n_max θ fs u b loc_del) s.mem) :
have rebActiveB := decide (fs.rebStage = 2 ∧ fs.dirtyIdx < fs.dirtyCount ∧ fs.dirtyBuckets fs.dirtyIdx = b ∧ fs.rebCandSalt < SuccinctWhp.sMaxWhp c n_max ∧ fs.rebCollision = 0); have rebAct := if rebActiveB = true then 1 else 0; have fs1 := SuccinctWhp.fastDeleteRemove c U n_max θ fs u b loc_del; have prog := fastDeleteMoveLastGenProg ((((mkWhpParams c U V w n_max, base), b), loc_del, loc_last), rebAct); have s' := (Memory.spec 0).clientState s prog; WordRAM.Realization.memoryCost prog s ≤ 20 * SuccinctWhp.cTabWhp c + 5 * hashEvalCostWhp c + 5476 ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog ∧ FastStateStep base c U V w n_max θ (SuccinctWhp.fastDeleteMoveLast c U n_max θ b loc_del loc_last rebActiveB fs1) s s'