Automated Code Verification: Claude Generates 180 Million Lines of Proof
Anthropic and Theorem have demonstrated that AI can autonomously mathematically verify open-source libraries, uncovering hundreds of latent bugs in the process.
By Takeshi Ellis ·

For decades, the practice of formally verifying software code has remained a niche and prohibitively expensive endeavor, reserved largely for mission-critical systems like aviation control software. This status quo is shifting as a new collaboration between Anthropic and Theorem demonstrates that artificial intelligence can now handle the rigorous mathematical proof generation traditionally required to guarantee code correctness.
The scale of the recent effort is substantial. In a matter of weeks, Anthropic’s Claude model produced approximately 180 million lines of mathematical proof code. This output was generated to verify 123 open-source libraries, which were sourced from Google’s OSS-Fuzz security project. The rapid generation of these proofs marks a significant departure from the traditional timeline, where such tasks could take years or even decades to complete by hand.
The methodology behind this achievement involves translating existing crash tests into mathematical problems. Rather than writing new software from scratch, Claude analyzed compiled machine code to create extensive proofs of correctness. These proofs are then checked by an independent verification program known as Rocq. According to the researchers involved, this process operates with minimal human intervention, leading them to describe the workflow as "fully autonomous," although the underlying formal foundations and tools were developed by human experts at Theorem.
The financial and temporal costs of formal verification have historically been a major barrier to its widespread adoption. For context, a team of specialists previously required 20 person-years to formally verify the seL4 operating system kernel, a relatively small piece of software. By automating this process, Anthropic and Theorem have drastically reduced the time and labor required, making the technique more accessible for a broader range of applications.
One of the most significant outcomes of the project was the discovery of numerous bugs that had evaded conventional testing methods for years. Claude identified hundreds of flaws during the proof-generation process and was permitted to fix them independently. Many of these issues only manifested under highly specific conditions, such as unusually large input files or particular sequences of data access, which standard testing suites often failed to trigger.
The efficiency of the AI in detecting these latent errors was highlighted by specific case studies. During the verification of a widely used PDF reader, the team found a volume of security bugs in just one week that typically accumulates over an entire year. In another instance, Claude uncovered a logical error in a separate application that had remained undetected for more than a decade. Anthropic notes that even when a complete proof fails, the attempt itself often reveals genuine defects in the code.
Despite the promising results, the project comes with strict practical limitations that define the scope of its current utility. Anthropic clarifies that "formally verified" does not equate to "error-free" in all contexts. The proofs generated are valid only under specific conditions, including a defined processor architecture, single-threaded program execution, and input sizes under 64 MB. These constraints mean that the verification does not automatically apply to all hardware configurations or multi-threaded environments in which these libraries might operate.
The computational expense of this process remains high, with individual proofs requiring hundreds of millions of tokens to generate. While Anthropic has not disclosed the total cost of the project, the findings suggest that AI-verified code could reduce the need for extensive manual review. This shift could lower costs across the entire software development lifecycle. Preliminary data also indicates that newer models are becoming more efficient, with Opus 5.5 solving half of the required proofs using approximately 40 percent fewer tokens than its predecessor, Opus 5.
The implications of this technology extend beyond simple code generation to the broader question of software automation. If AI can write code and simultaneously prove its safety under defined parameters, the industry’s focus shifts from questioning AI's ability to program to trusting its ability to verify its own work. Anthropic anticipates that this process will soon become as routine as standard testing, with Theorem’s roadmap targeting critical infrastructure components such as glibc, OpenSSL, and cURL for future verification efforts.






