Find a normalized LP witness in the virtual RAM banks over the reals
OpenSmaleNinth.real_normalized_witness_workerA fixed-access LP worker finds a normalized primal slack witness or dual Farkas witness in the virtual odd/even banks within a dimension-polynomial clock. It preserves the original LP and produces the logical headers expected by the verified final circuits. The capacity and final address limit also allow publication within a dimension-polynomial clock.
Preamble
import Definitions.Def_OAILP_Recovery_FinalPrimalCode import Definitions.Def_OAILP_Recovery_SlackRAM import Definitions.Def_OAILP_Specification import Mathlib.Data.Real.Basic open Matrix OAI.Optimization.LinearProgramming open OAI.Optimization.LinearProgramming.RAM OAI.Optimization.LinearProgramming.RAM.Callable open OAI.Optimization.LinearProgramming.Recovery
Formal statement
theorem SmaleNinth.real_normalized_witness_worker :
∃ (f : Fragment) (C E : ℕ), f.FixedAccess ∧
∀ (m d : ℕ) (A : Matrix (Fin m) (Fin d) ℝ) (b : Fin m → ℝ), 0 < m → 0 < d →
∃ (native caller : Memory ℝ) (raw atW cap limit : ℕ) (primal : Bool) (w : Fin (m+1) → ℝ),
f.Run (fun _ : ℝ => True)
(Odd.memory (start [] ([] : List ℝ)).memory (start [m,d] (lpInput A b)).memory)
(polyBound C E (m+d)) (Odd.memory native caller) ∧
Footprint (cap-1) (native.atPC 0) ∧ 2 ≤ cap ∧ (d+1)*m ≤ cap ∧
SlackRAM.InputAt caller raw A b ∧ 7 ≤ raw ∧ raw+(m*d+m) ≤ atW ∧
(∀ j, caller.index j ≤ limit) ∧
caller.index 24 = raw ∧ caller.index 28 = m ∧ caller.index 29 = d ∧
caller.index 60 = cap ∧ caller.index 212 = atW ∧ caller.index 156 = primal.toNat ∧
(∀ j : Fin (m+1), caller.data (atW+j.val) = w j) ∧
(if primal then ∃ x, Elimination.solve A (b-Fin.tail w) = some x ∧ Feasible A b x
else Certificate A b (Fin.tail w) ∧ b ⬝ᵥ Fin.tail w = -1) ∧
PrimalOutput.programTime m d cap limit + (5*m+25) ≤ polyBound C E (m+d) := by sorrySource