/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
import FormalConjecturesUtilKomlós conjecture
The Komlós conjecture in discrepancy theory: there is a universal constant $K$ such
that for all $n, m$ and all vectors $v_1, \dots, v_n \in \mathbb{R}^m$ with
$|v_i|
The best known bound is due to Banaszczyk, who proved that one can always achieve $O(\sqrt{\log n})$. The Beck–Fiala theorem on the discrepancy of sparse set systems is a special case (up to scaling), and the conjecture would imply the Beck–Fiala conjecture that set systems of degree $t$ have discrepancy $O(\sqrt{t})$.
namespace KomlosConjecture
The Komlós conjecture
There exists a universal constant $K > 0$ such that for all $n, m \in \mathbb{N}$ and
all vectors $v_1, \dots, v_n \in \mathbb{R}^m$ with $|v_i|
@[category research open, AMS 5]
theorem komlos_conjecture :
∃ K : ℝ, 0 < K ∧ ∀ (n m : ℕ) (v : Fin n → Fin m → ℝ),
(∀ i, ∑ j, (v i j) ^ 2 ≤ 1) →
∃ ε : Fin n → ℝ, (∀ i, ε i = 1 ∨ ε i = -1) ∧
∀ j, |∑ i, ε i * v i j| ≤ K := ⊢ ∃ K,
0 < K ∧
∀ (n m : ℕ) (v : Fin n → Fin m → ℝ),
(∀ (i : Fin n), ∑ j, v i j ^ 2 ≤ 1) →
∃ ε, (∀ (i : Fin n), ε i = 1 ∨ ε i = -1) ∧ ∀ (j : Fin m), |∑ i, ε i * v i j| ≤ K
All goals completed! 🐙
Banaszczyk's theorem
There exists a constant $C > 0$ such that for all $n, m \in \mathbb{N}$ and all vectors
$v_1, \dots, v_n \in \mathbb{R}^m$ with $|v_i|
[W. Banaszczyk,
@[category research solved, AMS 5]
theorem komlos_conjecture.variants.banaszczyk :
∃ C : ℝ, 0 < C ∧ ∀ (n m : ℕ) (v : Fin n → Fin m → ℝ),
(∀ i, ∑ j, (v i j) ^ 2 ≤ 1) →
∃ ε : Fin n → ℝ, (∀ i, ε i = 1 ∨ ε i = -1) ∧
∀ j, |∑ i, ε i * v i j| ≤ C * Real.sqrt (Real.log (n + 2)) := ⊢ ∃ C,
0 < C ∧
∀ (n m : ℕ) (v : Fin n → Fin m → ℝ),
(∀ (i : Fin n), ∑ j, v i j ^ 2 ≤ 1) →
∃ ε, (∀ (i : Fin n), ε i = 1 ∨ ε i = -1) ∧ ∀ (j : Fin m), |∑ i, ε i * v i j| ≤ C * √(Real.log (↑n + 2))
All goals completed! 🐙
Sanity check: with no vectors at all ($n = 0$), the empty signed sum is $0$ in every coordinate, so any constant bound holds.
@[category test, AMS 5]
theorem komlos_conjecture.variants.zero_vectors (m : ℕ) (v : Fin 0 → Fin m → ℝ) :
∃ ε : Fin 0 → ℝ, (∀ i, ε i = 1 ∨ ε i = -1) ∧
∀ j, |∑ i, ε i * v i j| ≤ 1 :=
⟨Fin.elim0, fun i => i.elim0, m:ℕv:Fin 0 → Fin m → ℝ⊢ ∀ (j : Fin m), |∑ i, i.elim0 * v i j| ≤ 1 All goals completed! 🐙⟩
end KomlosConjecture