Documentation

CslibFrontier.Computability.Complexity.Problems.StatisticalDifference.PolyTime

Polynomial-time polarization of Statistical Difference #

The efficiency half of the Sahai–Vadhan Polarization Lemma [SahaiVadhan2003, Lemma 3.3]. Instances of Statistical Difference are encoded by their common input and output counts in unary, followed by the binary codes of the two circuits (encSDInstance). On this encoding, polarization is polynomial-time whenever the instance and its parameters are computed in polynomial time, with the parameters in unary (SDInstance.computableInPolyTime_polarize_comp). Of the parameters of SDInstance.exists_polarize, the number λ of inner coordinates is logarithmic and the number ℓ of copies is polynomial in the number k + 1 of outer coordinates (SDInstance.computableInPolyTime_polarize_log). Polarization to error 2⁻⁽ᵏ⁺¹⁾ is therefore polynomial-time with k a separate input in unary, as in the source (SDInstance.exists_computableInPolyTime_polarize_unary), and with k = K x for every polynomial-time unary function K of the instance (SDInstance.exists_computableInPolyTime_polarize).

Two instances of K give the usual consequences, for constant thresholds 0 ≤ β < α² ≤ 1:

The circuits are De Morgan circuits with a common number of inputs and a common number of outputs, as in SDInstance.

Main definitions #

Main results #

References #

Instances of Statistical Difference: the pair of counts, followed by the pair of circuit codes. The pair of counts is the common input count in unary, framed, followed by the common output count in unary; the pair of codes is the binary code (Cslib.Circuits.Circuit.code) of the left circuit, framed, followed by the code of the right circuit. The pair of counts is itself framed, since encPair frames its first component.

Polarization is polynomial-time, for an instance and parameters computed in polynomial time from any encoded input, with the parameters in unary.

The polarization map of SDInstance.exists_polarize, with K a + 1 outer coordinates, is polynomial-time whenever the instance and K are computed in polynomial time from the encoded input, with K in unary.

theorem Cslib.Complexity.SDInstance.exists_computableInPolyTime_polarize {α β : ℝ} (hβ : 0 ≤ β) (hβα : β < α ^ 2) (hα : 0 ≤ α) (hα1 : α ≤ 1) :
∃ (m : ℕ) (b : ℕ), m ≠ 0 ∧ ∀ (K : SDInstance → ℕ), Turing.MultiTapeTM.ComputableInPolyTime K encSDInstance Turing.MultiTapeTM.encUnary → Turing.MultiTapeTM.ComputableInPolyTime (fun (x : SDInstance) => x.polarize (m * (Nat.log 2 (K x + 1) + 1) - 1) (2 ^ (b * (Nat.log 2 (K x + 1) + 1))) (K x)) encSDInstance encSDInstance ∧ ∀ (x : SDInstance), (α ≤ x.distance → 1 - (1 / 2) ^ (K x + 1) ≤ (x.polarize (m * (Nat.log 2 (K x + 1) + 1) - 1) (2 ^ (b * (Nat.log 2 (K x + 1) + 1))) (K x)).distance) ∧ (x.distance ≤ β → (x.polarize (m * (Nat.log 2 (K x + 1) + 1) - 1) (2 ^ (b * (Nat.log 2 (K x + 1) + 1))) (K x)).distance ≤ (1 / 2) ^ (K x + 1))

The Polarization Lemma with a polynomial-time map [SahaiVadhan2003, Lemma 3.3 and the remark after its proof], for constant thresholds 0 ≤ β < α² ≤ 1. There are constants m ≥ 1 and b such that, for every polynomial-time unary parameter K, polarization with λ = m (⌊log₂ (K x + 1)⌋ + 1) inner coordinates, ℓ = 2 ^ (b (⌊log₂ (K x + 1)⌋ + 1)) copies and K x + 1 outer coordinates is polynomial-time on encoded instances, sends instances at distance at least α to distance at least 1 - 2⁻⁽ᴷ⁽ˣ⁾⁺¹⁾, and sends instances at distance at most β to distance at most 2⁻⁽ᴷ⁽ˣ⁾⁺¹⁾.

Here the error parameter K x is a polynomial-time function of the instance alone. In the source the error parameter is a separate input in unary; that form is SDInstance.exists_computableInPolyTime_polarize_unary.

theorem Cslib.Complexity.SDInstance.exists_computableInPolyTime_polarize_unary {α β : ℝ} (hβ : 0 ≤ β) (hβα : β < α ^ 2) (hα : 0 ≤ α) (hα1 : α ≤ 1) :

The Polarization Lemma with the error parameter in unary [SahaiVadhan2003, Lemma 3.3 and the remark after its proof], for constant thresholds 0 ≤ β < α² ≤ 1: a polynomial-time map on pairs of an encoded instance and k in unary sends (x, k) with x at distance at least α to an instance at distance at least 1 - 2⁻⁽ᵏ⁺¹⁾, and (x, k) with x at distance at most β to an instance at distance at most 2⁻⁽ᵏ⁺¹⁾.

The source states Lemma 3.3 for the thresholds 2/3 and 1/3, with strict inequalities and error 2⁻ᵏ, and extends it to thresholds α² > β in the remark after its proof. Here the thresholds are non-strict and the error is 2⁻⁽ᵏ⁺¹⁾.

theorem Cslib.Complexity.SDInstance.exists_computableInPolyTime_polarize_length {α β : ℝ} (hβ : 0 ≤ β) (hβα : β < α ^ 2) (hα : 0 ≤ α) (hα1 : α ≤ 1) :

Polarization to error exponentially small in the instance length [SahaiVadhan2003, Lemma 3.3 and the remark after its proof], for constant thresholds 0 ≤ β < α² ≤ 1: a polynomial-time map on encoded instances sends instances at distance at least α to distance at least 1 - 2⁻⁽ⁿ⁺¹⁾, and instances at distance at most β to distance at most 2⁻⁽ⁿ⁺¹⁾, where n is the length of the encoded input instance.

theorem Cslib.Complexity.StatisticalDifference.polyTimeReducible {α β α' β' : ℝ} (hβ : 0 ≤ β) (hβα : β < α ^ 2) (hα : 0 ≤ α) (hα1 : α ≤ 1) (hβ' : 0 < β') (hβα' : β' < α') (hα' : α' < 1) :

Statistical Difference reduces to each of its gap versions [SahaiVadhan2003, Lemma 3.3, the remark after its proof, and p. 234]: for constant thresholds 0 ≤ β < α² ≤ 1 and 0 < β' < α' < 1, SD^{α,β} reduces to SD^{α',β'} in polynomial time, by polarization with a constant number of outer coordinates.