Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 8.5.5 (pinned constant) — m ≥ (8N/ε²)log(2N/δ) samples give Σ|p̂(i) − p(i)| ≤ ε with probability > 1 − δ

Proved
SampleComplexityRL.Exploration.l1_deviation_pinned

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

p2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1probabilityreinforcement-learning

Let ppp be a probability distribution on a set of N≥1N\ge1N≥1 elements, let ε>0\varepsilon>0ε>0 and 0<δ<10<\delta<10<δ<1, and let mmm be a number of samples with

m ≥ 8Nε2 log⁡2Nδ.m\ \ge\ \frac{8N}{\varepsilon^2}\,\log\frac{2N}{\delta}.m ≥ ε28N​logδ2N​.

Draw mmm independent samples from ppp and let p^(i)\hat p(i)p^​(i) be the fraction of samples equal to iii. Then, with probability greater than 1−δ1-\delta1−δ,

∑i∣p^(i)−p(i)∣ ≤ ε.\sum_{i}\big|\hat p(i)-p(i)\big|\ \le\ \varepsilon.i∑​​p^​(i)−p(i)​ ≤ ε.

The point of the lemma is that O ⁣(Nε2log⁡Nδ)O\!\big(\tfrac N{\varepsilon^2}\log\tfrac N\delta\big)O(ε2N​logδN​) samples suffice for ℓ1\ell_1ℓ1​ accuracy ε\varepsilonε, linear rather than quadratic in NNN; it sets the sample size mmm of RmaxR_{max}Rmax​.

Formalization Note This is a pinned form of the printed m=O(Nε2log⁡Nδ)m=O\big(\frac N{\varepsilon^2}\log\frac N\delta\big)m=O(ε2N​logδN​): the constant is the condition 2Nexp⁡(−ε2m/(8N))≤δ2N\exp(-\varepsilon^2m/(8N))\le\delta2Nexp(−ε2m/(8N))≤δ with which the printed proof ends (p. 113). The samples are independent with law μ\muμ on Fin N (product measure on Fin m → Fin N), and p(i)=μ({i})p(i)=\mu(\{i\})p(i)=μ({i}).

Preamble
import Mathlib
import Definitions.Def_SampleComplexityRL_Exploration_Empirical
Formal statement
namespace SampleComplexityRL.Exploration

open MeasureTheory

/-- **Lemma 8.5.5, pinned constant** (Kakade 2003, p. 112). Let `p` be a probability distribution
`μ` on a set of `N ≥ 1` elements, let `0 < ε`, `0 < δ < 1`, and let
`m ≥ (8N/ε²) log(2N/δ)` (the condition `2N exp(−ε²m/(8N)) ≤ δ` that ends the printed proof,
p. 113, in place of the printed `m = O((N/ε²) log(N/δ))`). If `m` independent samples are drawn
from `μ` and `p̂` is their empirical distribution, then with probability greater than `1 − δ`,
`Σ_i |p̂(i) − p(i)| ≤ ε`. -/
theorem l1_deviation_pinned (N m : ℕ) (hN : 0 < N) (μ : Measure (Fin N))
    [IsProbabilityMeasure μ] (ε δ : ℝ) (hε : 0 < ε) (hδ0 : 0 < δ) (hδ1 : δ < 1)
    (hm : 8 * (N : ℝ) / ε ^ 2 * Real.log (2 * N / δ) ≤ m) :
    ENNReal.ofReal (1 - δ) <
      (Measure.pi fun _ : Fin m => μ)
        {ω | ∑ i, |empiricalDist ω i - (μ {i}).toReal| ≤ ε} := by sorry

end SampleComplexityRL.Exploration
Source
Kakade, On the Sample Complexity of Reinforcement Learning, PhD thesis, University College London, 2003, p. 112, Lemma 8.5.5 (constant from the last line of its proof, p. 113)
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me