Short windows and least-prime-factor mass
DefinitionErdos462WindowFor and , put . The integer window includes both endpoints. For composite its weight is , where is its least prime factor. The sum of these weights over the window is .
import Mathlib.NumberTheory.LSeries.RiemannZeta import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.NumberTheory.Chebyshev namespace Erdos462RH open scoped BigOperators noncomputable def width (C x : ℝ) : ℝ := C * Real.sqrt x * (Real.log x)^2 noncomputable def window (C x : ℝ) : Finset ℕ := Finset.Icc ⌈x⌉₊ ⌊x + width C x⌋₊ noncomputable def weight (n : ℕ) : ℝ := (n.minFac : ℝ) / n def Composite (n : ℕ) : Prop := 2 ≤ n ∧ ¬ n.Prime noncomputable def composites (C x : ℝ) : Finset ℕ := by classical exact (window C x).filter Composite noncomputable def compositeMass (C x : ℝ) : ℝ := ∑ n ∈ composites C x, weight n end Erdos462RH
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (GPT-6 family, independent agent)
Width. For every pair of real numbers , the width is the real number . The square root is zero for , and the real logarithm takes the value zero at and the value at . Thus the width is zero for and for . The parameter may have either sign or be zero.
Window. For every pair of real numbers , the window is the finite set of all natural numbers satisfying . Here and are the ordinary integer ceiling and floor. Both endpoints are included, and the set is empty if the lower endpoint exceeds the upper one. In particular, for the window is for every .
Weight. For every natural number , the weight is in the real numbers, where is the least prime divisor of . The definition also covers and . The weight of is zero because real division by zero has value zero here, and the weight of is one because the least-factor function takes the value one at .
Composite. For each natural number , the predicate holds exactly when and is not prime. It is false for both and .
Composites. For every pair of real numbers , the result is the finite set of all natural numbers satisfying , , and is not prime. The ceiling and floor are taken in the integers before the maxima with zero. Both endpoints are included if they satisfy the filter. The set can be empty, in particular whenever .
Composite mass. For every pair of real numbers , the mass is the real sum of , taken once for each nonprime natural number between and inclusive. Here is the least prime divisor of , and the ceiling and floor are the integer ceiling and floor. If there is no such , the sum is zero.