Claude writes 180 million lines of math to verify 123 code libraries
Anthropic and partner Theorem used the AI model to formally verify open-source software in weeks, a process that previously took human specialists decades.
By Giovanni Serrano ·

Anthropic used its Claude model to generate approximately 180 million lines of mathematical proof code, verifying the behavior of 123 open-source libraries in a matter of weeks. The company worked with partner Theorem on this task, which has historically required immense human effort to complete. This approach marks a shift from manual verification to automated mathematical validation of existing software.
Formal verification is a rigorous method for proving that software runs without error under all possible conditions. Until now, the technique was reserved for critical systems like Airbus avionics because of the high cost and labor required. For example, specialists spent 20 person-years verifying seL4, a small operating system kernel. Anthropic and Theorem aimed to reduce this time and resource burden by delegating the proof generation to an AI model.
Claude did not write new software but instead analyzed compiled machine code from libraries in Google's OSS-Fuzz security project. The model converted crash tests into mathematical problems and constructed extensive proofs. A separate verification program called Rocq automatically checks these proofs. Anthropic states the process requires almost no human reviewers, though the underlying tools and formal foundations were built by humans at Theorem. The researchers describe the proof generation as fully autonomous.
During the verification process, Claude identified hundreds of bugs and was permitted to fix them. The researchers noted that many of these errors would likely escape conventional testing because they only appear under narrow conditions, such as unusually large input files or specific access sequences. In one test involving a widely used PDF reader, the team found as many security bugs in one week as are typically reported for that software in a full year. In another case, Claude identified a logical error that had gone unnoticed for more than a decade.
Anthropic emphasizes that formal verification does not guarantee software is completely error-free. The proofs hold only under specific conditions, including a particular processor architecture, single-threaded programs, and inputs smaller than 64 MB. Real-world deployments often run on different hardware and configurations. Individual proofs consume hundreds of millions of tokens, and the company has not published total project costs. However, a smaller test run showed that Opus 5.5 solves half the proofs using about 40 percent fewer tokens than Opus 5.
The project shifts the focus from whether AI can program to whether it can prove that code is safe. Anthropic expects formal verification with AI to become as practical as standard testing. Theorem's roadmap already targets critical infrastructure including glibc, OpenSSL, and cURL.
Source: The Decoder





