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

| 1 | # Lean image |
| 2 | |
| 3 | `lean.Dockerfile` builds the image the navier-stokes build check runs in. Tag: |
| 4 | |
| 5 | ``` |
| 6 | shoal-ns-lean:f9e8bc5b |
| 7 | ``` |
| 8 | |
| 9 | `scienceslack.json` refers to this exact name. |
| 10 | |
| 11 | ## Build |
| 12 | |
| 13 | On the machine whose runner will use it, from a checkout of the project's main (the context is that checkout: its |
| 14 | tree goes into the image as the check's commits will be): |
| 15 | |
| 16 | ```bash |
| 17 | sh docker/build.sh <checkout of the project's main> shoal-ns-lean:f9e8bc5b |
| 18 | # on the Beijing host, on given cores: |
| 19 | MIRRORS=cn CPUSET=32-63 sh docker/build.sh <checkout of the project's main> shoal-ns-lean:f9e8bc5b |
| 20 | ``` |
| 21 | |
| 22 | `build.sh` does it in two steps, so that a failure late in the compile loses nothing. First `docker build` of |
| 23 | `lean.Dockerfile` (tag `shoal-ns-lean:f9e8bc5b-base`): the tools, the toolchain, each package of `lake-manifest.json` fetched as the |
| 24 | one commit it is pinned at, Mathlib's cache, and the tree. Then `lake build` in a container with no network; when it |
| 25 | ends, `.lake/build` is given to `nobody` (the check builds a commit in place on top of it, `"in_place"` in |
| 26 | `checks/build.json`) and the container is committed as `shoal-ns-lean:f9e8bc5b`. If either step stops, run the same command again: the |
| 27 | layers already built are kept, and the container goes on from what Lake had compiled. |
| 28 | |
| 29 | The build needs the network (GitHub, the Lean release downloads, Go and Rust or their mirrors, the Mathlib cache). |
| 30 | Nothing is published: the runner that runs the check must have the image locally. |
| 31 | |
| 32 | **Built on the production host, 12-02** (cores 32-63, `MIRRORS=cn`): `shoal-ns-lean:f9e8bc5b`, image id |
| 33 | `656a504fbf49`, 23.5 GB (`-base` 15.3 GB). The long step compiled 11,411 jobs in 18.5 min; `.lake/build` is 6.9 GB, |
| 34 | `nobody`'s. That image predates the line in `build.sh` that also builds every `lean_lib`; here the default targets are |
| 35 | all three libraries, so nothing is missing. What a check costs on it: `checks/build.sbatch`'s comment. |
| 36 | |
| 37 | ## What is in it |
| 38 | |
| 39 | - `/opt/elan`: elan with the upstream's toolchain installed and set as the default, so `lake` works offline. |
| 40 | - `/opt/proof`: the upstream at its pinned commit, with `.lake` fully built (dependencies, their oleans and the project's own). `PROOF_BASE=/opt/proof`. |
| 41 | - On `PATH`: `lake`, `lean`, `comparator`, `lean4export`, `landrun`, `nanoda_bin`; also `python3`, `git`, `curl`, `zstd` and a C toolchain. |
| 42 | |
| 43 | ## How the check uses it |
| 44 | |
| 45 | `checks/build.py` (`scripts/lean-ci/README.md`) with `"in_place": true` and the standalone Comparator: the approved |
| 46 | challenges are built and exported as root, the commit is built as `nobody` in the image's own `.lake/build` (Lake |
| 47 | recompiles only what the commit changed), its two solution modules are exported, and `comparator` judges each pair of |
| 48 | exports with nanoda and Lean's kernel, `landrun` replaced by a stand-in that serves the exports. |
| 49 | |
| 50 | ## Pins |
| 51 | |
| 52 | All pins are full commit hashes in `ARG`s at the top of `lean.Dockerfile`. After each clone the build checks `git rev-parse HEAD` against its pin and fails otherwise. |
| 53 | |
| 54 | | ARG | Value | Source | |
| 55 | | --- | --- | --- | |
| 56 | | `UPSTREAM_COMMIT` | `f9e8bc5b38b6e212696e8a30e3e91517af887bbd` | openai/NavierStokesAndEuler, `upstream.json` | |
| 57 | | `TOOLCHAIN` | `leanprover/lean4:v4.34.0-rc2` | upstream `lean-toolchain` | |
| 58 | | `MATHLIB_COMMIT` | `85e3a25e006c35636f0e53b0e9296caca2685bc0` | upstream `lake-manifest.json` (tag v4.34.0-rc2) | |
| 59 | | `COMPARATOR_REV` | `19e111e2141cf333c7daff0f64c5f24acc91dd2e` | upstream `lake-manifest.json` (tag v4.34.0-rc2) | |
| 60 | | `LEAN4EXPORT_REV` | `cacf989bd75f608700820f6afc595f32e7a99a4d` | upstream `lake-manifest.json` (tag v4.34.0-rc2) | |
| 61 | | `LANDRUN_REV` | `811cfff51ceaf3d9843708aa6d22e9b84ccac8b4` (0.1.18) | PoincareConjecture `Comparator/README.md` | |
| 62 | | `NANODA_REV` | `079049d584b2aed2b0172218164082f4fc6eede2` (0.4.18) | PoincareConjecture `Comparator/README.md` | |
| 63 | | `GO_VERSION`, `GO_SHA256` | 1.24.13 | landrun's `go.mod` asks for Go 1.24; checksum from go.dev | |
| 64 | | `RUST_VERSION` | 1.100.1 | Rust stable on 2026-12-01; nanoda builds with `cargo build --locked` | |
| 65 | |
| 66 | ## Rebuild when main moves |
| 67 | |
| 68 | The image is the build of one commit of main. Rebuild it, under a new tag, whenever main's `lean-toolchain` or `lake-manifest.json` changes (for example a new Lean release, or new Mathlib or Comparator pins): set `UPSTREAM_COMMIT` (and the other pins it moves) in `lean.Dockerfile`, build, give the tag the new commit's first eight hex digits, and change the tag in `scienceslack.json` in the same PR. The check refuses a commit whose `lean-toolchain` differs from the image's. Rebuilding after other changes to main is optional: it only makes the checks faster, since less has to be recompiled. |