Documentation

CslibFrontier.Computability.Complexity.Classes.ArthurMerlin.PerfectCompleteness

Perfect completeness and perfect soundness for MA and AM #

Two-sided bounded error (2 / 3, 1 / 3) in MA and AM (Cslib.Complexity.MA, Cslib.Complexity.AM) can be replaced by perfect completeness (1) and soundness error 1 / 2 without changing either class (Goldreich, Chapter 6, Footnote 7 and Exercise 6.12; Goldreich, Exercises 9.8(2) and 9.9; Fürer, Goldreich, Mansour, Sipser and Zachos):

By contrast, requiring perfect soundness (0 acceptance on non-members) and completeness 1 / 2 on members defines MAZero (Cslib.Complexity.MAZero, written MA^{(1)} in Goldreich, Exercise 6.12(1)), which collapses to NP: any accepted pair of a proof and a random string is a deterministic certificate (MAZero = NP).

Main definitions #

Main results #

References #

Perfect soundness for MA: MA^{(1)} = NP #

def Cslib.Complexity.IsMerlinArthurZeroVerifier {α : Type} (enc : α ↪ List Bool) (q p : Polynomial ℕ) (V : α × List Bool → Bool) (A : Set α) :

V is a Merlin–Arthur verifier for A with completeness 1 / 2 and perfect soundness (0), the class MA^{(1)} of Goldreich, Exercise 6.12(1), with proofs of length q and random strings of length p, both evaluated at the length of the encoded instance: on a member a some proof y is accepted on at least half of the random strings r; on a non-member every proof and random string are rejected.

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

The problems with polynomial-time Merlin–Arthur verifiers with completeness 1 / 2 and soundness error 0 (MA^{(1)} in Goldreich, Exercise 6.12(1)).

theorem Cslib.Complexity.IsMerlinArthurZeroVerifier.isVerifier {α : Type} {enc : α ↪ List Bool} {A : Set α} {q p : Polynomial ℕ} {V : α × List Bool → Bool} (h : IsMerlinArthurZeroVerifier enc q p V A) :
IsVerifier enc (q + p) V A

A Merlin–Arthur verifier with completeness 1 / 2 and perfect soundness is a deterministic NP verifier when the proof and random string are read together as one certificate of length q + p.

theorem Cslib.Complexity.IsVerifier.isMerlinArthurZeroVerifier {α : Type} {enc : α ↪ List Bool} {A : Set α} {q : Polynomial ℕ} {V : α × List Bool → Bool} (h : IsVerifier enc q V A) :

A deterministic NP verifier is a Merlin–Arthur verifier with completeness 1 / 2 and perfect soundness that flips no coins.

theorem Cslib.Complexity.MAZero_subset_NP {α : Type} {enc : α ↪ List Bool} :
MAZero enc ⊆ NP enc

MAZero ⊆ NP: absorb the verifier's coins into Merlin's certificate.

theorem Cslib.Complexity.NP_subset_MAZero {α : Type} {enc : α ↪ List Bool} :
NP enc ⊆ MAZero enc

NP ⊆ MAZero: an NP verifier flips no coins.

theorem Cslib.Complexity.MAZero_eq_NP {α : Type} {enc : α ↪ List Bool} :
MAZero enc = NP enc

MA^{(1)} = NP Goldreich, Exercise 6.12(1): Merlin–Arthur proof systems with completeness 1 / 2 and perfect soundness (0) characterize NP.

Perfect completeness for MA and AM: definitions and two-trial reduction #

def Cslib.Complexity.IsMerlinArthurOneVerifier {α : Type} (enc : α ↪ List Bool) (q p : Polynomial ℕ) (V : α × List Bool → Bool) (A : Set α) :

V is a Merlin–Arthur verifier for A with perfect completeness (1) and soundness error 1 / 2 (Goldreich, Chapter 6, Footnote 7 and Exercise 6.12(2)), with proofs of length q and random strings of length p, both evaluated at the length of the encoded instance: on a member a some proof y is accepted on every random string r, V (a, y ++ r) = true; on a non-member every proof is accepted on at most half of the random strings.

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

