We Have Proof Automation Now

2026-07-29 · page · source ↗ · source summary

Adam Langley (ImperialViolet) builds a Zstandard decompressor in Lean, using LLMs to handle the proof burden — and in doing so makes the case that dependent types have crossed from research curiosity to practical engineering tool. The bottleneck that kept formal verification in the lab (10× more time proving than coding, per seL4) dissolves when LLMs can generate correct proofs in ~20 minutes for pennies.


Key quotes

"With great type-system power comes great proof effort."

Langley's one-liner diagnosis of why dependent types stayed niche. The seL4 retrospective quantified it: 10× more time proving than designing, 20× more lines of proof than C. This ratio is what LLMs invert.

"Proof irrelevance means that, once you've stated something that is correct, the contents of the proof don't matter — only its existence."

The property that makes LLM-generated proofs viable. A human-produced proof and an LLM-produced proof are equally valid to the type checker. You don't need to read or maintain the proof, just know it exists. This is the key insight Langley builds on, and it's correct — though it dodges the "proof engineering" problem of how proofs survive code changes.

"We, practically speaking, have a new type of programming language available to us."

The thesis. Not "dependent types are cool" but "dependent types plus LLM proof automation is a new category of tool." Langley is cautious — noting his decoder is 10× slower than native zstd and that proof scaling in larger systems is unknown — but the claim is still striking.

"Serving a complex and fickle god"

On F*'s SMT-solver-based approach to proof automation. The contrast with LLM-based proofs is instructive: SMT solvers require learning what pleases them; LLMs require learning how to prompt them. One is a formal system with predictable brittleness; the other is a stochastic system with unpredictable brittleness. Langley doesn't explore which is worse.

Key themes

Critical analysis

The argument works, but the caveats are bigger than Langley admits. His decoder is 10× slower than native zstd. He notes this but doesn't dwell on it. For decompression — a performance-critical operation where zstd's whole value proposition is speed — a 10× slowdown makes the exercise academic. The right comparison isn't "verified Lean vs. unverified C" but "verified Lean vs. verified C using conventional methods," and Langley doesn't make that comparison. The seL4 team proved a C implementation correct; they didn't need Lean.

The proof-engineering problem is real and unaddressed. Langley mentions that proofs must be structured to survive code changes, then moves on. But this is the whole game. If you change the FSE table construction and all four proofs break, and you need to regenerate them with an LLM, you're back to the same maintenance burden — just with a different tool. The question isn't "can LLMs generate proofs?" but "can LLMs generate maintainable proofs?" and Langley's experience — the LLMs needed to change his code style away from imperative Id.run — suggests the answer involves constraining how you write code, not just how you write proofs.

The refusal to publish code is telling. Langley says LLMs can "probably do better than he did" for small, well-defined cases. This inverts the usual open-source dynamic: normally you publish so others can improve. Here, the improvement mechanism (LLM generation) makes the reference implementation less valuable. If the code is the spec and the proof is the verification, and both can be regenerated cheaply, what's the durable artifact? The type signatures. This is The Oracle Is the Asset applied to formal methods: the spec (types) is the durable asset; the implementation and proof are disposable.

The "new type of programming language" claim is premature but directionally correct. Langley is right that something has changed. The combination of proof irrelevance + LLM generation eliminates the bottleneck that killed dependent types for practical work. But we don't know whether the result is a usable language or a laboratory curiosity with better tooling. The 10× performance gap, the scaling question, and the proof-maintenance problem are all real. What Langley has demonstrated is a proof of concept — literally and figuratively.

The verified assembly aside is the most interesting undeveloped thread. If you can prove equivalence between a high-level verified implementation and optimized assembly, you get correctness plus performance. Langley couldn't make it scale, but the architecture is right: use Lean for specification and verification, use extern to call native code at runtime, and prove the two equivalent. This is the escape hatch from the 10× performance penalty, and it's where the real engineering work lies.

Why this matters more than it seems: The combination Langley demonstrates — dependent types + LLM proof generation — is a specific instance of a general pattern: LLMs making previously impractical formal methods practical. If proofs are cheap, what else becomes cheap? Verified protocols, verified parsers, verified crypto — the entire class of software where correctness matters more than raw performance. The performance gap matters less when you're verifying a TLS handshake than when you're decompressing gigabytes.


Related pages


Sources: raw/zstd-lean Last updated: 2026-07-29