Press "Enter" to skip to content

Automatic formalization of a full paper in Lean

Lean formal dependency graph
Lean formal dependency graph

I have just conducted the automatic formalization in Lean of all my Ginibre Poincaré paper arXiv:2608.19358v2 using Codex CLI. Coverage concerns the asserted mathematical results, on the domains specified in the mathematical paper. It does not include certification of the numerical experiments or a separate formalization of every alternative proof. It took hours and the Lean code is relatively big in total because the paper involves functional analysis, stochastic calculus, and complex analysis, among other things. In particular, the formalization encompasses complex Hermite polynomials as well as the optimal Gaussian logarithmic Sobolev inequality, proved from the two-point space by tensorization and the binomial central limit theorem. Most of the formalization was done with Codex CLI, but I have also played successfully with Leanstral. What is really important is to ask Codex explicitly to use agents for the full formalization, and to use the standards of Palomar. The full development passes the project build and axiom audits. Theorem 1.1, including its equality classification, additionally passes Comparator and the three configured kernels. Palomar registration is a separate step.

Source scopeFiles/modulesPhysical lines
Active project Lean sources, including roots and generated facades1,315142,364
Transitively imported Mathlib3,7941,251,826
Project plus imported Mathlib5,1091,394,190

Counts include comments and blank lines. Imported Mathlib modules are counted once in full, these are source-module counts, not the size of a minimal proof-dependency closure.

Note. A large automatic Lean formalization is the one of the Fermat Last Theorem : about 13 million lines, more than 5 times the size of Mathlib. It seems that the automatic formalization of the $\theta(p_c)=0$ conjecture for bond percolation on $\mathbb{Z}^d$, $d\geq2$, takes "only" about 100,000 lines.

Lean Logo

Further reading.

    Leave a Reply

    Your email address will not be published.

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Syntax · Style · .