Documentation

CslibFrontier.Computability.Complexity.Classes.Promise.Probabilistic

Probabilistic classes of promise problems #

The probabilistic promise classes PromiseBPP, PromiseRP and PromiseCoRP, defined in CslibFrontier.Computability.Complexity.Classes.BPP and CslibFrontier.Computability.Complexity.Classes.RP together with the error conditions they share with BPP, RP and coRP, follow Goldreich's semantic definitions Goldreich, Definition 1.2 and Section 6.2, requiring bounded or one-sided error only on instances in the promise. They contain the lifted classes promiseClass (BPP enc), promiseClass (RP enc) and promiseClass (coRP enc).

Each class is equivalent to its uniform strict PPT program characterization (mem_PromiseBPP_iff_exists_isPPTOn, mem_PromiseRP_iff_exists_isPPTOn, mem_PromiseCoRP_iff_exists_isPPTOn) via saved-coin replay (IsPPTOn.exists_seeded_evaluator, IsPPTOn.exists_total_seeded_evaluator), and is closed under deterministic polynomial-time promise reductions (PromiseProblem.PolyTimeReducible.mem_PromiseBPP, PromiseProblem.PolyTimeReducible.mem_PromiseRP, PromiseProblem.PolyTimeReducible.mem_PromiseCoRP).

Main results #

References #

A promise problem is in PromiseCoRP when a polynomial-time verifier accepts every random string on every yes-instance and rejects at least half on every no-instance.

Every promise problem separated by a language in BPP is in PromiseBPP.

Every promise problem separated by a language in RP is in PromiseRP.

Every promise problem separated by a language in coRP is in PromiseCoRP.

A promise problem's complement is in PromiseRP exactly when the problem is in PromiseCoRP.

A promise problem's complement is in PromiseCoRP exactly when the problem is in PromiseRP.

Every promise problem in PromiseP is in PromiseRP.

Every promise problem in PromiseP is in PromiseCoRP.

Every promise problem in PromiseP is in PromiseBPP.

theorem Cslib.Complexity.probability_sampleList_verifier {α : Type} (V : α × List Bool → Bool) (a : α) (n : ℕ) :
(((fun (w : List Bool) => V (a, w)) <$> BitString.sampleList n).eval true).toReal = ↑(acceptCount V a n) / 2 ^ n

The program sampling a random string for a seeded verifier accepts with the accepted fraction of the strings.

theorem Cslib.Complexity.mem_PromiseBPP_iff_exists_isPPTOn {α : Type} {enc : α ↪ List Bool} {Q : PromiseProblem α} :
Q ∈ PromiseBPP enc ↔ ∃ (M : α → ProbComp Bool), Probability.IsPPTOn enc Turing.MultiTapeTM.encBool M ∧ (∀ a ∈ Q.yes, 2 / 3 ≤ ((M a).eval true).toReal) ∧ ∀ a ∈ Q.no, 2 / 3 ≤ ((not <$> M a).eval true).toReal

Probabilistic-program characterization of PromiseBPP: a promise problem is in PromiseBPP exactly when a uniform strict PPT Boolean program accepts every yes-instance with probability at least 2 / 3 and rejects every no-instance with probability at least 2 / 3.

theorem Cslib.Complexity.mem_PromiseRP_iff_exists_isPPTOn {α : Type} {enc : α ↪ List Bool} {Q : PromiseProblem α} :
Q ∈ PromiseRP enc ↔ ∃ (M : α → ProbComp Bool), Probability.IsPPTOn enc Turing.MultiTapeTM.encBool M ∧ (∀ a ∈ Q.yes, 1 / 2 ≤ ((M a).eval true).toReal) ∧ ∀ a ∈ Q.no, true ∉ (M a).eval.support

Probabilistic-program characterization of PromiseRP: a promise problem is in PromiseRP exactly when a uniform strict PPT Boolean program accepts every yes-instance with probability at least 1 / 2 and never accepts a no-instance.

theorem Cslib.Complexity.mem_PromiseCoRP_iff_exists_isPPTOn {α : Type} {enc : α ↪ List Bool} {Q : PromiseProblem α} :
Q ∈ PromiseCoRP enc ↔ ∃ (M : α → ProbComp Bool), Probability.IsPPTOn enc Turing.MultiTapeTM.encBool M ∧ (∀ a ∈ Q.yes, false ∉ (M a).eval.support) ∧ ∀ a ∈ Q.no, 1 / 2 ≤ ((not <$> M a).eval true).toReal

Probabilistic-program characterization of PromiseCoRP: a promise problem is in PromiseCoRP exactly when a uniform strict PPT Boolean program never rejects a yes-instance and rejects every no-instance with probability at least 1 / 2.

theorem Cslib.Complexity.PromiseProblem.PolyTimeReducible.mem_PromiseBPP {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {X : PromiseProblem α} {Y : PromiseProblem β} (h : PolyTimeReducible encA encB X Y) (hY : Y ∈ PromiseBPP encB) :

PromiseBPP is closed under polynomial-time reductions.

theorem Cslib.Complexity.PromiseProblem.PolyTimeReducible.mem_PromiseRP {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {X : PromiseProblem α} {Y : PromiseProblem β} (h : PolyTimeReducible encA encB X Y) (hY : Y ∈ PromiseRP encB) :
X ∈ PromiseRP encA

PromiseRP is closed under polynomial-time reductions.

theorem Cslib.Complexity.PromiseProblem.PolyTimeReducible.mem_PromiseCoRP {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {X : PromiseProblem α} {Y : PromiseProblem β} (h : PolyTimeReducible encA encB X Y) (hY : Y ∈ PromiseCoRP encB) :

PromiseCoRP is closed under polynomial-time reductions.