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 237

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 A⊆NA\subseteq \mathbb{N} be a set such that ∣A∩{1,…,N}∣≫log⁡N\lvert A\cap \{1,\ldots,N\}\rvert \gg \log N for all large NN. Let f(n)f(n) count the number of solutions to n=p+an=p+a for pp prime and a∈Aa\in A. Is it true that lim sup⁡f(n)=∞\limsup f(n)=\infty?

The answer is yes, as proved by Chen and Ding [ChDi22].

Here A may contain 00. This changes each f(n)f(n) by at most one, so it does not affect the answer.

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

Formal statement

theorem erdos_237 : ∀ A : Set ℕ,
    (fun N : ℕ ↦ Real.log N) =O[atTop] (fun N ↦ ((A ∩ .Icc 1 N).ncard : ℝ)) →
    limsup (fun n ↦ (f A n : ℕ∞)) atTop = ⊤
Show the full Challenge.lean (85 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 237

*References:*
- [erdosproblems.com/237](https://www.erdosproblems.com/237)
- [ChDi22] Chen, Y.-G. and Ding, Y., *On a conjecture of Erdős*.
  [arXiv:2201.10727](https://arxiv.org/abs/2201.10727) (2022).
- [Er50] Erdős, P., *On integers of the form $2^k+p$ and some related problems*.
  Summa Brasil. Math. (1950), 113-123.
-/

@[expose] public section

open Filter Asymptotics

namespace Erdos237

/--
`f A n` is the number of solutions to $n = p + a$ with $p$ prime and $a \in A$. A solution is
determined by $a$, so this counts the $a \in A$ with $a \leq n$ and $n - a$ prime.
-/
noncomputable def f (A : Set ℕ) (n : ℕ) : ℕ :=
  {a ∈ A | a ≤ n ∧ (n - a).Prime}.ncard

set_option linter.style.formal_proof_palomar false in
/--
Let $A\subseteq \mathbb{N}$ be a set such that $\lvert A\cap \{1,\ldots,N\}\rvert \gg \log N$ for
all large $N$. Let $f(n)$ count the number of solutions to $n=p+a$ for $p$ prime and $a\in A$. Is
it true that $\limsup f(n)=\infty$?

The answer is yes, as proved by Chen and Ding [ChDi22].

Here `A` may contain $0$. This changes each $f(n)$ by at most one, so it does not affect the
answer.
-/
@[category research solved, question, AMS 11, formal_proof using lean4 at
  "https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos237b.lean#L55"]
theorem erdos_237 : ∀ A : Set ℕ,
    (fun N : ℕ ↦ Real.log N) =O[atTop] (fun N ↦ ((A ∩ .Icc 1 N).ncard : ℝ)) →
    limsup (fun n ↦ (f A n : ℕ∞)) atTop = ⊤ := by
  sorry

set_option linter.style.formal_proof_palomar false in
/--
Chen and Ding [ChDi22] proved that the assumption
$\lvert A\cap \{1,\ldots,N\}\rvert \gg \log N$ can be replaced with the assumption that $A$ is
infinite.
-/
@[category research solved, AMS 11, formal_proof using lean4 at
  "https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos237b.lean#L55"]
theorem erdos_237.variants.infinite (A : Set ℕ) (hA : A.Infinite) :
    limsup (fun n ↦ (f A n : ℕ∞)) atTop = ⊤ := by
  sorry

set_option linter.style.formal_proof_palomar false in
/--
Erdős [Er50] proved the case $A=\{2^k : k\geq 0\}$.
-/
@[category research solved, AMS 11, formal_proof using lean4 at
  "https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos237b.lean#L55"]
theorem erdos_237.variants.pow_two :
    limsup (fun n ↦ (f (Set.range (2 ^ ·)) n : ℕ∞)) atTop = ⊤ := by
  sorry

end Erdos237

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

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