Documentation

CslibFrontier.Computability.Complexity.Classes.ExistsReal

Real complexity classes defined by polynomial-time reductions #

ExistsReal enc and ExistsForallReal enc are the polynomial-time many-one downward closures of ETR and existential–universal real truth. Reductions are total on source instances. Specializing to raw bitstrings recovers the classes in edemaine/lean-canny's formal abstract at 970f28a5ecefc1327402ade16c068aa4b1b2c183. Hardness and completeness use PolyTimeHard and PolyTimeComplete directly. This module provides the class definitions and the lower bounds NP ⊆ ∃ℝ ⊆ ∃∀ℝ; their counting-hierarchy upper bounds are separate.

NP ⊆ ∃ℝ says that ETR is NP-hard, which is standard. The proof reduces SAT, which is NP-hard by Cook–Levin: a literal (v, b) becomes x = 0 when b holds and x ≠ 0 otherwise, where the coordinate x numbers v by its first occurrence, so that the unary variable ranks of the ETR word stay below the number of literals. ETR's Boolean connectives make constraints x (x - 1) = 0 unnecessary. For ∃ℝ ⊆ ∃∀ℝ, an ETR word is a two-block sentence with an empty universal block and an existential block as long as the word.

Main definitions #

Main results #

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

Problems polynomial-time many-one reducible to the encoded ETR language.

Problems polynomial-time many-one reducible to encoded existential–universal real truth.

NP ⊆ ∃ℝ #

theorem Cslib.Complexity.NP_subset_ExistsReal {α : Type} {enc : α ↪ List Bool} :
NP enc ⊆ ExistsReal enc

NP ⊆ ∃ℝ: every problem in NP, under any encoding, reduces in polynomial time to ETR; equivalently, ETR is NP-hard (standard). The proof composes Cook–Levin with a reduction from SAT that writes a literal (v, b) as x = 0 or x ≠ 0 according to b.

∃ℝ ⊆ ∃∀ℝ #

∃ℝ ⊆ ∃∀ℝ: every problem reducible to ETR reduces to existential–universal real truth, through the sentence with an empty universal block.