Documentation

CslibFrontier.Computability.Complexity.Classes.Selective

P-selective sets #

A selector for a set A picks one of any two instances so that the pick is in A whenever either instance is (Cslib.Complexity.IsSelector). A set is P-selective (Cslib.Complexity.PSel) when it has a selector computable in polynomial time [Sel79]; see also Hemaspaandra and Torenvliet, Introduction to Semi-Feasible Computation. P-selective sets are the "semi-feasible" sets: membership need not be decidable, but of any two instances one that is in A if either is can be found in polynomial time.

Selectors here output one of their two arguments, as in Selman's definition. Equivalently, a P-selective set has a polynomial-time Boolean selector that says which argument to pick (Cslib.Complexity.mem_PSel_iff_bool).

Every set in P is P-selective (Cslib.Complexity.P_subset_PSel), and the P-selective sets are closed under complement (Cslib.Complexity.compl_mem_PSel) and downward closed under polynomial-time many-one reductions (Cslib.Complexity.PolyTimeReducible.mem_PSel) [Sel79]. Lower sets of a total order compared in polynomial time are P-selective (Cslib.Complexity.mem_PSel_of_isLowerSet): the minimum is a selector. Left cuts of infinite binary sequences, an uncountable family of P-selective sets, are built from this in CslibFrontier.Computability.Complexity.Classes.Selective.LeftCut.

Main definitions #

Main results #

References #

def Cslib.Complexity.IsSelector {α : Type u_1} (A : Set α) (f : α → α → α) :

f is a selector for A: it picks one of its two arguments, and the pick is in A whenever either argument is.

def Cslib.Complexity.PSel {α : Type u_1} (enc : α ↪ List Bool) :
Set (Set α)

The P-selective sets with respect to the encoding enc: A ∈ PSel enc when A has a selector computable in polynomial time on pairs of encoded instances [Sel79].

theorem Cslib.Complexity.mem_PSel {α : Type u_1} {enc : α ↪ List Bool} {A : Set α} :
A ∈ PSel enc ↔ ∃ (f : α → α → α), Turing.MultiTapeTM.ComputableInPolyTime (fun (p : α × α) => f p.1 p.2) (Turing.MultiTapeTM.encPair enc enc) enc ∧ IsSelector A f
theorem Cslib.Complexity.IsSelector.eq_or_eq {α : Type u_1} {A : Set α} {f : α → α → α} (hf : IsSelector A f) (x y : α) :
f x y = x ∨ f x y = y

A selector picks one of its arguments.

theorem Cslib.Complexity.IsSelector.mem {α : Type u_1} {A : Set α} {f : α → α → α} (hf : IsSelector A f) {x y : α} (h : x ∈ A ∨ y ∈ A) :
f x y ∈ A

The pick of a selector is in A when either argument is.

theorem Cslib.Complexity.IsSelector.mem_of_mem_of_eq {α : Type u_1} {A : Set α} {f : α → α → α} {x y : α} (hf : IsSelector A f) (hy : y ∈ A) (h : f x y = x ∨ f y x = x) :
x ∈ A

An instance beaten by a member of A, in either order, is in A.

theorem Cslib.Complexity.mem_PSel_iff_bool {α : Type} {enc : α ↪ List Bool} {A : Set α} :
A ∈ PSel enc ↔ ∃ (g : α × α → Bool), Turing.MultiTapeTM.ComputableInPolyTime g (Turing.MultiTapeTM.encPair enc enc) Turing.MultiTapeTM.encBool ∧ ∀ (x y : α), x ∈ A ∨ y ∈ A → (if g (x, y) = true then x else y) ∈ A

Boolean selectors. A set is P-selective exactly when a polynomial-time Boolean function g says which of two instances to pick: the first when g answers true, the second otherwise.

theorem Cslib.Complexity.P_subset_PSel {α : Type} {enc : α ↪ List Bool} :
P enc ⊆ PSel enc

P ⊆ PSel: a polynomial-time decider d gives the selector picking the first instance exactly when d accepts it.

theorem Cslib.Complexity.compl_mem_PSel {α : Type} {enc : α ↪ List Bool} {A : Set α} (hA : A ∈ PSel enc) :
Aᶜ ∈ PSel enc

Complements. The complement of a P-selective set is P-selective: pick the instance the selector rejects.

theorem Cslib.Complexity.PolyTimeReducible.mem_PSel {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {A : Set α} {B : Set β} (h : PolyTimeReducible encA encB A B) (hB : B ∈ PSel encB) :
A ∈ PSel encA

Reductions. A set that reduces to a P-selective set in polynomial time is P-selective: select between the images [Sel79].

Lower sets are P-selective. If a linear order on the instances is compared in polynomial time, every lower set of it is P-selective: the minimum of two instances is a selector.