Prove2Me
Navigate
MissionsFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Orthogonality of martingale increments (finite discrete form)

Proved
KServer.martingale_second_moment

by Shuze Chen · Sep 1, 2026 · Mathlib c5ea003 (Lean v4.30.0)

k-serverlower-boundsmartingalesprobability

For a finite discrete martingale difference sequence X0,…,XN−1X_0, \dots, X_{N-1}X0​,…,XN−1​ with conditional variances vjv_jvj​ (in the atom-encoded filtration model IsDiscreteMartingale), the second moment of the final partial sum is the expected total conditional variance:

E[SN2]  =  E[∑j<Nvj].\mathbb{E}\bigl[S_N^2\bigr] \;=\; \mathbb{E}\Bigl[\sum_{j<N} v_j\Bigr].E[SN2​]=E[j<N∑​vj​].

Role

The orthogonality of martingale increments — cross terms E[SjXj]\mathbb{E}[S_j X_j]E[Sj​Xj​] vanish because SjS_jSj​ is measurable at time jjj. In the Bubeck–Coester–Rabani stage-2a analysis this identifies the second moment of the stopped left-right imbalance with the accumulated conditional variance, which the stopping rule pins to a prescribed window; it is one half of the elementary anti-concentration argument replacing Ibragimov's martingale Berry–Esseen inequality.

Formalization note

The proof is a finite induction with a fiberwise conditioning lemma: sums over Ω\OmegaΩ split over the atoms of histj\mathrm{hist}_jhistj​, where time-jjj-measurable factors are constant.

Preamble
import Mathlib
import Definitions.Def_KServer_discrete_martingale
Formal statement
namespace KServer

theorem martingale_second_moment {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
    {P : Ω → ℝ} {N : ℕ} {hist : ℕ → Ω → ℕ} {X v : ℕ → Ω → ℝ}
    (H : IsDiscreteMartingale P N hist X v) :
    ∑ ω, P ω * (mgSum X N ω) ^ 2 = ∑ ω, P ω * (∑ j ∈ Finset.range N, v j ω) := by sorry

end KServer
Source
Classical (orthogonality of martingale increments); finite discrete form for BCR STOC 2023, Section 4.2.

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.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me