Finite data for multi-tape configurations #
FiniteCfg replaces the native integer-indexed work tapes by CSLib's BiTape data.
The input, control, output and action types retain their original meanings. Its simulation
relation allows the native heads to have any absolute positions; the finite tapes store their
contents relative to their current heads.
MultiTapeMachine.FiniteConfig adds finite query buffers and read-only answer tapes. It uses the
same named channels and the same local actions and query instructions as the shared machine core.
Each channel has finite storage; encoding all channels as finite data additionally requires the
channel type to be finite. The representation laws do not need that restriction.
Main definitions #
Turing.FiniteCfg: finite input, work tapes, output and control.Turing.MultiTapeMachine.FiniteConfig: finite storage with oracle channels.Turing.MultiTapeMachine.FiniteConfig.SpaceBound: input, work, output, query and reply budgets.
Main results #
Turing.MultiTapeMachine.FiniteConfig.Represents.step: preserve native observations.Turing.MultiTapeMachine.FiniteConfig.Represents.receive: preserve the channel reset semantics.Turing.MultiTapeMachine.FiniteConfig.SpaceBound.step: per-instruction storage growth.
References #
Adapted from the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8, using
Bolton Bailey's upstream BiTape and the common native machine configurations.
A configuration stored entirely as finite data. The input is included so the representation has one fixed type across all runtime inputs.
- input : List Symbol
The immutable input word.
- state : Option State
The current control, or
nonewhen halted. The native input position, including the two boundary cells.
- workTapes : Fin k → Cslib.Turing.BiTape Symbol
Work tapes centered at their current heads.
- output : List Symbol
Symbols already written to the output.
Instances For
The integer-indexed view with each work head placed at zero. Absolute work-head positions are irrelevant to observations, so the representation relation also admits translated views.
Instances For
Reading the native input is list lookup with an initial blank and a blank default.
The finite data and native configuration have identical observations and corresponding work-tape contents at every displacement from their heads.
Control states agree.
Input positions agree.
- workTapes (tape : Fin k) : (finite.workTapes tape).Represents (cfg.workTapes tape) (cfg.workTapePos tape)
Each finite work tape represents the native tape at its native head position.
Accumulated outputs agree.
Instances For
Related configurations read the same input cell.
Related configurations read the same work cells.
The same native action preserves the representation relation.
Finite tape storage for a shared-core configuration. Each channel stores its pending request and an answer tape centered at its current head. A finite channel type makes the whole configuration a finite collection of finite data.
- tapes : FiniteCfg k Symbol State
The ordinary input, work, control and output components.
- channels : Oracle → List Symbol × Cslib.Turing.BiTape Symbol
Per-channel pending requests and read-only answer tapes.
Instances For
The current answer symbols supplied to the shared transition table.
Instances For
An ordinary step applies the tape action and moves each answer head.
Instances For
A query clears just its selected buffer and installs the reply at position zero.
Instances For
Initial finite storage has empty buffers and blank answer tapes.
Instances For
Storage bounds after a number of native transitions. Replies can be longer than the clock; their size is therefore tracked separately from the work tapes and pending query buffers.
The input is stored once.
Work space grows by at most one cell per transition on each tape.
At most one output symbol is written per transition.
At most one query symbol per channel is written per transition.
Answer storage includes the installed reply and head movements since installation.
Instances For
Storage bounds may be enlarged independently.
A local native transition respects the per-step storage bounds.
Installing a bounded reply preserves the storage bounds and clears only its own query.
The observation-preserving relation to the shared native configuration.
- tapes : finite.tapes.Represents cfg.tapes
Ordinary configurations correspond.
Pending requests agree exactly, including requests not yet submitted.
- answers (oracle : Oracle) : (finite.channels oracle).2.Represents (fun (position : ℤ) => if 0 ≤ position then (cfg.channels oracle).answer[position.toNat]? else none) (cfg.channels oracle).answerPos
Answer tapes agree at every displacement from their heads.
Instances For
The transition table sees the same answer symbols in both representations.
An ordinary shared-core action preserves all finite representations.
Submission resets precisely the selected channel, retaining every other pending query and answer head. The installed reply has the native position-zero geometry.