Auditing Someone Else's Proof
How to examine a formal proof you did not write: pin exactly what was published, build it in its own environment, read the propositions rather than the names, follow the dependencies down to the axioms, bind the result to the claimed statement, and only then ask whether the statement means what the claim says. A practical checklist for any Lean or Rocq proof.
Most formal proofs you meet will not be your own. They arrive attached to a paper, a benchmark result, a repository or an announcement, usually with a sentence saying what they prove. This chapter is about checking that sentence. It uses the two investigations in Part I where the proof under examination came from outside the laboratory’s own contracts: the Grasshopper artifact (Chapter 6), and the substituted and weakened files of the wrong theorem (Chapter 5).
An audit asks a sequence of questions. Each depends on the one before, and the order matters. This is not a second account of statement identity or axiom inspection: it orders the ideas of Chapter 15, Chapter 16 and Chapter 22 into an audit of an artifact you did not build. Pinning, environment and licence come before any proof reading; the checklist at the end collects the sequence.
1. What exactly was published?
Before anything is built, pin the object. The Grasshopper artifact travels
inside the arXiv e-print of the paper that describes it. The audit records the
e-print’s sha256 (5e3dfe1e…) and the sha256 of every file in the artifact,
and refuses to continue if any of them differs. Two of those files matter as
much as the proof: lean-toolchain, which names Lean 4.28.0, and
lake-manifest.json, which names the exact Mathlib commit.
Pinning first prevents the commonest audit mistake, which is auditing a different object from the one cited: a later version, a fork, a fixed copy. It also settles a practical question early. No licence statement was found anywhere in the e-print or on the paper’s page. So this audit reads the artifact from the pinned e-print into a scratch folder at run time, deletes it afterwards, and never copies the source into the book or its records. That limits what can be reported (names, hashes and the kernel’s verdicts) but not what can be checked.
2. Does it build where its author built it?
A proof is checked against one version of the proof assistant and one version of its library. Mathlib changes weekly, and a proof that builds against one commit can fail against the next. So the audit builds the artifact in its own environment: an isolated image with Lean 4.28.0 and the artifact’s Mathlib commit, separate from the book’s own Lean 4.35 image. Forcing the artifact into the book’s toolchain would have audited a modified artifact.
If it does not build in its own pinned environment, the audit can stop there, and that is a finding.
3. What does it actually state?
Read the propositions, not the names. A declaration called grasshopper states
whatever its type says. The audit prints, for every declaration, the fully
elaborated type as the kernel holds it. That is the statement with all
notation expanded and every implicit argument visible.
Two ordinary failures are visible at this step:
- A substituted statement. The headline declaration states something
easier, as in the wrong theorem’s substituted case, where the file named
zero_add_leftstatedTrue. - A weakened statement. The headline declaration states something true but
narrower: extra hypotheses, a finite range, a special case. The wrong
theorem’s weakened case added
n ≤ 10 →.
Neither is a kernel error. Both are why the next steps exist.
4. What does each declaration rest on?
Ask the kernel for every declaration’s axioms. In the Grasshopper original, with Lean 4.28:
| Declaration | Axioms | Standing |
|---|---|---|
PS_last |
propext, Classical.choice, Quot.sound | proved |
PS_swap |
propext, Classical.choice, Quot.sound | proved |
PS_swap_eq |
propext, Classical.choice, Quot.sound | proved |
maximizer_swap_in_M |
propext, Classical.choice, Quot.sound | proved |
grasshopper |
propext, sorryAx, Classical.choice, Quot.sound | not proved |
The main theorem’s proof is the single word sorry, which Lean accepts with a
warning by assuming an axiom that asserts any proposition. The file compiles.
The headline is not proved.
Follow the dependencies, not the warnings. Chapter 16 — What a Proof Rests On (Part II, Chapter 7) showed that a
gap propagates silently to everything that uses it. The audit tests that
directly: in a variant with one helper’s last step replaced by sorry, the gap
appeared in that helper and in the one helper that depends on it, and nowhere
else among the four.
5. Is it bound to the statement that is claimed?
Even an axiom-clean declaration may prove the wrong thing. So bind it, as the laboratory binds its own (Chapter 22): ask the kernel to accept the declaration as a proof of the statement the claim refers to, frozen in advance. In the audit’s substitution variant, the main theorem is restated so that it proves trivially. Its axioms come out clean. Its binding to the frozen statement is refused. This is the wrong theorem’s lesson applied to someone else’s work: clean axioms say how a declaration was proved, not what was proved.
The frozen statement has to come from somewhere independent of the file being audited. For the Grasshopper audit it was taken from the published original, pinned by hash. For a claim in a paper, it is the paper’s own statement, formalized and reviewed separately.
6. Does the statement mean what the claim says?
Everything so far audits the proof artifact. It establishes, mechanically, what the kernel certified about the published file. It does not establish that the file’s main statement is the olympiad problem it is named after. That is a different question: whether the formal statement corresponds to IMO 2009 Problem 6. It needs a person to read the problem and the formal statement side by side, with the questions of Chapter 15 — What a Formal Proposition Says (Part II, Chapter 6) in mind (domains, types, totalized definitions, hypotheses). For the Grasshopper artifact that reading is still open.
Keeping the two apart matters in both directions. A sound artifact can state the wrong problem. And a faithful statement can come with an unfinished proof, which is this case.
7. What can be said, and what cannot?
The audit’s conclusion is narrow and exact. Of the published artifact’s
declarations, four helper lemmas are proved from Lean’s standard axioms, and
the main theorem is not proved: it rests on sorryAx. The audit’s attacks
behaved as designed: a hidden gap was found, a changed statement was refused,
and a substituted statement was refused by its binding. The audit does not
say whether the helpers are progress towards a proof. That is a mathematical
judgement it does not make. It also does not say what the AI system
contributed to the file, or assess the paper’s own claims.
A careful audit is as clear about these limits as about its findings, because the limits are what a hurried reader will cross.
A checklist for any Lean or Rocq proof
- Pin it. Record the hash of what was published, and of every file in it. Note the licence before copying anything.
- Pin its environment. Read
lean-toolchainandlake-manifest.json(or the Rocq version and opam lock). Build in exactly that environment. - Build it. If it does not build there, stop: that is the finding.
- List the declarations. Find the one the claim is about. Expect helpers, definitions and abbreviations as well.
- Read the statement, elaborated. Print the type with notation expanded. Compare it with the claim: domain, types, hypotheses, quantifiers.
- Print the axioms of every declaration. Accept only the standard set.
Treat
sorryAx, any projectaxiom, and compiler-trust axioms such as those fromnative_decideas findings to explain. - Follow the dependencies. A clean-looking declaration can inherit a gap. Check the axioms of the headline declaration itself, not only the file’s warnings.
- Bind it. Ask the kernel to accept the headline declaration as a proof of the claimed statement, written independently of the file.
- Attack it. Inject a gap, change a statement, substitute an easier one, and confirm each is caught where it should be.
- Separate the verdicts. Report what the kernel certified, then, separately, whether the statement corresponds to the claim, and say which of the two is still open.
A second worked pattern: challenge versus solution
OpenAI’s Ten Proofs release (August 2026; https://github.com/openai/ten-proofs,
commit 94bc0feb) gives the same checklist a second object. Each result ships
a Comparator challenge module stating the theorem and a separate solution
module containing the reported proof, with a configuration naming the theorems,
the permitted axioms and the checking tools. Reading the Ramsey configuration
as text shows four theorem names where the catalogue lists one principal
declaration — ErdosProblems.MulticolourTriangleRamsey.erdos_183 and
ErdosProblems.MulticolourTriangleRamsey.erdos_problem_183_explicit among
them. A result’s name is not a single proposition, again.
The audit consequence is the one this chapter already draws. A challenge file
carrying intentional sorry placeholders is an interface, not a refuted proof
and not an unfinished solution; only the solution module’s axioms and binding
decide what was proved. And a Comparator pass would establish the configured
mapping, not that the manuscript’s English statement was faithfully
formalized. That correspondence stays a person’s recorded judgement. The full
comparison is in the research dossier
(docs/research/MATH-OAI10-comparator.md); no OpenAI module was built here,
so every standing there is source-inspected, not kernel-checked.
Try it yourself
- Apply steps 1 to 3 of the checklist to any small Lean project on GitHub that
pins its toolchain. What does
lake-manifest.jsontell you thatlean-toolchaindoes not? - In the Grasshopper table, why is it not enough to search the file for the
word
sorry? - A file contains
axiom choice_strong : …and its main theorem’s axiom list includeschoice_strong. Is the theorem proved? What would you need to know before deciding? - The audit froze the main statement from the published original. Why is that independent enough to test substitution, but not independent enough to test correspondence with the olympiad problem?
- Write the two-sentence summary of the Grasshopper audit that a newspaper could print without misleading its readers.
Worked answers: Chapter 35 — Appendix A: Solutions to the Exercises (Part IV, Appendix A)#chapter-7-auditing-someone-elses-proof.
Evidence record
| Audit record | docs/research/book-proofs/N3-GRASSHOPPER-00.md |
| Audit procedure | experiments/investigations/n3-grasshopper/audit.py, run in grasshopper-env:4.28.0 |
| Recorded audit | n3-grasshopper/kernel-runs/2026-11-13-pinned/ (logs private: they contain the artifact’s elaborated statements) |
| Reader run | n3-grasshopper/runner-runs/2026-11-13-pinned/; imported record verified, no kernel run |
| Substitution and weakening | P04 demonstration and reader run p04-wrong-theorem/runner-runs/2026-11-13-pinned/ |
| Correspondence to IMO 2009 P6 | open; the relation between the Lean statement and the competition problem is not established |
Further Reading
For deeper study; not sources for the chapter’s claims.
- Thomas Hales, Mark Adams, Gertrud Bauer, et al. “A Formal Proof of the Kepler Conjecture.” Forum of Mathematics, Pi 5 (2017), e2. DOI. Why read it: A large multi-year formal verification project, a model case study in auditing a substantial formal proof and understanding what its statement actually covers.
- Georges Gonthier. “Formal Proof — The Four-Color Theorem.” Notices of the American Mathematical Society 55(11) (2008), 1382–1393. link. Why read it: A canonical example of formalizing a major theorem and of the specification questions that arise when the informal statement is turned into a formal one.
- Freek Wiedijk. “Formal Proof — Getting Started.” Notices of the American Mathematical Society 55(11) (2008), 1408–1414. link. Why read it: Practical guidance on reading and checking formal proofs, closely matching the chapter’s step-by-step audit checklist.
Next in Part III: Chapter 27, what AI did in building this book, and what checked it.