Mathematics / Original Research / Combinatorics & Graph Theory

A Lean-Checked Uniform Discrepancy Bound of 2.833771√n for Square Real Matrices

Proves and fully machine-checks in Lean 4 a uniform discrepancy bound of 2.833771√n for every square real matrix A ∈ [−1, 1]^(n×n) (leading coefficient 2.833183 with additive 0.213), cutting well below Spencer (5.32), Belshaw (5.199), Pesenti–Vladu (4.1), and Schmidt's unpublished 3.65.

Author
Ali Uyar
DOI
10.5281/zenodo.24852127
Scope
Machine-checked in Lean 4
Status
Standalone result
Original theorem
Spencer's Six Standard Deviations Suffice theorem (1985, C = 5.32); prior bounds 5.199 (Belshaw 2013), 4.1 + O(1) algorithmic (Pesenti–Vladu 2026), and 3.65* unpublished (Schmidt)
Source
github.com/aliuyar1234/verified-math-bounds/tree/main/132-spencer-discrepancy

Machine-checked in Lean 4 ✓ Verified locally via Lean 4 leanchecker full-prefix replay and independent exact rational Python checker; awaiting independent peer review.

Abstract

Spencer's celebrated Six Standard Deviations Suffice theorem proves that every n×n matrix A ∈ [−1, 1]^(n×n) admits a signing e ∈ {−1, 1}^n with ‖Ae‖∞ ≤ C√n for a universal constant C, originally C ≈ 5.32, subsequently improved to 5.199 (Belshaw), an unpublished 3.65 (Schmidt, reported by Belshaw), and an algorithmic 4.1√n + O(1) (Pesenti and Vladu). I prove, by an end-to-end formalization completely checked by the Lean 4 kernel across every positive dimension n ≥ 1 and every real matrix A ∈ [−1, 1]^(n×n), that there exists e ∈ {−1, 1}^n satisfying ‖Ae‖∞ ≤ (2833771/1000000)√n and ‖Ae‖∞ ≤ (2833183/1000000)√n + 213/1000. The internal Lean phase theorem retains the tighter uniform rational coefficient 2.833770984, while an independent exact-arithmetic Python verifier brackets the certificate's exact universal peak (at n = 116,177) in (2.833770982076, 2.833770982077) and its exact rational asymptotic coefficient in (2.833182148663, 2.833182148664).

The existence proof combines three stages: an initial even degree-20 heat polynomial controlling both signs of every row simultaneously on a walled hypercube; face-descent minimization of a continuum piecewise-quadratic regularized maximum governed by a paired spectral cap inequality and an exact modified clock near the end of the descent; and independent biased randomized sign rounding priced separately at each row's maximizing probability across 17 exponential-moment temperatures, combined with a 2.8√n bound for 1 ≤ n ≤ 23. The complete proof—including all 8,875 and 6,236 quadratic cells, heat-wall majorizations, polynomial moment checks, terminal probability intervals, and dimension envelopes—compiles under Lean 4.34.0 with Mathlib v4.34.0 (336 files, 40,092 lines), passes standalone leanchecker full-prefix replay, and depends solely on propext, Classical.choice, and Quot.sound.

Context

Determining the sharp universal constant in Spencer's theorem is a flagship open problem in combinatorial discrepancy theory, sitting between the 8×8 Hamming lower bound 5/√8 ≈ 1.7678 and prior upper bounds above 3.65. Bringing the uniform constant below 2.834—and verifying every analytic, spectral, and numerical step inside the Lean 4 kernel across all n ≥ 1—establishes a rigorous new benchmark for continuous-potential discrepancy proofs, while leaving open both algorithmic realizations at this constant and tighter constants closer to 5/√8.

Credits

Builds on Spencer (1985), Belshaw (2013), and Pesenti–Vladu (arXiv:2211.05509v2); certificate generators, exact Python verifiers, and the 336-file Lean 4 formalization produced with AI coding agents operated by Ali Uyar (December 2026).

Cite

@misc{uyar2026_spencer_discrepancy_2833771,
  author    = {Uyar, Ali},
  title     = {A Lean-Checked Uniform Discrepancy Bound of 2.833771√n for Square Real Matrices},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.24852127},
  url       = {https://doi.org/10.5281/zenodo.24852127},
  note      = {Machine-checked in Lean 4. Code: https://github.com/aliuyar1234/verified-math-bounds/tree/main/132-spencer-discrepancy}
}