Documentation

CslibFrontier.Computability.Complexity.Classes.AWPP.Amplification

Uniform error reduction for AWPP #

Majority amplification is a uniform polynomial in a GapP numerator and its complementary numerator. Uniform word sums and unary powers establish its GapP membership. A finite counting identity then permits the same majority tail estimate as in BPP; it does not assume that a GapP numerator can itself be computed or sampled in polynomial time.

Main definitions #

Main results #

References #

The numerator of strict majority among 2R independent trials with weights g and D-g.

theorem Cslib.Complexity.AWPPAmplification.majorityPolynomial_mem {α : Type} {enc : α ↪ List Bool} {g D : α → ℤ} {r : α → ℕ} (hg : g ∈ GapP enc) (hD : D ∈ GapP enc) (hr : Turing.MultiTapeTM.ComputableInPolyTime r enc Turing.MultiTapeTM.encUnary) :
(fun (a : α) => majorityPolynomial (g a) (D a) (r a)) ∈ GapP enc

The majority polynomial is uniformly GapP for polynomial-time unary repetition counts.

theorem Cslib.Complexity.AWPPAmplification.majorityPolynomial_bounds {g : ℤ} {m e : ℕ} (h0 : 0 ≤ g) (h1 : g ≤ 2 ^ m) :
have H := majorityPolynomial g (2 ^ m) (6 * e); have D := 2 ^ (2 * (6 * e) * m); (0 ≤ H ∧ H ≤ D) ∧ (2 * 2 ^ m ≤ 3 * g → 2 ^ e * (D - H) ≤ D) ∧ (3 * g ≤ 2 ^ m → 2 ^ e * H ≤ D)

The majority polynomial has the same bounds as a majority count, even when its numerator is a GapP value rather than an efficiently sampleable acceptance count.

theorem Cslib.Complexity.AWPPAmplification.amplify {α : Type} {enc : α ↪ List Bool} {A : Set α} {g : α → ℤ} (hg : g ∈ GapP enc) (p q : Polynomial ℕ) (hA : ∀ (a : α), (0 ≤ g a ∧ g a ≤ 2 ^ Polynomial.eval (enc a).length p) ∧ (a ∈ A → 2 * 2 ^ Polynomial.eval (enc a).length p ≤ 3 * g a) ∧ (a ∉ A → 3 * g a ≤ 2 ^ Polynomial.eval (enc a).length p)) :
have G := fun (a : α) => majorityPolynomial (g a) (2 ^ Polynomial.eval (enc a).length p) (6 * Polynomial.eval (enc a).length q); G ∈ GapP enc ∧ ∀ (a : α), have D := 2 ^ Polynomial.eval (enc a).length (12 * q * p); (0 ≤ G a ∧ G a ≤ D) ∧ (a ∈ A → 2 ^ Polynomial.eval (enc a).length q * (D - G a) ≤ D) ∧ (a ∉ A → 2 ^ Polynomial.eval (enc a).length q * G a ≤ D)

A dyadic AWPP witness with exponent p(n) amplifies to error 2^(-q(n)) by 12q(n) majority trials, with exact denominator exponent 12q(n)p(n). The amplified numerator is uniformly GapP; no efficient sampler for the original numerator is assumed.

theorem Cslib.Complexity.exists_AWPP_gap_errorExponent {α : Type} {enc : α ↪ List Bool} {A : Set α} (hA : A ∈ AWPP enc) (r : α → ℕ) (hr : Turing.MultiTapeTM.PolyBounded (fun (a : α) => (enc a).length) r) :
∃ G ∈ GapP enc, ∃ (P : Polynomial ℕ), ∀ (a : α), have D := 2 ^ Polynomial.eval (enc a).length P; (0 ≤ G a ∧ G a ≤ D) ∧ (a ∈ A → 2 ^ r a * (D - G a) ≤ D) ∧ (a ∉ A → 2 ^ r a * G a ≤ D)

Uniform AWPP amplification. For every requested exponent bounded by a polynomial in encoded input length, one GapP witness has error at most 2^(-r(a)) and a length-polynomial dyadic denominator. The requested function need not itself be computable: the construction uses a fixed dominating polynomial, not an oracle for that function.