betaFeedback

WorksMathematics

Saouter's primality criterion in Lean, a ladder constant, and a 25 rung route to odd Goldbach up to 102010^{20}

Abstract

This note gives Lean proofs, with no hypothesis, of the primality criterion of Saouter's paper, Lemma 1 for every even FF, Theorems 1 and 2, and it records the reading of the constant on page 865 under which the formula agrees with the rest of the paper; separately, given the published even Goldbach computation to 4⋅10184\cdot 10^{18} as an explicit hypothesis, a ladder of 25 Proth primes reaches 102010^{20} in the Lean kernel. The binary Goldbach conjecture remains open and this note makes no progress on it. The ternary Goldbach theorem for all odd numbers is Helfgott's (arXiv:1312.7748), and it is not formalized here and not used.

Introduction and Main Statements

We formalize in Lean 4, with no hypothesis, Saouter’s Lemma 1 for every even FF and Theorems 1 and 2, record the reading of the constant on page 865 matching his ladder formula, and deduce ternary Goldbach up to 102010^{20} from the published 4⋅10184 \cdot10^{18} even Goldbach bound via a ladder of 25 Proth primes.

Theorem M (Main statements). (a) Lemma 1 of Saouter holds for every even FF, and Saouter’s Theorems 1 and 2 hold, in Lean with no hypothesis; (b) assuming every even integer from 4 to 4⋅10184 \cdot10^{18} is a sum of two primes, every odd integer from 7 to 102010^{20} is a sum of three primes, in Lean. See Theorems B, C and E for detail.

The binary Goldbach conjecture remains open, and this note makes no progress on it. The ternary Goldbach theorem for all odd numbers is Helfgott’s [2], arXiv:1312.7748, and it is not formalized here and not used.

To place the present formalization in the context of prior work, the primary references are Saouter’s own verification to 102010^{20} [6] using the even Goldbach input 4⋅10114 \cdot10^{11} from Sinisalo [7] and a prime ladder of about 250⋅106250 \cdot10^{6} rungs, together with the subsequent work of Helfgott and Platt [3], who verified the ternary Goldbach conjecture up to 8.875⋅10308.875 \cdot10^{30}, far past this range, by the same ladder idea with Proth primes. The range 102010^{20} is therefore not a new result. What the entry supplies is a short kernel-checked derivation.

We state the exact scope and limits of this verification at the outset:

  • Saouter’s ladder of about 250⋅106250 \cdot10^{6} rungs is not reverified; only the 100 values of Table 1 of [6] and the starting and ending primes (138412033 and 100000000209366024193) are checked in the Lean kernel.

  • The 25-rung route is a different ladder built on a larger even Goldbach input (4⋅10184 \cdot10^{18}, from Oliveira e Silva, Herzog, and Pardi [4]) and does not check Saouter’s computation.

  • In Saouter [6], the formula on page 865 reads N=5⋅223⋅k+1258213N = 5 \cdot2^{23} \cdot k + 1258213 as printed, and is read as N(k)=5⋅223⋅k+12582913N(k) = 5 \cdot2^{23} \cdot k + 12582913 with one digit 9 restored. The paper’s method, table, starting and ending primes, and result all stand.

kkaakkaa
2328305533325962829513
465661177334924588993
698491779537252895233
931322415739581201593
1164153045741909507653
1396983685344237813833
16298143171146566120253
1862644839548894426635
2095475355751222732973
2328305925753551039333
2561136565355879345153
2793967113558207651573
30267976895

Table 1. The 25 Proth prime rungs N=k⋅234+1N = k \cdot2^{34} + 1 and witness bases aa for Theorem E.

This note is for readers of Saouter’s paper and of later ladder computations, and for those who want the primality criterion in a form that a proof assistant accepts.

Saouter’s Method and Primality Criteria

In [6] (pages 863 to 866), Saouter verifies the odd Goldbach conjecture up to 102010^{20}. The method on page 863 reduces the ternary problem on bounded intervals to the binary problem via a chain of primes: if NN is odd, pp is prime, and N−pN-p is a sum of two primes, then N=p+(N−p)N = p + (N-p) is a sum of three primes. Given the even Goldbach verification up to 4⋅10114 \cdot10^{11} by Sinisalo [7], one exhibits a strictly increasing sequence of primes

p0<p1<⋯<pPp_0 < p_1 < \cdots< p_P

