Finite views of space-bounded nondeterministic machines #
A nondeterministic machine whose computation paths visit at most s work-tape cells reaches only
configurations of bounded size, however long it runs. This file gives these configurations a
finite description that preserves acceptance.
Along a run path from blank tapes with every head at 0, the heads move by at most one cell per
step and only visited cells are written, so every head position and every non-blank cell lies
within the space used by its tape (Turing.MultiTapeNTM.RunPath.natAbs_lt_spaceUsedByTape).
A configuration is viewed as finite data (Turing.FiniteCfg), with every work tape stored
relative to its head and the append-only output summarized by
Turing.MultiTapeNTM.outputClass: empty, exactly [true], or [false] for every other
word. The summary is a congruence for appending, so the
views step exactly as the machine does (Turing.MultiTapeNTM.ViewStep); a halted view steps only
to itself. A computation path accepts exactly when a halted view with output [true] is reachable
from the initial view (Turing.MultiTapeNTM.accepts_iff_reflTransGen_viewStep). Under a space
bound every reachable view has a bounded encoding (Turing.MultiTapeNTM.length_encFiniteCfg_le),
whatever the length of the path reaching it.
Main definitions #
Turing.MultiTapeNTM.outputClass: the summary of an output word.Turing.MultiTapeNTM.ViewStep: the steps of the views of a machine.
Main results #
Turing.MultiTapeNTM.RunPath.natAbs_lt_spaceUsedByTape: heads and non-blank cells lie within the space used.Turing.MultiTapeNTM.accepts_iff_reflTransGen_viewStep: acceptance is reachability of views.Turing.MultiTapeNTM.length_encFiniteCfg_le: reachable views are small under a space bound.
References #
A position is visited exactly when a configuration of the path has the head there.
The positions visited by a head after one more step.
A single configuration visits its head position only.
The invariant of a run path from blank tapes with the heads at 0: the visited positions
form an interval around 0 containing every non-blank cell.
The starting position is visited.
- convex (a : ℤ) : a ∈ p.visitedByTapeHead i → ∀ b ∈ p.visitedByTapeHead i, ∀ (z : ℤ), a ≤ z → z ≤ b → z ∈ p.visitedByTapeHead i
The visited positions form an interval.
- written (z : ℤ) : (RelSeries.last p).workTapes i z ≠ none → z ∈ p.visitedByTapeHead i
Every non-blank cell of the last configuration has been visited.
Instances For
The invariant holds along every run path from blank tapes with the heads at 0.
Positions of an interval around 0 are smaller than its size.
Heads and written cells lie within the space used. On a run path from blank tapes with
the heads at 0, the last head position and every non-blank cell of a tape are smaller in absolute
value than the number of cells the tape's head has visited.
The size of tapes with bounded contents #
A tape whose cells are blank from displacement m on, on both sides, uses at most
2 * m + 1 cells.
Views #
The empty word is its own summary.
Nonempty words have a summary of one symbol.
The summary is a congruence for appending a symbol.
The summary has at most one symbol.
The steps of the views. A running view takes the summarized result of a permitted action; a halted view steps only to itself.
Instances For
The initial view on an input.
Instances For
A view represents a native configuration on input: the same input, control and input head,
work tapes centered at the native heads, and the summary of the native output. With the native
output in place of the summary, it is Turing.FiniteCfg.Represents (ViewRep.represents).
The inputs agree.
The controls agree.
The input heads agree.
- workTapes (tape : Fin k) : (finite.workTapes tape).Represents (cfg.workTapes tape) (cfg.workTapePos tape)
Each work tape represents the native tape at its native head.
The output is the summary of the native output.
Instances For
With the native output in place of the summary, a view on the native input is a
Turing.FiniteCfg.Represents of the native configuration.
Views step with the machine. The same action preserves the representation.
Every computation path has a reachable view.
Every reachable view is the view of a computation path.
Acceptance is reachability of views. A machine accepts exactly when a halted view with
output [true] is reachable from the initial view.
The size of reachable views #
A tape representing contents whose head and non-blank cells lie within distance s of 0
is stored in at most 4 * s + 1 cells relative to its head.
The bound of Turing.MultiTapeNTM.length_encFiniteCfg_le on the encodings of the reachable
views of a machine with k work tapes and controls State, on inputs of length n under the
space bound s: linear in n and s, with a constant depending only on k and State.
Instances For
Reachable views are small. Under a space bound s, every view reachable from the initial
view has an encoding of length at most Turing.MultiTapeNTM.viewLengthBound, linear in the input
and in s, whatever the length of the path reaching it.