Composing tidy step machines #
The composition g.comp f of tidy step machines is tidy: its halting test and its step take the
time of those of f and g plus a polynomial in the size of the state, and the space of those of
f and g plus the size of the state.
Main definitions #
Turing.StepMachine.encCompState: the encoding of the states ofg.comp f.
Main results #
Turing.StepMachine.Tidy.comp: the composition of tidy step machines is tidy.
Encodings #
Projections #
Countdowns #
theorem Turing.StepMachine.Countdown.length_encCountdown (c : Countdown) :
(encCountdown c).length = 2 * (MultiTapeTM.encNat c.k).length + 4 + (MultiTapeTM.encNat c.len).length
Counting down an emitted word #
The step of the composition #
The parts of a step, against the size L of the state and the bounds of the step.
theorem Turing.StepMachine.Tidy.comp {σf σg : Type} {encF : σf ↪ List Bool} {encG : σg ↪ List Bool} {f : StepMachine σf Bool Bool} {g : StepMachine σg Bool Bool} {Tf Sf : σf → ℕ} {Tg Sg : σg → ℕ} (hf : f.Tidy encF Tf Sf) (hg : g.Tidy encG Tg Sg) :
(g.comp f).Tidy (encCompState encF encG) (compTime encF encG Tf Sf Tg) (compSpace encF encG Sf Sg)
The composition of tidy step machines is tidy.