Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
[Imported from formal-conjectures on 23 Nov 2026]

Title:Erdős Problem 32

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:

Erdős proved in [Erd54] that there exists an additive complement AA to the primes with ∣A∩{1,…,N}∣=O((log⁡N)2)|A \cap \{1, \ldots, N\}| = O((\log N)^2).

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

Formal statement

theorem erdos_32.variants.log_squared : ∃ A : Set ℕ,
    IsAdditiveComplementToPrimes A ∧
    (fun N => (((Finset.Icc 1 N).filter (· ∈ A)).card : ℝ)) =O[atTop]
      fun N => (Real.log N) ^ 2
Show the full Challenge.lean (106 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 32

*References:*
* [erdosproblems.com/32](https://www.erdosproblems.com/32)
* [Erd54] Erdős, Paul, Some results on additive number theory. Proc. Amer. Math. Soc. (1954),
 847-853.
* [Guy04] Guy, Richard K., Unsolved problems in number theory. (2004), xviii+437
* [Ru98c] Ruzsa, Imre Z., On the additive completion of primes. Acta Arith. (1998), 269-275.
-/

@[expose] public section


namespace Erdos32

open scoped Nat
open Filter Set Asymptotics

/-- A set $A \subseteq \mathbb{N}$ is an _additive complement to the primes_ if every sufficiently
large natural number can be written as $p + a$ for some prime $p$ and $a \in A$. -/
def IsAdditiveComplementToPrimes (A : Set ℕ) : Prop :=
  ∀ᶠ n in atTop, ∃ p, p.Prime ∧ ∃ a ∈ A, n = p + a

open scoped Classical in
/--
Erdős proved in [Erd54] that there exists an additive complement $A$ to the primes with
$|A \cap \{1, \ldots, N\}| = O((\log N)^2)$.
-/
@[category research solved, AMS 11]
theorem erdos_32.variants.log_squared : ∃ A : Set ℕ,
    IsAdditiveComplementToPrimes A ∧
    (fun N => (((Finset.Icc 1 N).filter (· ∈ A)).card : ℝ)) =O[atTop]
      fun N => (Real.log N) ^ 2 := by
  sorry

open scoped Classical in
/--
Must every additive complement $A$ to the primes satisfy
$\liminf_{N \to \infty} \frac{|A \cap \{1, \ldots, N\}|}{\log N} > 1$?
-/
@[category research solved, AMS 11]
theorem erdos_32.variants.liminf_gt_one : ∀ A : Set ℕ,
    IsAdditiveComplementToPrimes A →
    (1 : EReal) < liminf (fun N => (((Finset.Icc 1 N).filter (· ∈ A)).card / Real.log N : EReal))
      atTop := by
  sorry

open scoped Classical in
/--
Does there exist a set $A \subseteq \mathbb{N}$ such that $|A \cap \{1, \ldots, N\}| = o((\log N)^2)$
and every sufficiently large integer can be written as $p + a$ for some prime $p$ and $a \in A$?
-/
@[category research open, question, AMS 11]
theorem erdos_32 : ∃ A : Set ℕ,
    IsAdditiveComplementToPrimes A ∧
    (fun N => (((Finset.Icc 1 N).filter (· ∈ A)).card : ℝ)) =o[atTop]
      fun N => (Real.log N) ^ 2 := by
  sorry

open scoped Classical in
/--
Can the bound $O(\log N)$ be achieved for an additive complement to the primes? [Guy04] writes
that Erdős offered \$50 for the solution.
-/
@[category research open, question, AMS 11]
theorem erdos_32.variants.log_bound : ∃ A : Set ℕ,
    IsAdditiveComplementToPrimes A ∧
    (fun N => (((Finset.Icc 1 N).filter (· ∈ A)).card : ℝ)) =O[atTop]
      fun N => Real.log N := by
  sorry

open scoped Classical in
/--
Ruzsa proved that any additive complement $A$ to the primes must satisfy
$\liminf_{N \to \infty} \frac{|A \cap \{1, \ldots, N\}|}{\log N} \geq e^\gamma$,
where $\gamma$ is the Euler-Mascheroni constant.
-/
@[category research solved, AMS 11]
theorem erdos_32.variants.ruzsa : ∀ A : Set ℕ,
    IsAdditiveComplementToPrimes A →
    (Real.exp Real.eulerMascheroniConstant : EReal) ≤
      liminf (fun N => (((Finset.Icc 1 N).filter (· ∈ A)).card / Real.log N : EReal)) atTop := by
  sorry

end Erdos32

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

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