Documentation

CslibFrontier.Languages.Probabilistic.UniformNat.LowerBound

Lower bounds on the residue probabilities of sampleModNat #

sampleModNat w m reduces a number written with w fair coins modulo m. Each residue i < m is hit by at least ⌊2 ^ w / m⌋ of the 2 ^ w coin outcomes, so its probability is at least (1 - m / 2 ^ w) / m, that is, 1 / m - 1 / 2 ^ w. The bound holds for every w; it is vacuous when 2 ^ w ≤ m. When m divides 2 ^ w, the residue distribution is exact (Pr[i] ≥ 1 / m).

Main results #

theorem Cslib.ProbComp.le_eval_sampleModNat_toReal {w m i : ℕ} (hi : i < m) :
(1 - ↑m / 2 ^ w) * (↑m)⁻¹ ≤ ((sampleModNat w m).eval i).toReal

Pointwise lower bound on sampleModNat w m: every residue i < m has probability at least (1 - m / 2 ^ w) / m.

theorem Cslib.ProbComp.one_le_mul_eval_sampleModNat_add {w m i : ℕ} (hi : i < m) :
1 ≤ ↑m * (sampleModNat w m).eval i + ↑m / 2 ^ w

The pointwise lower bound on sampleModNat w m in ℝ≥0∞, without subtraction: for every residue i < m, m times its probability is at least 1 - m / 2 ^ w.

theorem Cslib.ProbComp.one_le_mul_eval_sampleModNat_of_dvd {w m i : ℕ} (hi : i < m) (hdvd : m ∣ 2 ^ w) :
1 ≤ ↑m * (sampleModNat w m).eval i

Exact divisibility lower bound on sampleModNat w m in ℝ≥0∞: when m divides 2 ^ w, every residue i < m has probability at least 1 / m (1 ≤ m * Pr[i]) without bias.