Interval steps by finite simulation #
An interval step (Turing.MultiTapePTM.IntervalStep) replays coins from a configuration whose
work tapes are functions on ℤ. This module decides it by a simulation on finite storage, the
first step towards computing the block-counting networks of #1833 in polynomial time.
Finite storage (Turing.MultiTapePTM.LocalCfg) keeps the control, the input position as a
natural number, every work tape as a Cslib.Turing.BiTape around its head together with the
head's absolute position, and only the track of the output
(Turing.MultiTapeNTM.ChoiceTable.OutputTrack), which is all a control record keeps. One coin
step (Turing.MultiTapePTM.localCoinStep) applies the table's action; on halted storage it changes
nothing. Finite storage represents a configuration (Turing.MultiTapePTM.LocalCfg.Represents)
when it has its control, input position, head positions, output track and the contents of every
work tape around its head; steps preserve this
(Turing.MultiTapePTM.LocalCfg.Represents.localRun).
The window. The configuration embedded at block indices J with control record cIn and
window contents wIn (Turing.embedCfg) is represented by Turing.MultiTapePTM.localStart,
which loads the 3 b cells of each window into a tape (Cslib.Turing.BiTape.ofCells). Its control
record, block indices and window contents are read back from finite storage
(Turing.MultiTapePTM.LocalCfg.blockControl, Turing.MultiTapePTM.LocalCfg.blockIndex,
Turing.MultiTapePTM.LocalCfg.windowContents).
Main definitions #
Turing.MultiTapePTM.LocalCfg: finite storage for replaying an interval.Turing.MultiTapePTM.coinAction,Turing.MultiTapePTM.localCoinStep,Turing.MultiTapePTM.localRun: one coin step and a replay on finite storage.Turing.MultiTapePTM.windowCells,Turing.MultiTapePTM.localStart: the finite storage of an embedded window.Turing.MultiTapePTM.LocalIntervalStep: the interval condition on finite storage.
Main results #
Turing.MultiTapePTM.LocalCfg.Represents.localRun: replays preserve the representation.Turing.MultiTapePTM.represents_localStart: the finite storage of an embedded window.Turing.MultiTapePTM.intervalStep_iff_localIntervalStep: interval steps are decided by finite simulation.Turing.MultiTapePTM.intervalCount_eq_card_localIntervalStep: so are the interval tensors.
Finite storage and its steps #
Finite storage for replaying an interval: the control, the input position (0 and
|input| + 1 are the end cells), every work tape around its head with the head's absolute
position, and the track of the output.
- state : Option State
The control, or
nonewhen halted. - inputPos : ℕ
The input position, as in
Turing.Cfg.inputPos. Every work tape, around its head.
The absolute position of every work head.
The track of the output.
The action from a control under a coin: the table's action when running, and the action that changes nothing when halted.
Replaying coins on finite storage.
Finite storage represents a configuration when it has its control, input position, head positions and output track, and every work tape holds the configuration's tape around its head.
The controls agree.
The input positions agree.
Every finite work tape holds the configuration's tape around its head.
The work head positions agree.
The output track is the track of the configuration's output.
A coin step of a fair-coin table applies coinAction.
A coin step preserves the representation.
A replay preserves the representation.
Reading a configuration's view off finite storage #
The control record of finite storage: its control, the offset of every head in its block, and its output track.
The finite storage of an embedded window #
The finite storage of the configuration embedded at block indices J with control record
cIn and window contents wIn (Turing.embedCfg): each work tape holds the cells of its window
with its head on cell b + offset, in the middle block.
Interval steps by finite simulation #
The interval condition on finite storage: replaying coins on the finite storage of the
embedded window leaves the control record cOut and the window contents wOut, and moves the
block of every head h by δ h.
Instances For
Interval steps are decided by finite simulation.
Interval tensors by finite simulation: the interval tensor counts the bit strings that satisfy the interval condition on finite storage.