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

Title:Erdős Problem 9

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

The set is known to be infinite. In [Er77c] Erdős credits Schinzel with proving that there are infinitely many odd integers not of this form, but gives no reference.

[Er77c] Erdős, P., Problems and results on combinatorial number theory. III..

Subjects:Combinatorics (math.CO); Number Theory (math.NT)
MSC classes:05, 11
Tags:formal_proof
Cite as:NS.03560 [math.CO] · NS.03560v1 for this version
Declaration:Erdos9.erdos_9.variants.infinite
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:81dfbb4728a66d4f18c3e23aef0f883f2f9b9a85834d6cee2e694c61e18e1c3e
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/9.lean

Formal statement

theorem erdos_9.variants.infinite : Erdos9A.Infinite
Show the full Challenge.lean (82 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 9

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

@[expose] public section

namespace Erdos9

/--
The set of odd numbers that cannot be expressed as a prime plus two powers of 2.
-/
def Erdos9A : Set ℕ := { n | Odd n ∧ ¬ ∃ (p k l : ℕ), (Nat.Prime p) ∧ n = p + 2 ^ k + 2 ^ l }


@[category test, AMS 5 11]
theorem erdos9A_contains_one : 1 ∈ Erdos9A := by
  constructor
  · decide
  · push Not
    intro p k l hp
    linarith [Nat.Prime.two_le hp, @Nat.one_le_two_pow k, @Nat.one_le_two_pow l]

@[category test, AMS 5 11]
theorem erdos9A_contains_three : 3 ∈ Erdos9A := by
  constructor
  · decide
  · push Not
    intro p k l hp
    linarith [Nat.Prime.two_le hp, @Nat.one_le_two_pow k, @Nat.one_le_two_pow l]

@[category test, AMS 5 11]
theorem erdos9A_not_contains_five : 5 ∉ Erdos9A := by
  unfold Erdos9A
  simp only [exists_and_left, not_exists, not_and, Set.mem_ofPred_eq, not_forall, Decidable.not_not]
  intro
  use 3, Nat.prime_three, 0, 0
  simp only [pow_zero, Nat.reduceAdd]


set_option linter.style.formal_proof_palomar false in
/--
The set is known to be infinite. In [Er77c] Erdős credits Schinzel with proving that there are
infinitely many odd integers not of this form, but gives no reference.

[Er77c] Erdős, P., _Problems and results on combinatorial number theory. III._.
-/
@[category research solved, AMS 5 11, formal_proof using lean4 at
  "https://github.com/linrock/math-proofs/blob/de08009e59829727653bfa20b8d8f7ed1b1baf79/erdos-9/Solution.lean#L25"]
theorem erdos_9.variants.infinite : Erdos9A.Infinite := by
  sorry

/--
Is the upper density of the set of odd numbers that cannot be expressed as a prime plus
two powers of 2 positive?
-/
@[category research open, question, AMS 5 11]
theorem erdos_9 : 0 < Erdos9A.upperDensity := by
  sorry

end Erdos9

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

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