Anthropic announced that it has developed, jointly with research organization Theorem, a method for performing formal verification of software using its large language model (LLM) Claude. The effort succeeded in mathematically proving that bugs will not cause crashes across 123 open-source libraries, demonstrating the potential for AI to dramatically streamline verification work that until now has been confined to life-critical code such as aircraft flight-control systems.
Formal verification is a technique for expressing a program’s behavior as a mathematical model and logically proving that no defects arise for any input. The idea itself is not new, but producing proofs requires enormous manual effort and time. For the legendary microkernel seL4, writing the code is said to have taken only two person-years, while completing formal verification took 20 person-years. As a result, practical application has been limited to a very narrow set of fields.
In this initiative, Anthropic built a system in which Claude repeatedly writes proofs and fixes bugs. Verification targeted not source code but the RISC-V machine instructions that actually run on the CPU after compilation. Theorem described the behavior of RISC-V instructions and Linux processes as mathematical models, and Claude then wrote the proofs on top of them. Conditions were limited to single-threaded, statically linked environments with fixed memory usage.
The proofs Claude wrote reached roughly 1 billion lines, of which about 180 million lines passed machine verification by the proof checker Rocq. More than half of the total was reportedly auto-generated by tools Claude itself created. The verification work uncovered hundreds of bugs, which Claude repeatedly fixed. In one decompression tool, a counter underflow that occurs only with a peculiar input of about 20 MB was identified in the course of attempting a proof.
One example cited to illustrate the depth of verification was the C++ HTTP library cpp-httplib. To eliminate the possibility of stack exhaustion from recursion depth, Claude delved into the C++ standard library’s red-black tree implementation and proved at the machine-code level that tree height stays within logarithmic order. Claude also independently wrote a mathematical model of the x86 instruction set, and in the process found hundreds of errors in the official reference documentation, as well as a small number of defects lurking in CPU hardware itself.
Cost remains an issue. A single verification can consume more than 100 million tokens. However, Anthropic notes that the number of tokens required declines as model performance improves. In a comparison across 36 small-scale verification tasks, the tokens Claude Opus 5.5 needed to complete half the tasks were about 40% fewer than those required by Claude Opus 5.
According to Theorem’s estimates, verification speed has been doubling roughly every two months across seven state-of-the-art models released between May and September 2026. In addition, sharing work areas among agents reduced token consumption for the same task by 17%, and proof reuse is advancing among projects that use common base libraries.
The cost of applying the approach across the entire software ecosystem was also estimated. Using the Nix ecosystem as a sample, a 9 MB shared base library accounts for dependencies of two-thirds of all machine code, and OpenSSL alone is included in the runtime dependencies of about 16,000 packages. Verifying OpenSSL once at current prices would cost about $220,000 (roughly ¥35 million), but spread across each downstream package it comes to about $14 (roughly ¥2,200). If verification capability doubles every two months and work proceeds on an annual budget of $100 million (roughly ¥16 billion), an estimated 95% of the Nix ecosystem’s machine code could fall within proof coverage by the end of 2027 at a total cost of about $134 million (roughly ¥21 billion).
Formal verification has limits, however. Even if the absence of bugs is proven for RISC-V, the possibility of defects on Arm or x86 remains. Showing that there are no bugs in actual operating environments requires modeling every machine configuration on which a program could run. Moreover, the proof checker only confirms whether a proof conforms to logical rules; the final judgment on whether the model correctly reflects real-world requirements is left to humans.
Anthropic takes the view that such constraints can be overcome as understanding of LLM-based formal verification methods deepens and models improve. Theorem is offering its LLM-based formal verification method free of charge to open-source projects and has also published the skills used for verification. Proofs for the first 25 libraries and 60 verification entry points are available on GitHub, where anyone can download them and check the results themselves.
Behind this is the fact that AI’s growing capabilities are surfacing software vulnerabilities in huge numbers, outpacing manual fixes. Even in software as heavily scrutinized as the Linux kernel, Debian’s September security advisory alone listed more than 1,000 vulnerabilities. OSS-Fuzz, which Google launched in 2016, has run more than 1 trillion cumulative fuzz tests that crash programs with semi-random inputs, but it does not cover every path—input sizes, for example, are capped at around 1 MB. The research team reported that when it deliberately planted seven bugs in a Python interpreter written in Rust by Claude, random testing missed five, whereas the proof missed none.
Aengus Lynch, one of Theorem’s researchers, said, “It’s a terrifying time for the internet, but I believe this is a ray of hope,” expressing the view that a day will come when all critical software is formally verified.