Documentation

CslibFrontier.Computability.Complexity.Classes.Immune.RecursiveCore

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).

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 #

Main results #

References #

The requirements #

Requirement e: the problem of the words w that the machine with index e accepts within clock e |w| = (2 |w| + 2) ^ e steps.

Membership in requirement e, known at stage n: the clock of e on w is at most n, and the machine accepts within the clock. The clock is computed capped at n + 1, so that this is polynomial-time in n in unary.

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.

The stages are polynomial-time #

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.