The problems with polynomial-time Merlin–Arthur verifiers with perfect completeness and soundness error 1 / 2 (MA in Goldreich, Chapter 6, Footnote 7).

def Cslib.Complexity.IsArthurMerlinOneVerifier {α : Type} (enc : α ↪ List Bool) (p q : Polynomial ℕ) (V : α × List Bool → Bool) (A : Set α) :

V is an Arthur–Merlin verifier for A with perfect completeness (1) and soundness error 1 / 2 (Goldreich, Exercise 9.8(2); Fürer, Goldreich, Mansour, Sipser and Zachos), with random strings of length p and replies of length q, both evaluated at the length of the encoded instance: on a member a every random string r has a reply y with V (a, r ++ y) = true; on a non-member at most half of the random strings have one.

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

The problems with polynomial-time Arthur–Merlin verifiers with perfect completeness and soundness error 1 / 2 (Goldreich, Exercise 9.8(2); Fürer, Goldreich, Mansour, Sipser and Zachos).

theorem Cslib.Complexity.IsMerlinArthurOneVerifier.merlinArthurRepeat_one {α : Type} {enc : α ↪ List Bool} {A : Set α} {q p : Polynomial ℕ} {V : α × List Bool → Bool} (h : IsMerlinArthurOneVerifier enc q p V A) :
IsMerlinArthurVerifier enc q (2 * 1 * p) (merlinArthurRepeat enc q 1 p V) A

Repeating a perfectly complete Merlin–Arthur verifier twice (r = 1) reduces its soundness error from 1 / 2 to 1 / 4 ≤ 1 / 3.

theorem Cslib.Complexity.MAOne_subset_MA {α : Type} {enc : α ↪ List Bool} :
MAOne enc ⊆ MA enc

MAOne ⊆ MA.

theorem Cslib.Complexity.IsArthurMerlinOneVerifier.arthurMerlinRepeat_one_perfect {α : Type} {enc : α ↪ List Bool} {A : Set α} {p q : Polynomial ℕ} {V : α × List Bool → Bool} (h : IsArthurMerlinOneVerifier enc p q V A) (a : α) :
(a ∈ A → ∀ (x : Fin (Polynomial.eval (enc a).length (2 * 1 * p)) → Bool), ∃ (y : Fin (Polynomial.eval (enc a).length (2 * 1 * q)) → Bool), arthurMerlinRepeat enc 1 p q V (a, List.ofFn x ++ List.ofFn y) = true) ∧ (a ∉ A → 2 * 2 ^ Polynomial.eval (enc a).length (2 * 1 * p) ≤ 3 * {x : Fin (Polynomial.eval (enc a).length (2 * 1 * p)) → Bool | ∀ (y : Fin (Polynomial.eval (enc a).length (2 * 1 * q)) → Bool), arthurMerlinRepeat enc 1 p q V (a, List.ofFn x ++ List.ofFn y) = false}.card)

Repeating a perfectly complete Arthur–Merlin verifier twice in parallel (r = 1), accepting when both copies accept, keeps perfect completeness and reduces the soundness error from 1 / 2 to 1 / 4 ≤ 1 / 3, on every input separately: on a member every random string has an accepted reply, and on a non-member at least two thirds of the random strings have none.

theorem Cslib.Complexity.IsArthurMerlinOneVerifier.arthurMerlinRepeat_one {α : Type} {enc : α ↪ List Bool} {A : Set α} {p q : Polynomial ℕ} {V : α × List Bool → Bool} (h : IsArthurMerlinOneVerifier enc p q V A) :
IsArthurMerlinVerifier enc (2 * 1 * p) (2 * 1 * q) (arthurMerlinRepeat enc 1 p q V) A

Repeating a perfectly complete Arthur–Merlin verifier twice in parallel (r = 1) reduces its soundness error from 1 / 2 to 1 / 4 ≤ 1 / 3.

theorem Cslib.Complexity.AMOne_subset_AM {α : Type} {enc : α ↪ List Bool} :
AMOne enc ⊆ AM enc

AMOne ⊆ AM.

Shift covers give perfect completeness: MA = MAOne and AM = AMOne #

