Documentation

CslibFrontier.Foundations.Analysis.Asymptotics.PolyErr

Polynomial error functions #

Robustness theorems for nonlocal games, low-degree tests and property testing are stated with an error function: a strategy that wins with probability 1 - ε is δ(ε)-close to an ideal one, where δ(ε) = poly(ε); the convention poly(a) ≤ C a^C is fixed in Ji, Natarajan, Vidick, Wright and Yuen, §3, p. 25. The papers never track the polynomial; they only use that such functions are closed under the operations their proofs perform. Cslib.PolyErr δ is that notion: |δ x| ≤ C (|x|^lo + |x|^hi) for some constant C and exponents 0 < lo ≤ hi. The lower exponent makes δ small near 0, the upper exponent keeps it polynomially bounded for large arguments, which is what makes the class closed under composition across fractional powers. This two-exponent formulation is introduced here; it is not taken from the source.

PolyErr is a fun_prop predicate. The identity, √, |·| and positive powers are polynomial errors, and the class is closed under sums, differences, products, scalar multiples, negation, max and composition, so fun_prop proves goals such as PolyErr fun ε => 3 * √ε + (ε + √(2 * ε)) ^ 2. Nonconstant bounds are compared with Cslib.PolyErr.mono, and Cslib.PolyErr.exists_le turns a polynomial error back into an explicit bound δ ε ≤ C ε^c on [0, 1].

Main definitions #

Main results #

References #

def Cslib.PolyErrBound (f : ℝ → ℝ) (C lo hi : ℝ) :

f is bounded by C (|x|^lo + |x|^hi) with 0 ≤ C and 0 < lo ≤ hi.

def Cslib.PolyErr (f : ℝ → ℝ) :

A polynomial error function: |f x| ≤ C (|x|^lo + |x|^hi) for a constant C and exponents 0 < lo ≤ hi, the δ = poly(ε) of robustness theorems.

theorem Cslib.PolyErrBound.polyErr {f : ℝ → ℝ} {C lo hi : ℝ} (h : PolyErrBound f C lo hi) :
theorem Cslib.PolyErrBound.widen {f : ℝ → ℝ} {C lo hi lo' hi' : ℝ} (h : PolyErrBound f C lo hi) (hlo' : 0 < lo') (hl : lo' ≤ lo) (hh : hi ≤ hi') :
PolyErrBound f (2 * C) lo' hi'

A bound holds with any wider range of exponents, at twice the constant.

theorem Cslib.PolyErrBound.mono {f g : ℝ → ℝ} {C lo hi : ℝ} (h : PolyErrBound f C lo hi) (hg : ∀ (x : ℝ), |g x| ≤ |f x|) :
PolyErrBound g C lo hi
theorem Cslib.PolyErr.mono {f g : ℝ → ℝ} (hf : PolyErr f) (hg : ∀ (x : ℝ), |g x| ≤ |f x|) :

A function dominated by a polynomial error is a polynomial error.

theorem Cslib.PolyErr.of_le {f g : ℝ → ℝ} (hf : PolyErr f) (hg₀ : ∀ (x : ℝ), 0 ≤ g x) (hg : ∀ (x : ℝ), g x ≤ f x) :

A nonnegative function below a polynomial error is a polynomial error.

theorem Cslib.PolyErr.zero :
PolyErr fun (x : ℝ) => 0
theorem Cslib.PolyErr.id' :
PolyErr fun (x : ℝ) => x
theorem Cslib.PolyErr.abs {f : ℝ → ℝ} (hf : PolyErr f) :
PolyErr fun (x : ℝ) => |f x|
theorem Cslib.PolyErr.neg {f : ℝ → ℝ} (hf : PolyErr f) :
PolyErr fun (x : ℝ) => -f x
theorem Cslib.PolyErr.const_mul {f : ℝ → ℝ} (c : ℝ) (hf : PolyErr f) :
PolyErr fun (x : ℝ) => c * f x
theorem Cslib.PolyErr.mul_const {f : ℝ → ℝ} (c : ℝ) (hf : PolyErr f) :
PolyErr fun (x : ℝ) => f x * c
theorem Cslib.PolyErr.div_const {f : ℝ → ℝ} (c : ℝ) (hf : PolyErr f) :
PolyErr fun (x : ℝ) => f x / c
theorem Cslib.PolyErr.add {f g : ℝ → ℝ} (hf : PolyErr f) (hg : PolyErr g) :
PolyErr fun (x : ℝ) => f x + g x
theorem Cslib.PolyErr.sub {f g : ℝ → ℝ} (hf : PolyErr f) (hg : PolyErr g) :
PolyErr fun (x : ℝ) => f x - g x
theorem Cslib.PolyErr.max {f g : ℝ → ℝ} (hf : PolyErr f) (hg : PolyErr g) :
PolyErr fun (x : ℝ) => Max.max (f x) (g x)
theorem Cslib.PolyErr.mul {f g : ℝ → ℝ} (hf : PolyErr f) (hg : PolyErr g) :
PolyErr fun (x : ℝ) => f x * g x
theorem Cslib.PolyErr.pow {f : ℝ → ℝ} (hf : PolyErr f) (n : ℕ) [NeZero n] :
PolyErr fun (x : ℝ) => f x ^ n
theorem Cslib.PolyErr.comp {f g : ℝ → ℝ} (hf : PolyErr f) (hg : PolyErr g) :
PolyErr fun (x : ℝ) => f (g x)

The composition of polynomial errors is a polynomial error.

theorem Cslib.PolyErr.abs_rpow {r : ℝ} (hr : 0 < r) :
PolyErr fun (x : ℝ) => |x| ^ r

x ↦ |x|^r is a polynomial error for r > 0.

theorem Cslib.PolyErr.sqrt {f : ℝ → ℝ} (hf : PolyErr f) :
PolyErr fun (x : ℝ) => √(f x)
theorem Cslib.PolyErr.exists_le {f : ℝ → ℝ} (hf : PolyErr f) :
∃ (C : ℝ) (c : ℝ), 0 ≤ C ∧ 0 < c ∧ ∀ (ε : ℝ), 0 ≤ ε → ε ≤ 1 → |f ε| ≤ C * ε ^ c

An explicit bound on [0, 1]: |f ε| ≤ C ε^c with c > 0.

theorem Cslib.PolyErr.apply_zero {f : ℝ → ℝ} (hf : PolyErr f) :
f 0 = 0

A polynomial error vanishes at 0.

theorem Cslib.PolyErr.tendsto_zero {f : ℝ → ℝ} (hf : PolyErr f) :

A polynomial error tends to 0 at 0.