Simulate halting OpenAI LP RAM traces on positive dimensions
ProvedSmaleNinth.oai_lp_nonzero_trace_compilerlinear-programmingmachine-simulation
Fix a finite OpenAI scalar/address RAM program. There is a single real pointer program and a constant such that on every input of positive dimensions, every source trace of length ending with an output tag is simulated within target instructions, where . The target accepts exactly when the tag is zero. The target reads the platform encoding of , while the source receives the row-major list for and the separate address-bank dimensions. An address-bank value can grow by at most one per source instruction above the maximum of the dimensions and the fixed address literals. This allows indirect addressing by unit pointer increments with quadratic total overhead.
Preamble
import Definitions.Def_OAILP_Specification import Definitions.Def_SmaleNinth_BSSMachine import Definitions.Def_SmaleNinth_RealRAM open Matrix OAI.Optimization.LinearProgramming
Formal statement
theorem SmaleNinth.oai_lp_nonzero_trace_compiler (p : RAM.Program) :
∃ (Q : SmaleNinth.RAMProgram) (D : ℕ),
∀ (m n : ℕ) (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ),
0 < m → 0 < n →
∀ (k : ℕ) (trace : Fin (k + 1) → RAM.State ℝ) (tag : ℕ),
RAM.Trace p (RAM.start [m, n] (lpInput (-A) (-b))) k trace →
(trace (Fin.last k)).output = some tag →
SmaleNinth.RAMDecidesInTime Q (SmaleNinth.encodeLP A b)
(D * (m * n + m + 2 + k + 1) ^ 2) (decide (tag = 0)) := by sorrySource
Trace-simulation obligation for https://prove2.me/theorems/bc297c5f-c171-5b57-bff5-9fab6edc1f9a. Source instruction semantics: OpenAI, Strongly polynomial linear programming, Lean RAM/Basic.lean (Instr, start, execInstr, step, Trace), https://github.com/openai/math/blob/3344da59991ed94f9ba711217b29c1d760badfa6/lean/OAI/Optimization/LinearProgramming/RAM/Basic.lean. Target semantics: https://prove2.me/theorems/40a13078-ae7f-403e-b30b-476243e24e78.