ram sub
ProvedResourceScheduling.Graph.ram_subalgorithmspolynomial-time
Copied-register simultaneous consumption implements truncated natural subtraction with an explicit linear source-step bound.
Preamble
import Definitions.Def_ResourceScheduling_Graph_RAMArithmetic open CookPvsNP ResourceScheduling.Graph
Formal statement
namespace ResourceScheduling.Graph
theorem ram_sub {V : Type} [DecidableEq V] (i j dst : V) :
StackImplements RAMRep (ramSub i j dst)
(fun s => s.set dst (s.val i - s.val j))
(fun s => 9 * s.val i + 9 * s.val j + 3 * s.val dst + 13) := 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.