Documentation

Cslib.Computability.Machines.Turing.MultiTape.DeterministicToNondeterministic

Deterministic Multi-Tape Turing Machines are Nondeterministic #

Embeds MultiTapeTM into MultiTapeNTM and shows the embedding preserves computation.

toNTM permits exactly the transition tr prescribes: nondeterminism is the possibility of several, so having exactly one is the special case. A deterministic computation is then witnessed by the machine's own run. Both models idle once the machine has halted, so that run has exactly t steps for every t and its measures match runFrom and spaceUsed directly, with no reasoning about the step at which the machine halted.

Important Declarations #

def Turing.MultiTapeTM.toNTM {k : } {State : Type u_1} {Symbol : Type u_2} (tm : MultiTapeTM k Symbol State) :
MultiTapeNTM k Symbol State

Every deterministic machine is a nondeterministic one whose relation is a singleton.

Equations
Instances For
    @[simp]
    theorem Turing.MultiTapeTM.toNTM_initCfg {k : } {State : Type u_1} {Symbol : Type u_2} (tm : MultiTapeTM k Symbol State) (input : List Symbol) :
    tm.toNTM.initCfg input = initCfg input
    theorem Turing.MultiTapeTM.toNTM_step {k : } {State : Type u_1} {Symbol : Type u_2} {input : List Symbol} {tm : MultiTapeTM k Symbol State} (c : Cfg k Symbol State input) :
    tm.toNTM.Step c (step c)

    Each step of tm is a step of its nondeterministic reading. This holds at a halted configuration too, where both models idle.

    theorem Turing.MultiTapeTM.isChain_map_range {k : } {State : Type u_1} {Symbol : Type u_2} {input : List Symbol} {tm : MultiTapeTM k Symbol State} (cfg : Cfg k Symbol State input) (t : ) :

    The configurations the machine passes through form a chain of steps.

    def Turing.MultiTapeTM.toNTMComputationPath {k : } {State : Type u_1} {Symbol : Type u_2} (tm : MultiTapeTM k Symbol State) (input : List Symbol) (t : ) :

    The machine's own run for t steps, as a computation of its nondeterministic reading: the configuration reached after each step.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]
      theorem Turing.MultiTapeTM.toNTMComputationPath_time {k : } {State : Type u_1} {Symbol : Type u_2} {input : List Symbol} {tm : MultiTapeTM k Symbol State} {t : } :
      (tm.toNTMComputationPath input t).time = t
      @[simp]
      theorem Turing.MultiTapeTM.toNTMComputationPath_cfgs {k : } {State : Type u_1} {Symbol : Type u_2} {input : List Symbol} {tm : MultiTapeTM k Symbol State} {t : } :
      @[simp]
      theorem Turing.MultiTapeTM.toNTMComputationPath_last {k : } {State : Type u_1} {Symbol : Type u_2} {input : List Symbol} {tm : MultiTapeTM k Symbol State} {t : } :
      (tm.toNTMComputationPath input t).last = runFrom (initCfg input) t
      @[simp]
      theorem Turing.MultiTapeTM.toNTMComputationPath_space {k : } {State : Type u_1} {Symbol : Type u_2} {input : List Symbol} {tm : MultiTapeTM k Symbol State} {t : } :
      theorem Turing.MultiTapeTM.toNTM_computes {k : } {State : Type u_1} {Symbol : Type u_2} {input : List Symbol} {tm : MultiTapeTM k Symbol State} {output : List Symbol} {t s : } (h : tm.ComputesInTimeAndSpace input output t s) :

      Every deterministic computation is a nondeterministic one, witnessed by the machine's own run.