← All solved theorems
Chernoff–Stein Lemma for Binary Hypothesis Testing
proved in Lean
When deciding between distributions P and Q from n samples while keeping the chance of wrongly rejecting P fixed, the best chance of wrongly accepting P decays like 2 to the power minus n D(P||Q). KL divergence is the exact testing exponent.
Herman Chernoff; Charles Stein (1952) · Ch. 11 · Method of Types & Statistics · Cover & Thomas, Theorem 11.8.3
Statement
When testing $H_0 : P^n$ against $H_1 : Q^n$ ($P \ll Q$) at any fixed Type-I error threshold $\varepsilon \in (0, 1)$, the optimal Type-II error probability $\beta_n^*(\varepsilon)$ satisfies $$\lim_{n \to \infty} -\frac{1}{n}\log_2 \beta_n^*(\varepsilon) = D(P \| Q):$$
- Achievability: For every $\delta > 0$, eventually there exist acceptance sets $A_n$ with $\alpha_n \le \varepsilon$ and $\beta_n \le 2^{-n(D(P \| Q) - \delta)}$.
- Strong Converse: For every $\delta > 0$, eventually every test with $\alpha_n \le \varepsilon$ satisfies $\beta_n \ge 2^{-n(D(P \| Q) + \delta)}$ (plus the finite-$n$ DPI weak converse $(1 - \varepsilon)(-\frac{1}{n}\log_2 \beta_n) \le D(P \| Q) + \frac{1}{n}$).
How the proof works
Achievability uses the relative-entropy typical set relEntTypicalSet with a finite-sum Chebyshev bound; the strong converse intersects any acceptance set $A_n$ with relEntTypicalSet so $P^n(A_n \cap B_n) \ge (1 - \varepsilon)/2$ and transfers mass to $Q^n$ via the pointwise likelihood ratio bound; the finite-$n$ weak converse uses deterministic-map DPI (klDivergence_map_le).
Lean declarations (5)
The key theorems in the Lean library. Each is compiled with Lean 4, uses only the standard axioms propext, Classical.choice and Quot.sound, and is re-checked by leanchecker. Click a name to see the full proof on GitHub.
theorem klDivergence_iidDist (P Q : ProbDist α) (n : ℕ) (hac : AbsCont P Q) :
klDivergence (iidDist P n) (iidDist Q n) = (n : ℝ) * klDivergence P Q := by …
theorem chernoff_stein_achievability (P Q : ProbDist α) (hac : AbsCont P Q)
{ε δ : ℝ} (hε0 : 0 < ε) (_hε1 : ε < 1) (hδ : 0 < δ) :
∃ N : ℕ, ∀ n ≥ N, ∃ A : Finset (Fin n → α),
htType1Error P n A ≤ ε ∧
htType2Error Q n A ≤ (2 : ℝ) ^ (-((n : ℝ) * (klDivergence P Q - δ))) := by …
theorem chernoff_stein_converse_rate (P Q : ProbDist α) (hac : AbsCont P Q)
{n : ℕ} (hn : 0 < n) (A : Finset (Fin n → α)) {ε : ℝ}
(hα : htType1Error P n A ≤ ε) (hε1 : ε < 1) :
(1 - ε) * (-log2 (htType2Error Q n A) / (n : ℝ)) ≤
klDivergence P Q + 1 / (n : ℝ) := by …
theorem chernoff_stein_strong_converse (P Q : ProbDist α) (hac : AbsCont P Q)
{ε δ : ℝ} (hε1 : ε < 1) (hδ : 0 < δ) :
∃ N : ℕ, ∀ n ≥ N, ∀ A : Finset (Fin n → α),
htType1Error P n A ≤ ε →
(2 : ℝ) ^ (-((n : ℝ) * (klDivergence P Q + δ))) ≤ htType2Error Q n A := by …
theorem chernoff_stein_theorem (P Q : ProbDist α) (hac : AbsCont P Q)
{ε : ℝ} (hε0 : 0 < ε) (hε1 : ε < 1) :
Filter.Tendsto
(fun n : ℕ => -log2 (chernoffSteinOptTypeII P Q n ε) / (n : ℝ))
Filter.atTop
(nhds (klDivergence P Q)) := by …
Related open problems (3)
Open problems that build on, generalize, or are analogous to this theorem.