Copying and rewinding the source input #
Initialization uses exactly 2 * input.length + 2 CSLib transitions. Each
source alphabet track contains the input symbol's encoding at every position.
noncomputable def
Complexity.MathlibTM0.inputContents
(M : BinaryMachine)
(bits : List Bool)
(i : Track M)
(z : ℤ)
:
The track contents after copying the specified input prefix.
Equations
- Complexity.MathlibTM0.inputContents M bits i z = Complexity.SymbolTracks.encode ((Turing.Tape.mk₁ (List.map M.bit bits)).nth z) ((Complexity.MathlibTM0.trackEquiv M) i)
Instances For
theorem
Complexity.MathlibTM0.inputContents_append
(M : BinaryMachine)
(bits : List Bool)
(b : Bool)
(i : Track M)
:
inputContents M (bits ++ [b]) i = Function.update (inputContents M bits i) (↑bits.length) (SymbolTracks.encode (M.bit b) ((trackEquiv M) i))
noncomputable def
Complexity.MathlibTM0.copyCfg
(M : BinaryMachine)
(w : List Bool)
(t : ℕ)
(ht : t ≤ w.length)
:
Turing.Cfg (Fintype.card M.Alphabet) Bool (Control M.State) w
The configuration after copying an input prefix of length t.
Equations
- One or more equations did not get rendered due to their size.
Instances For
noncomputable def
Complexity.MathlibTM0.rewindCfg
(M : BinaryMachine)
(w : List Bool)
(t : ℕ)
(ht : t ≤ w.length)
:
Turing.Cfg (Fintype.card M.Alphabet) Bool (Control M.State) w
The configuration with t copied input cells left to rewind.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Complexity.MathlibTM0.copyCfg_step
(M : BinaryMachine)
(w : List Bool)
(t : ℕ)
(ht : t < w.length)
:
theorem
Complexity.MathlibTM0.rewindCfg_step
(M : BinaryMachine)
(w : List Bool)
(t : ℕ)
(ht : t + 1 ≤ w.length)
:
theorem
Complexity.MathlibTM0.runFrom_add
(M : BinaryMachine)
{w : List Bool}
(d : Turing.Cfg (Fintype.card M.Alphabet) Bool (Control M.State) w)
(t u : ℕ)
:
Turing.MultiTapeTM.runFrom d (t + u) = Turing.MultiTapeTM.runFrom (Turing.MultiTapeTM.runFrom d t) u
theorem
Complexity.MathlibTM0.runFrom_succ
(M : BinaryMachine)
{w : List Bool}
(d : Turing.Cfg (Fintype.card M.Alphabet) Bool (Control M.State) w)
(t : ℕ)
:
theorem
Complexity.MathlibTM0.run_copy
(M : BinaryMachine)
(w : List Bool)
(t : ℕ)
(ht : t ≤ w.length)
:
theorem
Complexity.MathlibTM0.run_rewind
(M : BinaryMachine)
(w : List Bool)
(t : ℕ)
(ht : t ≤ w.length)
:
theorem
Complexity.MathlibTM0.rewindCfg_zero_sim
(M : BinaryMachine)
(w : List Bool)
:
Sim M (Turing.TM0.init (List.map M.bit w)) (Turing.MultiTapeTM.step (rewindCfg M w 0 ⋯))
theorem
Complexity.MathlibTM0.init_sim
(M : BinaryMachine)
(w : List Bool)
:
Sim M (Turing.TM0.init (List.map M.bit w))
(Turing.MultiTapeTM.runFrom (Turing.MultiTapeTM.initCfg w) (2 * w.length + 2))