such that p0<4⋅1011p_0 < 4 \cdot10^{11}, each consecutive step satisfies pi+1−pi<4⋅1011p_{i+1} - p_i < 4 \cdot10^{11}, and pP>1020p_P > 10^{20}. With step size bounded by 4⋅10114 \cdot10^{11}, at least 250⋅106250 \cdot10^6 primes are needed to reach 102010^{20}.

To test primes rapidly at this scale without factoring N−1N - 1 in full, Saouter uses a special case of the primality criteria of Brillhart, Lehmer, and Selfridge [1]. We record the statements from page 864 of [6].

Lemma 1 (Saouter [6], page 864; from Theorem 5 of Brillhart, Lehmer, and Selfridge [1]). Let N=RF+1N = RF + 1 be odd with FF even, the factorization of FF known, and gcd⁡(R,F)=1\gcd(R,F) = 1. Suppose an integer aa satisfies

aN−1≡1(modN)andgcd⁡(a(N−1)/p−1,N)=1a^{N-1} \equiv1 \pmod{N} \quad\text{and} \quad\gcd\left(a^{(N-1)/p} - 1,N\right) = 1

for every prime pp dividing FF. Write R=2Fs+rR = 2Fs + r with 0≤r<2F0 \le r < 2F. If N<2F3N < 2F^3, then NN is prime if and only if s=0s = 0 or r2−8sr^2 - 8s is not a perfect square.

Specializing FF to a power of 2 eliminates all odd prime factors of FF and reduces the Lucas-type hypotheses to a single modular exponentiation:

Theorem 1 (Saouter [6], page 864). Let N=222R+1N = 2^{22}R + 1 with N<1020N < 10^{20} and RR odd, and suppose there is some integer aa with

a(N−1)/2≡−1(modN).a^{(N-1)/2} \equiv-1 \pmod{N}.

Write R=2⋅222s+rR = 2 \cdot2^{22}s + r with 0≤r<2⋅2220 \le r < 2 \cdot2^{22}. Then NN is prime if and only if s=0s = 0 or r2−8sr^2 - 8s is not a perfect square. The size condition of Lemma 1 holds since 2⋅(222)3>10202 \cdot(2^{22})^3 > 10^{20}.

To avoid searching for a base aa at each candidate, Saouter fixes a=5a = 5 by restricting the residue class of NN modulo 10:

Lemma 2 (Saouter [6], page 864). A prime NN of the form 10k+310k + 3 satisfies

5(N−1)/2≡−1(modN),5^{(N-1)/2} \equiv-1 \pmod{N},

by Euler’s criterion and quadratic reciprocity.

Theorem 2 (Saouter [6], page 864). Let N=222R+1N = 2^{22}R + 1 with N<1020N < 10^{20}, N≡3(mod10)N \equiv3 \pmod{10} and RR odd, and suppose 5(N−1)/2≡−1(modN)5^{(N-1)/2} \equiv-1 \pmod{N}. Write R=2⋅222s+rR = 2 \cdot2^{22}s + r with 0≤r<2⋅2220 \le r < 2 \cdot2^{22}. Then NN is prime if and only if s=0s = 0 or r2−8sr^2 - 8s is not a perfect square.

The ladder generation algorithm on page 864 of [6] proceeds as follows:

  1. Start at p0=138412033=33⋅222+1p_0 = 138412033 = 33 \cdot2^{22} + 1, which is the least prime satisfying both N=222R+1N = 2^{22}R + 1 (RR odd) and N≡3(mod10)N \equiv3 \pmod{10}.

  2. From the current prime rung, step up by 95360⋅22295360 \cdot2^{22}, which is the largest multiple of 10⋅22210 \cdot2^{22} below 4⋅10114 \cdot10^{11}.

  3. Test the candidate for primality using Theorem 2; on a composite candidate, step down by 10⋅22210 \cdot2^{22} repeatedly until a prime is reached.

In Section 4, page 865 of [6], the ending prime of the ladder is reported as

100000000209366024193100000000209366024193

and Table 1 gives the initial 100 values of the parameter kk for the ladder primes, where the formula on page 865 reads N=5⋅223⋅k+1258213N = 5 \cdot2^{23} \cdot k + 1258213.

Proposition A: The Formula Constant on Page 865

We begin by recording the arithmetic relationship between the formula as printed on page 865 and the candidate family defined on page 864.

Proposition A. Let

N(k)=5⋅223⋅k+12582913andN′(k)=5⋅223⋅k+1258213,N(k) = 5 \cdot2^{23} \cdot k + 12582913 \quad\text{and} \quad N'(k) = 5 \cdot2^{23} \cdot k + 1258213,

