Composing step-machine resource certificates #
The composition g.comp f retains resource certificates: 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.ResourceCertificate.comp: the composition preserves resource certificates.
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.ResourceCertificate.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.ResourceCertificate encF Tf Sf) (hg : g.ResourceCertificate encG Tg Sg) :
(g.comp f).ResourceCertificate (encCompState encF encG) (compTime encF encG Tf Sf Tg) (compSpace encF encG Sf Sg)
Composition preserves step-machine resource certificates.