Cost of computing the markings for one set
ProvedOAI.ThreeMachine.StackCompiler.Costs.solveMarksThroughout, a routine R : Uniform f is a program in the compiler's while-language Code, with a charge function, that computes the function family on encoded data. R.time i x is the charge of on the encoding of , a natural number that bounds the number of evaluation steps of the program on that input. For , the predicate Poly s f d means that there is a constant with for all . Let be an index type with , with table lengths and family lengths satisfying Poly n of degree , candidate-triple list length of degree , and with tables that are good for the precedence relation of and bounded: Algorithm.TableGood says that each stored block is a valid full schedule of its set, and Algorithm.TableBounded that each stored block has all time values at most its length. The routine Uniform.solveMarks, computing Algorithm.markings from Algorithm.states, has running time satisfying Poly n of degree .
Formalization Note The statement is reproduced verbatim from upstream MatrixCosts.lean (openai/math, Apache-2.0, credit OpenAI). It feeds the bound requestRawBound_poly and the running-time statement of main_theorem.
import Mathlib
import Definitions.Def_OAIThreeMachineSched02
set_option maxHeartbeats 2000000
set_option maxRecDepth 100000
set_option linter.all false
set_option Elab.async false
namespace OAI
universe u1 u2 u3 u4 u5
section
namespace ThreeMachine.StackCompiler.Costs
variable {J : Type} (n : J → ℕ) (U : ∀ j, Universe (n j)) (M : ∀ j, Matrix (n j))
variable (tab : ∀ j, Table (n j)) (fs zs : ∀ j, List (Finset (Fin (n j))))
variable (W : ∀ j, Finset (Fin (n j)))
theorem solveMarks
(hl : Poly n (fun j => (tab j).length) 30000)
(hf : Poly n (fun j => (fs j).length) 30000) (hz : Poly n (fun j => (zs j).length) 3)
(ht : ∀ j, Algorithm.TableGood (matrixRel (M j)) (tab j))
(hb : ∀ j, Algorithm.TableBounded (tab j)) :
Poly n (fun j => Uniform.solveMarks.time (n j) (U j,(M j,(tab j,(fs j,(zs j,W j)))))) 120009 := by
sorry
end ThreeMachine.StackCompiler.Costs
end
end OAI