Documentation

CslibFrontier.Computability.Complexity.Classes.Immune.Core

Complexity cores #

A set X is a complexity core of A for a class C of sets (Cslib.Complexity.IsComplexityCore) when every member of C that lies inside A, or inside its complement, meets X in a finite set. A member of C that accepts only instances in A, or only instances outside A, accepts only finitely many instances of X. For C = P and decidable A, these are the polynomial complexity cores of Lynch: every machine deciding A runs in superpolynomial time on all but finitely many instances of X. The machine form, with binary machines as in P where Lynch allows any machine (a polynomially robust choice), is in CslibFrontier.Computability.Complexity.Classes.Immune.PolyTimeCore. Cores were studied further by Orponen and Schöning.

A set is bi-immune to C exactly when it and its complement are infinite and the universe is a core (Cslib.Complexity.isBiImmune_iff_isComplexityCore_univ). Problems in a class closed under complement have only finite cores (Cslib.Complexity.IsComplexityCore.finite_of_mem).

Lynch, Lemma 1 shows that a recursive set outside P has an infinite recursive polynomial complexity core, a subset of all words. A standard diagonal argument gives a class-generic form with a proper core, one inside the set: for every countable class C that contains the finite sets and is closed under union, a set not in C has an infinite core inside it (Cslib.Complexity.exists_infinite_isComplexityCore_subset). Enumerate C as e₀, e₁, …, and let Dₙ be the union of the eᵢ with i < n that lie inside A. Then A \ Dₙ is infinite, since otherwise A would be the union of Dₙ and a finite set. Choosing xₙ ∈ A \ Dₙ gives an infinite set {xₙ} that meets each eᵢ inside A only at indices n ≤ i. P is such a class (Cslib.Complexity.countable_P), so problems outside P have infinite cores inside them (Cslib.Complexity.exists_infinite_isComplexityCore_P_subset). Compared with Lynch's lemma, the core is proper, which is stronger, but it is chosen without regard to decidability. For decidable problems on bit strings, a delayed diagonalization chooses it decidable (Cslib.Complexity.exists_infinite_isDecidable_isPolyTimeCore, in Immune.RecursiveCore).

Main definitions #

Main results #

References #

def Cslib.Complexity.IsComplexityCore {α : Type u_1} (C : Set (Set α)) (A X : Set α) :

X is a complexity core of A for the class C: every member of C contained in A or in its complement meets X in a finite set.

theorem Cslib.Complexity.isComplexityCore_iff {α : Type u_1} {C : Set (Set α)} {A X : Set α} :
IsComplexityCore C A X ↔ ∀ B ∈ C, B ⊆ A ∨ B ⊆ Aᶜ → (B ∩ X).Finite
theorem Cslib.Complexity.IsComplexityCore.subset {α : Type u_1} {C : Set (Set α)} {A X Y : Set α} (h : IsComplexityCore C A X) (hYX : Y ⊆ X) :

Subsets of cores are cores.

theorem Cslib.Complexity.IsComplexityCore.union {α : Type u_1} {C : Set (Set α)} {A X Y : Set α} (hX : IsComplexityCore C A X) (hY : IsComplexityCore C A Y) :
IsComplexityCore C A (X ∪ Y)

Unions of two cores are cores.

theorem Set.Finite.isComplexityCore {α : Type u_1} {C : Set (Set α)} {A X : Set α} (hX : X.Finite) :

Finite sets are cores.

theorem Cslib.Complexity.IsComplexityCore.mono {α : Type u_1} {C D : Set (Set α)} {A X : Set α} (h : IsComplexityCore C A X) (hDC : D ⊆ C) :

A core for a class is a core for every subclass.

@[simp]
theorem Cslib.Complexity.isComplexityCore_compl {α : Type u_1} {C : Set (Set α)} {A X : Set α} :

A set and its complement have the same cores.

theorem Cslib.Complexity.IsComplexityCore.finite_of_mem {α : Type u_1} {C : Set (Set α)} {A X : Set α} (h : IsComplexityCore C A X) (hA : A ∈ C) (hAc : Aᶜ ∈ C) :

If A and its complement are in the class, every core of A is finite.

theorem Cslib.Complexity.isComplexityCore_univ_iff {α : Type u_1} {C : Set (Set α)} {A : Set α} :
IsComplexityCore C A Set.univ ↔ ∀ B ∈ C, B ⊆ A ∨ B ⊆ Aᶜ → B.Finite

The universe is a core of A when every member of the class inside A or its complement is finite.

Bi-immunity is a core condition: A is bi-immune to C exactly when A and its complement are infinite and the universe is a core of A.

theorem Cslib.Complexity.exists_infinite_isComplexityCore_subset {α : Type u_1} {C : Set (Set α)} {A : Set α} (hC : C.Countable) (hfin : ∀ (F : Set α), F.Finite → F ∈ C) (hunion : ∀ B ∈ C, ∀ B' ∈ C, B ∪ B' ∈ C) (hA : A ∉ C) :
∃ X ⊆ A, X.Infinite ∧ IsComplexityCore C A X

Class-generic core theorem, generalizing Lynch, Lemma 1 by a standard diagonal argument: if C is countable, contains the finite sets and is closed under union, every set not in C has an infinite core inside it.

theorem Cslib.Complexity.exists_infinite_isComplexityCore_P_subset {β : Type} {enc : β ↪ List Bool} {A : Set β} (hA : A ∉ P enc) :
∃ X ⊆ A, X.Infinite ∧ IsComplexityCore (P enc) A X

Problems outside P have infinite cores (Lynch, Lemma 1, proper-core strengthening): a problem outside P has an infinite core for P inside it. Unlike Lynch's core, this one is not claimed to be recursive; for a decidable core of a decidable problem on bit strings, see Cslib.Complexity.exists_infinite_isDecidable_isPolyTimeCore.

theorem Cslib.Complexity.IsComplexityCore.finite_of_mem_P {β : Type} {enc : β ↪ List Bool} {A X : Set β} (h : IsComplexityCore (P enc) A X) (hA : A ∈ P enc) :

A problem in P has only finite cores for P.

theorem Cslib.Complexity.notMem_P_iff_exists_infinite_isComplexityCore {β : Type} {enc : β ↪ List Bool} {A : Set β} :
A ∉ P enc ↔ ∃ X ⊆ A, X.Infinite ∧ IsComplexityCore (P enc) A X

A problem is outside P exactly when it has an infinite core for P.