Anthropic and Theorem Deploy Claude to Automate Mathematical Code Verification
A new autonomous system uses Claude to generate formal proofs for 123 open-source libraries, uncovering hundreds of latent bugs while facing strict hardware and input limitations.
By Ahmed Mansour ·

Anthropic has introduced a system capable of mathematically proving the correctness of existing software code without human intervention, a development that could fundamentally alter how developers trust AI-generated programs. By partnering with Theorem, the company utilized its Claude model to generate formal proofs for 123 open-source libraries, effectively automating a process that historically required years of specialized labor and was reserved for critical systems like aviation software.
The scale of the automated effort is significant. In a matter of weeks, the model produced approximately 180 million lines of proof code. This output was derived from test programs associated with Google’s OSS-Fuzz security project. Rather than creating new software, Claude focused on verifying existing code by translating crash tests into mathematical problems and analyzing compiled machine code. An independent verification program named Rocq checks these proofs, and Anthropic states that the process requires minimal human oversight, which the researchers describe as "fully autonomous" despite the human-built foundational tools.
The ability to detect elusive defects represents a major functional advantage. During the proof generation, Claude identified hundreds of bugs that conventional testing methods had missed. These errors typically only manifest under specific, rare conditions, such as unusually large input files or particular sequences of data access. In one notable instance involving a widely used PDF reader, the team discovered as many security vulnerabilities in a single week as are typically reported for that software over an entire year. Additionally, the model caught a logical error that had remained undetected for more than a decade.
However, the definition of "correct" in this context is subject to rigorous constraints. Anthropic acknowledges that formal verification does not guarantee software is error-free in all scenarios. The generated proofs are valid only under specific conditions: a particular processor architecture, single-threaded execution, and input sizes under 64 MB. In practical application, these libraries often run on diverse hardware configurations, meaning the verification covers a specific slice of operational reality rather than the entire spectrum of potential use.
The computational demands of this approach remain high. Individual proofs can consume hundreds of millions of tokens, though Anthropic has not disclosed the total project costs. Efficiency is improving, however; a smaller test run demonstrated that proofs are reusable and that newer models are more token-efficient. Specifically, Opus 5.5 solved half the required proofs using approximately 40 percent fewer tokens than its predecessor, Opus 5. This trend suggests that the financial barrier to entry for formal verification may decrease as model efficiency increases.
The strategic implication for the software industry is a shift in the primary question facing AI developers. Instead of asking whether AI can program, the focus is moving toward whether AI can prove that its own code is safe under defined conditions. If this capability becomes routine, developers may spend less time on manual review and verification, reducing costs across the entire coding lifecycle. Anthropic expects formal verification with AI to soon become as practical as standard testing, while Theorem’s roadmap already targets critical infrastructure components such as glibc, OpenSSL, and cURL.
For the Pacific Northwest tech sector, which relies heavily on software development and cloud infrastructure, this shift signals a potential leap in automation. The combination of AI-written code and AI-generated proofs could streamline development pipelines, provided the strict hardware and input limitations are managed effectively. As these tools mature, the distinction between code generation and code verification may blur, leading to a more integrated and autonomous software engineering process.
The collaboration between Anthropic and Theorem marks a clear step toward a future where mathematical rigor is applied at a scale previously thought impossible. While the current limitations regarding hardware architecture and input size remain, the precedent of catching long-standing bugs and generating proofs at machine speed suggests that the economic model of software testing is poised for significant disruption in the coming years.
Source: The Decoder


