Zulip Chat Archive
Stream: PrimeNumberTheorem+
Topic: New subproject: Odd goldbach for small n
Terence Tao (Feb 14 2026 at 18:56):
Started a quick application of the primes in short intervals machinery already in PNT+: by a standard argument, once one knows some theorems about primes in short intervals, one can bootstrap numerical verification of the even Goldbach conjecture (all even numbers greater than 2 are the sum of two primes) to numerical verification of the odd Goldbach conjecture (all odd numbers greater than 5 are the sum of three primes). For instance, Ramare and Saouter used a verification of Richter of the even Goldbach conjecture up to , together with a short interval theorem, to conclude verification of the odd Goldbach conjecture up to . I have some initial tasks for this at PNT#959 PNT#960 PNT#961 PNT#962 and will add a few more later. (EDIT: this is now done: PNT#769 PNT#770)
Harald Helfgott (Feb 15 2026 at 19:29):
The alternative would be to construct a prime-number ladder (as we did in Helfgott-Platt; this is an old strategy). It was a weekend computation on a Mac Mini sitting on my bedroom desk, even back in 2013, so I don't necessarily think that would be unrealistic to formalize.
Terence Tao (Feb 15 2026 at 20:13):
Hmm, suppose for instance we used the even Goldbach verification up to and wanted to use a ladder to verify up to, say, . Then one would need a ladder of about primes of size , and to verify the ladder one needs to check that they are all prime (and that they are spaced by less than . The spacing seems doable within Lean, but I'm not sure that Lean's primality testing algorithms are sufficient for this task (even if using native_decide). These are the sort of inputs though that I am happy to trust rigorous code (e.g., using interval arithmetic to handle any real numbers that show up) to handle rather than Lean.
Johan Commelin (Feb 16 2026 at 07:26):
What are the primality certificates typically used at such a scale?
Kevin Buzzard (Feb 16 2026 at 10:01):
I've seen @Bhavik Mehta proving numbers are prime in Lean in that range using Pratt certificates IIRC (in a talk at Imperial). Bhavik have I remembered correctly?
Bhavik Mehta (Feb 16 2026 at 10:05):
Yeah, for numbers up to 50 digits Pratt certificates work great. Kenny extended my work to use Pocklington certificates (in https://github.com/b-mehta/PrimeCert) so it now comfortably handles 70 digit primes.
The (slower) Pratt certificate code is what I used for the LCM highly abundant ladder (here: #PrimeNumberTheorem+ > Explicit estimates: $$M(x)$$, $$\psi(x)$$ @ 💬) which is a chain of primes up to , and it's reasonably efficient. And (as people who know me well will know) none of this uses native_decide.
Bhavik Mehta (Feb 16 2026 at 10:08):
I don't have an estimate off the top of my head on how fast a ladder of primes of 30 digits would take to verify. But a computation which took under 48 hours on 2013 seems like it should be reasonable to verify in under 48 hours today. I'm on vacation this week, but I can take a look next week.
Harald Helfgott (Feb 16 2026 at 15:46):
What Platt and I did was use Proth primes, which are easy to certify.
Bhavik Mehta (Feb 16 2026 at 15:53):
Ah right, the code should already be pretty efficient for those: I think I did a 400 or so digit example a while ago
Terence Tao (Feb 16 2026 at 15:59):
But one would still need to include a list of 10^{12} primes somewhere in the Lean files, unless one uses the IO functions, right? This feels a bit too risky to have in the main project, both for build time and for security reasons, but perhaps it would be fine to have in a completely separate Lean repository. (Harald, I don't know if you have saved the file of primes from your 2013 work with Platt, but presumably with modern computers (and AI) one should be able to regenerate a comparable list relatively quickly.)
Harald Helfgott (Feb 16 2026 at 19:15):
Hm, I may have access to the backup drive of that ancient Mac Mini in early March, but I can ask Platt. (Each of us wrote a program and ran it separately.) I don't think I kept a list of the primes - that would have been too much memory.
Harald Helfgott (Feb 16 2026 at 19:18):
I'm sure I still have the code somewhere.
Harald Helfgott (Feb 16 2026 at 19:28):
Found my code. Right, I'm definitely not storing the list.
Johan Commelin (Feb 16 2026 at 20:03):
Yeah, that would be ~40 TB, right? Sounds a bit too large for a random Lean file :see_no_evil:
J. J. Issai (project started by GRP) (Feb 16 2026 at 20:16):
So store differences between consecutive list members. That should get it down easily to under ~30 TB.
Harald Helfgott (Feb 17 2026 at 07:26):
Excuse my ignorance, but why would a proof by brute force via Lean have to store all the primes in the file? Is it because that would necessarily be part of some sort of certificate? I would have thought the code would need to typecheck once and do the computation as part of that process, but not store all of the primes.
This feels like a newbie question, but also one that will help me understand something about Lean I haven't yet understood.
Johan Commelin (Feb 17 2026 at 07:27):
It's not necessary, and indeed probably not a good idea.
It's a tradeoff between time and memory. Computing the primes on the fly will be more work but will save a lot on space.
Harald Helfgott (Feb 17 2026 at 07:51):
Then don't do it. It's not like computing zeros of zeta(s), where the zeros themselves will be useful for a ton of other things. This isn't a large computation by any stretch of the imagination - and at any rate, having a ladder up to 10^27 (probably a lot less than that, once I am done improving certain things...) will be enough. If that feels like too small a task, then compute a ladder up to 10^27 with smaller gaps. It's the verification of binary Goldbach up to 4*10^18 that is genuinely a large computation.
Terence Tao (Feb 17 2026 at 16:18):
Ah, right, the statement one would be typechecking does not have to retain the proof (thanks to propositional extensionality) and so one does not need to keep the primes around as a certificate.
It may be premature to actually implement any of this in some lean repository now, but it could be an interesting intellectual exercise to estimate what type of time/memory requirements would be needed to hypothetically verify in Lean that for every (say), there exists a prime between and .
Harald Helfgott (Feb 17 2026 at 20:34):
Not to repeat myself, but, as I just implied, it would make perhaps more sense to estimate up to which point it would be realistic to verify binary Goldbach in Lean (, say?) and then see what type of requirements would be needed to verify that for every or there exists a prime between and .
Terence Tao (Feb 17 2026 at 21:37):
I would imagine the former task scales essentially linearly in and the latter task scales essentially inversely in , so the geometric mean between the run time for these two tasks (for a reasonable choice of ) would be a good proxy for the total optimized run time.
On the other hand I would imagine that the modern explicit prime number theorems at medium ranges would already handle the latter task without any further numerics, in the spirit of the Kadiri-Lumley paper.
Harald Helfgott (Feb 17 2026 at 21:50):
Agreed on the scaling. On the second matter: the best explicit prime number theorems will give you the existence of primes between and when or so, where is the height up to which you have verified RH. (You get from Chirre-Helfgott off-the-shelf, but perhaps one can lop off that .) The uncertainty principle pays us a visit again.
Of course then the question is up to where is it realistic to verify RH by formal means nowadays, bearing in mind that that's something in which it is worthwhile to sink resources, compared to a special-purpose computation.
Last updated: Feb 28 2026 at 14:05 UTC