Whole-run correspondence before cleanup #
The compiler executes exactly one source transition per TM2 transition until the first halting source configuration. Its next transition enters cleanup. These statements include the final source action, which may write, move heads and emit a bit while halting.
Main results #
Turing.MultiTapeTM.ToTM2.iterate_encode: correspondence of every source execution prefix.Turing.MultiTapeTM.ToTM2.prefixEvals: the same correspondence with Mathlib's partial clock.
def Turing.MultiTapeTM.ToTM2.prefixEvals {k : ℕ} {State : Type} [Fintype State] (tm : MultiTapeTM k Bool State) (input : List Bool) {t : ℕ} (ht : tm.HaltsAt (tm.initCfg input) t) {i : ℕ} (hi : i ≤ t) :
Mathlib's partial execution reaches each source prefix in exactly that many transitions.