stack transfer
ProvedCookPvsNP.stack_transferalgorithmspolynomial-time
Transfer reverses the source into selected targets and empties the source in exactly three times its length plus one steps.
Preamble
import Definitions.Def_CookPvsNP_StackMacros open CookPvsNP
Formal statement
namespace CookPvsNP
theorem stack_transfer {K A : Type} [DecidableEq K] (src : K) (targets : K → Bool)
(s : K → List A) :
(transferProg src targets).Exec s (transferStore 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.