Documentation

CslibFrontier.Computability.Complexity.Classes.NP.Image

Images of problems in P and NP #

The encodings of the members of a problem in P form a problem in P on words, when the encoding has a decoder (Cslib.Complexity.mem_P_image): decode the word, check that it encodes what was decoded, and run the decider.

The encodings of the members of a problem in NP form a problem in NP on words, when the encoding has a decoder (Cslib.Complexity.mem_NP_image): the verifier decodes the word, checks that it encodes what was decoded, and runs the verifier of the problem. In particular the encodings of the satisfiable formulas form a problem in NP on words (Cslib.Complexity.image_SAT_mem_NP), an oracle language that answers, through the Cook–Levin reduction, every problem in NP.

Main results #

theorem Cslib.Complexity.mem_P_image {β : Type} {encB : β ↪ List Bool} (D : Turing.MultiTapeTM.Decoder encB) {B : Set β} (hB : B ∈ P encB) :

Images of problems in P. The encodings of the members of a problem in P form a problem in P on words, when the encoding has a decoder: decode the word, check that it encodes what was decoded, and run the decider of the problem.

theorem Cslib.Complexity.mem_NP_image {β : Type} {encB : β ↪ List Bool} (D : Turing.MultiTapeTM.Decoder encB) {B : Set β} (hB : B ∈ NP encB) :

Images of problems in NP. The encodings of the members of a problem in NP form a problem in NP on words, when the encoding has a decoder: the verifier decodes the word, checks that it encodes what was decoded, and runs the verifier of the problem.

The encodings of the satisfiable formulas form a problem in NP on words.