theorem Cslib.Complexity.ArthurMerlin.isMerlinArthurOneVerifier_sigmaTwoVerifier {α : Type} {enc : α ↪ List Bool} {A : Set α} {e q k p : Polynomial ℕ} {W : α × List Bool → Bool} (h : IsMerlinArthurVerifierWithErrorExponent enc e q p W A) (hcover : ∀ (n : ℕ), Polynomial.eval n p < Polynomial.eval n e * Polynomial.eval n k) (hshifts : ∀ (n : ℕ), 2 * Polynomial.eval n k ≤ 2 ^ Polynomial.eval n e) :
IsMerlinArthurOneVerifier enc (q + k * p) p (sigmaTwoVerifier enc q k p W) A

Perfect completeness for MA via Lautemann's shifts (Goldreich, Exercise 6.12(2); Goldreich, Exercise 9.9): if W is a Merlin–Arthur verifier for A with error at most 2 ^ (-e(n)) and random strings of p(n) bits, and k(n) shifts satisfy p(n) < e(n) k(n) and 2 k(n) ≤ 2 ^ e(n), then sigmaTwoVerifier enc q k p W is a perfectly complete Merlin–Arthur verifier for A with soundness error 1 / 2.

theorem Cslib.Complexity.ArthurMerlin.isArthurMerlinOneVerifier_piTwoVerifier {α : Type} {enc : α ↪ List Bool} {A : Set α} {e k p q : Polynomial ℕ} {W : α × List Bool → Bool} (h : IsArthurMerlinVerifierWithErrorExponent enc e p q W A) (hcover : ∀ (n : ℕ), Polynomial.eval n p < Polynomial.eval n e * Polynomial.eval n k) (hshifts : ∀ (n : ℕ), Polynomial.eval n k < 2 ^ Polynomial.eval n e) :
IsArthurMerlinOneVerifier enc (k * p) (p + k * q) (piTwoVerifier enc k p q W) A

Perfect completeness for AM via Lautemann's shifts (Goldreich, Exercise 9.8(2); Fürer, Goldreich, Mansour, Sipser and Zachos): if W is an Arthur–Merlin verifier for A with error at most 2 ^ (-e(n)), random strings of p(n) bits and replies of q(n) bits, and k(n) shifts satisfy p(n) < e(n) k(n) and k(n) < 2 ^ e(n), then piTwoVerifier enc k p q W is a perfectly complete Arthur–Merlin verifier for A with soundness error 1 / 2.

theorem Cslib.Complexity.MA_subset_MAOne {α : Type} {enc : α ↪ List Bool} :
MA enc ⊆ MAOne enc

MA ⊆ MAOne (Goldreich, Exercise 6.12(2); Goldreich, Exercise 9.9 at f ≡ 1): amplify a Merlin–Arthur verifier and attach Lautemann's shifts to Merlin's proof.

theorem Cslib.Complexity.MA_eq_MAOne {α : Type} {enc : α ↪ List Bool} :
MA enc = MAOne enc

MA = MAOne (Goldreich, Exercise 6.12(2); Goldreich, Exercise 9.9 at f ≡ 1): two-sided bounded error (2 / 3, 1 / 3) and perfect completeness (1, 1 / 2) define the same class MA.

theorem Cslib.Complexity.AM_subset_AMOne {α : Type} {enc : α ↪ List Bool} :
AM enc ⊆ AMOne enc

AM ⊆ AMOne (Goldreich, Exercise 9.8(2); Fürer, Goldreich, Mansour, Sipser and Zachos): amplify an Arthur–Merlin verifier and have Arthur send k random strings while Merlin replies with one shift and k replies.

theorem Cslib.Complexity.AM_eq_AMOne {α : Type} {enc : α ↪ List Bool} :
AM enc = AMOne enc

AM = AMOne (two-message constant-round milestone of Goldreich, Exercise 9.8(2); Fürer, Goldreich, Mansour, Sipser and Zachos): two-sided bounded error (2 / 3, 1 / 3) and perfect completeness (1, 1 / 2) define the same class AM.

theorem Cslib.Complexity.MAOne_subset_AMOne {α : Type} {enc : α ↪ List Bool} :
MAOne enc ⊆ AMOne enc

MAOne ⊆ AMOne.