Compiling OpenAI's LP RAM into the real pointer machine
ProvedSmaleNinth.real_ram_of_oai_programLet be a program of OpenAI's random-access machine and . Then there are a program of the real pointer machine and constants with the following property. For all , and , suppose that whenever the run of on the negated system (input tape , dimensions ) halts within steps with an output tag that equals exactly when is feasible. Then , started on the memory , halts within
steps and accepts exactly when the polyhedron is nonempty. Instances with or carry no hypothesis and are decided by directly.
Role. This is the model-translation step between OpenAI's machine and the mission's real pointer machine: reads and the data from , negates the system, and simulates step by step, keeping OpenAI's address registers in memory and converting them to pointers by counting (their values stay polynomially bounded, since address registers change only by , copies and constants). It is used twice: with SmaleNinth.oai_feasibility_real it proves SmaleNinth.smale_ninth_real_ram, and with the proved rational theorem OAI.Optimization.LinearProgramming.strongly_polynomial_feasibility it proves SmaleNinth.smale_ninth_real_ram_rational.
import Definitions.Def_OAILP_Specification import Definitions.Def_Polyhedron import Definitions.Def_SmaleNinth_BSSMachine import Definitions.Def_SmaleNinth_RealRAM open Matrix LinearOptimization OAI.Optimization.LinearProgramming
theorem SmaleNinth.real_ram_of_oai_program (p : RAM.Program) (c e : ℕ) :
∃ (R : SmaleNinth.RAMProgram) (C d' : ℕ),
∀ (m n : ℕ) (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ),
(0 < m → 0 < n →
∃ (k : ℕ) (t : Fin (k + 1) → RAM.State ℝ),
RAM.Trace p (RAM.start [m, n] (lpInput (-A) (-b))) k t ∧
k ≤ RAM.polyBound c e (m + n) ∧
∃ tag : ℕ, (t (Fin.last k)).output = some tag ∧
(tag = 0 ↔ ∃ x, Feasible (-A) (-b) x)) →
∃ result : Bool,
SmaleNinth.RAMDecidesInTime R (SmaleNinth.encodeLP A b) (C * (m * n + m + 2) ^ d') result ∧
(result = true ↔ (polyhedron A b).Nonempty) := by sorry