where N′(k)N'(k) is the formula as printed on page 865 of [6]. Then:

  1. Since 12582913=3⋅222+112582913 = 3 \cdot2^{22} + 1 and 5⋅223=10⋅2225 \cdot2^{23} = 10 \cdot2^{22}, we have

N(k)=222(10k+3)+1,N(k) = 2^{22}(10k + 3) + 1,

so N(k)≡3(mod10)N(k) \equiv3 \pmod{10} and the cofactor R=10k+3R = 10k + 3 is odd for every natural number kk.

(2) At k=3k = 3 and k=2384185796007k = 2384185796007, the formula N(k)N(k) gives

N(3)=138412033=33⋅222+1,N(3) = 138412033 = 33 \cdot2^{22} + 1,
N(2384185796007)=100000000209366024193=222⋅23841857960073+1,N(2384185796007) = 100000000209366024193 = 2^{22} \cdot23841857960073 + 1,

which are the starting and ending primes of [6], with 2384185796007323841857960073 odd.

(3) For the printed form N′(k)N'(k), evaluation at k=3k = 3 gives the composite number

N′(3)=127087333=19⋅6688807,N'(3) = 127087333 = 19 \cdot6688807,

N′(k) mod 222N'(k) \bmod2^{22} is never 11 for any natural number kk, and N(k)=N′(k)+11324700N(k) = N'(k) + 11324700.

(4) Every one of the 100 printed values of kk in Table 1 of [6] gives a prime N(k)N(k), with largest consecutive step 399968829440=95360⋅222399968829440 = 95360 \cdot2^{22} by script.

Proof. Since 222=41943042^{22} = 4194304, direct multiplication yields

3⋅222+1=3⋅4194304+1=12582912+1=12582913.3 \cdot2^{22} + 1 = 3 \cdot4194304 + 1 = 12582912 + 1 = 12582913.

Consequently, for any natural number kk,

N(k)=5⋅223⋅k+12582913=222(10k)+222⋅3+1=222(10k+3)+1.N(k) = 5 \cdot2^{23} \cdot k + 12582913 = 2^{22}(10k) + 2^{22} \cdot3 + 1 = 2^{22}(10k + 3) + 1.

Because 222=(24)5⋅22=6⋅4=24≡4(mod10)2^{22} = (2^4)^5 \cdot2^2 = 6 \cdot4 = 24 \equiv4 \pmod{10}, we have

N(k)≡4(10k+3)+1≡12+1≡3(mod10),N(k) \equiv4(10k + 3) + 1 \equiv12 + 1 \equiv3 \pmod{10},

and 10k+3=2(5k+1)+110k + 3 = 2(5k + 1) + 1 is odd.

Substituting k=3k = 3 into N(k)N(k) gives 10(3)+3=3310(3) + 3 = 33 and

N(3)=33⋅222+1=138412033.N(3) = 33 \cdot2^{22} + 1 = 138412033.

Substituting k=2384185796007k = 2384185796007 gives 10k+3=2384185796007310k + 3 = 23841857960073, which is odd, and

N(2384185796007)=222⋅23841857960073+1=100000000209366024193.N(2384185796007) = 2^{22} \cdot23841857960073 + 1 = 100000000209366024193.

In contrast, for N′(k)=5⋅223⋅k+1258213N'(k) = 5 \cdot2^{23} \cdot k + 1258213, the difference is constant:

N(k)−N′(k)=12582913−1258213=11324700.N(k) - N'(k) = 12582913 - 1258213 = 11324700.

Since 5⋅223⋅k=10k⋅2225 \cdot2^{23} \cdot k = 10k \cdot2^{22} is a multiple of 2222^{22}, we have N′(k)≡1258213(mod222)N'(k) \equiv1258213 \pmod{2^{22}}, which is never congruent to 1(mod222)1 \pmod{2^{22}} for any kk. At k=3k = 3, N′(3)=138412033−11324700=127087333=19⋅6688807N'(3) = 138412033 - 11324700 = 127087333 = 19 \cdot6688807. Finally, each of the 100 values N(k)N(k) for kk in Table 1 is checked prime in the Lean kernel via Theorem 2 (Table1Thm2.table1_prime_thm2), each consecutive step is below 4⋅10114 \cdot10^{11} (Table1.table1_gaps), and by script the largest consecutive step is 399968829440=95360⋅222399968829440 = 95360 \cdot2^{22}.

