Recursive polynomial complexity cores #
Lynch, Lemma 1 shows that a recursive set outside P has an infinite recursive
polynomial complexity core. This module proves it for problems on bit strings, with a core that is
also proper, that is, inside the set: a decidable problem A outside P has an infinite
decidable subset X on which every machine deciding A runs in superpolynomial time almost
everywhere (Cslib.Complexity.exists_infinite_isDecidable_isPolyTimeCore). Lynch's core need not
lie inside the set. The proper and recursive form is a strengthening proved here, by a standard
delayed diagonalization; we did not verify a primary source stating it in this form. The
class-generic core theorem (Cslib.Complexity.exists_infinite_isComplexityCore_P_subset) gives a
proper core that is not claimed to be decidable.
The statement is restricted to bit strings (encBits). The construction runs a decider of A on
every bit string and enumerates every bit string as a candidate. Under a general encoding enc, a
decider of A only answers on the range of enc, so the construction would need at least that the
range of enc be decidable on all bit strings, which a general encoding does not provide.
The construction #
Fix the description d of a decider of A, whose clocked runs
(Turing.MultiTapeTM.Universal.runBool) are sound and eventually complete
(Turing.MultiTapeTM.IsComputable.exists_runBool).
- Requirements. Requirement
e(Cslib.Complexity.RecursiveCore.requirement) is the problem of the wordswthat the machine with indexe(Cslib.Complexity.Ladner.runIndexed) accepts within(2 |w| + 2) ^ esteps (Cslib.Complexity.Ladner.clock). Every requirement is inP, and every problem inPis a requirement: the clock of a large enough index exceeds the time bound of its decider (Cslib.Complexity.RecursiveCore.exists_requirement_eq). - Stages. Stage
ndecides whether then-th word (Cslib.Complexity.Ladner.word) is selected. Everything at stagenis clocked byn. The decider ofAis run fornsteps, and membership in requirementeis known at stagenonly when the clock ofeis at mostn(Cslib.Complexity.RecursiveCore.memReq). The count at stagenis the number of earlier selected words that the decider has accepted withinnsteps. Requirementeis refuted at stagenwhen an earlier word is known to be in requirementeand rejected by the decider withinnsteps (Cslib.Complexity.RecursiveCore.refuted). Then-th word is selected when every requirement below the count is refuted or is not known to contain the word (Cslib.Complexity.RecursiveCore.selects_eq_true_iff). The core isA ∩ selected d(Cslib.Complexity.RecursiveCore.core).
Stage n runs at most n machines on words with indices below n for at most n steps, so the
table of the first n stages is polynomial-time in n in unary, and selected d is in E
(Cslib.Complexity.RecursiveCore.selected_mem_E, through
Cslib.Complexity.Ladner.setOf_index_mem_E_of_computableInPolyTime). The core is therefore
decidable.
The core is a core (Cslib.Complexity.RecursiveCore.isComplexityCore_core). Let B ∈ P lie
inside A, and let B be requirement e. Every refutation is sound, so e is never refuted. If
the core is infinite, then from some stage on the count exceeds e, and from some length on the
clock of e on the n-th word is at most n. Past both, the core avoids B.
The core is infinite (Cslib.Complexity.RecursiveCore.infinite_core). If it were finite, the
count would stay below its size K. Every requirement below K that is not inside A is
eventually refuted, since the decider of A eventually rejects a witness. From then on, every
word of A outside the core lies in one of the requirements below K inside A. So A is a
finite union of problems in P and a finite set, and A would be in P.
Main definitions #
Cslib.Complexity.RecursiveCore.requirement: the problems inP, by clocked machine index.Cslib.Complexity.RecursiveCore.selected,Cslib.Complexity.RecursiveCore.core: the words selected by the stages, and the core.
Main results #
Cslib.Complexity.RecursiveCore.exists_requirement_eq: every problem inPis a requirement.Cslib.Complexity.RecursiveCore.selected_mem_E: the selected words form a problem inE.Cslib.Complexity.RecursiveCore.isComplexityCore_core,Cslib.Complexity.RecursiveCore.infinite_core: the core is a complexity core forP, and it is infinite when the problem is outsideP.Cslib.Complexity.exists_infinite_isDecidable_isPolyTimeCore: Lynch's Lemma 1 with a proper core, for problems on bit strings.Cslib.Complexity.notMem_P_iff_exists_infinite_isDecidable_isPolyTimeCore: a decidable problem is outsidePexactly when it has an infinite decidable polynomial complexity core inside it.
References #
The requirements #
Every requirement is in P: its clock is a polynomial.
Every problem in P is a requirement, with arbitrarily large indices: machines of
arbitrarily large index decide it within their clock (Ladner.exists_index_of_mem_P).
The stages #
The decider described by d halts on the m-th word within n steps with answer b.
The count at stage T.length, from the table T of the earlier stages: the number of earlier
selected words that the decider accepts within T.length steps.
Requirement e is refuted at stage n: an earlier word is known at stage n to be in
requirement e, and the decider rejects it within n steps.
The decision of stage T.length, from the table T of the earlier stages: every requirement
below the count is refuted or is not known to contain the word.
The table of the decisions of the first n stages.
Stage n selects the n-th word.
The words selected by their stage.
The core: the selected words of A.
The stages are polynomial-time #
The stage tables are polynomial-time in their length, in unary.
The stage decisions are polynomial-time in the stage, in unary.
The selected words form a problem in E: the decision at each stage is polynomial-time in
the stage (Cslib.Complexity.Ladner.setOf_index_mem_E_of_computableInPolyTime).
The core of a decidable problem is decidable.
Correctness #
Stage n selects its word exactly when every requirement below the count is refuted or is
not known to contain the word.
The core is a complexity core of A for P. A problem in P inside A is a requirement
e that is never refuted. If the core is infinite, the count eventually exceeds e, so past the
stages where the clock of e has not yet run out, the core avoids the problem.
The core is infinite when A is not in P. If the core were finite, the count would stay
below its size. The requirements below that size that are not inside A are refuted from some
stage on, and from then on every word of A outside the core lies in one of the finitely many
requirements below that size inside A. Then A would be in P.
Decidable problems outside P have infinite decidable polynomial complexity cores inside
them (Lynch, Lemma 1, strengthened to a proper core; for problems on bit strings): a
decidable problem A outside P has an infinite decidable subset on which every machine deciding
A runs in superpolynomial time almost everywhere.
A decidable problem is outside P exactly when it has an infinite decidable polynomial
complexity core inside it.