Runs of a deterministic machine, unbounded in time #
The tool that makes the converse half of a space-bounded hardness proof free.
A reduction into DescriptiveComplexity.DTMAcceptSpace has to show both that a
yes-instance is accepted and that a no-instance is not. The second half is
usually a second induction – an invariant strong enough to rule out every run.
For a deterministic machine it is not needed: the configurations reachable from
one starting point are linearly ordered by reachability
(DescriptiveComplexity.TMData.reach_total, from Mathlib's
Relation.ReflTransGen.total_of_right_unique and
DescriptiveComplexity.TMData.step_functional), so it is enough to exhibit one
run, of the machine's own choosing, that ends badly.
Concretely, DescriptiveComplexity.TMData.not_acceptsSpace_of_reaches_dead says: if
the initial configuration reaches a configuration that is stuck and not
accepting, and if accepting configurations are themselves stuck, then the
machine does not accept. Both side conditions are properties of the transition
table, so a reduction discharges them by inspection of its own program.
Nothing here is about space: the statements hold for any TMData whose runs
are read with Relation.ReflTransGen.
A budgeted run is a run: the space-bounded reading of acceptance forgets
the step count, so every lemma stated with DescriptiveComplexity.TMData.StepsIn –
the sweep primitives of DescriptiveComplexity.Problems.Machine.Program, in
particular – feeds straight into it.
Dependency graph
A deterministic machine has one run: two configurations reachable from the same starting point are reachable from one another.
Dependency graph
Nothing is reachable from a stuck configuration but itself.
Dependency graph
A deterministic machine that runs into a dead end does not accept.
The run exhibited by hreach is the run, so an accepting configuration would
have to lie on it – before the dead end, and then it would have to be the dead
end itself since an accepting configuration is stuck, or after it, and then it
would be the dead end because nothing follows a dead end. Either way the dead
end is accepting, which it is not.
Dependency graph
The positive half, for symmetry: a run from the initial configuration to an accepting one is exactly what acceptance in bounded space asks for.