Online data structures: the final state of a run satisfies its RunsWithin postcondition
ProvedDynLZ77.Main.finalState_of_runsWithindata-structuresdynamic-lz77hoare-logicverified-programmingword-ram
In the online protocol ServesOnline (definition DynLZ77_Main_DataStructure), the memory left by a run of the program from memory is that of , the state at the first halting step. If
then satisfies : its memory and space usage satisfy .
This links the specification of a single run to the memory handed to the next operation, which is what a representation invariant must survive.
Preamble
import Mathlib import Definitions.Def_CentralStrQ_Machine import Definitions.Def_CentralStrQ_Hoare import Definitions.Def_DynLZ77_Main_DataStructure set_option autoImplicit false
Formal statement
namespace DynLZ77.Main
open CentralStrQ WordRAM
/-- The final state (`finalState`, the state at the first halting step) of a run that
`RunsWithin` some bound satisfies the postcondition. -/
theorem finalState_of_runsWithin {w : Width} {P : Program} {mem : Memory w} {T : ℝ}
{post : Memory w → ℕ → Prop} (h : RunsWithin P mem T post) :
post (finalState P mem).mem (finalState P mem).maxAddr := by sorry
end DynLZ77.Main
Source
Online protocol of Def_DynLZ77_Main_DataStructure: Boneh, Fried, Golan, Kraus, Dynamic LZ77: No Space for Improvement, STOC 2027 submission (manuscript), Section 4.1, p. 16 (dynamic algorithms, edit operations) and footnote 1, p. 1 (Otilde bounds), formalized in the mission definition DynLZ77_Main_DataStructure; machine Def_CentralStrQ_Machine. Infrastructure for the published deterministic word RAM Def_CentralStrQ_Machine (Kempa, Kociumaka, A Complete Characterization of Central String Queries in Compact Space, STOC 2027 submission, Section 3.2, p. 13; T. Hagerup, Sorting and searching on the word RAM, STACS 1998, https://doi.org/10.1007/BFb0028575). Hoare-style rules after C. A. R. Hoare, An axiomatic basis for computer programming, Commun. ACM 12(10), 1969, https://doi.org/10.1145/363235.363259.