Lemma 3.1: Simulation of Polynomial-Time Multi-Tape Turing Machines in Bellantoni-Cook Safe Recursion
ProvedBC1992.lemma_3_1_tm_simulation_in_bccomplexity-theoryimplicit-computational-complexitypolynomial-timesafe-recursionturing-machines
Establishes Lemma 3.1 of Bellantoni and Cook (1992) for every deterministic multi-tape Turing machine :
- for every syntactic polynomial .
- .
- If , then .
- If , then .
- If , then .
- Consequently, for every polynomial clock and input , .
Preamble
import Definitions.Def_BC1992_Syntax import Definitions.Def_BC1992_Machines import Definitions.Def_BC1992_Simulation
Formal statement
namespace BC1992
/-- **Lemma 3.1 (Bellantoni & Cook 1992 — Multi-Tape Turing Machine Simulation in `BC`)**:
For every deterministic multi-tape Turing machine `M : TM`:
1. (`length_eval_polyWord`) `((polyWord q).eval [x] []).length = q.eval x.length`.
2. (`eval_initCfgBC`) `(initCfgBC M).eval [W] [x] = encCfg M W.length (M.init x)`.
3. (`eval_stepCfgBC`) If `M.TapeBounded W.length c`, then
`(stepCfgBC M).eval [W] [encCfg M W.length c] = encCfg M W.length (M.stepOrSelf c)`.
4. (`eval_runCfgBC`) If `x.length + T.length ≤ W.length`, then
`(runCfgBC M).eval [T, W] [encCfg M W.length (M.init x)] = encCfg M W.length (M.run T.length (M.init x))`.
5. (`eval_outputCfgBC`) If `(c.tapes ⟨0, M.hk⟩).right.length < W.length`, then
`(outputCfgBC M).eval [W] [encCfg M W.length c] = M.output c`.
6. (`eval_simTM`) For every polynomial clock `p : Poly` and input word `x : Word`,
`(simTM M p).eval [x] [] = M.output (M.run (p.eval x.length) (M.init x))`. -/
theorem lemma_3_1_tm_simulation_in_bc :
(∀ (q : Poly) (x : Word),
((polyWord q).eval [x] []).length = q.eval x.length) ∧
(∀ (M : TM) (W x : Word),
(initCfgBC M).eval [W] [x] = encCfg M W.length (M.init x)) ∧
(∀ (M : TM) (W : Word) {c : Cfg M.k M.Q M.G},
M.TapeBounded W.length c →
(stepCfgBC M).eval [W] [encCfg M W.length c] = encCfg M W.length (M.stepOrSelf c)) ∧
(∀ (M : TM) (T W x : Word),
x.length + T.length ≤ W.length →
(runCfgBC M).eval [T, W] [encCfg M W.length (M.init x)] =
encCfg M W.length (M.run T.length (M.init x))) ∧
(∀ (M : TM) (W : Word) {c : Cfg M.k M.Q M.G},
(c.tapes ⟨0, M.hk⟩).right.length < W.length →
(outputCfgBC M).eval [W] [encCfg M W.length c] = M.output c) ∧
(∀ (M : TM) (p : Poly) (x : Word),
(simTM M p).eval [x] [] = M.output (M.run (p.eval x.length) (M.init x))) := by
sorry
end BC1992Source
Stephen Bellantoni and Stephen Cook, 'A new recursion-theoretic characterization of the polytime functions', Computational Complexity 2 (1992), pp. 97-110 (doi:10.1007/BF01201998). Section 3, Lemma 3.1, pp. 102-105.
Read-back
What the Lean code literally says, in plain math · Gemini 4 Argon (Independent Blind Auditor)
Overview
Thm_BC1992_lemma_3_1_tm_simulation_in_bc.lean states Lemma 3.1 of Bellantoni & Cook (1992): every deterministic multi-tape Turing machine running for a polynomial number of steps is simulated in the Bellantoni–Cook algebra by the closed program simTM M p : Fn 1 0.
Detailed Read-Back of Theorem Conjuncts
theorem lemma_3_1_tm_simulation_in_bc is a 6-way conjunction:
- Polynomial Clock Generation (
length_eval_polyWord): For every syntactic polynomial and input word :
- Initial Configuration Encoding (
eval_initCfgBC): For every Turing machine , clock word , and input word :
- Single Transition Step Simulation (
eval_stepCfgBC): For every , clock word , and configuration :
- Multi-Step Run Simulation (
eval_runCfgBC): For every and words :
- Output Extraction (
eval_outputCfgBC): For every , clock word , and configuration :
- End-to-End Polynomial-Time TM Simulation (
eval_simTM): For every , polynomial , and input word :
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.