Execution correspondence for the reverse TM2 compiler #
Each native transition compiles to one fixed Mathlib stack-machine statement. The finite control holds the current work cells; raw stacks retain blank cells and preserve the two-sided geometry.
Main results #
Turing.MultiTapeTM.ToTM2.stepAux_action: a compiled action realizes the raw tape update.
theorem Turing.MultiTapeTM.ToTM2.step_encode {k : ℕ} {State : Type} [Fintype State] (tm : MultiTapeTM k Bool State) (d : Data k State) {q : State} (hq : d.state = some q) :
One live source transition is exactly one Mathlib stack-machine transition.
theorem Turing.MultiTapeTM.ToTM2.step_encode_halt {k : ℕ} {State : Type} [Fintype State] (tm : MultiTapeTM k Bool State) (d : Data k State) (hq : d.state = none) :
A halted source starts cleanup on the following target step.