Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

refactor(NavierStokes/Generic): fold 12 small modules into the files that import them #667
Open
Some checks haven’t completed yet
challenge Program · challenge files and build config
Details
build Program · lake build and Comparator
The site’s maintainer has yet to read this pull request
This branch has no conflicts with the base branch
This pull request changes the project’s rules
Part of #14.
Folds 12 small modules of the family
NavierStokes/Generic*into the files that import them. Each of these modules is imported by exactly one file of the same family and folder once the family's chains are collapsed from the leaf up, so the two were always used together; on mainGenericSolenoidalRealization.leanhas two importers,GenericAngularRecovery.leanandGenericVelocityRates.lean, and both are folded intoGenericSummationRealization.leanas well. Each module's text moves into its file unchanged, under a heading that names where it came from and in asectionof its own (the scopes the module left open at its end are closed there, as Lean would have closed them at its end), and the file takes over its imports. No statement, no proof and no docstring changes:python3 -I docs/s5-folding/fold.py check . <plan.json>makes every changed file again from main's text and compares byte for byte (the tool and this series' pages come with this pull request, indocs/s5-folding).NavierStokes/GenericSummationRealization.leanGenericDiagonalSchedule.lean(26),GenericRealization.lean(52),GenericSolenoidalRealization.lean(23),GenericVelocityRates.lean(24),GenericTupleRealization.lean(77),GenericAngularRecovery.lean(62),GenericFactorSupport.lean(38),GenericTupleSupport.lean(24)NavierStokes/GenericSupportLocalSummation.leanGenericSupportLocalCoefficients.lean(26)NavierStokes/GenericSupportedPolynomial.leanGenericJetRateAlgebra.lean(16),GenericDifferentialPolynomial.lean(57),GenericRealizationBounds.lean(31)"Before" is the file and the modules it takes in, counted one by one on main; "after" is the one file. The number in brackets is a module's length in lines.
Read top to bottom, none of the three files reads worse folded than the two did apart: the three hosts were themselves bare namespace stubs on main, so the folded text is what gives them content, and the
## From ...headings and thesectionbounds keep each module'sopenandvariablescope.Why it is cheaper. Before
leanreads a module's first line it loads everything the module imports. The cheapest modules of this tree cost about 4 G with next to nothing in them, and that is paid once a module. A module folded into its only importer no longer pays it; nothing else about its text changes.The rule. A module is folded when exactly one file of the repository imports it (chains collapse from the leaf up, so a module whose two importers are both folded into the same file qualifies), that file is in the same folder and family, the module has at most 200 lines, the file stays within 600 lines after taking it, and neither states results (no file with
Comparator,Solution,Theorem,PaperResult,ResultsorStatementin its name is touched).How this was measured. The count is instructions retired in user space by
leanelaborating one file alone, on one thread, with synchronous elaboration (lean -j1 -DElab.async=falseand the lakefile's options, underperf stat -e instructions:u), against the compiled tree of main atba4a037(before) and against the compiled tree of the same commit with all 582 folds of this series (after), on one machine, one run after the other. G is 10⁹ instructions, T is 10¹². It is a count, not a time. The three files above are this pull request; the series' whole tree is 54.73 T over 2,587 files before and 50.94 T over 2,005 files after (−6.9%), and none of the other folds is in this pull request.Where the kind of change comes from. Lean Pool's copy of this proof (https://github.com/LeanPool/lean-pool, Vasily Ilin's pull requests 405 and 570) has fewer modules and trimmed imports, and its benchmark found the gain there. Which modules fold here was computed on this tree, from its own import graph; it is not a copy of Lean Pool's merges, whose tree started from another commit. Treant's
mergestage (TitiSkywalker/NavierStokesAndEuler) did the same to 13 thin wrappers.What it does not show: the wall-clock time of a build; that the files are now in their best shape for reading (P-8 splits the large ones; nothing here grows past 600 lines). Older notes under
routes/that name a folded file are left as they were written.This is the first pull request of a series, one family per pull request:
docs/s5-folding/README.mdlists the 582 folds by family. As S-5 asks, the others are not opened until the maintainer has said, on this one, whether the kind is wanted.