Stage a dense ordered-field matrix for a native RAM subroutine
ProvedSmaleNinth.matrix_native_call_portsA fixed-access relocatable fragment prepares the raw scalar and dimension tape descriptors for a dense matrix already stored in the caller. It preserves all scalars and works in time polynomial in the two matrix dimensions, with room for the complete matrix and dimension packet.
Preamble
import Definitions.Def_OAILP_RAM_CallableRawTapes import Definitions.Def_OAILP_RAM_CallableScopedAccess import Definitions.Def_OAILP_Geometry_GramEncoding import Definitions.Def_OAILP_Geometry_UniformTable import Mathlib.Algebra.Polynomial.Eval.Defs open Matrix OAI.Optimization.LinearProgramming open OAI.Optimization.LinearProgramming.RAM OAI.Optimization.LinearProgramming.RAM.Callable open OAI.Optimization.LinearProgramming.Geometry
Formal statement
theorem SmaleNinth.matrix_native_call_ports {K : Type} [Field K] [LinearOrder K] [IsStrictOrderedRing K] :
∃ (g : Fragment) (clock : Polynomial ℕ), g.FixedAccess ∧
∀ (h n src : ℕ) (A : Matrix (Fin h) (Fin n) K) (native caller : Memory K),
caller.index 200 = h → caller.index 201 = n → caller.index 202 = src →
uniformRect h n src caller = A →
∃ out, g.Run (fun _ : K => True) (Odd.memory native caller) (clock.eval (h+n))
(Odd.memory native out) ∧
RawTapes out src 512 (h*n+2) (encodedGramInput A) [h,n] ∧ out.index 153 = 0 := by sorrySource