The existing conditional machine and its run theorem #
Machine declarations are moved from their original module without changing programs or resource formulas. Higher computability-calculus theorems remain in the original facade.
noncomputable def Turing.MultiTapeTM.iteTM {k₀ k₁ k₂ : ℕ} {Symbol : Type u_1} {S₀ : Type u_2} {S₁ : Type u_3} {S₂ : Type u_4} (tmc : MultiTapeTM k₀ Symbol S₀) (tm₁ : MultiTapeTM k₁ Symbol S₁) (tm₂ : MultiTapeTM k₂ Symbol S₂) :
MultiTapeTM (max k₀ (max k₁ k₂) + 1) Symbol ((S₀ ⊕ RewindWorkState) ⊕ Option (S₁ ⊕ S₂) ⊕ Unit ⊕ RewindWorkState)
Run tmc with its output on a new last work tape, then tm₁ if that word is non-empty and
tm₂ otherwise, and clear the tape. All three machines are padded to max k₀ (max k₁ k₂) work
tapes.
Instances For
theorem Turing.MultiTapeTM.ComputesTidilyInTimeAndSpace.ite {k₀ k₁ k₂ : ℕ} {Symbol : Type u_1} {S₀ : Type u_2} {S₁ : Type u_3} {S₂ : Type u_4} {tmc : MultiTapeTM k₀ Symbol S₀} {tm₁ : MultiTapeTM k₁ Symbol S₁} {tm₂ : MultiTapeTM k₂ Symbol S₂} {x w y : List Symbol} {tc sc t₁ s₁ t₂ s₂ : ℕ} (hc : tmc.ComputesTidilyInTimeAndSpace x w tc sc) (h₁ : w ≠ [] → tm₁.ComputesTidilyInTimeAndSpace x y t₁ s₁) (h₂ : w = [] → tm₂.ComputesTidilyInTimeAndSpace x y t₂ s₂) :
If tmc computes w from x tidily, tm₁ computes y from x tidily when w is non-empty
and tm₂ does when w is empty, then iteTM tmc tm₁ tm₂ computes y from x tidily, within the
bounds of tmc plus those of the machine that runs.