AI Proves Code Safety in Weeks, Not Decades, Shifting Software Development Focus
Anthropic’s latest collaboration demonstrates that large language models can now generate mathematical proofs of correctness for complex software, potentially making rigorous safety checks a standard part of the development cycle.
By Allison Girard ·

For decades, the gold standard for software safety has been formal verification, a process so mathematically rigorous and computationally expensive that it was largely reserved for critical systems like aircraft avionics. This week, Anthropic announced a significant breakthrough in this field, revealing that its Claude AI model can now automatically generate these complex safety proofs for existing software libraries.
The core claim from Anthropic and its partner, Theorem, is that AI can now handle the heavy lifting of proving code correctness. Instead of relying solely on human experts to manually construct mathematical arguments, the system uses Claude to translate standard crash tests into formal mathematical problems. The model then analyzes the compiled machine code to produce extensive proofs that demonstrate the software behaves as intended under specific conditions.
The scale of this effort is substantial. In a period of just a few weeks, Claude generated approximately 180 million lines of proof code. This work focused on 123 open-source libraries sourced from Google’s OSS-Fuzz security project. While the AI did not write the original software, it verified the existing code, effectively acting as an automated mathematician ensuring that the logic holds up against potential failures.
A key differentiator of this approach is the use of an independent verification program called Rocq. This tool automatically checks the proofs generated by Claude, creating a layer of validation that requires minimal human intervention. Anthropic’s Frontier Red Team describes the process as "fully autonomous," although they acknowledge that the underlying formal foundations and tools were developed by human experts at Theorem.
Beyond simply confirming that code works, the system has proven effective at finding hidden errors. During the proof generation process, Claude identified hundreds of bugs that conventional testing methods had missed. These were often edge-case issues that only appeared under very specific conditions, such as unusually large input files or particular sequences of data access. In one notable instance, the team found as many security bugs in a single week for a widely used PDF reader as are typically reported for that software in an entire year.
The process also caught a logical error that had remained undetected for over a decade in another application. Anthropic notes that even when a complete proof fails, the attempt itself often surfaces real bugs. This suggests that the value of the system extends beyond binary pass/fail results, providing developers with deep insights into code stability.
However, there are significant caveats to this achievement. Anthropic clarifies that "formally verified" does not equate to "error-free" in all possible scenarios. The proofs are valid only under strict conditions, including a specific processor architecture, single-threaded execution, and input sizes under 64 MB. Since these libraries often run on diverse hardware and configurations in the real world, the verification provides a strong but not absolute guarantee of safety.
The computational cost of this process is also high, with individual proofs consuming hundreds of millions of tokens. While Anthropic has not disclosed the total project costs, the efficiency gains are becoming apparent. Smaller tests indicate that proofs are reusable, and newer models are becoming more efficient; for example, Opus 5.5 solves half the proofs using about 40 percent fewer tokens than its predecessor, Opus 5.
This development shifts the focus of software automation from simply writing code to proving its safety. If AI can write code and mathematically guarantee its correctness under defined conditions, developers can place greater trust in AI-generated software. This could reduce the time spent on manual code review and lower overall development costs. Anthropic expects this method to become as routine as standard testing, with plans to apply it to critical infrastructure libraries like glibc, OpenSSL, and cURL.






