Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Vinogradov's three primes theorem (conditional on Siegel--Walfisz)

Proved
ThreePrimes.three_primes

by tabbott · Sep 3, 2026 · Mathlib c5ea003 (Lean v4.30.0)

circle-methodnumber-theorythree-primesvinogradov

Vinogradov's three primes theorem, conditional on the Siegel--Walfisz theorem: there is N0N_0N0​ such that every odd n≥N0n\ge N_0n≥N0​ is a sum of three primes,

n=p1+p2+p3.n=p_1+p_2+p_3 .n=p1​+p2​+p3​.

Proved by the Hardy--Littlewood--Vinogradov circle method. Writing R(n)=∑a+b+c=nΛ(a)Λ(b)Λ(c)R(n)=\sum_{a+b+c=n}\Lambda(a)\Lambda(b)\Lambda(c)R(n)=∑a+b+c=n​Λ(a)Λ(b)Λ(c) as an integral of S(α,N)3e(−nα)S(\alpha,N)^3e(-n\alpha)S(α,N)3e(−nα) over the circle, the Farey dissection at level P=(log⁡N)BP=(\log N)^BP=(logN)B splits it into major and minor arcs. On the minor arcs Vinogradov's estimate for ∑Λ(n)e(αn)\sum\Lambda(n)e(\alpha n)∑Λ(n)e(αn) — proved here via Vaughan's identity — gives a saving of an arbitrary power of log⁡N\log NlogN. On the major arcs Siegel--Walfisz gives the approximation S(a/q+β)≈μ(q)φ(q)v(β)S(a/q+\beta)\approx\tfrac{\mu(q)}{\varphi(q)}v(\beta)S(a/q+β)≈φ(q)μ(q)​v(β), whose cube integrates to 12S(n)n2\tfrac12\mathfrak S(n)n^221​S(n)n2. Since S(n)≥1\mathfrak S(n)\ge1S(n)≥1 for odd nnn (and S(n)=0\mathfrak S(n)=0S(n)=0 for even nnn — the parity obstruction), the main term dominates and R(n)>0R(n)>0R(n)>0. Finally the prime-power triples contribute only O(n3/2log⁡3n)O(n^{3/2}\log^3n)O(n3/2log3n), so the representation uses three genuine primes.

The one input not formalised is Siegel--Walfisz itself, which Mathlib does not yet contain; it appears as an explicit hypothesis.

Preamble
import Definitions.Def_Vino_threeprimes
import Mathlib.Analysis.Asymptotics.Defs
import Mathlib.Analysis.Asymptotics.Lemmas
import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic
import Mathlib.MeasureTheory.Integral.Bochner.Set
import Mathlib.NumberTheory.ArithmeticFunction.VonMangoldt
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.Data.Nat.Totient

open CircleMethod Vino Finset Filter Asymptotics MeasureTheory
open scoped Topology
Formal statement
namespace ThreePrimes

theorem three_primes (hSW : SiegelWalfisz) :
    ∃ N₀ : ℕ, ∀ n : ℕ, N₀ ≤ n → Odd n →
      ∃ p₁ p₂ p₃ : ℕ, p₁.Prime ∧ p₂.Prime ∧ p₃.Prime ∧ p₁ + p₂ + p₃ = n := by sorry

end ThreePrimes
Source
I. M. Vinogradov, Representation of an odd number as a sum of three primes, Dokl. Akad. Nauk SSSR 15 (1937), 291-294; H. Davenport, Multiplicative Number Theory, 3rd ed., GTM 74, Springer, 2000, Chapter 26 (the three primes theorem)
Human review
  • Endorsed by Shuze Chen · Sep 3, 2026

  • Endorsed by alya · Sep 3, 2026

    Confirmed by the mission captain (proposal self-audit).

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