Documentation

Complexitylib.Interop.Mathlib.TM0.Internal.Output

Emitting the complete halted output #

After source halting, the simulator emits one bit per step and halts at the first blank. Together with initialization and source simulation, this costs at most 2 * input.length + sourceTime + output.length + 4 steps.

The simulator is emitting from the represented tape, after previously emitted bits.

Instances For
    theorem Complexity.MathlibTM0.Emitting.read {M : BinaryMachine} {input : List Bool} {tape : Turing.Tape M.Alphabet} {emitted : List Bool} {d : Turing.Cfg (Fintype.card M.Alphabet) Bool (Control M.State) input} (h : Emitting M tape emitted d) :
    theorem Complexity.MathlibTM0.Emitting.step_bit {M : BinaryMachine} {input : List Bool} {tape : Turing.Tape M.Alphabet} {emitted : List Bool} {d : Turing.Cfg (Fintype.card M.Alphabet) Bool (Control M.State) input} (h : Emitting M tape emitted d) {b : Bool} (hb : tape.head = M.bit b) :
    theorem Complexity.MathlibTM0.Emitting.run {M : BinaryMachine} {input : List Bool} (output : List Bool) {tape : Turing.Tape M.Alphabet} {emitted : List Bool} {d : Turing.Cfg (Fintype.card M.Alphabet) Bool (Control M.State) input} (h : Emitting M tape emitted d) (ho : ∀ (j : ℕ), tape.nth ↑j = (List.map M.bit output).getI j) :
    theorem Complexity.MathlibTM0.computes_proof (M : BinaryMachine) {input output : List Bool} {time : ℕ} (h : M.OutputsWithin input output time) :
    (machine M).ComputesInTimeAndSpace input output (2 * input.length + time + output.length + 4) (Turing.MultiTapeTM.spaceUsed (Turing.MultiTapeTM.initCfg input) (2 * input.length + time + output.length + 4))