Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Rothvoß's Lemma 8: one round of the partial-coloring method

Proved
lemma8_partial_coloring_round

by xbgxjack · Sep 10, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsdiscrepancy-theoryentropy-method

This is Rothvoß's Lemma 8, the one-round partial-coloring lemma at the heart of Spencer's entropy-method proof of the discrepancy theorem, generalized here from a single set to nnn rows handled jointly.

Fix nnn rows a1,…,an:Fin m→{0,1}a_1,\dots,a_n:\mathrm{Fin}\,m\to\{0,1\}a1​,…,an​:Finm→{0,1} on a common active column set of size m≥1m\ge1m≥1, and λ≥2\lambda\ge2λ≥2 satisfying the entropy budget

n⋅12log⁡2 e−λ2/4  ≤  m10.n\cdot\frac{12}{\log 2}\,e^{-\lambda^2/4}\;\le\;\frac{m}{10}.n⋅log212​e−λ2/4≤10m​.

Then there exist two Boolean colorings x,y:Fin m→{true,false}x,y:\mathrm{Fin}\,m\to\{\mathrm{true},\mathrm{false}\}x,y:Finm→{true,false} that differ in more than 2⌊m/10⌋2\lfloor m/10\rfloor2⌊m/10⌋ coordinates (a substantial fraction of mmm), such that the signed half-difference χ:=12(RSign(x)−RSign(y))\chi:=\tfrac12(\mathrm{RSign}(x)-\mathrm{RSign}(y))χ:=21​(RSign(x)−RSign(y)) — a partial coloring valued in {−1,0,1}\{-1,0,1\}{−1,0,1}, nonzero exactly where xxx and yyy disagree — keeps every row's signed sum small:

∀i,∣∑jai(j) χ(j)∣  ≤  λm.\forall i,\quad \Bigl|\textstyle\sum_j a_i(j)\,\chi(j)\Bigr|\;\le\;\lambda\sqrt m.∀i,​∑j​ai​(j)χ(j)​≤λm​.

The proof combines subadditivity of Shannon entropy across the nnn rows with Rothvo\u00df's Lemma 9 (the per-row entropy bound shannonEntropy_shellFin_le) to bound the joint entropy of the quantized row sums, a pigeonhole argument to find a large bucket of colorings whose row sums are pairwise close, and Kleitman's diameter theorem (via a Pinsker-type bound on the relevant Hamming-ball volume) to extract two colorings in that bucket at large Hamming distance. Iterating this lemma on a shrinking active column set is what proves the full O(n)O(\sqrt n)O(n​) discrepancy bound.

Formalization Note. RSign\mathrm{RSign}RSign is the platform definition of the same name (the {−1,+1}\{-1,+1\}{−1,+1}-valued Rademacher sign of a Boolean coloring).

Preamble
import Mathlib
import Definitions.Def_RSign
open Finset
Formal statement
theorem lemma8_partial_coloring_round (n : ℕ) {m : ℕ} (a : Fin n → Fin m → ℝ)
    (h01 : ∀ i j, a i j = 0 ∨ a i j = 1) (hm : 1 ≤ m) (lam : ℝ) (hlam : 2 ≤ lam)
    (hbudget : (n:ℝ) * ((12 / Real.log 2) * Real.exp (-lam^2/4)) ≤ (m:ℝ)/10) :
    ∃ x y : Fin m → Bool,
      2 * (m/10) < (Finset.univ.filter (fun j => x j ≠ y j)).card ∧
      ∀ i : Fin n, |∑ j, a i j * ((RSign x j - RSign y j)/2)| ≤ lam * Real.sqrt (m:ℝ) := by sorry
Source
T. Rothvoß, "Discrepancy theory, or: how much balance is possible?", MIT lecture notes, Lemma 8 (Section 4), https://math.mit.edu/classes/18.095/lect6/notes.pdf
Human review
  • Endorsed by Shuze Chen · Sep 11, 2026

  • Endorsed by xbgxjack · Sep 11, 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, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me