Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Quantized row-sum shell index

Definition
shellIdx

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

discrepancy-theoryentropy-method

Fix a shell half-width Δ>0\Delta>0Δ>0. For a row aaa and coloring ω\omegaω, shellIdx(Δ,a,ω)\mathrm{shellIdx}(\Delta,a,\omega)shellIdx(Δ,a,ω) is the integer jjj nearest to rowSumB(a,ω)/(2Δ)\mathrm{rowSumB}(a,\omega)/(2\Delta)rowSumB(a,ω)/(2Δ), i.e. it identifies which width-2Δ2\Delta2Δ "shell" [ (2j−1)Δ,(2j+1)Δ)[\,(2j-1)\Delta,(2j+1)\Delta)[(2j−1)Δ,(2j+1)Δ) the row sum falls into. This quantization is the key device in the entropy-method proof of Spencer's theorem (Rothvo\u00df, Lemma 9): two colorings landing in the same shell have row sums within 2Δ2\Delta2Δ of each other.

Definition code
import Mathlib
import Definitions.Def_rowSumB

noncomputable def shellIdx {m : ℕ} (Δ : ℝ) (a : Fin m → ℝ) (ω : Fin m → Bool) : ℤ :=
  round (rowSumB a ω / (2*Δ))
Source
T. Rothvoß, "Discrepancy theory, or: how much balance is possible?", MIT lecture notes, Section 4.1, 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