Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Erdős Problem 1028

Source:Erdős Problems
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Let H(n)=min⁡fmax⁡X⊆{1,…,n}∣∑x<y∈Xf(x,y)∣,H(n)=\min_f \max_{X\subseteq \{1,\ldots,n\}} \left\lvert \sum_{x<y\in X} f(x,y)\right\rvert, where ff ranges over all functions f:{1,…,n}2→{−1,1}f:\{1,\ldots,n\}^2\to \{-1,1\}. Estimate H(n)H(n).

Erdős [Er63d] proved n4≤H(n)≪n3/2.\frac{n}{4}\leq H(n) \ll n^{3/2}. Erdős and Spencer [ErSp71] proved that H(n)≫n3/2H(n)\gg n^{3/2}.

Subjects:Combinatorics (math.CO)
MSC classes:05
Tags:formal_proof
Cite as:NS.00410 [math.CO] · NS.00410v1 for this version
Declaration:Erdos1028.erdos_1028
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:443d1d48f02147f3f68a0b034400430856c1d06720d8cd39eea8ec889ac731f8
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/1028.lean

Formal statement

theorem erdos_1028 :
    (fun n => (H n : ℝ)) =Θ[atTop]
      fun n : ℕ => (n : ℝ) ^ (3 / 2 : ℝ)
Show the full Challenge.lean (89 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 1028

*References:*
- [erdosproblems.com/1028](https://www.erdosproblems.com/1028)
- [Er63d] Erdős, Pál, *On combinatorial questions connected with a theorem of Ramsey and van der
  Waerden*. Mat. Lapok (1963), 29-37.
- [Er71] Erdős, P., *Some unsolved problems in graph theory and combinatorial analysis*.
  Combinatorial Mathematics and its Applications (Proc. Conf., Oxford, 1969) (1971), 97-109.
- [ErSp71] Erdős, P. and Spencer, J., *Imbalances in $k$-colorations*. Networks (1971/72),
  379-385.
-/

@[expose] public section

open Filter Asymptotics

namespace Erdos1028

/-- The imbalance of a finite set `X` under a colouring `f`, that is,
$\left\lvert \sum_{x<y\in X} f(x,y)\right\rvert$. -/
def imbalance (f : ℕ → ℕ → ℤ) (X : Finset ℕ) : ℤ :=
  |∑ x ∈ X, ∑ y ∈ X.filter (fun y => x < y), f x y|

/-- `H n` is the minimum, over all colourings `f` of pairs from `{1, …, n}` with values in
`{-1, 1}`, of the largest imbalance of a subset `X ⊆ {1, …, n}`. -/
noncomputable def H (n : ℕ) : ℕ :=
  sInf {m | ∃ f : ℕ → ℕ → ℤ, (∀ x y, f x y = 1 ∨ f x y = -1) ∧
    ∀ X ⊆ Finset.Icc 1 n, imbalance f X ≤ (m : ℤ)}

set_option linter.style.formal_proof_palomar false in
/--
Let
$$H(n)=\min_f \max_{X\subseteq \{1,\ldots,n\}} \left\lvert \sum_{x<y\in X} f(x,y)\right\rvert,$$
where $f$ ranges over all functions $f:\{1,\ldots,n\}^2\to \{-1,1\}$. Estimate $H(n)$.

Erdős [Er63d] proved
$$\frac{n}{4}\leq H(n) \ll n^{3/2}.$$
Erdős and Spencer [ErSp71] proved that $H(n)\gg n^{3/2}$.
-/
@[category research solved, AMS 5, formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/main/src/v4.29.1/ErdosProblems/Erdos1028.lean"]
theorem erdos_1028 :
    (fun n => (H n : ℝ)) =Θ[atTop]
      fun n : ℕ => (n : ℝ) ^ (3 / 2 : ℝ) := by
  sorry

/-- Erdős [Er63d] proved
$$\frac{n}{4}\leq H(n) \ll n^{3/2}.$$
-/
@[category research solved, AMS 5]
theorem erdos_1028.variants.lower_bound :
    ∀ᶠ n : ℕ in atTop, (n : ℝ) / 4 ≤ (H n : ℝ) := by
  sorry

/-- Erdős [Er63d] proved
$$\frac{n}{4}\leq H(n) \ll n^{3/2}.$$
-/
@[category research solved, AMS 5]
theorem erdos_1028.variants.upper_bound :
    (fun n => (H n : ℝ)) ≪ (fun n : ℕ => (n : ℝ) ^ (3 / 2 : ℝ)) := by
  sorry

/-- Erdős and Spencer [ErSp71] proved that $H(n)\gg n^{3/2}$. -/
@[category research solved, AMS 5]
theorem erdos_1028.variants.erdos_spencer :
    (fun n : ℕ => (n : ℝ) ^ (3 / 2 : ℝ)) ≪ (fun n => (H n : ℝ)) := by
  sorry

end Erdos1028

To prove it: keep every definition of Challenge.lean unchanged and prove Erdos1028.erdos_1028 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_erdos_1028 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch erdos-1028
nosorry submit erdos-1028 nosorry/erdos-1028/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.