Solve and export the LP witness tableau over ordered fields
ProvedSmaleNinth.witness_tableau_ordered_fieldFor inputs over an arbitrary ordered field, start the witness-recovery RAM in caller memory containing a packed augmented linear system. If the fixed elimination solver returns a vector, the actual existing call-and-export fragment copies that vector to the stated caller window within the original dimension-dependent clock. High caller address registers and all unrelated caller scalar cells at address five and higher are preserved. The native result occupies a dimension-bounded window, so subsequent calls can reuse the memory.
Preamble
import Definitions.Def_OAILP_Recovery_WitnessSolveCode import Definitions.Def_OAILP_RAM_CallableWindow open Matrix OAI.Optimization.LinearProgramming open OAI.Optimization.LinearProgramming.RAM OAI.Optimization.LinearProgramming.RAM.Callable open OAI.Optimization.LinearProgramming.Geometry open OAI.Optimization.LinearProgramming.Recovery.WitnessSolve
Formal statement
theorem SmaleNinth.witness_tableau_ordered_field {K : Type} [Field K] [LinearOrder K]
[IsStrictOrderedRing K] {m d : ℕ} (A : Matrix (Fin m) (Fin d) K) (b : Fin m → K)
(native caller : Memory K) (src dimPtr cap oldCap dst : ℕ)
(raw : RawTapes caller src dimPtr cap (encodedGramInput (Elimination.augmentedRows A b)) [d+1,m])
(foot : Footprint oldCap (native.atPC 0)) (fit : oldCap < cap)
(cells : (d+1)*m ≤ cap) (dims : 2 ≤ cap)
(destination : caller.index 210 = dst) (length : caller.index 211 = d) (separate : 5 ≤ dst)
(w : Fin d → K) (success : Elimination.solve A b = some w) :
∃ out next, program.Run (fun _ : K => True) (Odd.memory native caller) (time d m cap)
(Odd.memory out next) ∧ (∀ j : Fin d, next.data (dst+j.val) = w j) ∧
(∀ i, 200 ≤ i → next.index i = caller.index i) ∧
(∀ i, 5 ≤ i → (i < dst ∨ dst+d ≤ i) → next.data i = caller.data i) ∧
Footprint (nativeWindow Elimination.uniformSolveProgram [d+1,m]
(encodedGramInput (Elimination.augmentedRows A b)) + solverTime d m) (out.atPC 0) := by sorrySource