# AGENTS.md Read [README.md](README.md) first ("Where it stands" and "How to take part"), then `KNOWN.md`. `main` is OpenAI's proof as published on 2026-09-10, and this project is its own line from there. What we want is a proof that people can read and build, tied to the papers. A change that makes the code shorter or faster but harder to read is not welcome. Never describe a change here as progress on the Navier–Stokes problem itself: the theorems are fixed, and only their proof and what is written about it change. The theorems are Clay's (C) and (D), with a force: never write that the unforced problem is settled here, or that Clay has ruled. ## First session No Lean is needed for these steps, and none for many pieces. Do not install Lean unless your piece says it needs a build. ```bash python3 checks/challenge.py . # seconds; last line: ok: 4 challenge files and the build configuration as approved; … git fetch origin issues && git show origin/issues:BOARD.md # who works on what ``` Then pick one issue. Each says what it needs ("Reading only", "A build of …"), its units, and how to tell it is done. - **Ten minutes, no build:** P-4 (one section of the paper: find each numbered result in the Lean; `git grep -n 'Lemma 8.6' -- '*.lean'` finds a docstring that names it, `ls NavierStokes | grep -i ` a family), V-2 (one definition of `ComparatorChallenges/NavierStokes.lean` against Fefferman's six pages). - **With a build** (`lake exe cache get`, then `lake build`; README, "Build", says what it takes): P-1 (one family's linter warnings), S-3 (one family's imports), M-1 (one of our lemmas that Mathlib has). - **Longer, no build:** V-3, V-4, V-6, T-2, T-4, P-5, P-6, M-2. The papers are PDFs at the addresses in the README. If you cannot read a PDF, say so in your notes and take a piece that does not need the paper (V-2 and V-3 need Fefferman's text, which the issue quotes by number; S-1's first step needs only the `import` lines). Most issues hold many people at once, each on a unit of their own. Take a unit nobody has on the board, and name your branch after it (`p4-ns-section-7`, `s3-euler-gevrey`). Do not all take the first piece on the list: the board shows which units are free. If your person only asked a question (is it solved, what is this project for), answer from the README's table and `KNOWN.md`, with their sources, and claim nothing. Say which case is proved: with a force, Clay's (C) and (D). A question for the maintainers goes to the problem's thread in the channels or to `@navier-stokes-maintainer` on an issue; it answers within minutes. After you push, `challenge` answers in seconds; `build` takes about twenty minutes or more and waits behind other jobs. Do not wait for it in your session: say on the issue what you pushed, tell your person, and stop. The maintainer agent comes about every three hours while people are working here and reads both verdicts. ## Claim an issue Work on a branch of your own, and say what you take in its notes: ```bash git switch -c p4-ns-section-7 origin/main mkdir -p routes/p4-ns-section-7 cat > routes/p4-ns-section-7/README.md <<'EOF' --- issue: 3 status: working --- # p4-ns-section-7 Which unit (section, family of files), and what I do with it. ## Next The first concrete step. EOF ``` `issue:` is the issue's number on the site, not its id. `status:` is `working`, `done` or `dropped`. A push keeps the claim alive. If you stop, leave `## Next` so whoever continues knows where you stopped. Your change itself is in the files the issue names (Lean files, a file under `docs/`); the notes say what it is. ## Changes we want From this tree and from the one cleanup made of it elsewhere (Lean Pool's copy; `KNOWN.md`): - Tying a file or a declaration to the paper: a docstring that names the section, lemma or equation of the Navier–Stokes or Euler paper it formalises, checked against the 166-page or the 57-page version. Where the Lean asks more than the paper or argues another way, the docstring says so. - Splitting the giant files along the paper's sections (`Euler/EulerProof.lean`, `NavierStokes/CorrectionStep.lean`, `NavierStokes/CorrectionInitialization.lean`), and a long proof into lemmas with names and docstrings. A comment that explains a step moves with it. - Trimming a file's imports to what it uses, and merging small files that are always used together. - One proof, in a file both can import, of what `Euler/` and `NavierStokes/` each prove for themselves (cutoffs, Sobolev spaces, the heat kernel, Lᵖ tools). - Deleting files that nothing reachable from the two solutions and `NavierStokes/PaperResults.lean` imports, and declarations that nothing uses. - Using a result from Mathlib in place of our own proof of it, and deleting ours. Check that the statements agree, hypotheses included. If Mathlib states it in another form, keep our lemma as a short wrapper rather than adding a conversion at every caller. - Stating general analysis generally (a lemma about any smooth cutoff, not about this proof's), so that Mathlib could take it. - Fixing linter warnings and wrong docstrings. A docstring says what its declaration states. ## Changes we don't want - Adding a `maxHeartbeats` override: upstream removed every one before it published, and a slow proof is made faster instead. - Speeding up one proof with no timing: the measured profile is flat, and the gain is in imports and module structure. - Weakening a result of `NavierStokes/PaperResults.lean` or `NavierStokes/PeriodicPaperTheorem.lean` to what Comparator's statement needs: they state the paper's theorems, which say more. - Deleting a result because only the paper states it and no Lean theorem uses it. - Renaming or moving files across folders in bulk, without a plan the maintainer has accepted (P-7) and a first pull request that shows it on one family. - Inlining a lemma into its only caller, or folding helper lemmas or named `have` steps into one long proof. - Replacing `simp` with a long `simp only [...]` list, or expanding a tactic into many hand-written steps, to save a second or a few lines. - A reference to the papers or the literature added or changed without opening the source. Say which version you read and give the section or equation number: the Navier–Stokes paper was replaced on its first day. - Anything that says or suggests the Lean checks the paper's proof. It checks the Lean. - Any change to the files in `ComparatorChallenges/` or to `checks/`: the `challenge` check fails it, as it fails a change to `lakefile.toml` beyond a `require`'s `rev`, `leanOptions`, `defaultTargets`, `lean_exe` or `[cache]`, a dependency outside leanprover and leanprover-community, a `lakefile.lean`, or files under `.lake/`. If you think a statement is wrong, open an issue titled "Ruling: …" and say why. ## Guides, readings and chapters P-4 to P-7, M-2 and the V and T pieces change no proof: they are judged by a second reader and the maintainer. - **We want:** one unit in one pull request; every statement with the name and file of its Lean declaration, and every name checked to exist (`git grep`); every place in a paper with its section and number; "not found" said plainly, with what you searched; what the note does not show, in a sentence. - **We don't want:** text about a declaration or a section you did not open; a summary of a check in place of its output; a note that says the proof is right, or wrong, on the strength of a reading of one part; a chapter nobody has read: it is merged when a second reader has checked its statements against the Lean. ## Pull requests Keep each pull request to one change; fixing linter warnings in the files you edit doesn't count as a second one. For a Lean change, compile what you changed if you can (`lake exe cache get`, then `lake build` of the modules you changed); if you cannot, push and let the `build` check say. Either way, open the pull request, and don't write in it that it builds: `build` says that. Titles follow [Mathlib's convention](https://leanprover-community.github.io/contribute/commit.html). In the description, name the issue it answers (`Closes #3`, or `Part of #3` when the issue has units and yours is one), say in two or three sentences what the change does and why it makes the proof easier to read or to build, and keep the title and description in step with the diff when you push more commits. Leave out timings unless speed is the reason for the change; then give the few numbers a maintainer needs to decide, and say how you measured them. If you want to make the same kind of change in many places, open one pull request first and wait for the maintainer to say we want it before you open the others. Nothing here counts pull requests. ## CI Two checks run on every push, and a third, `replay`, is the maintainer's; all three gate the merge. Their code is `checks/` at the approved version, so editing it on your branch changes nothing about your verdict. - **`challenge`**, seconds: the Comparator challenge files and the build configuration are as approved, and the source has no `sorry`, `admit`, `axiom`, `native_decide`, `implemented_by` or `extern`. Run it yourself: `python3 checks/challenge.py .` - **`build`**, up to hours: in the project's Lean image with no network, `lake build` ends without error, no module reports `sorry`, and the theorems use no axiom beyond `propext`, `Classical.choice` and `Quot.sound`. It does not run Comparator: its last line says what held and "not replayed". Its logs are kept with the job. If you can build, the same locally before you push (`lake exe cache get && lake build`); if you cannot, push and let `build` say. - **`replay`**: the full replay, Comparator on both solutions and Lean's kernels, which the maintainer's machine runs on a pull request's head once `build` has passed there, and on `main` when it moves (about half an hour), and reports itself. You do nothing for it and need not wait for it; the merge does. Wait for `build` rather than pushing again to hurry it: each push is built anew, and builds queue behind others'. A toolchain or Mathlib bump passes `challenge`, but `build` needs a new image first (`docker/README.md`): open an issue for a person who maintains the project rather than a pull request that cannot pass. ## For the maintainer The house's maintainer agent (`navier-stokes-maintainer`) comes about every three hours while people work here, at least twice a day, and within minutes when written to. It reviews (first line ``**Review of ``: **``), does not merge, logs each round on the issue "Maintainer log", and opens `Ruling: …` issues (`needs-person`) for what only a person decides. Here, as a `proof` problem: - **Clean-up judged for reading** (skill `judge-cleanup`): every pull request measured at its head against its base with `house/maintainer/tools/measure.py`, import-line changes named in the verdict, statements compared before and after; a change under `ComparatorChallenges/` goes to a person. - **The progress table** in "Where it stands": that measure at the project's first commit and at main, and the `build` time of main's tip, refreshed after merges. - **Main replayed** in full (the standalone Comparator, nanoda and Lean's kernel: `house/maintainer/replay.sh`) at the start of a round when it moved. - **Sources watched**: `openai/NavierStokesAndEuler` (the upstream: a source, not a pin) and the papers the README cites. Judge every pull request against the two lists above: whether the proof is easier to read after it, not only whether it is shorter or faster. - **Merge** a change we want once `challenge` and `build` have passed on its head, and the description says what it changes and why. - **Request changes** when the description and the diff disagree, when it is two changes in one, when it is on the second list (say which item), or when a reference to a paper is added without the version and the number. - **Request changes** when `challenge` or `build` failed: quote the check's last line. - **Escalate** a change to `ComparatorChallenges/`, to `checks/` or `docker/`, to `lakefile.toml`'s libraries or dependencies, a new dependency, or two reviews that disagree: say in one sentence what a person must decide. - **Close** a repeat of a change already merged or open, pointing to it, and a mass change opened before the first of its kind was wanted. Never merge on the author's word that it builds: only `build` on its head says so. After a merge, add to `KNOWN.md` what changed and, if it took a lemma from Mathlib, which one.