ram code correct
ProvedResourceScheduling.Graph.ram_code_correctalgorithmspolynomial-time
Every register program satisfying the loop-counter write discipline compiles to its exact semantics with its certified cost expression.
Preamble
import Definitions.Def_ResourceScheduling_Graph_RAMCode open CookPvsNP ResourceScheduling.Graph
Formal statement
namespace ResourceScheduling.Graph
theorem ram_code_correct {V : Type} [DecidableEq V] (p : RAMCode V) (hp : p.Valid) :
StackImplements RAMRep p.code p.eval p.cost := by sorry
end ResourceScheduling.GraphSource
New auxiliary formalization for the ResourceScheduling Q2 reduction. The target is the unchanged CookPvsNP one-tape machine model, following Cook, The P versus NP problem, Clay Mathematics Institute (2000), Appendix. This explicit finite-column stack compiler and its simulation lemmas are new contributions, not numbered claims from Cook or the scheduling source paper.