Fast Deletion Move-Last Live & Overmars Slice Relocation #
Sub-helper 6.2b relocating loc_last -> loc_del in liveSlice[b] and overmarsSlice[b] with
exact Overmars collision handling.
Main definitions #
Main results #
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.realizes_delMoveLiveOmGen :
WordRAM.Realization.Realizes WordRAM.Basis.exact delMoveLiveOmGenProg WordRAM.Realization.WordEncoding.encode
WordRAM.Realization.WordEncoding.encode
(fun (w : ℕ) (x : (((WhpCoreParams × ℕ) × ℕ) × ℕ × ℕ) × ℕ × ℕ) (s : Memory.State) =>
match x with
| ((((cp, base), b), loc_del, snd), fst, fp_live_last) =>
∃ (c : ℕ) (U : ℕ) (V : ℕ) (w₀ : ℕ) (n_max : ℕ) (θ : SuccinctWhp.SeedWhp c U n_max) (fs : SuccinctWhp.FastState)
(lm : ℕ → Option ℕ),
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 fs s.mem ∧ (fs.curEp = 0 ∨ fs.curEp = 1) ∧ b < SuccinctWhp.numBucketsWhp n_max ∧ fs.liveRole b < 3 ∧ fs.overmarsRole b < 3 ∧ fs.liveSliceIdx b ≠ fs.overmarsSliceIdx b ∧ loc_del < SuccinctWhp.totalLocalCoordsWhp n_max ∧ fp_live_last < 2 ^ SuccinctWhp.fpBitsWhp n_max ∧ fs.liveInsCount b ≤ 8 * FeistelQuotient.slabScale n_max ^ 12 ∧ SuccinctWhp.ValidWhpSlice n_max (fs.liveInsCount b) (fs.slices (fs.liveSliceIdx b)) lm ∧ (fs.overmarsActive b = 1 →
fs.overmarsInsCount b < 8 * FeistelQuotient.slabScale n_max ^ 12 ∧ ∃ (om : ℕ → Option ℕ),
SuccinctWhp.ValidWhpSlice n_max (fs.overmarsInsCount b)
(fs.slices (fs.overmarsSliceIdx b)) om))
fun (x : (((WhpCoreParams × ℕ) × ℕ) × ℕ × ℕ) × ℕ × ℕ) (x_1 : Memory.State) => 0
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.delMoveLiveOmGenProg_fastStep {c U V w n_max base b loc_del loc_last st_last fp_live_last : ℕ} {θ : SuccinctWhp.SeedWhp c U n_max} {fs : SuccinctWhp.FastState} {lm : ℕ → Option ℕ} {s : Memory.State} (henv : WhpLargeEnv c U V w n_max w base) (hce : fs.curEp = 0 ∨ fs.curEp = 1) (hb : b < SuccinctWhp.numBucketsWhp n_max) (hlr : fs.liveRole b < 3) (hor : fs.overmarsRole b < 3) (hne_lo : fs.liveSliceIdx b ≠ fs.overmarsSliceIdx b) (hld : loc_del < SuccinctWhp.totalLocalCoordsWhp n_max) (hfp : fp_live_last < 2 ^ SuccinctWhp.fpBitsWhp n_max) (hlic : fs.liveInsCount b ≤ 8 * FeistelQuotient.slabScale n_max ^ 12) (hv_l : SuccinctWhp.ValidWhpSlice n_max (fs.liveInsCount b) (fs.slices (fs.liveSliceIdx b)) lm) (hom_fn :
fs.overmarsActive b = 1 →
fs.overmarsInsCount b < 8 * FeistelQuotient.slabScale n_max ^ 12 ∧ ∃ (om : ℕ → Option ℕ),
SuccinctWhp.ValidWhpSlice n_max (fs.overmarsInsCount b) (fs.slices (fs.overmarsSliceIdx b)) om) (hst_eq : st_last = fs.locState b loc_last) (hseed : SeedWhpMemRep base c U w n_max θ s.mem) (hrep : FastMemRep base c U V w n_max fs s.mem) :
have prog :=
delMoveLiveOmGenProg ((((mkWhpCoreParams c U V w n_max, base), b), loc_del, loc_last), st_last, fp_live_last);
have s' := (Memory.spec 0).clientState s prog;
have omPair := SuccinctWhp.fastDeleteMoveSlices n_max b loc_del loc_last fp_live_last fs;
WordRAM.Realization.memoryCost prog s ≤ 2718 ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog ∧ FastStateStep base c U V w n_max θ
{ quotArr := fs.quotArr, valArr := fs.valArr, locState := fs.locState, bktCount := fs.bktCount,
bktSalt := fs.bktSalt, liveRole := fs.liveRole, liveInsCount := fs.liveInsCount,
overmarsRole := fs.overmarsRole, overmarsActive := fs.overmarsActive, overmarsCursor := fs.overmarsCursor,
overmarsInsCount := omPair.2, rebDoneFlag := fs.rebDoneFlag, rebQueued := fs.rebQueued, backPtr := fs.backPtr,
poolFreeTop := fs.poolFreeTop, poolFreeStack := fs.poolFreeStack, poolOwner := fs.poolOwner, slices := omPair.1,
buf := fs.buf, curEp := fs.curEp, epochClock := fs.epochClock, rebStage := fs.rebStage,
stageCursor := fs.stageCursor, dirtyCount := fs.dirtyCount, dirtyBuckets := fs.dirtyBuckets,
dirtyIdx := fs.dirtyIdx, rebCandSalt := fs.rebCandSalt, rebScanCursor := fs.rebScanCursor,
rebInsCount := fs.rebInsCount, rebCollision := fs.rebCollision }
s s'