Thus the formula on page 865 is read with constant 12582913=3⋅222+112582913 = 3 \cdot2^{22} + 1, with one digit 9 restored; note that 12582913=7⋅179755912582913 = 7 \cdot1797559 is itself composite, as it is only the constant term N(0)N(0) corresponding to k=0k = 0 rather than a rung of the ladder (which starts at k=3k = 3). By script, 9 of the 100 values N′(k)N'(k) are prime, and a rerun of the paper’s algorithm starting from 138412033 reproduces Table 1 of [6] exactly. No other change to [6] is needed.

Formalization of the Primality Criteria in Lean

We now turn to the Lean formalization of Lemma 1, Theorems 1 and 2, Lemma 2, and the Table 1 checks. Note also that Lemma 8 of Ramaré and Saouter [5] restates Lemma 1 with the factor argument.

Theorem B (BLS.lemma1). Lemma 1 of § 2 holds for every even FF.

Proof. Let N=RF+1N = RF + 1 satisfy the hypotheses of Lemma 1. By Pocklington’s order argument applied to each prime power pe∥Fp^e \parallel F, the conditions aN−1≡1(modN)a^{N-1} \equiv1 \pmod N and gcd⁡(a(N−1)/p−1,N)=1\gcd(a^{(N-1)/p} - 1, N) = 1 imply that the multiplicative order of aa modulo any prime factor qq of NN is divisible by FF. By Fermat’s little theorem, F∣(q−1)F \mid(q - 1), which puts every prime factor qq of NN in the residue class 1(modF)1 \pmod F. Since products of integers congruent to 1(modF)1 \pmod F remain congruent to 1(modF)1 \pmod F, every positive divisor of NN is congruent to 1(modF)1 \pmod F. Moreover, since FF is even and gcd⁡(R,F)=1\gcd(R,F) = 1, RR must be odd; because R=2Fs+rR = 2Fs + r and 2Fs2Fs is even, the remainder rr is also odd. Suppose first that NN is composite. Then NN factors as a product of two integers above 1,

N=(uF+1)(vF+1)N=(uF+1)(vF+1)

with integers u,v≥1u,v\ge1. Expanding the product gives

RF+1=uvF2+(u+v)F+1,RF+1=uvF^2+(u+v)F+1,

and dividing by FF yields

R=uvF+u+v.R=uvF+u+v.

From the strict inequality uvF2<(uF+1)(vF+1)=N<2F3uvF^2<(uF+1)(vF+1)=N<2F^3, dividing by F2F^2 gives uv<2Fuv<2F. Since u,v≥1u,v\ge1, we have (u−1)(v−1)≥0(u-1)(v-1)\ge0, so

u+v≤uv+1≤2F.u+v\le uv+1\le2F.

Because RR is odd and FF is even, the term uvFuvF is even, whence u+v=R−uvFu+v=R-uvF is odd. Since 2F2F is even and u+vu+v is odd, the weak inequality u+v≤2Fu+v\le2F forces the strict inequality

u+v<2F.u+v<2F.

Furthermore, since u+vu+v is odd, one of u,vu,v is even and the other is odd, so their product uvuv is even. We may therefore write

R=2F(uv2)+(u+v)with0<u+v<2F.R=2F\left(\frac{uv}{2}\right)+(u+v)\quad\text{with}\quad0<u+v<2F.

By uniqueness of the quotient ss and remainder rr in Euclidean division of RR by 2F2F, we obtain

s=uv2≥1andr=u+v.s=\frac{uv}{2}\ge1\quad\text{and}\quad r=u+v.

Consequently,

r2−8s=(u+v)2−4uv=(u−v)2,r^2-8s=(u+v)^2-4uv=(u-v)^2,

which is a perfect square.

Conversely, suppose that s≥1s\ge1 and r2−8s=t2r^2-8s=t^2 for an integer t≥0t\ge0. Since rr is odd, r2r^2 is odd, so t2=r2−8st^2=r^2-8s is odd, which implies that tt is odd. Therefore r+tr+t and r−tr-t are both even, and

u=r+t2,v=r−t2u=\frac{r+t}{2},\qquad v=\frac{r-t}{2}

are integers satisfying

u+v=randuv=r2−t24=8s4=2s>0.u+v=r\quad\text{and}\quad uv=\frac{r^2-t^2}{4}=\frac{8s}{4}=2s>0.

Since uv=2s>0uv=2s>0 and u+v=r>0u+v=r>0, both uu and vv are strictly positive integers (u,v≥1)(u,v\ge1). Multiplying the factors uF+1>1uF+1>1 and vF+1>1vF+1>1 gives

(uF+1)(vF+1)=uvF2+(u+v)F+1=2sF2+rF+1=(2Fs+r)F+1=RF+1=N,(uF+1)(vF+1)=uvF^2+(u+v)F+1=2sF^2+rF+1=(2Fs+r)F+1=RF+1=N,

