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 162

Source:Erdős Problems
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Let α>0\alpha > 0 and n≥1n \geq 1. Let F(n,α)F(n,\alpha) be the largest kk such that there exists some 2-colouring of the edges of KnK_n in which any induced subgraph HH on at least kk vertices contains more than α(∣H∣2)\alpha\binom{|H|}{2} many edges of each colour.

Prove that for every fixed 0≤α≤1/20 \leq \alpha \leq 1/2, as n→∞n \to \infty, F(n,α)∼cαlog⁡nF(n,\alpha) \sim c_\alpha \log n for some constant cαc_\alpha.

We require α<1/2\alpha < 1/2: at α=1/2\alpha = 1/2 no colouring works for any k ≤ n (see erdos_162.variants.half).

Subjects:Combinatorics (math.CO)
MSC classes:05
Cite as:NS.01167 [math.CO] · NS.01167v1 for this version
Declaration:Erdos162.erdos_162
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:4e29437ffdc9fa77a3be18026659ce9b6f14e8648e0082807ea47b73deee9d06
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/162.lean

Formal statement

theorem erdos_162 (α : ℝ) (h0 : 0 ≤ α) (h1 : α < 1 / 2) :
    ∃ c : ℝ, (fun n : ℕ ↦ (F n α : ℝ)) ~[atTop] (fun n : ℕ ↦ c * Real.log n)
Show the full Challenge.lean (123 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 162

*References:*
- [erdosproblems.com/162](https://www.erdosproblems.com/162)
- [Er90b] Erdős, Paul, *Problems and results on graphs and hypergraphs: similarities and
  differences*. Mathematics of Ramsey theory (1990), 12-28.
-/

@[expose] public section

open Filter Asymptotics

namespace Erdos162

/-- The number of edges of $K_n$ inside `H` that get colour `b` under the colouring `c`. -/
def colourEdgeCount {n : ℕ} (c : Sym2 (Fin n) → Bool) (H : Finset (Fin n)) (b : Bool) : ℕ :=
  (H.sym2.filter (fun e ↦ ¬ e.IsDiag ∧ c e = b)).card

/-- Every set `H` of at least `k` vertices contains more than $\alpha\binom{|H|}{2}$ edges of
each colour under `c`. -/
def IsBalancedAbove (n : ℕ) (α : ℝ) (c : Sym2 (Fin n) → Bool) (k : ℕ) : Prop :=
  ∀ H : Finset (Fin n), k ≤ H.card → ∀ b : Bool,
    α * (H.card.choose 2 : ℝ) < colourEdgeCount c H b

/-- $F(n, \alpha)$: the smallest `k` such that some 2-colouring of $K_n$ satisfies
`IsBalancedAbove n α c k`.

The source says "largest `k`". Read literally, every `k > n` works vacuously, so no largest `k`
exists. The smallest `k` is the reading consistent with the stated $\Theta(\log n)$ growth. -/
noncomputable def F (n : ℕ) (α : ℝ) : ℕ :=
  sInf {k : ℕ | ∃ c : Sym2 (Fin n) → Bool, IsBalancedAbove n α c k}

/--
Let $\alpha > 0$ and $n \geq 1$. Let $F(n,\alpha)$ be the largest $k$ such that there exists some
2-colouring of the edges of $K_n$ in which any induced subgraph $H$ on at least $k$ vertices
contains more than $\alpha\binom{|H|}{2}$ many edges of each colour.

Prove that for every fixed $0 \leq \alpha \leq 1/2$, as $n \to \infty$,
$F(n,\alpha) \sim c_\alpha \log n$ for some constant $c_\alpha$.

We require $\alpha < 1/2$: at $\alpha = 1/2$ no colouring works for any `k ≤ n`
(see `erdos_162.variants.half`).
-/
@[category research open, AMS 5]
theorem erdos_162 (α : ℝ) (h0 : 0 ≤ α) (h1 : α < 1 / 2) :
    ∃ c : ℝ, (fun n : ℕ ↦ (F n α : ℝ)) ~[atTop] (fun n : ℕ ↦ c * Real.log n) := by
  sorry

/--
It is easy to show with the probabilistic method that there exist $c_1(\alpha), c_2(\alpha)$ such
that $c_1(\alpha)\log n < F(n,\alpha) < c_2(\alpha)\log n$.
-/
@[category research solved, AMS 5]
theorem erdos_162.variants.bounds (α : ℝ) (h0 : 0 ≤ α) (h1 : α < 1 / 2) :
    ∃ c₁ c₂ : ℝ, 0 < c₁ ∧ c₁ < c₂ ∧ ∀ᶠ n : ℕ in atTop,
      c₁ * Real.log n < F n α ∧ (F n α : ℝ) < c₂ * Real.log n := by
  sorry

/--
At $\alpha = 1/2$ the two colour counts in $H$ add up to $\binom{|H|}{2}$, so both cannot exceed
half of it. Hence $F(n, 1/2) = n + 1$, and the claim fails at $\alpha = 1/2$.
-/
@[category textbook, AMS 5]
theorem erdos_162.variants.half (n : ℕ) : F n (1 / 2) = n + 1 := by
  have hvac : ∀ c : Sym2 (Fin n) → Bool, IsBalancedAbove n (1 / 2) c (n + 1) := by
    intro c H hH
    have := H.card_le_univ
    simp at this
    omega
  refine le_antisymm (Nat.sInf_le ⟨fun _ ↦ true, hvac _⟩) ?_
  refine le_csInf ⟨n + 1, fun _ ↦ true, hvac _⟩ ?_
  rintro k ⟨c, hc⟩
  by_contra! hk
  have ht := hc Finset.univ (by simp; omega) true
  have hf := hc Finset.univ (by simp; omega) false
  have hsum : colourEdgeCount c Finset.univ true + colourEdgeCount c Finset.univ false =
      n.choose 2 := by
    have h1 := Finset.card_filter_add_card_filter_not
      (s := (Finset.univ : Finset (Fin n)).sym2.filter fun e ↦ ¬ e.IsDiag) (fun e ↦ c e = true)
    simp only [Finset.filter_filter, Bool.not_eq_true] at h1
    rw [colourEdgeCount, colourEdgeCount, h1, Finset.sym2_univ, ← Fintype.card_subtype,
      Sym2.card_subtype_not_diag, Fintype.card_fin]
  simp only [Finset.card_univ, Fintype.card_fin] at ht hf
  have : (colourEdgeCount c Finset.univ true : ℝ) + colourEdgeCount c Finset.univ false =
      n.choose 2 := by exact_mod_cast hsum
  linarith

/-- `k = n + 1` always works, since no vertex set has more than `n` elements. -/
@[category API, AMS 5]
theorem isBalancedAbove_succ (n : ℕ) (α : ℝ) (c : Sym2 (Fin n) → Bool) :
    IsBalancedAbove n α c (n + 1) := by
  intro H hH
  have := H.card_le_univ
  simp at this
  omega

/-- $F(n, \alpha)$ is at most `n + 1`. -/
@[category API, AMS 5]
theorem F_le_succ (n : ℕ) (α : ℝ) : F n α ≤ n + 1 :=
  Nat.sInf_le ⟨fun _ ↦ true, isBalancedAbove_succ n α _⟩

end Erdos162

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

nosorry fetch erdos-162
nosorry submit erdos-162 nosorry/erdos-162/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.