Special Issue Article November 24, 2026 5 min read Formal Verification Multi-Agent Systems

Multi-Agent Lean Proofs at Scale, from Fermat's Last Theorem to Signal's Compiled Binary

Take-home: Large formal proofs become feasible when many agents prove separate lemmas and Lean's kernel checks each one. DeepMind's AlphaProof Code applies the same approach to software, verifying Signal's compiled ARM64 binary against about 26,000 lines of human-reviewed specifications.

Contents

1. Why proof checking lets agent teams scale

When many LLM agents write ordinary code together, small errors tend to pile up. Tests catch some of them, and the rest spread through the codebase (T4). Proof assistants change this. Lean's kernel is a small program that accepts a proof only if every step follows from the rules of Lean's logic. A lemma the kernel accepts is correct relative to its statement, assuming the kernel itself is correct. That makes it safe to split a large proof into many pieces and hand them to different agents, because each piece is checked on its own.

Anthropic's November 9 engineering report shows what this looks like in practice. 1,000 Claude Fable 5.2 agents formalized Andrew Wiles' proof of Fermat's Last Theorem in 28.7 hours. An earlier run in September had taken 11 days and produced 13 million lines; the new run's proof was 7× shorter and used 3× fewer action tokens. The setup has two parts.

  1. A shared dependency graph. A coordinator splits the target theorem into lemmas. Each lemma starts as a Lean statement whose proof is the placeholder sorry, Lean's keyword for "proof omitted". Lean tracks these placeholders, so a theorem that depends on one is not counted as proved. The lemmas live in a database and a Git repository. Agents claim open lemmas, prove them, and push the results, and the graph records which lemmas depend on which. Each agent therefore needs only the context of its own lemma, not a transcript of the whole project.
  2. Checked rewards. In reinforcement learning with verifiable rewards (RLVR), a model is rewarded only when its output passes an automatic check. With Lean as the checker, a plausible-looking but wrong proof earns nothing, and the same holds during inference-time search (T8).

This setup also limits where human review is needed. A false intermediate lemma cannot be proved, and a true but irrelevant one will not combine into the final theorem. So the intermediate statements an agent writes do not need human checking. Only the top-level statement does. When that statement already exists in Mathlib, as with the Riemann Hypothesis in A1, checking it is mechanical. When it does not, as in the complexity and optimization claims of A2 and A3, experts have to read it.

2. AlphaProof Code: verifying Signal's compiled binary

Google DeepMind's AlphaProof Code (technical artifacts), built on Gemini 4 Carbon (S3), applies the same approach to production software. Most verified cryptographic code so far has been written in languages designed for verification, then translated to C or assembly. Examples are HACL*, written in F* and extracted to C, and Jasmin, which compiles to assembly. AlphaProof Code instead starts from unmodified Rust: libsignal v0.105.4 together with the post-quantum SPQR v1.6.0 crate, compiled with the standard rustc 1.98.1 into a statically linked AArch64 Linux binary of about 560 KB and 140,000 machine instructions. Five researchers and multi-agent proof teams produced about 6.5 million lines of Lean 4 in four weeks.

What was proved

  • Function contracts on the machine code. The agents proved separation-logic contracts for each function against a formal model of the ARMv8-A instruction set. Separation logic is a program logic for reasoning about memory. A function's specification describes only the part of memory the function uses, so proofs about separate functions can be combined. The proofs cover the binary rather than the Rust source, which means the compiler does not have to be trusted: a bug in rustc or LLVM would show up as a failed proof. seL4's translation validation is an earlier example of checking compiled code against a higher-level semantics. Coverage runs from musl program startup and the mallocng memory allocator through protobuf parsing to Signal's two main protocols. PQXDH (specification) is the key-agreement handshake, which combines the classical X3DH exchange with the post-quantum key encapsulation scheme ML-KEM-768. The Triple Ratchet is Signal's Double Ratchet for message keys, extended with the post-quantum SPQR component.
  • Security of the protocol. A framework called DyLean combines these low-level proofs with a symbolic protocol model in the style of Dolev and Yao. In that model the attacker controls the network and can read, alter and inject messages, but treats the cryptographic primitives as unbreakable. Within this model, the proofs establish three properties. Forward secrecy: past messages stay secret even if long-term keys leak later. Post-compromise security: secrecy recovers after a compromise once fresh keys have been exchanged. And handshake authentication.
  • What has to be trusted. The 6.5 million lines of proof rest on about 18,000 lines of security specifications and 8,000 lines of ARM64 instruction semantics, all reviewed by people, plus the Lean kernel itself.

Testing the specifications

A specification can be too weak to mean much, and then a proof against it says little. This is the same question raised for VP vs VNP in A2. To test this, DeepMind reintroduced two real vulnerabilities from libsignal's history. One was a malformed handshake that produced duplicate session secrets. The other kept a signed-prekey secret in memory after an error. They then recompiled. In both cases the Lean proofs no longer went through, which shows that the specifications constrain the behavior that matters for these bugs.

The ratio of about 26,000 reviewed lines to 6.5 million generated ones shows where the human effort goes in this kind of project: into writing and reviewing specifications, while the proofs themselves are produced and checked by machine.