Zulip Chat Archive
Stream: PrimeNumberTheorem+
Topic: Diophantine approximation (or: a formalization surprise)
Harald Helfgott (Jan 18 2026 at 14:34):
Hi all,
Just wanted to report another success for Aristotle.
Last night, I asked it to formalize the first two lemmas in Part I of my ternary Goldbach book draft. The first lemma is just Dirichlet's Diophantine approximation theorem, with real; mathlib already has a very close variant. The second lemma is the more interesting one, in that it is not in mathlib, or elsewhere in the literature: it states that, given a Diophantine approximation to a real with error , you can find another valid approximation such that lies in a prescribed dyadic range depending on .
Harald Helfgott (Jan 18 2026 at 14:43):
I tried two approaches:
-
I gave Aristotle essentially the LaTeX for the section essentially verbatim (just removing commentary and citations). This is
diophapprox.txt. I'm also including a version
diophapprox.tex with commentary and citations edited back in, and formatted so that they do not depend on a bibliography file. This was really something I was doing late at night, almost for a lark. -
Then I rewrote the txt file so as to make it something closer to a blueprint, indicating to Aristotle that there was something equivalent to the first lemma in Mathlib, and also breaking down the second lemma into several lemmatia. This is
diophapprox_purple2.txt.
Guess what: Aristotle proved both versions within about an hour.
Here are the generated .lean files:
diophapprox-output.lean
diophapprox_purple2-output.lean
They type-check, and, as far as I can tell, the statements do correspond to what was asked; I'd be very happy if others could double-check.
If this holds up, I think the second lemma (Lemma 2.2 in the book draft) would be a good candidate to add to the blueprint tree (or forest).
Terence Tao (Jan 18 2026 at 17:01):
Just for the record, if one wants to add a new Lean file (containing blueprint tags) to the project as a PR, one has to do the following
- Make sure
Architectis imported, either directly or indirectly, in the Lean file - Add the Lean file as an import to the top-level lean file
PrimeNumberTheoremAnd.lean - Also add the Lean file as an
\inputleanmodule{}somewhere inblueprint.tex - Format the Lean and LaTeX using the
blueprint_commentand@blueprint[]functions (one can look at other Lean files in the repository for examples. - If there are references, update
references.bibin the blueprint directory accordingly. - If new LaTeX macros are introduced, update the initial part of `blueprint.tex' accordingly.
(I'll go ahead and add these notes to CONTRIBUTING.md.)
Pietro Monticone (Jan 18 2026 at 17:03):
Yes, precisely.
Harald Helfgott (Jan 18 2026 at 17:18):
Thanks, Terry. What does adding the notes to CONTRIBUTING.md do? Does it incorporate them to the blueprint tree?
Terence Tao (Jan 18 2026 at 17:20):
No; CONTRIBUTING.md is our guide to contributors for how to make contributions to the Github repository (this is a standard component of many open source projects run on Github).
Harald Helfgott (Jan 18 2026 at 17:21):
Ah, OK. So, if I follow these instructions, the blueprint will be incorporated to the blueprint tree? Surely one should specify where it is to be added?
Terence Tao (Jan 18 2026 at 17:22):
You can choose where in blueprint.tex you will import the Lean file; this will determine the placement of the file in the current blueprint tree. I'll update the instructions in CONTRIBUTING.md to reflect this.
Last updated: Feb 28 2026 at 14:05 UTC