which shows that NN is composite. Thus NN is prime if and only if s=0s=0 or r2−8sr^2-8s is not a perfect square. □

Theorem C. Saouter’s Theorem 1 (for both a natural base and an integer base), Lemma 2, and Theorem 2 (in both directions) hold in Lean with no hypothesis; Lemma 2 shows that the hypothesis on 5 holds for every prime N≡3(mod10)N\equiv3\pmod{10}, so the test rejects no prime of this class, and the form Thm2.theorem2_if keeps the hypothesis on 5 and replaces N<1020N<10^{20} by N<2⋅(222)3N<2\cdot(2^{22})^3, for the direction from the square test to primality. The Lean names are Thm1.theorem1, Thm1.theorem1_int, Paper.lemma2, Thm2.theorem2, and Thm2.theorem2_if.*

Proof. Let F=222F=2^{22} and N=222R+1N=2^{22}R+1 with RR odd. Then gcd⁡(R,222)=1\gcd(R,2^{22})=1, and the only prime dividing FF is p=2p=2. From the congruence a(N−1)/2≡−1(modN)a^{(N-1)/2}\equiv-1\pmod N, squaring both sides yields the Fermat condition

aN−1≡1(modN).a^{N-1}\equiv1\pmod N.

Moreover, for the unique prime divisor p=2p=2 of FF, we have a(N−1)/2−1≡−2(modN)a^{(N-1)/2-1}\equiv-2\pmod N, so

gcd⁡(a(N−1)/2−1,N)=gcd⁡(−2,N)=1\gcd\left(a^{(N-1)/2}-1,N\right)=\gcd(-2,N)=1

because N=222R+1N=2^{22}R+1 is odd. The size threshold of Lemma 1 is

2F3=2⋅(222)3=267=147573952589676412928>1020,2F^3=2\cdot(2^{22})^3=2^{67}=147573952589676412928>10^{20},

so Lemma 1 applies directly to establish Theorem 1. For Lemma 2 (Paper.lemma2), if N=10k+3N = 10k + 3 is prime, then NN is odd and N≡3(mod5)N \equiv3 \pmod{5}. Since 5≡1(mod4)5 \equiv1 \pmod{4}, quadratic reciprocity and Euler’s criterion give

5(N−1)/2≡(5N)=(N5)=(35)=−1(modN).5^{(N-1)/2} \equiv\left(\frac{5}{N}\right) = \left(\frac{N}{5}\right) = \left(\frac{3}{5}\right) = -1 \pmod{N}.

Theorem 2 is Theorem 1 at a=5a = 5. Lemma 2 shows that the hypothesis on 5 holds for every prime N≡3(mod10)N \equiv3 \pmod{10}, so the test rejects no prime of this class. The form Thm2.theorem2_if keeps the hypothesis on 5 and replaces N<1020N < 10^{20} by N<2⋅(222)3N < 2 \cdot(2^{22})^3, for the direction from the square test to primality. □

Deviation and Range Remark on the Final Prime. We record one point regarding the range of Theorem 2 as stated on page 864 of [6]. The ending prime of Saouter’s ladder is

N=100000000209366024193>1020,N = 100000000209366024193 > 10^{20},

so it lies outside the range N<1020N < 10^{20} stated in Theorem 2, as it must in order for the ladder to cross 102010^{20}. However, it lies well below the Lemma 1 bound

2⋅(222)3=267=147573952589676412928,2 \cdot(2^{22})^3 = 2^{67} = 147573952589676412928,

so the primality criterion still applies. In Lean, Thm2.last_prime uses the wider form Thm2.theorem2_if with hypothesis N<2⋅(222)3N < 2 \cdot(2^{22})^3. Specifically, for N=100000000209366024193N = 100000000209366024193, the parameters are

R=23841857960073,R = 23841857960073,
s=2842170,s = 2842170,
r=7960713,r = 7960713,
r2−8s=63372928731009,r^2 - 8s = 63372928731009,

and r2−8s=63372928731009r^2 - 8s = 63372928731009 is not a square since it lies strictly between 796071127960711^2 and 796071227960712^2.

