Raw configurations for the multi-tape to TM2 compiler #
Main definitions #
Turing.MultiTapeTM.ToTM2.Data: finite stacks representing a binary native configuration.Turing.MultiTapeTM.ToTM2.Data.step: apply one native action to the raw configuration.Turing.MultiTapeTM.ToTM2.Data.run: execute a native machine with raw stacks.Turing.MultiTapeTM.ToTM2.Data.Represents: agreement with a native configuration.
Main results #
Turing.MultiTapeTM.ToTM2.Data.represents_run: raw execution agrees with native execution.Turing.MultiTapeTM.ToTM2.Data.input_length_run: input storage is exactly the input length.Turing.MultiTapeTM.ToTM2.Data.output_prefix_run: chronological output grows by extension.Turing.MultiTapeTM.ToTM2.Data.sum_work_span_run_le: native space bounds raw work storage.
A native binary configuration stored as finite stacks, with chronological output.
- state : Option State
The current state, or
noneafter halting. The bounded read-only input zipper.
The work tapes, retaining all visited cells.
Symbols emitted so far, in chronological order.
Instances For
Select and apply the native transition, staying put once halted.
Instances For
Execute a fixed number of total steps from an arbitrary raw configuration.
Instances For
Execute a fixed number of total steps from the initial raw configuration.
Instances For
Raw fields agree with the corresponding native state, heads, tapes and output.
The control states agree.
- input : d.input.Represents sourceInput cfg.inputPos
The input zipper represents the native bounded head.
- work (i : Fin k) : (d.work i).Represents (cfg.workTapes i) (cfg.workTapePos i)
Each work tape represents its native integer-indexed tape and head.
Output is chronological in both representations.
Instances For
A live raw configuration applies the transition selected from its current reads.
Initialization represents the native initial configuration.
Applying the same action preserves every field of the representation.
Raw and native configurations select the same action and take corresponding total steps.
Any number of raw total steps represents the same number of native total steps.
Raw execution from initialization agrees with the native execution, even after halting.
At every time, the raw input stacks retain exactly the original input length.
The raw output is exactly the native chronological output.
The raw control state agrees with the native state at every time.
Every raw output is a prefix of the complete output of a terminating native computation.
A terminating native output bounds every intermediate raw output, without a time term.
Each raw total step uses precisely the tape action along the represented native step.
The work tapes coincide with the raw tapes used by the exact visited-space theorem.
Summed raw work-tape storage is exactly native visited space.
Side-stack storage omits exactly the one current cell held in control for each work tape.
A native space certificate bounds all raw work storage, independently of runtime.
The sum of raw side-stack lengths is bounded by native space.