Cost of computing the output from an instance
ProvedOAI.ThreeMachine.StackCompiler.Costs.unaryAnswerThroughout, 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 where satisfies Poly s of degree , let be instances on jobs with edge list length satisfying Poly s of degree , and let be optional deadlines whose value (default ) satisfies Poly s of degree . The routine Uniform.unaryAnswer, which first computes the reachability matrix and then the answer, has running time satisfying Poly s of degree .
Formalization Note The statement is reproduced verbatim from upstream RequestBounds.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
section
namespace ThreeMachine.StackCompiler.Costs
variable {J : Type} (s n : J → ℕ) (U : ∀ j, Universe (n j)) (M : ∀ j, Matrix (n j))
theorem unaryAnswer (G : ∀ j, Instance (n j)) (d : J → Option ℕ)
(hn : Poly s n 1) (he : Poly s (fun j => (G j).edges.length) 1)
(hd : Poly s (fun j => (d j).getD 0) 1) :
Poly s (fun j => Uniform.unaryAnswer.time (n j) (U j,(G j,d j))) 150011 := by
sorry
end ThreeMachine.StackCompiler.Costs
end
end OAI