Theorem D. All 100 rungs N(k)N(k) from Table 1 of [6], together with the starting prime 138412033 and the ending prime 100000000209366024193, are checked prime in the Lean kernel by the criterion of Theorem 2 using one modular power each. Among the 100 rungs of Table 1, 11 have s=1s = 1 and the rest have s=0s = 0, by script. The 100 Table 1 rungs begin at 138412033, are strictly rising, and have every consecutive step strictly below 4⋅10114 \cdot10^{11}, with largest step 399968829440 = 95360 · 2222^{22} by script. The Lean names are Table1Thm2.table1_prime_thm2, Thm2.first_prime, Thm2.last_prime, Table1.table1_head, and Table1.table1_gaps.

Proof. Each rung is checked in the Lean kernel via decide +kernel applied to Theorem 2 (Table1Thm2.table1_prime_thm2, Thm2.first_prime, and Thm2.last_prime), and the ordering and step bounds on the 100 rungs are checked directly in Table1.table1_head and Table1.table1_gaps. □

The 25-Rung Proth Ladder to 102010^{20}

Separately from the verification of Saouter’s criteria and Table 1, we construct a 25-rung ladder of Proth primes that derives the ternary Goldbach range up to 102010^{20} from the published even Goldbach range 4⋅10184 \cdot10^{18}.

Theorem E. Assuming every even integer from 4 to 4⋅10184 \cdot10^{18} is a sum of two primes, every odd integer from 7 to 102010^{20} is a sum of three primes. The Lean statement ProthLadder.ternaryGoldbachUpTo_1e20_of_even proves EvenGoldbachUpTo (4 * 10^18) → TernaryGoldbachUpTo (10^20), where the hypothesis EvenGoldbachUpTo (4 * 10^18) is passed as an explicit argument, never declared as an axiom, and it is not proved here.

Proof. We check the ladder primes by Proth’s theorem (Proth.proth): if 0<k<2m+10 < k < 2^{m+1}, N=k⋅2m+1+1N = k \cdot2^{m+1} + 1, and there is a natural number aa such that

ak⋅2m≡−1(modN),a^{k \cdot2^m} \equiv-1 \pmod{N},

then NN is prime.

We take m+1=34m + 1 = 34, so each of the 25 rungs has the form

N=k⋅234+1N = k \cdot2^{34} + 1

with 0<k<2340 < k < 2^{34} and witness base aa as listed in Table 1. The starting rung in Table 1 is

3999998442578378753=232830553⋅234+1,(1)3999998442578378753 = 232830553 \cdot2^{34} + 1, \tag*{(1)}

and the ending rung is

99999983948045221889=5820765157⋅234+1.99999983948045221889 = 5820765157 \cdot2^{34} + 1.

Let B=4⋅1018B = 4 \cdot10^{18}. In Lean, the chain relation (Ladder.Step2, checked for our sequence in ProthLadder.rungs_chain) checks that, starting from 3 followed by the 25 rungs, each step strictly rises and has difference at most B−2B - 2, with largest step

3999999971586736128.3999999971586736128.

The reach lemma (ProthLadder.rungs_reach) checks that the ending rung plus B=4⋅1018B = 4 \cdot10^{18} satisfies

99999983948045221889+4⋅1018=103999983948045221889≥1020.99999983948045221889 + 4 \cdot10^{18} = 103999983948045221889 \ge10^{20}.

The single-interval covering step (Ladder.ternary_step) establishes that if pp is an odd prime, nn is odd, and

p+4≤n≤p+B,p + 4 \le n \le p + B,

then n−pn-p is even and satisfies 4≤n−p≤B4 \le n-p \le B; by EvenGoldbachUpTo BB, n−pn-p is a sum of two primes, so n=p+(n−p)n=p+(n-p) is a sum of three primes. Since each consecutive step in the chain is at most B−2B-2, and since BB is even and pp is odd, p+Bp+B is odd, and p′+4≤p+B+2p' + 4 \le p+B+2, so the odd integers covered from p′p' continue directly after those covered from pp. Induction along the chain (Ladder.ternary_of_ladder2), starting at p=3p=3 (which covers odd nn from 3+4=73+4=7 to 3+B3+B), therefore covers every odd integer nn from 7 to 102010^{20}. □

Sanity Instance and Rung Count Comparison. To confirm that the definitions and ladder induction have no hidden vacuity, the formalization includes a sanity instance with no hypothesis (ProthLadder.ternaryGoldbachUpTo_293_vacuity): applying the exact same ladder lemma with B=100B=100 and prime rungs 97 and 193, where ProthLadder.evenGoldbachUpTo_100 is proved directly in the kernel, yields TernaryGoldbachUpTo 293 with nothing assumed.

The rung count comparison (with the second quotient in Paper.rung_count) is:

10204⋅1018=25,\frac{10^{20}}{4 \cdot10^{18}} = 25,

against

