Anthropic's Claude Generates 180 Million Lines of Proof Code for Open-Source Libraries
Anthropic has used its Claude model to produce formal mathematical proofs that existing open-source code is correct, generating roughly 180 million lines of proof code for 123 libraries and uncovering bugs that years of conventional testing had missed.
Anthropic has used its Claude model to generate formal mathematical proofs that existing open-source software behaves as intended, producing roughly 180 million lines of proof code covering 123 open-source libraries. In the process, the model identified bugs that years of conventional testing had failed to catch, according to the company.
The effort marks a step toward what Anthropic describes as its broader goal: making formal verification with artificial intelligence as routine a part of software development as standard testing is today. Formal verification uses mathematical logic to demonstrate that a program meets a precise specification, rather than relying on sample inputs and observed outputs.
The scale of the output is notable. Writing 180 million lines of proof code by hand would be an enormous undertaking, typically reserved for small, highly critical pieces of software where failure is unacceptable. Extending the technique across more than a hundred open-source libraries suggests that AI models may be able to lower the cost and effort involved in proving code correct.
The discovery of previously undetected bugs is perhaps the most concrete result. Conventional testing can only show that software works for the cases it is tested against; it cannot rule out failures in untested conditions. A formal proof, by contrast, aims to establish that a program satisfies its specification for all possible inputs. Bugs that survived years of testing therefore point to gaps that mathematical analysis can expose.
Anthropic's announcement reflects a growing interest in using large language models not only to write software but also to check it. Code generated by AI has raised concerns about reliability and security, and formal verification offers a way to establish guarantees about behavior rather than relying on review alone. If proofs can be produced at scale, they could complement existing testing and code review practices.
The approach also raises questions about how such proofs are validated and maintained. Proof code must itself be correct, and it must be updated as software changes. How organizations integrate AI-generated proofs into their development workflows, and how much confidence they place in them, will shape whether formal verification becomes a routine practice or remains a specialized discipline.
For now, Anthropic is presenting the work as evidence that AI can take on a task long considered too labor-intensive for widespread use. The company's stated aim is to make formal verification as ordinary as testing, a shift that would change how developers reason about the safety and correctness of the software that underpins much of modern life.
4
