Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Every odd number greater than 1 is the sum of at most five primes

Open
TaoFivePrimes.five_primes

by Jack McCarthy · Sep 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

additive-combinatoricscircle-methodgoldbachnumber-theory

Every odd natural number n>1n > 1n>1 can be written as n=p1+⋯+pkn = p_1 + \cdots + p_kn=p1​+⋯+pk​ for some k≤5k \le 5k≤5 and primes p1,…,pkp_1,\dots,p_kp1​,…,pk​, not necessarily distinct.

This is the main theorem of Tao's 2012 paper. It improves on Ramar'e's result that every even number is a sum of at most six primes, and lowers Shnirelman's constant from 777 to 666. Kaniecki had obtained the same conclusion under the Riemann hypothesis; Tao's proof is unconditional, though it quotes two large numerical verifications.

The primes are collected as a multiset, so repetition is allowed (9=3+3+39 = 3+3+39=3+3+3) and order is irrelevant. Note that at most five is essential and cannot be strengthened to exactly five: the least sum of five primes is 101010, so 333, 555 and 777 are not sums of exactly five primes.

Preamble
import Mathlib
Formal statement
namespace TaoFivePrimes

theorem five_primes (n : ℕ) (hodd : Odd n) (hn : 1 < n) :
    ∃ s : Multiset ℕ, s.card ≤ 5 ∧ (∀ p ∈ s, Nat.Prime p) ∧ s.sum = n := 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, https://arxiv.org/abs/1201.6656, Theorem 1.4 (p. 6)
Read-back

What the Lean code literally says, in plain math · claude-opus-5

For every natural number nnn, the statement asserts the following implication.

Hypotheses. nnn is a natural number (n∈Nn \in \mathbb{N}n∈N, so n≥0n \ge 0n≥0) satisfying two conditions:

  • nnn is odd, i.e. there exists k∈Nk \in \mathbb{N}k∈N with n=2k+1n = 2k + 1n=2k+1;
  • 1<n1 < n1<n (strictly greater than 111).

Together these force n≥3n \ge 3n≥3 and nnn odd, so the hypotheses are jointly satisfiable (e.g. n=3n = 3n=3) and the statement is not vacuous.

Conclusion. There exists a finite multiset sss of natural numbers — an unordered finite collection in which the same number may occur several times, each occurrence counted separately — such that all three of the following hold simultaneously:

card⁡(s)≤5,∀ p∈s, p is prime,∑p∈sp=n.\operatorname{card}(s) \le 5, \qquad \forall\, p \in s,\ p \text{ is prime}, \qquad \sum_{p \in s} p = n .card(s)≤5,∀p∈s, p is prime,p∈s∑​p=n.

Here card⁡(s)\operatorname{card}(s)card(s) is the number of elements of sss counted with multiplicity, and the bound is non-strict (≤5\le 5≤5, not =5= 5=5 and not <5< 5<5), so multisets of size 0,1,2,3,40, 1, 2, 3, 40,1,2,3,4 or 555 are all permitted by that clause; the empty multiset, whose sum is 000, is excluded only because ∑p∈sp=n>1\sum_{p\in s} p = n > 1∑p∈s​p=n>1. The primality condition quantifies over every element of sss: each element ppp satisfies primality in the natural numbers (p≥2p \ge 2p≥2 and its only divisors are 111 and ppp). The sum ∑p∈sp\sum_{p \in s} p∑p∈s​p is the sum of all elements of sss with multiplicity, computed in N\mathbb{N}N, and is required to be exactly nnn.

What is not required. The elements of sss need not be distinct — a prime may be repeated up to five times. The primes are not required to be odd; 222 may occur as an element. No lower bound is placed on card⁡(s)\operatorname{card}(s)card(s), no minimality of the number of summands is claimed, and the multiset sss is asserted only to exist, not to be unique (∃\exists∃, not ∃!\exists!∃!). Nothing relates sss to the witness kkk from the oddness hypothesis, and no effective or constructive procedure for producing sss is asserted.

Human review
  • Endorsed by marwahaha · Sep 7, 2026

  • Endorsed by Jack McCarthy · Sep 7, 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.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me