FormalConjectures/Wikipedia/SixStandardDeviations.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
4 declarations, 3 contain sorry, 0 declared as axioms
Six standard deviations suffice (Spencer's theorem)
Spencer's theorem in discrepancy theory: for every $n$ and every family of $n$ subsets $S_1, \dots, S_n$ of $\{1, \dots, n\}$, there is a colouring $\chi : \{1, \dots, n\} \to \{-1, +1\}$ such that $$\left|\sum_{j \in S_i} \chi(j)\right| \le 6\sqrt{n}$$ for every $i$.
A uniformly random colouring only achieves the bound $O(\sqrt{n \log n})$, so Spencer's theorem ("six standard deviations suffice") is a genuine improvement over the basic probabilistic method; its proof uses a partial-colouring argument based on the entropy method, and the bound $\Theta(\sqrt{n})$ is tight up to the value of the constant. Spencer's original argument is non-constructive; polynomial-time algorithms achieving $O(\sqrt{n})$ were later found by Bansal (2010) and Lovett–Meka (2012).
The Komlós conjecture (the subject of a companion file in this directory) would strengthen this theorem: applied to the incidence vectors of the sets, scaled by $1/\sqrt{n}$, it would give a discrepancy bound $O(\sqrt{n})$ for any number of sets, not just $n$ of them.
References:
Imports (1)
- theorem
SixStandardDeviations.six_standard_deviationsDocumented declaration: six_standard_deviations sorry line 63 sourceSource documentation
Six standard deviations suffice (Spencer, 1985)
For every $n$ and every family of $n$ subsets $S_1, \dots, S_n$ of $\{1, \dots, n\}$, there is a colouring $\chi : \{1, \dots, n\} \to \{-1, +1\}$ such that $\left|\sum_{j \in S_i} \chi(j)\right| \le 6\sqrt{n}$ for every $i$.
depends on sorry what this means
Statement uses:
Nat,Fin,Finset,Exists,Real,And,Or,Eq,OfNat.ofNat,Neg.neg,LE.le,abs,Finset.sum,HMul.hMul,Real.sqrtProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous30 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem six_standard_deviations : ∀ (n : ℕ) (S : Fin n → Finset (Fin n)), ∃ χ : Fin n → ℝ, (∀ j, χ j = 1 ∨ χ j = -1) ∧ ∀ i, |∑ j ∈ S i, χ j| ≤ 6 * Real.sqrt n := by … - theorem
SixStandardDeviations.six_standard_deviations.variants.random_boundsorry line 84 sourcedepends on sorry what this means
Statement uses:
Exists,Real,And,LT.lt,OfNat.ofNat,Nat,Fin,Finset,Or,Eq,Neg.neg,LE.le,abs,Finset.sum,HMul.hMul,Real.sqrt,Real.log,HAdd.hAddProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous40 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
SixStandardDeviations.six_standard_deviations.variants.universal_boundsorry line 101 sourcedepends on sorry what this means
Statement uses:
Exists,Real,And,LT.lt,OfNat.ofNat,Nat,Fin,Finset,Or,Eq,Neg.neg,LE.le,abs,Finset.sum,HMul.hMul,Real.sqrtProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous29 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
SixStandardDeviations.six_standard_deviations.variants.zero_setsSanity check: with no points and no sets ($n = 0$), the empty colouring works and the bound $6\sqrt{0} = 0$ holds vacuously line 112 sourceSource documentation
Sanity check: with no points and no sets ($n = 0$), the empty colouring works and the bound $6\sqrt{0} = 0$ holds vacuously.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Fin,OfNat.ofNat,Nat,Finset,Exists,Real,And,Or,Eq,Neg.neg,LE.le,abs,Finset.sum,HMul.hMul,Real.sqrtProof uses:
Exists.intro,Fin.elim0,And.intro32 instances, coercions and auxiliary constants left out.
theorem six_standard_deviations.variants.zero_sets (S : Fin 0 → Finset (Fin 0)) : ∃ χ : Fin 0 → ℝ, (∀ j, χ j = 1 ∨ χ j = -1) ∧ ∀ i, |∑ j ∈ S i, χ j| ≤ 6 * Real.sqrt 0 := …