Acceptance is a bounded search in the configuration graph #
⚠️ Unreviewed by Bolton
Complexitylib.Classes.Containments.Internal.ConfigGraph turns acceptance into reachability, and
Complexitylib.Classes.Containments.Internal.ReachSet turns reachability into a fixpoint whose
round count is the number of configuration codes. This file joins the two for a space-bounded
machine: the codes of Complexitylib.Classes.Containments.Internal.ConfigCount separate the
reachable configurations, so the search terminates after Fintype.card (Code …) rounds — and for
a log-space machine that count is polynomial.
The result is the specification NL ⊆ P has to implement: a language in NL is exactly a
polynomially bounded breadth-first search in the configuration graph, with no residual reference
to nondeterminism, traces, or time.
Main results #
NTM.DecidesInSpace.mono— deciding in space is monotone in the boundNTM.withinDecisionSpace_of_reachesCfg— the space bound holds along the whole graphNTM.cfgCode_inj_of_reachesCfg— codes separate the reachable configurationsNTM.mem_iff_exists_mem_reachSet— membership is a search of enough roundsNL_bounded_reachability_internal— forNLthe round count is polynomially boundedNL_subset_P_of_search_internal— the containment, modulo one machine
Deciding in space S is deciding in any larger space bound.
The space bound holds at every configuration of the graph. DecidesInSpace states the
bound along traces no longer than the halting time; past that time a trace is frozen, so the
bound propagates to every reachable configuration.
The initial configuration and everything reachable from it stays inside the window.
Codes separate the reachable configurations. This is what bounds the search: distinct reachable configurations have distinct codes, of which there are only finitely many.
Membership is a bounded breadth-first search. An input is in the language exactly when an accepting configuration shows up within any number of rounds of successor-closure from the initial configuration that reaches the number of codes. Nothing here mentions traces, choices, or time.
A language in NL is a polynomially bounded reachability search. This is the
specification a polynomial-time decision procedure has to implement: run the successor-closure
for A · (|x| + 1) ^ B rounds and look for an accepting configuration.
NL ⊆ P, reduced to the existence of one machine. The hypothesis carries the log-space
witness for tm: without it the search language is not decidable at all, let alone in polynomial
time, since the configuration graph would be unbounded.