AI model generates massive math proofs to validate software code
Anthropic's Claude system produced 180 million lines of proof code to check open-source libraries, uncovering hidden bugs that traditional testing missed.
By Naledi Dlamini ·

The high cost of mathematically verifying software has historically limited the practice to critical systems like aviation controls, but a new effort by Anthropic and its partner Theorem has drastically reduced that barrier. By using their Claude model to generate formal proofs, the team has shown that artificial intelligence can now verify existing code with a speed and scale previously thought impossible for automated systems.
The project focused on 123 open-source libraries from Google's OSS-Fuzz security project. Instead of writing new software, Claude translated crash tests into mathematical problems and analyzed the compiled machine code. In a matter of weeks, the model produced approximately 180 million lines of proof code. An independent verification program called Rocq checked these proofs, a process that Anthropic describes as nearly fully autonomous, requiring very few human reviewers.
A significant benefit of this approach is its ability to find defects that standard testing methods often miss. During the verification process, Claude identified hundreds of bugs and fixed them autonomously. Many of these errors only appeared under specific conditions, such as unusually large input files or particular access sequences. In one notable instance, the team found as many security bugs in a widely used PDF reader in a single week as are typically reported over an entire year. In another case, the system caught a logical error that had remained undetected for more than a decade.
Despite these successes, the method has strict practical limits. Anthropic notes that formal verification does not guarantee software is completely error-free. The proofs only hold under specific constraints, including a particular processor architecture, single-threaded execution, and input sizes under 64 MB. Additionally, the computational cost is high, with individual proofs consuming hundreds of millions of tokens. A smaller test run indicated that newer model versions are becoming more efficient, with Opus 5.5 solving half the proofs using about 40 percent fewer tokens than its predecessor.
This development signals a potential shift in how developers approach software automation. If AI can both write code and prove its correctness within defined parameters, the focus moves from basic programming capability to guaranteed safety. Anthropic expects this type of verification to become as routine as standard testing in the near future. Theorem’s roadmap already targets critical infrastructure components like glibc, OpenSSL, and cURL, suggesting that this technology could soon impact the foundational software used across the industry.
Source: The Decoder


