Runs between configurations with shifted words #
Turing.MultiTapeTM.TransformsTapes describes machines that start and halt with every word at
the start of its tape and every head on the first cell of its word. Some machines keep a word at a
drifting position, for example a stack that grows to the left. This file describes runs between
arbitrary configurations and transports specifications to configurations whose words sit anywhere.
Turing.Cfg.shift δ moves the contents and the head of every work tape i by δ i cells. Machines
are translation invariant (Turing.MultiTapeTM.runFrom_shift), so a run from a shifted
configuration is the shifted run. Turing.tapesCfg input ws o h out is the configuration whose tape
i holds the word ws i from cell o i on, with its head at cell h i; a wordsCfg
configuration shifted by δ is tapesCfg input ws δ δ out.
Turing.MultiTapeTM.RunsBetween tm c c' t s says that tm, started in its initial state on the
tapes of c, has halted on the tapes of c' after t steps, using at most s cells. Such runs
compose sequentially, embed into machines with more tapes, follow from TransformsTapes
specifications at any shift, and accumulate along the loop Turing.MultiTapeTM.whileCond.
Main definitions #
Turing.Cfg.shift,Turing.tapesCfg: shifted configurations.Turing.MultiTapeTM.RunsBetween: a run between two configurations within bounds.
Main results #
Turing.MultiTapeTM.runFrom_shift,Turing.MultiTapeTM.space_shift: translation invariance.Turing.MultiTapeTM.RunsBetween.seq,.extendTapes,.of_transformsTapes: composition.Turing.MultiTapeTM.runsBetween_whileCond: loops, with the costs of the rounds adding up.
The configuration whose work tape i holds the word ws i from cell o i on, with its head at
cell h i, the input head at the start of the input and the output out. Its state is irrelevant
for Turing.MultiTapeTM.RunsBetween.
Instances For
Translation invariance #
Translation invariance. The run from a shifted configuration is the shifted run.
A shifted run visits as many cells as the run.
Runs between configurations #
RunsBetween tm c c' t s: started in its initial state on the tapes, heads and output of c,
the machine has halted after t steps on those of c', having visited at most s cells. The
states of c and c' are ignored.
Instances For
Larger bounds: a halted machine stays where it is.
A run to a halted configuration: its space is at most one cell per tape and configuration.
A run between shifted configurations.
Sequential composition.
A run on the tapes selected by an embedding. The other tapes are left alone; each costs one cell.
A TransformsTapes specification, read as runs between shifted word configurations.
A TransformsTapes specification whose postcondition determines the words and the emitted
word, read as a run between shifted word configurations.
Placing a tapesCfg configuration on the tapes selected by an embedding, the other tapes of
another one.
One step from a tapesCfg configuration, for an action that keeps the input head and emits
nothing: each tape is written and moved as the action says.
Loops #
Loops. If c holds at the configurations cfg i for i < n, from each of which tm
runs to cfg (i + 1), and fails at cfg n, then whileCond c tm runs from cfg 0 to cfg n.
The times of the rounds add up, with one step per round to read the condition.