/- 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 FormalConjecturesUtil

Komló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|2 \le 1$, there exist signs $\varepsilon_i \in {-1, +1}$ such that $$\left|\sum{i=1}^n \varepsilon_i v_i\right|_\infty \le K.$$

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})$.

References:

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|2 \le 1$ (encoded here as $\sum_j v{ij}^2 \le 1$), there exist signs $\varepsilon_i \in {-1, +1}$ such that $\left|\sum_i \varepsilon_i v_i\right|\infty \le K$, i.e. $\left|\sum_i \varepsilon_i v{ij}\right| \le K$ for every coordinate $j$.

@[category research open, AMS 5] theorem declaration uses 'sorry'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|2 \le 1$, there exist signs $\varepsilon_i \in {-1, +1}$ such that $\left|\sum_i \varepsilon_i v_i\right|\infty \le C \sqrt{\log(n + 2)}$. This is the best known bound towards the Komlós conjecture. (The shift $n + 2$ inside the logarithm is a harmless normalization keeping it positive for $n \in {0, 1}$.)

[W. Banaszczyk, Balancing vectors and Gaussian measures of n-dimensional convex bodies, Random Structures & Algorithms 12 (1998), 351–360.]

@[category research solved, AMS 5] theorem declaration uses 'sorry'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