Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Dirichlet-regime bound for the smoothed prime sum

Proved
TaoFivePrimes.smoothedExpSum_dirichlet_bound_005

by marwahaha · Sep 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

analytic-number-theorycircle-methodexponential-sumsnumber-theoryprime-numberstao-five-primes

Let 87⋅1035≤x≤e310087\cdot10^{35}\le x\le e^{3100}87⋅1035≤x≤e3100, put y=x/1000y=x/1000y=x/1000, and let θ∈R\theta\in\mathbb Rθ∈R have circle distance

1000T04πx<∥θ mod 1∥<324⋅1014,T0=3.29⋅109.\frac{1000T_0}{4\pi x}<\|\theta\bmod 1\|<\frac{32}{4\cdot10^{14}}, \qquad T_0=3.29\cdot10^9.4πx1000T0​​<∥θmod1∥<4⋅101432​,T0​=3.29⋅109.

For the logarithmic cutoff η0\eta_0η0​ and the primorial sifting modulus ⌊x/1000⌋#\sqrt{\lfloor x/1000\rfloor}\#⌊x/1000⌋​#, prove

∣Sη0,⌊x/1000⌋#(y,θ)∣≤0.05 x1000.\left|S_{\eta_0,\sqrt{\lfloor x/1000\rfloor}\#}(y,\theta)\right| \le 0.05\,\frac{x}{1000}.​Sη0​,⌊x/1000⌋​#​(y,θ)​≤0.051000x​.

This is the pure exponential-sum estimate in the Dirichlet regime of Tao's Section 8. Choose q=⌊(4∥θ∥)−1⌋q=\lfloor(4\|\theta\|)^{-1}\rfloorq=⌊(4∥θ∥)−1⌋, split according to q≤y1/3q\le y^{1/3}q≤y1/3, y1/3≤q≤y2/3y^{1/3}\le q\le y^{2/3}y1/3≤q≤y2/3, or y2/3≤qy^{2/3}\le qy2/3≤q, and apply the explicit bounds (1.10), (1.9), and (1.12), respectively. At the stated endpoints the three corrected coefficients are below 0.0001920.0001920.000192, 0.012510.012510.01251, and 0.017850.017850.01785, each safely below 0.050.050.05.

Preamble
import Mathlib
import Definitions.Def_TaoFivePrimes_ArcSplit
import Definitions.Def_TaoFivePrimes_SmoothedExpSum

open TaoFivePrimes
Formal statement
namespace TaoFivePrimes

theorem smoothedExpSum_dirichlet_bound_005 (x : ℕ)
    (h1 : 87 * 10 ^ 35 ≤ x) (h2 : (x : ℝ) ≤ Real.exp 3100)
    (theta : ℝ)
    (hlo : 1000 * T0 / (4 * Real.pi * x) < ‖(theta : AddCircle (1 : ℝ))‖)
    (hhi : ‖(theta : AddCircle (1 : ℝ))‖ < 32 / (4 * 10 ^ 14)) :
    ‖smoothedExpSum eta0 (primorial (Nat.sqrt (x / 1000)))
        ((x : ℝ) / 1000) theta‖ ≤ 0.05 * (x : ℝ) / 1000 := by sorry

end TaoFivePrimes
Source
Terence Tao, Every odd number greater than 1 is the sum of at most five primes, Mathematics of Computation 83 (2014), 997–1038; arXiv:1201.6656v4, Section 8, Dirichlet-regime calculation (8.19)–(8.20), pp. 35–36, applying Theorem 1.3 estimates (1.10), (1.9), and (1.12). https://arxiv.org/html/1201.6656v4#S8. The displayed (8.20) has an extra factor x; the surrounding derivation and three case bounds have the dimensionally correct x/K scale. The formal statement uses K=1000, the corrected x/K scale, the mission split 32/N0, and coefficient 0.05, supported by the same endpoint calculations with the published 1.2 and 2.4 constants in (1.12).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me