AI Leap: Anthropic’s Claude Mathematically Proves Code Safety at Scale
By generating massive formal proofs for open-source libraries, Anthropic’s model is transforming software verification from a rare, costly manual process into an automated routine.
By Kaito Sokolov ·

Anthropic has demonstrated that its artificial intelligence model, Claude, can automatically generate mathematical proofs to verify the safety of existing software. Collaborating with Theorem, the company used Claude to produce formal proofs for 123 open-source libraries. This initiative marks a significant step toward making rigorous software verification a standard, automated practice rather than a manual, specialized task.
The core challenge addressed here is the high cost of proving that software runs without errors under all conditions. Historically, formal verification was reserved for critical systems like aircraft avionics because it required immense human effort. For instance, a team of specialists needed 20 person-years to verify the seL4 operating system kernel. By leveraging Claude, the Frontier Red Team generated approximately 180 million lines of proof code in just a few weeks, drawing from test programs in Google’s OSS-Fuzz security project.
Instead of writing new software from scratch, Claude translated crash tests into mathematical problems and analyzed compiled machine code. The process is described as fully autonomous, with an independent program called Rocq checking the generated proofs. While the underlying tools and formal foundations were built by human engineers at Theorem, the actual generation of the proofs required minimal human review.
During the verification process, Claude identified hundreds of bugs that conventional testing methods had missed. These errors often only appeared under specific, rare conditions, such as unusually large input files or specific access sequences. In one notable case, the team found as many security bugs in a popular PDF reader in a single week as are typically reported over an entire year. In another instance, Claude detected a logical error that had remained hidden for over a decade.
Despite these successes, the company notes that formal verification does not guarantee complete error-free performance. The proofs are valid only under strict conditions, including a specific processor architecture, single-threaded execution, and inputs smaller than 64 MB. Since many of these libraries run on varied hardware and configurations, the verification is a powerful but limited tool.
The computational cost of this process is significant, with individual proofs consuming hundreds of millions of tokens. However, Anthropic suggests that the efficiency gains could outweigh the costs. Newer models are proving more efficient; for example, the Opus 5.5 model solves half the proofs using about 40 percent fewer tokens than its predecessor, Opus 5. This efficiency trend suggests that the method could become more economical as models improve.
Reactions to the development highlight a shift in the software industry’s perspective. The project strengthens the argument that AI can not only write code but also guarantee its correctness under defined parameters. This changes the fundamental question from whether AI can program to whether it can prove that its code is safe, potentially reducing the time developers spend on manual review.
Looking ahead, Anthropic expects AI-driven formal verification to become as routine as standard testing. Theorem’s roadmap already targets critical infrastructure components such as glibc, OpenSSL, and cURL. If successful, this approach could lead to more trustworthy software development, allowing developers to rely more heavily on AI-generated code with greater confidence.
The successful application of Claude to this task indicates that software automation may undergo a major transformation. By combining AI’s ability to process vast amounts of data with the rigor of mathematical proof, the industry may move closer to a future where safety verification is an automated, standard part of the coding lifecycle.





