Documentation

CslibFrontier.DataStructure.Dictionary.CellProbe.LowerBound.CandidateReplay

Candidate Segment Replay and State Multiplicity Fibers #

Helper definitions and replay lemmas for Section 8.1 of [LLYZ23b]: the decoded-state memory fiber stateFiber, cardinality helpers for activeKeys, insertedSet, and deletedSet, and validity/replay equivalence for modeCandidateOps.

Main definitions #

Main results #

Candidate segment replay and dictionary-state multiplicity fibers #

noncomputable def Cslib.DataStructure.Dictionary.CellProbe.stateFiber {U cells w : ℕ} (D_det : CellProbe.IndexedScheme (Dynamic.Op U) Dynamic.Op.Result cells w) (stepIdx : ℕ) (st : State U) :

Finset of memories decoding to dictionary state st at step stepIdx.

theorem Cslib.DataStructure.Dictionary.CellProbe.sum_card_stateFiber_le {U V n cells w : ℕ} (D_det : CellProbe.IndexedScheme (Dynamic.Op U) Dynamic.Op.Result cells w) (stepIdx : ℕ) :
∑ p : SizedDict U V n, (stateFiber D_det stepIdx ↑p).card ≤ 2 ^ (cells * w)
theorem Cslib.DataStructure.Dictionary.CellProbe.dom_ite_eq {U V : ℕ} (S : Finset (Fin U)) (kv : Fin U → Fin V) :
(dom fun (u : Fin U) => if u ∈ S then some ↑(kv u) else none) = S
theorem Cslib.DataStructure.Dictionary.CellProbe.card_activeKeys {U V n t₀ : ℕ} (s : HardKeyValSeed U V n) (ht₀ : t₀ ≤ n) :
(s.activeKeys t₀ ht₀).card = n
theorem Cslib.DataStructure.Dictionary.CellProbe.card_insertedSet {U V n t₀ r : ℕ} (s : HardKeyValSeed U V n) (hr : t₀ + r ≤ n) :
(s.insertedSet t₀ r hr).card = r
theorem Cslib.DataStructure.Dictionary.CellProbe.card_deletedSet {U V n t₀ m : ℕ} (s : HardKeyValSeed U V n) (ht₀ : t₀ + m ≤ n) :
theorem Cslib.DataStructure.Dictionary.CellProbe.segDeletedKeys_subset_activeKeys {U V n t₀ m : ℕ} (s : HardKeyValSeed U V n) (ht₀ : t₀ + m ≤ n) :
Finset.image (⇑(segDeletedKeys s.keys s.delPerm t₀ m ht₀)) Finset.univ ⊆ s.activeKeys t₀ ⋯
theorem Cslib.DataStructure.Dictionary.CellProbe.run_take_modeOps_eq_ite (withQueries : Bool) {U V n t₀ : ℕ} (s : HardKeyValSeed U V n) (ht₀ : t₀ ≤ n) :
((Dynamic.spec U V n).run (empty U) (List.take (n + modeStride withQueries * t₀) (HardKeyValSeed.modeOps withQueries s))).1 = fun (u : Fin U) => if u ∈ s.activeKeys t₀ ht₀ then some ↑(s.kv u) else none
theorem Cslib.DataStructure.Dictionary.CellProbe.validHistory_and_run_modeCandidateOps (withQueries : Bool) {U V n t₀ m : ℕ} (s : HardKeyValSeed U V n) (ht₀ : t₀ + m ≤ n) {B : Finset (Fin U)} (hB : B.card = m) (hdisj : Disjoint B (s.activeKeys t₀ ⋯)) :
have stride := modeStride withQueries; have pref_bef := List.take (n + stride * t₀) (HardKeyValSeed.modeOps withQueries s); have ops_B := HardKeyValSeed.modeCandidateOps withQueries s t₀ m ht₀ B hB; have D_set := Finset.image (⇑(segDeletedKeys s.keys s.delPerm t₀ m ht₀)) Finset.univ; (Dynamic.spec U V n).ValidHistory (empty U) (pref_bef ++ ops_B) ∧ (pref_bef ++ ops_B).length = n + stride * (t₀ + m) ∧ ((Dynamic.spec U V n).run (empty U) (pref_bef ++ ops_B)).1 = fun (u : Fin U) => if u ∈ s.activeKeys t₀ ⋯ \ D_set ∪ B then some ↑(s.kv u) else none