MISTRAL BUILT AN AI THAT CAN MATHEMATICALLY PROVE YOUR CODE IS CORRECT BEFORE IT SHIPS — AND RELEASED IT FREE TO THE WORLD
Mistral just shipped something the industry has been talking about but nobody has actually delivered at scale. Leanstral is the first open-source AI agent built natively for Lean 4, the formal proof assistant that mathematicians and software engineers use to write code that is provably correct. The latest version, Leanstral 1.5, released on July 2, is a 119 billion parameter model available for free under an Apache 2.0 license and has already uncovered previously unknown bugs in open-source projects during its beta period.
What that means in plain terms is this. When Leanstral generates or reviews code, it does not just pass tests. It produces a mathematical proof that the software behaves exactly as specified. If the proof does not go through, the code does not ship. This is categorically different from running unit tests or fuzzing, which can only catch bugs that someone thought to look for.
The technical architecture is a mixture-of-experts design, meaning only 6 billion parameters are active on any given computation. That makes it dramatically cheaper to run than models with equivalent capability on this specific task.
This matters beyond the research community. As AI generates more and more code in production, the ability to formally verify that code is correct shifts from a theoretical nice-to-have into something businesses will demand before they trust AI-written software in critical systems. Mistral just put that capability in everyone’s hands at no cost, and that should make every other AI coding company pay attention.
Keywords: Mistral Leanstral, formal verification AI, Lean 4 proof assistant, AI code correctness