The term ‘slop’ has emerged as a defining concept in the AI industry for 2026. It describes low-quality outputs from large language models—errors, hallucinations, or nonsensical code that fail to meet functional or safety standards. As AI-generated code becomes increasingly common in software development, the risk of producing such slop has grown exponentially. This has led to a critical shift in how developers approach AI-assisted coding, moving from intuitive, rapid prototyping to a more rigorous, verifiable process. Source: latent.space.
What Is Formal Verification?
Formal verification uses mathematical logic to prove that software or hardware behaves correctly under all conditions. Unlike traditional testing, which checks for errors after code is written, formal verification constructs logical proofs that a system meets its specifications. These proofs are not merely theoretical—they are being implemented in real-world systems, from autonomous vehicles to financial transaction processors.
For instance, Amazon’s Kiro agentic development environment uses cvc5, a solver for satisfiability modulo theories (SMT), to analyze specifications and generate tests. This process ensures that code not only compiles but also adheres to precise behavioral requirements. The system can validate that a function behaves correctly across all possible inputs, not just common cases.
Clark Barrett, co-founder and co-CEO of &Truth;, is a leading figure in this field. He developed cvc5 while at Stanford and notes its widespread use in production systems. He says cvc5 is now called billions of times a day in Amazon’s pipelines. This scale of deployment underscores the practicality and reliability of formal verification tools in enterprise environments.
How AI and Lean Enable Verification
Lean is an open-source programming language and proof assistant. It allows users to write mathematical proofs that can be independently verified. Unlike general-purpose programming languages, Lean is designed specifically for formal reasoning and is used to express logical statements with high precision.
Recent developments show AI models using Lean to solve complex math problems. Clark Barrett, co-founder of &Truth;, noted that GPT-6.2 Astra produced what Vals believes is the first Lean proof of Smoktunowicz’s Gap Theorem—a result that had remained unsolved for decades. This achievement demonstrates that AI models can now generate proofs that are not only correct but also publishable in academic circles.
This effort represents a significant milestone in the intersection of AI and mathematical discovery. By encoding the theorem in Lean, researchers were able to verify every logical step, eliminating ambiguity and potential error.
Anthropic mathematician Levent Alpöge claims to have used Claude to prove the 167-year-old Riemann hypothesis. He posted the proof in Lean, marking a significant milestone in AI-assisted mathematical discovery. This achievement suggests that AI models are not just generating content—they are now capable of producing rigorous, peer-reviewed mathematical proofs that can be independently validated.

&Truth; is building a ‘verification machine’ on top of the Lean framework. Its goal is to read code in any programming language, verify that it meets precisely stated requirements, and allow developers to trust the output without needing to understand every line of code. This capability is transformative because it bridges the gap between high-level specifications and executable code, ensuring that the final product is both functional and logically sound.
Clark Barrett explains that Lean acts as a ‘very sophisticated checker for mathematics.’ It doesn’t evaluate the correctness of the code’s logic—it only checks that no mathematical errors were made in the proof. This distinction is crucial: formal verification does not require the developer to understand the entire implementation, only that the specification and proof are logically consistent.
Formal Verification in AI Training
Companies like Axiom Math are using formal verification not just to catch errors, but to improve AI models themselves. Axiom’s AI system, AxiomProver, generates Lean proofs as part of its training loop. These proofs serve as feedback signals that help refine the model’s reasoning capabilities.
Carina Hong, CEO of Axiom Math, stated in an interview with Latent Space in June that formal verification is about ‘scaling brilliance,’ not just avoiding mistakes. She emphasized that verified AI systems can learn from correct proofs, allowing them to grow more intelligent over time. This approach shifts the focus from error correction to intelligent reasoning development.
Harmonic uses a system called Aristotle—an automated theorem prover—that writes proofs in Lean. The AI generates the proof, and Lean checks every step. This ensures results are not dependent on the AI being correct. Instead, the output is validated by a mathematically grounded system, making the final result objectively reliable.
Security Applications in a Risk-Prone Era
With growing concerns about AI-generated code and cybersecurity, formal verification is gaining traction as a defense mechanism. Memory safety is one of the most critical vulnerabilities in software. A single buffer overflow can lead to system compromise, data theft, or denial-of-service attacks.
&Truth; aims to scan all C code—both open and closed source—to ensure memory safety. If a piece of code is found to be unsafe, the system points to the exact location and suggests a fix. This capability is especially valuable in legacy codebases, where vulnerabilities are often hidden in outdated or poorly documented sections.

Theorem, a competitor to &Truth;, states that ‘verification is the only defense that holds while adversaries scale.’ As AI-powered attacks grow in sophistication, traditional security measures are increasingly inadequate. Formal verification offers a proactive, mathematically grounded defense that can detect vulnerabilities before they are exploited.
Theorem has collaborated with Anthropic on a blog post entitled ‘LLMs are making formal software verification feasible at a much larger scale.’ The post highlights that large language models are now capable of generating high-quality verification tasks, reducing the need for human intervention in proof construction.
Anthropic reported that Opus 5.5 achieved a 50% solve rate on 36 small verification tasks using 40% fewer tokens than Opus 5. This improvement suggests that verification is becoming more efficient as models are trained on longer, more complex tasks. As training data expands to include real-world system behaviors and edge cases, the token efficiency of verification will likely continue to improve.
From Vibe-Coding to Veri-Coding
Developers are moving from ‘vibe-coding’—writing code based on intuition—to ‘veri-coding,’ where correctness is verified before deployment. This shift is not just a trend; it is a necessary evolution in software development as AI-generated code becomes more prevalent.
Clark Barrett said that with a verification machine connected to an AI agent, a developer can say, ‘I want to build this.’ The agent then works with the formal verification tool to produce code that works the first time. The key shift is in workflow: developers spend more time defining specifications and reviewing them, rather than writing or reviewing code.
As Nader Dabit of Cognition noted, ‘outcome engineering’ is a growing concept. When agents generate code, humans need a way to verify correctness. Formal verification offers a practical path to that. It enables developers to trust AI-generated outputs not just as prototypes, but as production-ready, secure, and reliable systems.
Companies like &Truth;, Harmonic, Theorem, and Axiom Math are advancing this field. Their systems aim to make formal verification accessible, efficient, and integrated into daily development. While current verification processes are still token-intensive, progress is evident. As models are trained on longer, more complex tasks, efficiency is expected to improve.
These tools may soon become standard in AI-driven software development. They offer a way to ensure that AI-generated code is not just functional—but safe, reliable, and mathematically sound.
Sources & further reading
Featured image: The War Against Slop and an Emerging Weapon to Fight it: Formal Verification. Via original publisher. Image source

