Soundness of counted real-RAM compilation
ProvedPandoraKnapsack.Skipping.ArrayRAM.compile_cost_soundFor any typed-array command executing in charged steps from the initial store, compilation produces a single program which, for every budget , is halted and has the same decoded policy as the source output store. The seven steps are the input prologue. This statement holds on each draw stream.
Preamble
import Definitions.Def_PandoraKnapsack_Skipping_ArrayCompiler
Formal statement
namespace PandoraKnapsack.Skipping.ArrayRAM
theorem compile_cost_sound {n m T : ℕ} (I : Instance n m T) (ω : ℕ → ℝ)
(c : C) (a : Store) (k B : ℕ) (e : Exec I ω c (initial n m T) a k) (hB : 7+k ≤ B) :
Halted (compile c) (run I ω (compile c) B) ∧
decodeOutput n m (run I ω (compile c) B).core.mem =
decodeOutput n m (fun z => a.out z.toNat) := by sorry
end PandoraKnapsack.Skipping.ArrayRAM
Source
Barak, Berlin, Cohen, Eden, Porat and Talgam-Cohen, Pandora’s Knapsack via Simple Policies, arXiv:2509.05956v5, https://arxiv.org/html/2509.05956v5#S5.SS1, Algorithm 1 and Theorem 5.1, Appendix B.1; original machine-implementation lemma for the stated Prove2Me exact coefficient-access model.