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 #
Cslib.DataStructure.Dictionary.CellProbe.stateFiber: finset of memories whose decoded dictionary equalsstat stepstepIdx.
Main results #
Cslib.DataStructure.Dictionary.CellProbe.sum_card_stateFiber_le: upper bound on fiber counts.Cslib.DataStructure.Dictionary.CellProbe.run_take_modeOps_eq_ite: dictionary state after taking the segment prefix ofmodeOps.Cslib.DataStructure.Dictionary.CellProbe.validHistory_and_run_modeCandidateOps: exact replay of candidate segment operationsmodeCandidateOps.
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 (CellProbe.Mem cells w)
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 : ℕ) :
theorem Cslib.DataStructure.Dictionary.CellProbe.card_activeKeys {U V n t₀ : ℕ} (s : HardKeyValSeed U V n) (ht₀ : t₀ ≤ n) :
theorem Cslib.DataStructure.Dictionary.CellProbe.card_insertedSet {U V n t₀ r : ℕ} (s : HardKeyValSeed U V n) (hr : t₀ + r ≤ n) :
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) :
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