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 521

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

Let (ϵk)k≥0(\epsilon_k)_{k\geq 0} be independently uniformly chosen at random from {−1,1}\{-1,1\}. If RnR_n counts the number of real roots of fn(z)=∑0≤k≤nϵkzkf_n(z)=\sum_{0\leq k\leq n}\epsilon_k z^k then is it true that, almost surely, lim⁡n→∞Rnlog⁡n=2π?\lim_{n\to \infty}\frac{R_n}{\log n}=\frac{2}{\pi}?

The answer is no: this almost-sure limit fails. This result was obtained first by others, who deserve the credit for the problem; the link is to an independent machine-checked proof by Star Fleet Math.

Subjects:Number Theory (math.NT); Probability (math.PR)
MSC classes:11, 60
Tags:question, formal_proof
Cite as:NS.02377 [math.NT] · NS.02377v1 for this version
Declaration:Erdos521.erdos_521
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:581be0ab8223f1472b89e3fb3b1ada077201c0d5ca897296cdbf78eb012df212
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/521.lean

Formal statement

theorem erdos_521 : ¬ Claim
Show the full Challenge.lean (89 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 521

*Reference:* [erdosproblems.com/521](https://www.erdosproblems.com/521)
-/

@[expose] public section

namespace Erdos521

open MeasureTheory Filter Polynomial
open scoped Topology

/-- `true` encodes the sign `+1`, `false` the sign `-1`. -/
def sign (b : Bool) : ℝ := if b then 1 else -1

/-- One fair coin: the uniform probability measure on `Bool`. -/
noncomputable def fairCoin : Measure Bool :=
  (2 : ENNReal)⁻¹ • (Measure.dirac true + Measure.dirac false)

/-- `fairCoin` gives each of the two signs mass `1/2`. Together with
`fairCoin_isProbabilityMeasure` this pins the definition down, so a proof stating the
same problem with a `Bernoulli(1/2)` measure is stating the same thing. -/
@[category API, AMS 60]
theorem fairCoin_apply (b : Bool) : fairCoin {b} = 2⁻¹ := by
  cases b <;> simp [fairCoin]

/-- `fairCoin` is a probability measure. -/
@[category API, AMS 60]
theorem fairCoin_isProbabilityMeasure : IsProbabilityMeasure fairCoin := by
  constructor
  simp [fairCoin]
  rw [ENNReal.inv_two_add_inv_two]

/-- The law of an infinite sequence of independent fair coins `(ε_k)_{k ≥ 0}`,
each uniform on `{-1, +1}`. -/
noncomputable def rademacherMeasure : Measure (ℕ → Bool) :=
  Measure.infinitePi (fun _ : ℕ ↦ fairCoin)

/-- The degree-`n` Littlewood polynomial `f_n(z) = ∑_{0 ≤ k ≤ n} ε_k z^k`. -/
noncomputable def littlewoodPolynomial (ω : ℕ → Bool) (n : ℕ) : ℝ[X] :=
  ∑ k ∈ Finset.range (n + 1), Polynomial.monomial k (sign (ω k))

/-- `R_n`: the number of distinct real roots of `f_n`. -/
noncomputable def realRootCount (ω : ℕ → Bool) (n : ℕ) : ℕ :=
  Set.ncard ((littlewoodPolynomial ω n).rootSet ℝ)

/-- The assertion asked about in Problem 521: almost surely `R_n / log n → 2/π`. -/
def Claim : Prop :=
  ∀ᵐ ω ∂rademacherMeasure,
    Tendsto (fun n : ℕ ↦ (realRootCount ω n : ℝ) / Real.log (n : ℝ))
      atTop (𝓝 ((2 : ℝ) / Real.pi))

set_option linter.style.formal_proof_palomar false in
/--
Let $(\epsilon_k)_{k\geq 0}$ be independently uniformly chosen at random from
$\{-1,1\}$. If $R_n$ counts the number of real roots of
$f_n(z)=\sum_{0\leq k\leq n}\epsilon_k z^k$ then is it true that, almost surely,
$$\lim_{n\to \infty}\frac{R_n}{\log n}=\frac{2}{\pi}?$$

The answer is no: this almost-sure limit fails. This result was obtained first by others, who
deserve the credit for the problem; the link is to an independent machine-checked proof by
Star Fleet Math.
-/
@[category research solved, question, AMS 11 60, formal_proof using lean4 at "https://github.com/williamjblair/lean-proofs/blob/4f915a323443bfb1709a6805a013812016dca88a/starfleet/erdos-521/Research/LateFourthFinal.lean"]
theorem erdos_521 : ¬ Claim := by
  sorry

end Erdos521

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

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

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.