Orient the real LP alternative and prepare the native support query context
OpenSmaleNinth.real_lp_orientation_of_marked_subspaceGiven a fixed native marked-subspace decider on complementary real bases, a fixed-access polynomial-clock prefix decides which side carries the LP witness and prepares the exact equations and caller context for subsequent coordinate deletion. It retains the original input coefficients and bounds the final native and logical address banks.
Preamble
import Definitions.Def_OAILP_Recovery_InitialPairShared import Definitions.Def_OAILP_Recovery_PrincipalMath import Definitions.Def_OAILP_Recovery_BundleSelect import Definitions.Def_OAILP_Recovery_SupportBundleContext import Definitions.Def_OAILP_RAM_CallableScopedAccess import Definitions.Def_OAILP_RAM_CallableWindow import Mathlib.Data.Real.Basic open Matrix Polynomial OAI.Optimization.LinearProgramming open OAI.Optimization.LinearProgramming.RAM OAI.Optimization.LinearProgramming.RAM.Callable open OAI.Optimization.LinearProgramming.Geometry OAI.Optimization.LinearProgramming.Recovery open scoped Matrix
Formal statement
theorem SmaleNinth.real_lp_orientation_of_marked_subspace (p : Program) (c e capC capE : ℕ)
(decides : ∀ (r s : ℕ) (hn : 0 < r+s)
(D : Matrix (Fin r) (Fin (r+s)) ℝ) (E : Matrix (Fin s) (Fin (r+s)) ℝ),
LinearIndependent ℝ D.row → LinearIndependent ℝ E.row → D*Eᵀ = 0 →
∃ k, ∃ tr : Fin (k+1) → State ℝ, k ≤ polyBound c e (r+s) ∧
Trace p (start [r,s] (encodedGramInput D++encodedGramInput E)) k tr ∧
∃ bit : Bool, (tr (Fin.last k)).output = some bit.toNat ∧
(bit = true ↔ ∃ z ∈ Submodule.span ℝ (Set.range D.row), 0 ≤ z ∧ 0 < z ⟨0,hn⟩))
(callFits : ∀ m d : ℕ,
max (addressBudget p) (max ((m+1)*(m+1)) (max 2 (m+1))) + polyBound c e (m+1) ≤
SupportBundle.capacity capC capE m d - 1) :
∃ (f : Fragment) (clock addrClock : Polynomial ℕ), f.FixedAccess ∧
∀ (m d : ℕ) (A : Matrix (Fin m) (Fin d) ℝ) (b : Fin m → ℝ),
∃ (h src : ℕ) (M : Matrix (Fin h) (Fin (m+1)) ℝ) (native caller : Memory ℝ),
f.Run (fun _ : ℝ => True)
(Odd.memory (start [] ([] : List ℝ)).memory (start [m,d] (lpInput A b)).memory)
(clock.eval (m+d)) (Odd.memory native caller) ∧
Footprint (SupportBundle.capacity capC capE m d-1) (native.atPC 0) ∧
SupportBundle.Context M (Principal.ref A b).primal src (SupportBundle.capacity capC capE m d) caller ∧
LinearMap.ker M.mulVecLin = (Principal.side A b (Principal.ref A b).primal).denote ∧
h ≤ m+1 ∧ PublicInput.sourceBase m d+(m*d+m) ≤ src ∧
SlackRAM.InputAt caller (PublicInput.sourceBase m d) A b ∧
caller.index 24 = PublicInput.sourceBase m d ∧ caller.index 28 = m ∧ caller.index 29 = d ∧
∀ j, caller.index j ≤ addrClock.eval (m+d) := by sorrySource