10204⋅1011=250⋅106\frac{10^{20}}{4 \cdot10^{11}} = 250 \cdot10^{6}

in Saouter [6].

This saving comes entirely from the larger even Goldbach input 4⋅10184 \cdot10^{18}, which is the published computation of Oliveira e Silva, Herzog, and Pardi [4], and not from any new idea. The ladder structure is Saouter's [6] and the use of Proth primes is that of Helfgott and Platt [3], § 3.

Cited Input, Verification Status, and Data Availability

Differences from the source

We list the differences between the Lean formalization and [6]:

  • (a) the constant on page 865, read as in Proposition A;

  • (b) the last prime, as in the remark on the final prime;

  • (c) Lean states the base as a natural number and as an integer, the paper as an integer;

  • (d) the 25 rung ladder starts at 3 and uses steps at most B−2B - 2, the paper starts at p0p_0 and asks steps below 4⋅10114 \cdot10^{11};

  • (e) Lemma 2 is stated in ZMod p.

The Section 3 sentence “No other change” means no other change to the formula. In addition, in Lean ss and rr are the natural number quotient and remainder of RR by 2F2F; (N−1)/2(N - 1)/2 is natural division of 222R2^{22}R by 2, exact since 222R2^{22}R is even; IsSquare is taken over the integers, so a negative r2−8sr^2 - 8s is not a square, matching “not a perfect square”; and the case F=0F = 0 of BLS.lemma1 is empty since N<2F3N < 2F^3 does not hold.

Input Table

There is one cited input in Theorem E, and none elsewhere in this note. Table 2 records its bibliographic details, printed wording, normalization, and Lean representation. It is a computation, cited as such and never stated as proved.

FieldSpecification
SourceT. Oliveira e Silva, S. Herzog, and S. Pardi [4], Empirical verification of the even Goldbach conjecture and computation of prime gaps up to 4⋅10184 \cdot10^{18}, Math. Comp. 83, no. 288, 2014, 2033 to 2060.
Printed statementAbstract, page 2033: the conjecture is “confirmed to be true for all even numbers not larger than 4⋅10184 \cdot10^{18}”.
NormalizationInclusive at 4⋅10184 \cdot10^{18}, for all even integers nn with n≥4n \ge4.
Lean formEvenGoldbachUpTo N, defined as: for all nn, Even n, 4≤n4 \le n, n≤Nn \le N, IsGoldbachSum n, instantiated at N=4∗1018N = 4 * 10 ^ 18.
Role in LeanExplicit hypothesis in ProthLadder.ternaryGoldbachUpTo_1e20_of_even; never an axiom.

Table 2. External cited input used in Theorem E (and nowhere else).

Verification Status Table

Every claim in this note is classified into one of four categories: Kernel (checked by the Lean 4 kernel), Script (checked by external script and not used in any Lean proof), Hand (a statement checked by hand in this note and not in Lean), or Cited (external published computation). Table 3 gives the mapping.

