Mature software earns trust through accumulated testing, and that trust is usually justified. The surprise of formal verification is how much slips through anyway: a function can pass every test ever written against it and still violate its own contract on an input nobody thought to try.
The trending query I checked Clojure's core with Lean and found unreported bugs reached the Hacker News front page in late November 2026, and it marks a coming of age for verification. Theorem provers spent decades on paper algorithms and cryptographic protocols; pointing one at the working standard library of a live language is a different ambition. The durable idea is that mechanical checking has become cheap enough to audit software that already works.
What a proof assistant does
A proof assistant is a program that checks mathematical arguments mechanically, and Lean is a prominent one. Nothing is trusted on style or reputation: every step must follow from earlier ones under the prover's rules, and an argument that survives the checker is correct relative to its stated assumptions.
Pointing Lean at a standard library means turning documentation into mathematics. The claim that a function sorts, or that it never loses an element, becomes a theorem whose proof the machine checks. Where a proof cannot be completed, the mismatch lands in one of two places: the code violates its contract, or the contract was written wrong. Both outcomes are findings worth reporting.
Why decades of tests still miss things
Tests sample. A test suite runs the inputs someone imagined, plus some random probing, and it reaches maybe thousands of cases per function. Logical checking exhausts: a proved property covers every input in the type, including the awkward ones at boundaries, empty collections, and the edges of numeric ranges. That coverage gap is exactly where the unreported bugs were hiding.
The mature code is what makes the story notable. Clojure's core has run in production for years and carries one of the more disciplined test suites in its ecosystem. Bugs that survived that environment fell to exhaustive checking of the kind no test budget reaches, which recalibrates what confidence in tested software should mean.
| Aspect | Test suite | Proof assistant |
|---|---|---|
| Coverage | Sampled inputs | Every input in the type |
| Failure meaning | This case breaks | Contract or code is wrong |
| Setup cost | Low per case | High per property |
| Scales to | Thousands of cases | Core contracts |
Drop in your PDF - it doesn't leave your device.
Every miss becomes a red node on your map.
Free plan: 21 nodes, no card, no countdown.
The workflow and the trend line
The working loop is concrete: formalize a function's specification, attempt the proof, and treat every failure as a signal. Some failures expose genuine bugs that become reports or patches. Others expose specification errors, an overclaim in the documentation, and those corrections matter just as much, since a wrong contract misleads every user of the function.
The cost of this machinery keeps falling, which is the trend line under the story. Proving core paths is moving within reach of ordinary projects, and claims about software quality will increasingly split between we tested it and we proved the core paths. The lesson is that verification has started auditing working software, and what it found in mature, heavily tested code says the audit was overdue.
Key takeaways
- A proof assistant like Lean checks mathematical claims mechanically, step by step, against stated assumptions.
- Applying it to a standard library means encoding each function's documented contract as a theorem.
- Tests sample inputs, while a completed proof covers every input in the type, including boundary cases.
- Every failed proof marks a code bug or a specification error, and both are reportable findings.
- Verification cost keeps falling, so proved core paths are becoming a realistic option for ordinary projects.
Quick answers
What is Lean?
A proof assistant: software that mechanically checks each step of a mathematical argument against its rules.
How do you check a library with it?
Encode the documented behavior of functions as theorems and let the prover hunt for counterexamples.
What does a failed proof mean?
Either the code violates its contract or the contract itself overclaims; both are findings.
Why did mature code still have bugs?
Tests sample imagined inputs, while exhaustive logical checking also covers boundaries nobody wrote a test for.
Is this practical outside research?
Verification cost keeps falling, which puts proved core paths within reach of ordinary projects.
One thing to do tonight
Take one function you maintain and write its contract as a single precise sentence: what it promises for every input. If the sentence will not pin down, the vagueness is the finding. Precise contracts are where formal checking begins.