Erdős: when has positive density
OpenErdos1950.theorem_4Let be natural numbers with and for every . Then the set
has positive lower density if and only if both of the following hold:
- there is with for all (that is, );
- there is with for all .
This is Theorem 4 of Erdős (1950). Romanoff's theorem is the case .
Formalization Note The paper indexes the sequence from ; here it starts at . Positive lower density is HasPosLowerDensity.
import Definitions.Def_Erdos1950_Defs import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.NumberTheory.Divisors open Erdos1950
namespace Erdos1950
theorem theorem_4 (a : ℕ → ℕ) (ha0 : 0 < a 0) (hmono : StrictMono a)
(hdvd : ∀ k, a k ∣ a (k + 1)) :
HasPosLowerDensity {n : ℕ | ∃ p k : ℕ, p.Prime ∧ n = p + a k} ↔
((∃ C : ℝ, ∀ k : ℕ, Real.log (a k) ≤ C * (k + 1)) ∧
∃ C : ℝ, ∀ i : ℕ, (∑ d ∈ (a i).divisors, (1 : ℝ) / d) < C) := by sorry
end Erdos1950Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Data and hypotheses. Let be a sequence of natural numbers satisfying
- ;
- is strictly increasing: ;
- for every .
These hypotheses are jointly satisfiable (for instance ). They imply for all , so no term is (hence no logarithm of and no divisor set of occurs below).
Statement. Let
Then has positive lower density if and only if both (A) and (B) hold:
- Positive lower density of means: there are a real and a natural number such that for every natural ,
(the count includes if , which never happens here since and ; it counts elements in ).
- (A) There is a real constant such that for all ,
with the natural logarithm and converted to a real number. Since , . No sign is required of .
- (B) There is a real constant (a separate existential, unrelated to the one in (A)) such that for all ,
the sum being over all positive divisors of , computed in the reals. The inequality is strict. Since , the divisor set is nonempty and finite.
Remarks. The equivalence is between the density statement and the conjunction (A) (B). In (A), the bound is rather than , so the case is not degenerate. The indices in range over all of , including , and ranges over all primes including .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.