Claim or ComponentLean Module / Identifier or ReferenceStatus
Proposition A: identities for N(k)N(k) and N′(k)N'(k), N(3)=138412033N(3) = 138412033, N(2384185796007)=100000000209366024193N(2384185796007) = 100000000209366024193, that N′(3)N'(3) is composite, N′(k) mod 222≠1N'(k) \bmod2^{22} \ne1, N(k)−N′(k)=11324700N(k) - N'(k) = 11324700Paper.Table1.printed_three_compositeKernel
Proposition A: leastness of p0=138412033p_0 = 138412033 (text, not used in proofs); count that 9 of 100 values N′(k)N'(k) are prime; rerun of Saouter’s algorithm from 138412033 reproducing Table 1; largest Table 1 step 399968829440=95360⋅222399968829440 = 95360 \cdot2^{22}; count that 11 of the 100 Table 1 rungs have s=1s = 1External check scriptsScript
Theorem B: Saouter’s Lemma 1 for every even FFBLS.lemma1Kernel
Theorem C: Saouter’s Theorem 1 (natural and integer base), Lemma 2, and Theorem 2 (both directions and N<2⋅(222)3N < 2 \cdot(2^{22})^3 form)Thm1.theorem1, Thm1.theorem1_int, Paper.lemma2, Thm2.theorem2, Thm2.theorem2_ifKernel
Theorem D: primality of all 100 Table 1 rungs, starting prime 138412033, and ending prime 100000000209366024193; ordering and step bound below 4⋅10114 \cdot10^{11}Table1Thm2.table1_prime_thm2, Thm2.first_prime, Thm2.last_prime, Table1.table1_head, Table1.table1_gapsKernel
Theorem E: implication from EvenGoldbachUpTo (4 * 10 ^ 18) to TernaryGoldbachUpTo (10 ^ 20), Proth criterion, 25 rungs, chain, reach, ladder step, induction, sanity check to 293, and 1020/(4⋅1011)=250⋅10610^{20}/(4 \cdot10^{11}) = 250 \cdot10^6ProthLadder.ternaryGoldbachUpTo_1e20_of_even, Proth.proth, Ladder.Step2, ProthLadder.rungs_chain, ProthLadder.rungs_reach, Ladder.ternary_step, Ladder.ternary_of_ladder2, ProthLadder.ternaryGoldbachUpTo_293_vacuity, ProthLadder.evenGoldbachUpTo_100, Paper.rung_countKernel
12582913=7⋅179755912582913 = 7 \cdot1797559, by multiplication; N′(3)=19⋅6688807N'(3) = 19 \cdot6688807; 1020/(4⋅1018)=2510^{20}/(4 \cdot10^{18}) = 25Checked by hand in this noteHand
Even Goldbach verification up to 4⋅10184 \cdot10^{18} (hypothesis of Theorem E)Oliveira e Silva, Herzog, and Pardi [4]Cited
Saouter’s full ladder of about 250⋅106250 \cdot10^6 rungs (with Sinisalo’s 4⋅10114 \cdot10^{11} input [7]); Helfgott and Platt’s verification to 8.875⋅10308.875 \cdot10^{30} [3]; Helfgott’s ternary Goldbach theorem [2][6], [7], [3], [2] (not reverified)Cited

Table 3. Verification status of all claims and components (categories: Kernel, Script, Hand, Cited).

The proofs printed in this note are written for the reader; the Lean proofs are the check.

Data Availability and Build Reproduction

All Lean names in this note are under the namespace GoldbachLean.Saouter1998. The Lean 4 formalization is publicly available under the Apache-2.0 license:

  • Repository: https://github.com/sthubbar/goldbach-lean

  • Folder: entries/saouter1998

  • Full commit hash: 39d1ce6db8b634233ed29c2aa3e3dcf1218400dc

  • Palomar Registry listing: PALOMAR-2026-11-02-000012 version 1, available at https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-02-000012&version=1 (note that Palomar is a listing and not peer review).

  • Toolchain: Lean and Mathlib v4.35.0-rc3.

  • Build instruction: Running lake build inside entries/saouter1998 completes in 57 s in a cloud build with cached Mathlib.

  • Audit file and foundations: All main statements are collected and compared in ChallengeSaouter1998.lean, which exports 19 theorems. The proofs depend only on the Lean axioms propext, Classical.choice, and Quot.sound. Every finite primality and arithmetic check uses decide +kernel and never native_decide; each rung verification costs one modular power on numbers below 2672^{67}.

Steve Hubbard designed the research program and directed this work. AI tools, Claude, Codex, Gemini and Antigravity, were used to write the Lean code and draft the text. AI agents also did the checks of the Lean against the source, and no human expert has reviewed the mathematics. The author takes full responsibility for the content.

References

  1. [1]J. Brillhart, D. H. Lehmer, and J. L. Selfridge, New primality criteria and factorizations of 2^m+1, Math. Comp. 29 (1975), no. 130, 620–647.DOI
  2. [2]H. A. Helfgott, The ternary Goldbach conjecture is true, arXiv:1312.7748, 2013.arxiv.org/abs/1312.7748
  3. [3]H. A. Helfgott and D. J. Platt, Numerical verification of the ternary Goldbach conjecture up to 8.875 · 10^30, Exp. Math. 22 (2013), 406–409.
  4. [4]T. Oliveira e Silva, S. Herzog, and S. Pardi, Empirical verification of the even Goldbach conjecture and computation of prime gaps up to 4 · 10^18, Math. Comp. 83 (2014), no. 288, 2033–2060.
  5. [5]O. Ramaré and Y. Saouter, Short effective intervals containing primes, J. Number Theory 98 (2003), 10–33.DOI
  6. [6]Y. Saouter, Checking the odd Goldbach conjecture up to 10^20, Math. Comp. 67 (1998), no. 222, 863–866, doi:10.1090/S0025-5718-98-00928-4.
  7. [7]M. K. Sinisalo, Checking the Goldbach conjecture up to 4 · 10^11, Math. Comp. 61 (1993), no. 204, 931–934.DOI

Paper details

vlnc:W_cjrsnjxr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 30

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents