Claude Generates 180 Million Lines of Code to Prove Software Correctness
Anthropic and Theorem used AI to verify 123 open-source libraries, uncovering bugs that conventional testing missed.
By Leila Reynolds ·

Anthropic and its partner Theorem have used the Claude model to mathematically verify that 123 open-source libraries function correctly. The team generated approximately 180 million lines of proof code in a matter of weeks. This effort marks a departure from traditional methods that required extensive manual labor to validate software behavior.
Formal verification has historically been expensive and slow. Specialists required 20 person-years to verify seL4, a small operating system kernel. Because of this cost, the technique was largely limited to high-stakes environments like Airbus avionics. Anthropic’s Frontier Red Team sought to reduce this burden by delegating the proof generation to an AI model.
The process did not involve writing new software. Instead, Claude analyzed compiled machine code from libraries in Google's OSS-Fuzz security project. It converted crash tests into mathematical problems and constructed proofs. A separate tool called Rocq automatically checked these proofs. Anthropic described the generation process as fully autonomous, noting that human intervention was minimal.
During the verification process, Claude identified hundreds of bugs. The researchers stated that many of these errors would likely have escaped standard testing because they only appear under specific conditions, such as unusually large input files. In one instance, the team found as many security bugs in a widely used PDF reader in one week as are typically reported over a full year. In another case, the AI detected a logical error that had remained unnoticed for more than decade.
Anthropic emphasized that formal verification does not guarantee that software is error-free in all scenarios. The proofs hold only under defined conditions, including a specific processor architecture, single-threaded execution, and inputs smaller than 64 MB. Real-world deployments often differ from these constraints, meaning the verification does not cover every possible hardware or configuration setup.
Cost remains a barrier to widespread adoption. Individual proofs consume hundreds of millions of tokens, and the total project cost has not been published. However, efficiency is improving. Opus 5.5 solves half of the proofs using about 40 percent fewer tokens than the previous version. A smaller test run indicated that proofs can be reused, potentially lowering long-term costs.
Theorem’s roadmap targets critical infrastructure, including glibc, OpenSSL, and cURL. The project shifts the focus from whether AI can program to whether it can prove its code is safe. Anthropic expects this method to become as practical as standard testing in the coming years.





