Shared Bucket & Value-Lane Bounds for Fast Operations #
Internal helper lemmas extracting buffer/slice invariants on a bucket from ValidFastState and
bounding dense local coordinates by 2 ^ valLaneBitsWhp n_max.
Main results #
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.validFastState_delete_bounds {c U V n_max b : ℕ} {θ : SuccinctWhp.SeedWhp c U n_max} {fs : SuccinctWhp.FastState} {dict : State U} (hv : SuccinctWhp.ValidFastState c U V n_max θ fs dict) (hb : b < SuccinctWhp.numBucketsWhp n_max) :
(∀ loc < fs.bktCount b,
fs.locState b loc = 2 →
(fs.buf 0).nodeAlloc + SuccinctWhp.cTabWhp c ≤ SuccinctWhp.maxTrieNodesWhp c n_max ∧ (fs.buf 0).itemAlloc < SuccinctWhp.qEpochWhp n_max ∧ ∃ (m0 : ℕ → Option (ℕ × ℕ)),
SuccinctWhp.ValidBufTrie (SuccinctWhp.cTabWhp c) (SuccinctWhp.bCharWhp n_max) (fs.buf 0) m0) ∧ (∀ loc < fs.bktCount b,
fs.locState b loc = 3 →
(fs.buf 1).nodeAlloc + SuccinctWhp.cTabWhp c ≤ SuccinctWhp.maxTrieNodesWhp c n_max ∧ (fs.buf 1).itemAlloc < SuccinctWhp.qEpochWhp n_max ∧ ∃ (m1 : ℕ → Option (ℕ × ℕ)),
SuccinctWhp.ValidBufTrie (SuccinctWhp.cTabWhp c) (SuccinctWhp.bCharWhp n_max) (fs.buf 1) m1) ∧ fs.liveSliceIdx b < 3 * SuccinctWhp.numBucketsWhp n_max ∧ fs.overmarsSliceIdx b < 3 * SuccinctWhp.numBucketsWhp n_max ∧ fs.rebSliceIdx b < 3 * SuccinctWhp.numBucketsWhp n_max ∧ fs.liveSliceIdx b ≠ fs.overmarsSliceIdx b ∧ fs.liveSliceIdx b ≠ fs.rebSliceIdx b ∧ fs.overmarsSliceIdx b ≠ fs.rebSliceIdx b ∧ (fs.liveInsCount b ≤ 8 * FeistelQuotient.slabScale n_max ^ 12 ∧ ∃ (lm : ℕ → Option ℕ),
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) ∧ (decide
(fs.rebStage = 2 ∧ fs.dirtyIdx < fs.dirtyCount ∧ fs.dirtyBuckets fs.dirtyIdx = b ∧ fs.rebCandSalt < SuccinctWhp.sMaxWhp c n_max ∧ fs.rebCollision = 0) = true →
fs.rebInsCount < 8 * FeistelQuotient.slabScale n_max ^ 12 ∧ ∃ (rm : ℕ → Option ℕ),
SuccinctWhp.ValidWhpSlice n_max fs.rebInsCount (fs.slices (fs.rebSliceIdx b)) rm)
Extract buffer and slice invariants on bucket b from ValidFastState.
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.loc_lt_two_pow_valLaneBits {n_max loc : ℕ} (hloc : loc < SuccinctWhp.totalLocalCoordsWhp n_max) :