Publish a dual LP certificate from finitely addressed RAM cells
ProvedSmaleNinth.dual_output_finite_memoryFor a positive row count , let the source pointer be at least . The caller stores and in address registers and and the certificate entries at scalar addresses . One fixed fragment copies the entries to the public scalar output and sets the public tag registers to and . The cost is at most steps and any scalar invariant satisfied initially is preserved. The input contract specifies only finitely many addresses, so the fragment applies to ordinary executions from a finite input tape over any ordered field.
Preamble
import Definitions.Def_OAILP_Recovery_Publish import Definitions.Def_OAILP_RAM_CallableBase open OAI.Optimization.LinearProgramming open OAI.Optimization.LinearProgramming.RAM OAI.Optimization.LinearProgramming.RAM.Callable
Formal statement
theorem SmaleNinth.dual_output_finite_memory {K : Type*} [Field K] [LinearOrder K]
[IsStrictOrderedRing K] {m : ℕ} (z : Memory K) (y : Fin m → K) (src : ℕ) (P : K → Prop)
(safe : z.AllData P) (hm : 0 < m) (space : m ≤ src)
(ptr : z.index 14 = src) (len : z.index 15 = m)
(stored : ∀ i : Fin m, z.data (src + 2 * i.val) = y i) :
∃ t, (Fragment.ofBlock (.seq (.op (.addrConst 16 1))
(.seq Recovery.Publish.block (.op (.addrConst 17 0))))).Run P z (8 * (m - 1) + 10) t ∧
(∀ i : Fin m, t.data i.val = y i) ∧ t.index 16 = 1 ∧ t.index 17 = 0 := by sorrySource