Deterministic machine acceptance is in PTIME #
Stage 2b of the machine bridge: a deterministic run is exactly
a least fixed point, so DescriptiveComplexity.DTMAccept is FO(LFP) definable –
DescriptiveComplexity.dtmAccept_lfpDefinable – and hence, through the formalized
translation DescriptiveComplexity.lfpDefinable_iff_sigmaSOHornDefinable, SO-Horn
definable, that is, in PTIME (DescriptiveComplexity.dtmAccept_mem_PTIME).
The fixed point #
Three relation variables, indexed by the time positions of the run exactly as
in the Σ₁ membership proof of NTMAccept: Q t q (the state at time t),
H t p (the head cell) and T t p a (the tape). The rules are the step
relation read as an inductive definition:
- at the lowest position, the state is a start state, the head is on the
lowest position, and the tape is the input (
DescriptiveComplexity.TMData.InitTape); - along each
SuccPos t t', a transition applicable in the current state to the symbol under the head – and able to fire: a destination, a written symbol and a neighbour in its direction must exist, else the machine halts and nothing is derived att'– advances the state, moves the head, writes its symbol, and leaves every other cell unchanged.
All the conditions are first-order over the input vocabulary, so they sit in
the guards of the Horn clauses; the body atoms are the three variables read
at time t, at most four per rule.
The output sentence is where FO(LFP) earns its keep over bare SO-Horn: it
states positively that an accepting state occurs in the fixed point – a thing
no goal clause can say – conjoined with the first-order promises
(DescriptiveComplexity.TMData.WellFormed, DescriptiveComplexity.TMData.Deterministic)
that DTMAccept folds into its yes-instances.
Why determinism is what makes this correct #
The fixed point derives everything any run does. For a deterministic machine
the run from the (unique) initial configuration is unique
(DescriptiveComplexity.TMData.stepsIn_functional), so the derived atoms describe it
and nothing else: soundness (DescriptiveComplexity.DTFix.derives_sound) is an
induction on derivations, completeness
(DescriptiveComplexity.DTFix.derivedAt_of_run) an induction along the rank of the
time position, and together they make the output read exactly “the machine
accepts within its budget”.
The ordered expansion of the machine vocabulary.
Equations
Instances For
Dependency graph
Guards over the machine vocabulary #
The position symbol over the ordered expansion.
Instances For
Dependency graph
The transition symbol over the ordered expansion.
Instances For
Dependency graph
The start-state symbol over the ordered expansion.
Instances For
Dependency graph
The accepting-state symbol over the ordered expansion.
Instances For
Dependency graph
The blank symbol over the ordered expansion.
Instances For
Dependency graph
The move-right symbol over the ordered expansion.
Instances For
Dependency graph
The machine's own order symbol over the ordered expansion.
Instances For
Dependency graph
The transition-source symbol over the ordered expansion.
Instances For
Dependency graph
The transition-read symbol over the ordered expansion.
Instances For
Dependency graph
The transition-destination symbol over the ordered expansion.
Instances For
Dependency graph
The transition-write symbol over the ordered expansion.
Instances For
Dependency graph
The input symbol over the ordered expansion.
Instances For
Dependency graph
x is a position, as a guard.
Equations
Instances For
Dependency graph
x is a transition, as a guard.
Equations
Instances For
Dependency graph
x is a start state, as a guard.
Equations
Instances For
Dependency graph
x is an accepting state, as a guard.
Equations
Instances For
Dependency graph
x is the blank symbol, as a guard.
Equations
Instances For
Dependency graph
The transition x moves the head right, as a guard.
Equations
Instances For
Dependency graph
x ≤ y in the machine's own order, as a guard.
Equations
Instances For
Dependency graph
The transition x applies in the state y, as a guard.
Equations
Instances For
Dependency graph
The transition x reads the symbol y, as a guard.
Equations
Instances For
Dependency graph
The transition x moves to the state y, as a guard.
Equations
Instances For
Dependency graph
The transition x writes the symbol y, as a guard.
Equations
Instances For
Dependency graph
The cell x initially holds the symbol y, as a guard.
Equations
Instances For
Dependency graph
x = y, as a guard.
Equations
Instances For
Dependency graph
x ≠ y, as a guard.
Equations
Instances For
Dependency graph
x is the lowest position, as a guard.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
y is the position immediately above x, as a guard.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The cell x initially holds the symbol y: the input where defined, the
blank elsewhere.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The transition x has a destination, as a guard.
Equations
Instances For
Dependency graph
The transition x has a written symbol, as a guard.
Equations
Instances For
Dependency graph
The transition x, with the head at h, can move: there is a neighbour
in its direction. Without this in every step rule the fixed point would run
past a halt.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Realization of the guards #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The promises, as sentences #
Reflexivity of the machine's order.
Equations
Instances For
Dependency graph
Transitivity of the machine's order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Antisymmetry of the machine's order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Totality of the machine's order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
There is a position.
Equations
Instances For
Dependency graph
The input is functional.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
There is a blank symbol.
Equations
Instances For
Dependency graph
The blank symbol is unique.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The start state is unique.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
At most one transition applies in a given state on a given symbol.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The destination of a transition is unique.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The written symbol of a transition is unique.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Well-formedness, as a sentence.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Determinism, as a sentence.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
Dependency graph
The block and the rules #
The relation variables of the fixed point: the state Q t q, the head
H t p and the tape T t p a of the run, indexed by the time positions.
Equations
Instances For
Dependency graph
The atom Q (xᵢ, xⱼ).
Instances For
Dependency graph
The atom H (xᵢ, xⱼ).
Instances For
Dependency graph
The atom T (xᵢ, xⱼ, xₗ).
Instances For
Dependency graph
Initial state: at the lowest position, a start state.
Equations
- DescriptiveComplexity.DTFix.dtCQInit = { guard := DescriptiveComplexity.DTFix.minPosG 0 ⊓ DescriptiveComplexity.DTFix.startG 3, body := [], head := some (DescriptiveComplexity.DTFix.qAt 0 3) }
Instances For
Dependency graph
Initial head: at the lowest position, on the lowest position – times and cells being the same sort.
Equations
- DescriptiveComplexity.DTFix.dtCHInit = { guard := DescriptiveComplexity.DTFix.minPosG 0, body := [], head := some (DescriptiveComplexity.DTFix.hAt 0 0) }
Instances For
Dependency graph
Initial tape: the input, with the blank elsewhere.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The shared core of the step rules: consecutive times, an applicable transition that can fire – a destination and a written symbol exist.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The shared body of the step rules: the state, the head, and the symbol under the head, at the current time.
Equations
Instances For
Dependency graph
Step, the state: the transition's destination.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Step, the head, moving right.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Step, the head, moving left.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Step, the written cell.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Step, the frame: every other cell is unchanged.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The rules of the fixed point: the step relation of the machine, read as an inductive definition along the time positions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
The output sentence #
The acceptance atom of the output, over two variables.
Instances For
Dependency graph
The positive part of the output: some time carries an accepting state in the fixed point – the statement no goal clause of a Horn program can make.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The output sentence: the promises, and acceptance at the fixed point.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Reading the acceptance atom off an assignment.
Dependency graph
Dependency graph
Dependency graph
Correctness #
Soundness – everything derived is true of the (unique) run – is one induction
on derivations; completeness – everything true of the run is derived – one
induction along the rank of the time position. Determinism enters exactly
where the plan said it would: a derived state atom carries some run to its
time, the head and tape atoms hold of every run to theirs, and uniqueness of
the run (DescriptiveComplexity.TMData.stepsIn_functional) is what lets the two
readings meet in the step cases.
The derived state atoms.
Equations
Instances For
Dependency graph
The derived head atoms.
Equations
Instances For
Dependency graph
The derived tape atoms.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
A position of rank 0 is the lowest.
Dependency graph
Every rank below the position count is realized by a position: this is
where the run's ℕ-indexed clock is matched to the time positions.
Dependency graph
The meaning of a state atom: some run reaches its time in that state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The meaning of a head atom: every run to its time has the head there.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The meaning of a tape atom: every run to its time reads that symbol.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
What a derived atom says about the run: a state atom carries some run to its time, a head or tape atom holds of every run to its time. The asymmetry is deliberate – the head and tape rules alone cannot certify a run exists, and the state rules can.
Equations
Instances For
Dependency graph
Soundness: every derived atom is true of the run. Induction on derivations, one case per rule; in the step cases the step the rule took is compared with the run's own step through determinism.
Dependency graph
Completeness: the run is derived, rank by rank. Determinism plays no role in this direction – the rules fire on whatever run is given.
Dependency graph
The machine accepts exactly when the fixed point contains an accepting state: the two inductions above, glued by the surjectivity of the rank below the position count.
Dependency graph
Deterministic machine acceptance is FO(LFP) definable: the run is the least fixed point of the step rules, and the output states the promises and that an accepting state occurs.
Dependency graph
Deterministic machine acceptance is in PTIME, through the formalized translation of FO(LFP) into the Horn fragment.