Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Ville's inequality for nonnegative supermartingales

Proved
BanditAlgorithm.nonnegative_supermartingale_ville

by Harry_Xu · Jul 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

bandit-algorithmsmartingalesprobability

Let (Mt)t≥0(M_t)_{t\ge 0}(Mt​)t≥0​ be a real-valued supermartingale on a probability space, adapted to a discrete-time filtration. Assume that Mt≥0M_t\ge 0Mt​≥0 almost surely for every ttt and that M0≤1M_0\le 1M0​≤1 almost surely. Then, for every δ∈(0,1)\delta\in(0,1)δ∈(0,1),

P ⁣(∃t∈N: Mt≥1δ)≤δ.\mathbb P\!\left(\exists t\in\mathbb N:\ M_t\ge\frac{1}{\delta}\right)\le\delta.P(∃t∈N: Mt​≥δ1​)≤δ.

This is Ville's inequality, or the maximal inequality for nonnegative supermartingales. Its time-uniform form is the probability-theoretic step that turns the mixture supermartingale in the self-normalized concentration argument into a bound valid simultaneously at every time.

Formalization Note Nonnegativity and the initial bound are stated almost surely, matching the measure-theoretic definition of a supermartingale.

Preamble
import Mathlib.Probability.Martingale.OptionalStopping
import Mathlib.MeasureTheory.Integral.Bochner.Basic

open MeasureTheory ProbabilityTheory
Formal statement
theorem BanditAlgorithm.nonnegative_supermartingale_ville
    {Ω : Type} {mΩ : MeasurableSpace Ω}
    {P : Measure Ω} [IsProbabilityMeasure P]
    (ℱ : Filtration ℕ mΩ) (f : ℕ → Ω → ℝ)
    (hf : Supermartingale f ℱ P)
    (hnonneg : ∀ t : ℕ, 0 ≤ᵐ[P] f t)
    (h0 : ∀ᵐ ω ∂P, f 0 ω ≤ 1)
    {δ : ℝ} (hδ : δ ∈ Set.Ioo (0 : ℝ) 1) :
    P.real {ω | ∃ t : ℕ, 1 / δ ≤ f t ω} ≤ δ := by
  sorry
Source
Lattimore and Szepesvári, Bandit Algorithms (CUP 2020), printed p. 51, Theorem 3.9 (Maximal inequality), used in the proof of Theorem 20.4 on printed p. 260, Eq. (20.7).

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