Complement TM: proof internals #
This file provides the simulation lemmas for TM.complementTM, showing that
the complement machine correctly flips the output of the original TM.
Embed a configuration of tm into tm.complementTM by tagging the state
with Sum.inl and keeping all tapes unchanged.
Equations
Instances For
Embedding the initial configuration of tm on input x yields the initial
configuration of tm.complementTM on x.
The embedding sends configurations in tm's start state to configurations in
tm.complementTM's start state, preserving all tapes.
tm.complementTM simulates tm step-for-step on embedded configurations: a
t-step run of tm lifts to a t-step run of the complement machine.
From halted complementCfg, reach done state with flipped output.
Takes ≤ output.head + 4 steps.
If tm decides L in time f, then complementTM tm decides Lᶜ
in time 2 * f + 4.