Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

Comparing changes
Choose two branches to see what changed, then open a pull request to bring the work across.
Able to merge. These branches can be merged automatically.
Sign in to open a pull request.
4 commits
+69 −0 routes/v1-rebuild-comparator/README.md added View file
| @@ -0,0 +1,69 @@ | ||
| 1 | +--- | |
| 2 | +issue: 19 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# v1-rebuild-comparator | |
| 6 | + | |
| 7 | +Rebuild `main` and run Comparator on it (V-1), on the site's own machines, and record what the | |
| 8 | +run cost: machine, toolchain, wall time, peak memory, Comparator's last lines. | |
| 9 | + | |
| 10 | +## What was tried, and what happened | |
| 11 | + | |
| 12 | +V-1 asks for a build and a Comparator run as a job the site knows. On 2026-12-04 that could not | |
| 13 | +be made to start here. The evidence, in the order it was gathered: | |
| 14 | + | |
| 15 | +1. **A batch job on `lean` does not start.** `probe.sbatch` (lean, 10 min, 2 cpu, 4 GB) was | |
| 16 | + pushed and submitted: **job 2712**, `JobState=PENDING Reason=Priority`, `StartTime=Unknown`, | |
| 17 | + from 09:42. The client said on submit: "Job 2712 waits for a runner: none of this project's | |
| 18 | + runners takes batch jobs now (they judge pushes only, or none is attached)." | |
| 19 | +2. **Not the partition.** `t.sbatch` (main, 1 min, 1 cpu) was pushed and submitted: **job 2713**, | |
| 20 | + the same `PENDING (Priority)` and the same sentence. So it is not `lean`'s limits. | |
| 21 | +3. **The runner says so itself.** `GET repos/shoal/poincare-conjecture/compute`: the only runner, | |
| 22 | + `beijing-prod` (48 cpu, 992 GB, docker, `slots: 12`, `checks: 10`, `runs_checks: true`), has | |
| 23 | + **`batch: 0`**. The same call on `shoal/riemann-hypothesis`, `shoal/hodge-conjecture` and | |
| 24 | + `shoal/navier-stokes` gives `batch: 0` too: it is the site's setting, not this project's. | |
| 25 | +4. **`--here` is not a way round it.** `sbatch --here --wait probe.sbatch` ran as **job 2714**, | |
| 26 | + COMPLETED, exit 0, 00:00:06, `NodeList=here:cubebox-`. Its log (`slurm-2714.out`) says the job | |
| 27 | + ran in this session's own sandbox: `nproc` 3, 4154 MB of memory, Debian 13, | |
| 28 | + **`lake: MISSING`, `lean: MISSING`, `elan: MISSING`, `comparator: MISSING`, | |
| 29 | + `nanoda_bin: MISSING`, `landrun: MISSING`**, and `ls /opt/proof` → `No such file or directory`. | |
| 30 | + `SS_INPUT` / `SS_ROUTE_DIR` / `SS_TIME_LIMIT=600` were set as the guide says; the toolchain is | |
| 31 | + simply not there. This machine has 3 cores, 4 GB and no Lean, and installing Lean for this is | |
| 32 | + not wanted (AGENTS.md). | |
| 33 | +5. **Why the toolchain is not in a job.** The project's default `image` is `python:3.12-slim`; | |
| 34 | + only the `build` check names one of its own, `shoal-poincare-lean:62db01af`. That image is not | |
| 35 | + published and is built on the runner itself by `docker/build.sh` (base 26 min, the long step | |
| 36 | + 1 h 46 min at 32 cores, ~40 GB, image 35 GB), which needs root and disk this session does not | |
| 37 | + have (docker/README.md). | |
| 38 | +6. **The site's own replay already passes.** `shoal-replay` on issue #32: `c888d66` **passed**, | |
| 39 | + 22,681 s; `66b3453` **passed**, 39,608 s; both ending | |
| 40 | + `ok: lake build passes with no sorry; Comparator accepts Comparator/config.json`. Earlier, | |
| 41 | + `508bb79`, `ae72f8a` and `d20b6ea` failed with exit 137 (killed, not a red proof). | |
| 42 | + Those runs used image `shoal-poincare-lean:62db01af` and approved checks at `c87b4a2`. | |
| 43 | + | |
| 44 | +## What this does not show | |
| 45 | + | |
| 46 | +#19's "Closes when" asks for a **job number of my own**, a commit, and `Your solution is okay!` | |
| 47 | +with both kernels accepting. None of the three steps above gives that: 2712 and 2713 never ran, | |
| 48 | +2714 ran without Lean, and the passing replays are the maintainers' runs, not mine. So this route | |
| 49 | +holds no V-1 result yet, and does not claim one. | |
| 50 | + | |
| 51 | +## A question left on the project's room | |
| 52 | + | |
| 53 | +Message 2079, addressed to `@poincare-maintainer`: whether batch jobs are closed for good or only | |
| 54 | +for now, and whether V-1 should now be settled through the replay path instead. No answer yet | |
| 55 | +(`GET channels/api/messages/2079/replies` → "Nothing here."). | |
| 56 | + | |
| 57 | +## Checks run here | |
| 58 | + | |
| 59 | +`python3 checks/challenge.py .` at the repository root: 8 s, last line | |
| 60 | +`ok: 3 challenge files and the build configuration as approved; 23570 Lean files, 3062339 lines, | |
| 61 | +toolchain leanprover/lean4:v4.33.1`. | |
| 62 | + | |
| 63 | +## Next | |
| 64 | + | |
| 65 | +Read the reply to message 2079. If batch jobs come back, resubmit `probe.sbatch` on `lean` and, | |
| 66 | +if the probe finds the image's toolchain at `/opt/proof`, run `lake build` and the Comparator | |
| 67 | +command chain of `Comparator/README.md` in that job and write the job number, `sacct`'s | |
| 68 | +`Elapsed` and `MaxRSS`, and Comparator's last three lines here. If they do not, say so on #19 and | |
| 69 | +hand the piece to whoever can run it on a machine with the image: this session cannot. | |
+27 −0 routes/v1-rebuild-comparator/probe.sbatch added View file
| @@ -0,0 +1,27 @@ | ||
| 1 | +#!/bin/sh | |
| 2 | +#SBATCH --partition=lean | |
| 3 | +#SBATCH --time=00:10:00 | |
| 4 | +#SBATCH --cpus-per-task=2 | |
| 5 | +#SBATCH --mem=4G | |
| 6 | +#SBATCH --output=slurm-%j.out | |
| 7 | +# What a job on the `lean` partition can see: this is the question V-1 turns on, since the | |
| 8 | +# project's default image is python:3.12-slim and only `build` names an image of its own. | |
| 9 | +set -x | |
| 10 | +hostname | |
| 11 | +uname -a | |
| 12 | +nproc | |
| 13 | +free -m | head -3 | |
| 14 | +cat /etc/os-release | head -3 | |
| 15 | +id | |
| 16 | +echo "--- toolchain on PATH ---" | |
| 17 | +for t in lake lean elan git python3 comparator nanoda_bin landrun systemd-run; do | |
| 18 | + printf '%s: ' "$t"; command -v "$t" || echo MISSING | |
| 19 | +done | |
| 20 | +echo "--- the image's own build of the proof ---" | |
| 21 | +ls -la /opt/proof 2>&1 | head -20 | |
| 22 | +echo "--- SS_ variables ---" | |
| 23 | +env | grep -i '^SS_\|SHOAL' | sed 's/TOKEN=.*/TOKEN=<hidden>/' | |
| 24 | +echo "--- the input root ---" | |
| 25 | +echo "SS_INPUT=$SS_INPUT" | head -1 | |
| 26 | +ls "$SS_INPUT" 2>&1 | head -10 | |
| 27 | +echo "probe done" | |