Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Signed row sum under a Boolean coloring

Definition
rowSumB

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

combinatoricsdiscrepancy-theory

For a real-valued row a:Fin m→Ra:\mathrm{Fin}\,m\to\mathbb Ra:Finm→R (typically with entries in {0,1}\{0,1\}{0,1}) and a Boolean coloring χ\chiχ, rowSumB(a,χ)=∑jaj RSign(χ,j)\mathrm{rowSumB}(a,\chi)=\sum_{j} a_j\,\mathrm{RSign}(\chi,j)rowSumB(a,χ)=∑j​aj​RSign(χ,j) is the signed discrepancy of that row under the coloring χ\chiχ — the quantity Spencer's theorem bounds.

Definition code
import Mathlib
import Definitions.Def_RSign

def rowSumB {m : ℕ} (a : Fin m → ℝ) (χ : Fin m → Bool) : ℝ :=
  ∑ j, a j * RSign χ j
Source
J. Spencer, "Six standard deviations suffice", Trans. Amer. Math. Soc. 289 (1985), 679-706.
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