stack consume
ProvedCookPvsNP.stack_consumealgorithmspolynomial-time
Consuming a counter drops its length from selected stacks and takes three times the counter length plus one steps.
Preamble
import Definitions.Def_CookPvsNP_StackMacros open CookPvsNP
Formal statement
namespace CookPvsNP
theorem stack_consume {K A : Type} [DecidableEq K] (src : K) (targets : K → Bool)
(s : K → List A) :
(consumeProg src targets).Exec s (consumeStore src targets s) (3 * (s src).length + 1) := by sorry
end CookPvsNPSource
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.