A zero-dimension prelude for real pointer programs on encoded LP inputs
ProvedSmaleNinth.lp_ram_zero_dimension_wrapperlinear-programmingmachine-simulation
For every real pointer program , there is one wrapped program and a constant with the following guarantees. On inputs with no rows it accepts. On inputs with no columns and at least one row it accepts exactly when all right-hand-side entries are nonpositive. These cases cost at most steps, where . On positive dimensions, any Boolean verdict reached by within steps is reached by the wrapped program within steps. The prelude reads the dimensions and scans the right-hand-side block only in the zero-column case. On positive dimensions it restores the initial registers and enters a copy of with its branch targets relocated.
Preamble
import Definitions.Def_SmaleNinth_BSSMachine import Definitions.Def_SmaleNinth_RealRAM open Matrix
Formal statement
theorem SmaleNinth.lp_ram_zero_dimension_wrapper (Q : SmaleNinth.RAMProgram) :
∃ (R : SmaleNinth.RAMProgram) (H : ℕ),
∀ (m n : ℕ) (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ),
((m = 0 ∨ n = 0) →
∃ result : Bool,
SmaleNinth.RAMDecidesInTime R (SmaleNinth.encodeLP A b)
(H * (m * n + m + 2)) result ∧
(result = true ↔ m = 0 ∨ ∀ i, b i ≤ 0)) ∧
(0 < m → 0 < n → ∀ (t : ℕ) (result : Bool),
SmaleNinth.RAMDecidesInTime Q (SmaleNinth.encodeLP A b) t result →
SmaleNinth.RAMDecidesInTime R (SmaleNinth.encodeLP A b)
(t + H * (m * n + m + 2)) result) := by sorrySource
Zero-dimension handling obligation for https://prove2.me/theorems/bc297c5f-c171-5b57-bff5-9fab6edc1f9a. The input layout is encodeLP at https://prove2.me/theorems/f7cd5dc5-4abd-49e9-8a22-b5a0dd1fa9bf. The target execution semantics are RAMStep, RAMRun, and RAMDecidesInTime at https://prove2.me/theorems/40a13078-ae7f-403e-b30b-476243e24e78.