Documentation

CslibFrontier.DataStructure.Dictionary.WordRAM.ResizableSuccinct.Dispatch.BucketOps.DeleteSpec

Dictionary-Level Two-Phase Deletion Specification (DictStateInv) #

Establishes DictStateInv, FixedCoupled, and amortized memoryCost bounds for two-phase compacted deletion (compDeleteWithHashGenProg_dict_spec).

Main results #

theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compDeleteWithHashGenProg_dict_spec {metaBase itemBase U V w N m_items : ℕ} {θ : Succinct.QuotHashSeed U N} {s_abs : State U} {s_fix s s_mid : Memory.State} (henv : CompEpochEnv U V w N metaBase itemBase m_items s) (hfit_off : WordRAM.Fits w (metaBase + offCompItems U w N)) (hinv : Succinct.DictStateInv U V (ghostW w) N 0 θ s_abs s_fix) (hcpl : FixedCoupled metaBase itemBase U V w N s_fix s) (hm_items : Succinct.totalSlots N (compGmAt metaBase U w N s.mem) ≤ m_items) (hmid_fr : s_mid.frontier = s.frontier) (hmid_out : ∀ (a : ℕ), metaBase + offCompLM U w N ≤ a → s_mid.mem a = s.mem a) (u : Fin U) :
have q := FeistelQuotient.keyQuotient (FeistelQuotient.bucketBits N) ↑u; have h_q := Succinct.hValOfSeed U N θ q; have d_prep := ((mkCompParams U V w N, metaBase, itemBase), ↑u, h_q); have prog_prep := compDeletePrepWithHashGenProg d_prep; ∃ (found : ℕ) (j_del : ℕ) (phys_del : ℕ) (q_last : ℕ), have prep := (((found, j_del), phys_del), q_last); have h_q_last := Succinct.hValOfSeed U N θ q_last; have d_fin := ((((mkCompParams U V w N, metaBase, itemBase), ↑u, h_q), (found, j_del), phys_del), h_q_last); have prog_fin := compDeleteFinishWithHashGenProg d_fin; have s' := (Memory.spec 0).clientState s_mid prog_fin; have gm₀ := compGmAt metaBase U w N s.mem; have gm' := compGmAt metaBase U w N s'.mem; (Memory.spec 0).clientResult s prog_prep = prep ∧ (found = 1 ↔ (s_abs u).isSome = true) ∧ CompQueryWithHashPre w d_prep s ∧ (Memory.spec 0).clientState s prog_prep = s ∧ q_last < 2 ^ FeistelQuotient.quotientBits U N ∧ CompDeleteFinishWithHashPre w d_fin s_mid ∧ CompOpFrame metaBase itemBase U V w N m_items s_mid s' ∧ (∃ (s_fix' : Memory.State), Succinct.DictStateInv U V (ghostW w) N 0 θ (Function.update s_abs u none) s_fix' ∧ FixedCoupled metaBase itemBase U V w N s_fix' s') ∧ WordRAM.Realization.memoryCost prog_prep s + WordRAM.Realization.memoryCost prog_fin s_mid + 98 * Succinct.slotPotential N gm' ≤ 98 * Succinct.slotPotential N gm₀ + 354 + 12 * SuccinctBucket.probeExcess N (Succinct.qStage1 U N θ.1) (Succinct.polyStage2 U N) θ.2 (dom s_abs) u

Dictionary-level specification of two-phase compacted deletion (compDeletePrepWithHashGenProg on s followed by compDeleteFinishWithHashGenProg on s_mid, allowing the intermediate second hash evaluation to overwrite limb scratch below metaBase + offCompLM U w N).