Goldbach: exact residue coverings for moduli up to 53
Result page Proof blueprint → Paper PDF Verification archive
Pick one remainder for each odd prime q up to y so that every odd prime p up to z leaves the picked remainder when divided by some q. Lean proves the largest odd prime z is 317, 409, 491 and 607 for y = 41, 43, 47 and 53.
For y = 41, 43, 47 and 53, the largest odd prime z such that some choice of one remainder a_q for each odd prime q ≤ y puts every odd prime p ≤ z in one of the classes p ≡ a_q (mod q) is 317, 409, 491 and 607, and it is the same when p must be caught by a modulus q ≠ p; for y = 3, 5, 7, 11, 13, 17, 19, 29 and 37 the largest such z is 3, 5, 17, 29, 41, 61, 101, 179 and 269, and with q ≠ p it is the same except 11 at y = 7 and none at all at y = 3.
Goldbach's conjecture says that every even n ≥ 4 is a sum of two primes, and p(n), the least prime p with n − p prime, says how far up one must look. If every odd prime p ≤ z falls in the chosen class of some odd prime q ≤ y, with y ≥ 3, the Chinese remainder theorem gives even numbers n > z + y with q dividing n − p for every such p, so p(n) > z whenever n is a sum of two primes; the paper sets this beside the Erdős–Rankin covering construction for large gaps between primes, and notes that these values for single y do not move the asymptotic bounds on Goldbach's conjecture.
Coverings that Lean checks and certificate trees that Lean evaluates fix the exact covering values z*(y) and Z(y) at 13 of the prime moduli from 3 to 53 (not 23 or 31)
Walkthrough: 5 of 5 main results in Lean
Lean assumes no published theorem. The paper calls the covering mechanism behind its Proposition 3 classical (the four works it names next are listed as context below); Lean proves only that mechanism as Proposition 3 uses it, for each fixed y and z, with Dirichlet’s theorem on primes in progressions and the two-modulus Chinese remainder theorem from Mathlib, Lean’s library of proved mathematics. Lean defines the paired Jacobsthal function h₂(n) itself.
Published inputs
- Classical covering mechanism (Re-proved in Lean): One remainder class for each odd prime q ≤ y, lifted by the Chinese remainder theorem. The paper calls it classical; Lean proves it as Proposition 3 states it, for each fixed y and z.
- Ziller & Morack (2017) (Ported into Lean): Defined the paired Jacobsthal function h₂(n) and tabulated it through p₂₁ = 73. That Lean’s h₂(n) is their function is the paper’s reading; Lean checks only h₂(3) = 18.
What this paper adds
- Covering lift, search soundness & the h₂ bound: The covering lift (Proposition 3); When a search may stop (Lemma 4); Below the paired Jacobsthal function (Proposition 5)
- Exact values from checked coverings and certificates: A certificate checker with a proved soundness theorem; Nine moduli from 3 to 37 (Proposition 2); Four headline moduli (Theorem 1)
z*(y) = Z(y) = 317, 409, 491 and 607 for y = 41, 43, 47 and 53
Choose one remainder for each odd prime q ≤ y; z*(y) is the largest odd prime z (or 0 if there is none) such that some choice catches every odd prime up to z, a prime being caught when it leaves the chosen remainder on division by some q, and Z(y) is the same with no prime caught by its own modulus. Both are 317, 409, 491 and 607 for y = 41, 43, 47 and 53, and both are determined exactly at y = 3, 5, 7, 11, 13, 17, 19, 29 and 37, with Z(7) = 11 < 17 = z*(7) and Z(3) = 0. These finite values do not move the asymptotic bounds on Goldbach’s conjecture.
All 5 of 5 main results (Theorem 1, Propositions 2, 3 and 5, Lemma 4) proved in Lean with no outside assumption; the upper bounds rest on certificate trees that Lean evaluates itself (Z(3) = 0 by a direct argument). The paper’s Python searches and brute force are independent checks outside Lean.
Listed as open in the paper
- The exact values of z*(y) and Z(y) for prime moduli y ≥ 59, and for y = 23 and 31.
- Whether Z(y) = z*(y) for every prime y ≥ 11, so that 3 and 7 are the only prime moduli where the strict value is smaller.
- Whether z*(y)/(y ln y) → ∞ as y → ∞, and whether z*(y) = y(ln y)²⁺ᵒ⁽¹⁾, by analogy with the Maier–Pomerance heuristic for interval coverings.
Adjacent prior work (not used as inputs)
- Pomerance (1980): Applied Jacobsthal-type coverings to the least prime in an arithmetic progression. Pomerance’s bounds are not proved in Lean.
- Granville & Pomerance (1990): Refined bounds for the least prime in arithmetic progressions; not proved in Lean.
- Maier & Pomerance (1990): Conjectured x(log x)²⁺ᵒ⁽¹⁾ scaling for interval coverings; not proved in Lean.
- Ford, Green, Konyagin, Maynard & Tao (2018): Improved the Erdős–Rankin bound for long gaps between primes; not proved in Lean.
- Hagedorn (2009) (not fully read): Computed Jacobsthal’s function h for primorials, n < 50. The paper describes h(Q(y)) as covering every integer in an interval with one class per prime up to y, and sets h(Q(y)) beside z*(y) in its Table 3.
- Oliveira e Silva, Herzog & Pardi (2014) (not fully read): Verified the even Goldbach conjecture through 4·10¹⁸, with records for the least prime p such that n − p is prime; the paper sets these records beside z*(y).
Three classes reach 17, and 13 is out of strict reach
Take y = 7, so the moduli are 3, 5 and 7. Choose 2 mod 3, 3 mod 5 and 0 mod 7. Then 5, 11 and 17 leave 2 on division by 3, 3 and 13 leave 3 on division by 5, and 7 leaves 0 on division by 7. Every odd prime up to 17 is caught, and 19 is not.
The even number 98 leaves 2, 3 and 0 on division by 3, 5 and 7, so 98 − p is a multiple of the modulus that catches p, and larger than it: 95, 93, 91, 87, 85 and 81 are all composite. But 98 − 19 = 79 is prime, and Lean proves that 19 is the least prime p with 98 − p prime.
Here 7 caught itself. If no prime may be caught by its own modulus, 13 is out of reach. Give 3, 5, 7, 11 and 13 the weights 2, 2, 3, 2 and 1, in all 10. Among 5, 7, 11 and 13, one class mod 3 holds weight at most 4 (5 and 11 leave 2, 7 and 13 leave 1). Among 3, 7, 11 and 13, one class mod 5 holds at most 3, and among 3, 5, 11 and 13 one class mod 7 holds at most 2. Since 4 + 3 + 2 = 9 < 10, some prime up to 13 is missed. This weighted count is the certificate Lean checks for the strict rule at y = 7, and the classes 2 mod 3, 2 mod 5 and 3 mod 7 reach 11 under the strict rule.
Coverings, reach, z*(y) and Z(y)
A choice of one remainder a_q for each odd prime q ≤ y covers an odd prime p when p ≡ a_q (mod q) for some q, and covers it strictly when such a q differs from p. Its reach is the largest odd prime z with every odd prime up to z covered, or 0, and z*(y) and Z(y) are the largest relaxed and strict reaches. Some odd prime is always left uncovered, by Dirichlet's theorem, so the reach is defined, and z*(y) = z follows from one choice that covers up to z together with a proof that no choice covers up to the next odd prime.
How to pin down z*(y) exactly
Let z and T be primes ≥ 3 such that every prime p ≥ 3 below T is at most z. If some function covers every odd prime up to z at bound y, and none covers every odd prime up to T, then z*(y) = z.
How to pin down Z(y) exactly
Let z and T be primes ≥ 3 such that every prime p ≥ 3 below T is at most z. If some function covers every odd prime up to z strictly at bound y, and none covers every odd prime up to T strictly, then Z(y) = z.
- The odd primes up to x
- How many odd primes there are up to x
- The primorial Q(y)
- Covering every odd prime up to z
- Covering every odd prime up to z strictly
Some odd prime is always left uncovered
For every bound y and every choice a, some prime p ≥ 3 is not covered by a.
theorem GoldbachResidueCoverings.exists_uncovered_odd_prime (y : ℕ) (a : ℕ → ℕ) : ∃ p, Nat.Prime p ∧ 3 ≤ p ∧ ¬RelaxedCovers y a p
- The least strictly uncovered odd prime
The reach is at least z exactly when a covers up to z
For a prime z ≥ 3, z is at most the reach of a exactly when a covers every odd prime up to z.
- The largest reach z*(y)
- The largest strict reach Z(y)
One covering gives a lower bound for z*(y)
If z is a prime ≥ 3 and some function a covers every odd prime up to z at bound y, then z ≤ z*(y).
If nothing covers up to T, then z*(y) < T
If T is a prime ≥ 3 and no function a covers every odd prime up to T at bound y, then z*(y) < T.
Why a covering pushes the least Goldbach prime up
The strict value never exceeds the relaxed one, and they are equal when some choice strictly covers every odd prime up to z*(y), in particular when a choice that covers every odd prime up to z*(y) has no remainder 0. For any choice of classes, exactly one even n in (z + y, z + y + Q(y)] has n ≡ a_q (mod q) for every odd prime q ≤ y. If the choice covers every odd prime p ≤ z, then for every such even n > z + y each n − p is composite, and when y ≥ 3 the least prime p with n − p prime, if there is one, is larger than z.
Proposition 3, comparison and lifting
For all y, z and functions a: Z(y) ≤ z*(y); if a covers every odd prime up to z*(y) strictly, or covers them and no a_q is a multiple of q, then Z(y) = z*(y); exactly one even n with z + y < n ≤ z + y + Q(y) has n ≡ a_q (mod q) for every odd prime q ≤ y; and if a covers every odd prime up to z, then every even n > z + y with those remainders has n − p composite for each odd prime p ≤ z, and, when y ≥ 3, p(n) > z if n has a Goldbach representation.
theorem GoldbachResidueCoverings.paper_prop_crt_lift (y : ℕ) (z : ℕ) (a : ℕ → ℕ) : ZStrict y ≤ zStar y ∧ (StrictCoversUpTo y a (zStar y) → ZStrict y = zStar y) ∧ (RelaxedCoversUpTo y a (zStar y) → (∀ q ∈ oddPrimesUpTo y, a q % q ≠ 0) → ZStrict y = zStar y) ∧ (∃! n, z + y < n ∧ n ≤ z + y + primorial y ∧ n ≡ 0 [MOD 2] ∧ ∀ q ∈ oddPrimesUpTo y, n ≡ a q [MOD q]) ∧ (RelaxedCoversUpTo y a z → ∀ (n : ℕ), z + y < n → n ≡ 0 [MOD 2] → (∀ q ∈ oddPrimesUpTo y, n ≡ a q [MOD q]) → (∀ p ∈ oddPrimesUpTo z, IsComposite (n - p)) ∧ (3 ≤ y → ∀ (hgb : HasGoldbachRep n), z < leastGoldbachPrime n hgb))Z(y) ≤ z*(y)
For every y, the largest strict reach is at most the largest reach.
A strict covering up to z*(y) makes the two values equal
If some function a covers every odd prime up to z*(y) strictly at bound y, then Z(y) = z*(y).
The Chinese remainder theorem for a finite set of moduli
For a finite set of positive moduli, no two of which share a factor, and any wished remainders, some n below the product of the moduli leaves each modulus its wished remainder.
Exactly one lift in the window (z + y, z + y + Q(y)]
For every y, z and function a, exactly one n with z + y < n ≤ z + y + Q(y) is even and has n ≡ a_q (mod q) for every odd prime q ≤ y.
- A composite number
Every covered p makes n − p composite
If a covers every odd prime up to z at bound y, and n > z + y has n ≡ a_q (mod q) for every odd prime q ≤ y, then n − p is composite for every odd prime p ≤ z.
- A Goldbach representation of n
- The least Goldbach prime p(n)
The lift has least Goldbach prime above z
If y ≥ 3, a covers every odd prime up to z at bound y, and n > z + y is even with n ≡ a_q (mod q) for every odd prime q ≤ y, then p(n) > z if n has a Goldbach representation.
Splitting the search, and when a branch can stop
A search state holds the targets still uncovered, the moduli already given a remainder, and for each free modulus some forbidden remainders. Taking a target t, the state splits into one child for each free modulus that may still catch t, in increasing order, and Lean proves that every choice of classes fitting the state fits exactly one child. A state can also stop when the free moduli, each taking its best allowed class, cannot catch as many targets as remain, and a finished tree of such steps at the start state for y and a prime T ≥ 3 shows z*(y) < T.
Lemma 4, the search is sound
For every search state and target t in L, a function fits the state exactly when it fits some child for t, no function fits two children, and with no candidate nothing fits; if the capacity is less than the number of targets left, nothing fits; a finished search tree leaves nothing fitting; and if T is a prime ≥ 3 and the start state for y and T has a finished tree, no function covers every odd prime up to T at bound y, and z*(y) < T.
theorem GoldbachResidueCoverings.paper_lem_bnb_soundness : (∀ {y T : ℕ} (s : SearchState y T) {t : ℕ}, t ∈ s.L → (∀ (a : ℕ → ℕ), StateCompatible s a ↔ ∃ j, StateCompatible (partitionChild s t j) a) ∧ (∀ (j₁ j₂ : Fin (candidateModuli s t).length), j₁ ≠ j₂ → ∀ (a : ℕ → ℕ), ¬(StateCompatible (partitionChild s t j₁) a ∧ StateCompatible (partitionChild s t j₂) a)) ∧ ((candidateModuli s t).length = 0 → ∀ (a : ℕ → ℕ), ¬StateCompatible s a)) ∧ (∀ {y T : ℕ} (s : SearchState y T), capacitySum s < s.L.card → ∀ (a : ℕ → ℕ), ¬StateCompatible s a) ∧ (∀ {y T : ℕ} {s : SearchState y T}, BnBRefutation y T s → ∀ (a : ℕ → ℕ), ¬StateCompatible s a) ∧ ∀ {y T : ℕ}, Nat.Prime T → 3 ≤ T → BnBRefutation y T (rootState y T) → (∀ (a : ℕ → ℕ), ¬RelaxedCoversUpTo y a T) ∧ zStar y < T- A search state
The children split the state exactly
For any search state and any target t still in L, a function fits the state exactly when it fits some child for t, and no function fits two different children.
Too little capacity ends the branch
If the capacity of a state is less than the number of targets left in L, no function fits it.
A finished tree leaves no fitting choice
If a state has a finished search tree, no function fits it.
A certificate checker that Lean runs
A certificate is a finite tree. A split node tries listed remainders of one modulus and forbids them in a last branch; a leaf says that the free moduli, each taking its best allowed class, catch fewer targets than remain, either counting targets or adding weights put on some of them. Lean proves that when the checker answers yes, no allowed choice catches every target. With a trial-division list of the odd primes, proved right up to 840, this becomes the statement that no choice covers every odd prime up to T, and a list of pairs (q, a_q), one for each odd prime q ≤ y, that passes the witness check covers every odd prime up to z.
A passed check: no allowed function catches every target
If the checker says yes on a tree, for the given rule, targets and free moduli, then no function a with every class allowed catches every target.
- The witness check
- A list of classes as a function
- How many classes of a list catch p
- Trial division for odd primes
- The trial-division list up to N
Trial division is right up to 840
For n ≤ 840, trial division says yes exactly when n is a prime and n ≥ 3.
A passed relaxed certificate rules out covering up to T
If y ≤ 840 and T ≤ 840, the targets are the list of odd primes up to T, the moduli are the odd primes up to y with nothing forbidden, and the relaxed checker says yes on a certificate, then no function covers every odd prime up to T at bound y.
A passed strict certificate rules out strict covering up to T
Under the same conditions with the strict checker, no function covers every odd prime up to T strictly at bound y.
A passed strict witness check gives a strict covering
Under the same conditions with the strict witness check, the list read as a function covers every odd prime up to z strictly at bound y.
Exact values at nine moduli up to 37
For each y = 3, 5, 7, 11, 13, 17, 19, 29 and 37, Lean checks a list of classes that covers the odd primes up to the claimed value, and a certificate tree, of 1 to 29 nodes, showing that no choice covers up to the next odd prime. At y = 7 a separate certificate shows that no strict choice reaches 13, so Z(7) = 11 while z*(7) = 17, and at y = 3 the only modulus cannot catch 3 strictly, so Z(3) = 0. The chapter also holds the worked examples at y = 3 and y = 7, among them that 19 is the least prime p with 98 − p prime.
Proposition 2, nine moduli up to 37
z*(3) = 3 and Z(3) = 0; z*(5) = Z(5) = 5; z*(7) = 17 and Z(7) = 11; z*(11) = Z(11) = 29; z*(13) = Z(13) = 41; z*(17) = Z(17) = 61; z*(19) = Z(19) = 101; z*(29) = Z(29) = 179; z*(37) = Z(37) = 269.
theorem GoldbachResidueCoverings.proposition1_small_values : zStar 3 = 3 ∧ ZStrict 3 = 0 ∧ zStar 5 = 5 ∧ ZStrict 5 = 5 ∧ zStar 7 = 17 ∧ ZStrict 7 = 11 ∧ zStar 11 = 29 ∧ ZStrict 11 = 29 ∧ zStar 13 = 41 ∧ ZStrict 13 = 41 ∧ zStar 17 = 61 ∧ ZStrict 17 = 61 ∧ zStar 19 = 101 ∧ ZStrict 19 = 101 ∧ zStar 29 = 179 ∧ ZStrict 29 = 179 ∧ zStar 37 = 269 ∧ ZStrict 37 = 269z*(7) = 17
At y = 7 the largest reach is 17.
Z(7) = 11
At y = 7 the largest strict reach is 11.
z*(37) = Z(37) = 269
At y = 37 both values are 269.
Lean runs the strict checker for y = 7, target 13
The strict checker, run on these targets, these moduli and this tree, answers yes. Lean evaluates it itself.
The least Goldbach prime of 98 is 19
98 has a Goldbach representation, and the least prime p with 98 − p prime is 19.
Exact values at y = 41, 43, 47 and 53
For each of y = 41, 43, 47 and 53, Lean checks a list of nonzero classes that strictly covers every odd prime up to 317, 409, 491 and 607, and evaluates a certificate tree of 71, 81, 85 and 111 nodes showing that no choice of classes, even under the relaxed rule, covers every odd prime up to 331, 419, 499 and 613. So z*(y) and Z(y) are both 317, 409, 491 and 607. Lean also checks the counts of covered primes, that a +1 change in any one class breaks the covering, and explicit even numbers n with n − p composite for every covered p.
Theorem 1, exact values at y = 41, 43, 47 and 53
z*(y) = Z(y) = 317, 409, 491 and 607 at y = 41, 43, 47 and 53; there are 65, 79, 93 and 110 odd primes up to those values; the four strict choices have every remainder with 1 ≤ a_q < q, cover every odd prime up to 317, 409, 491 and 607 strictly, and leave 331, 419, 499 and 613 as the least odd primes they do not cover strictly; and no function covers every odd prime up to 331, 419, 499 and 613 at y = 41, 43, 47 and 53.
z*(41) = Z(41) = 317
At y = 41 both the largest reach and the largest strict reach are 317.
z*(53) = Z(53) = 607
At y = 53 both values are 607.
- The strict choice at y = 41
- The strict choice at y = 43
- The strict choice at y = 47
- The strict choice at y = 53
Lean runs the relaxed checker for y = 53, target 613
The relaxed checker, run on these targets, these moduli and this tree, answers yes. Lean evaluates it itself.
The least odd primes the four strict choices miss
The least odd prime not covered strictly by the strict choice at y = 41, 43, 47 and 53 is 331, 419, 499 and 613.
Four even numbers whose differences are all composite
n − p is composite for every odd prime p ≤ 317 when n = 144,519,147,931,868; for p ≤ 409 when n = 6,814,588,972,726,858; for p ≤ 491 when n = 566,671,167,283,642,412; and for p ≤ 607 when n = 20,515,530,269,698,679,522.
Below the paired Jacobsthal function
For the n-th prime pₙ, h₂(n) is the least m ≥ 1 such that for any two integers a and b with b − a even, some i from 1 to m makes a + i and b + i both share no factor with pₙ#, the product of the primes up to pₙ. If n ≥ 3, h₂(n) is even and h₂(n) + 1 < pₙ₊₁², then z*(pₙ) < h₂(n): otherwise a best covering, lifted to an even N, would give a run of h₂(n) pairs (x, x − N) with x from 2 to h₂(n) + 1 in which every pair has an entry sharing a factor with pₙ#. Lean also checks h₂(3) = 18.
z*(pₙ) < h₂(n)
If n ≥ 3, h₂(n) is even and h₂(n) + 1 < pₙ₊₁², then z*(pₙ) < h₂(n).
Some window length always works
For every n some length gives a paired window, so h₂(n) is defined.
h₂(3) = 18
For p₃ = 5 and p₃# = 30, the paired Jacobsthal function is 18.