Mistral has open sourced Leanstral 1.5, a model whose entire purpose is to prove that code is correct rather than just test that it usually works. Released on July 2, 2026 under a permissive Apache 2.0 license, it is built for Lean 4, the proof assistant that lets you state a property about a program and then check it with mathematical certainty. That can sound academic until you look at the results. Leanstral 1.5 solved 587 of 672 problems on the PutnamBench math benchmark and, more usefully for engineers, uncovered 5 previously unknown bugs across 57 real code repositories. Because it ships as open weights, you can download it and run the whole thing on your own hardware.
The short answer
Mistral released Leanstral 1.5 on July 2, 2026, an open weights Apache 2.0 model built for Lean 4, the proof assistant behind formal software verification. It solved 587 of 672 PutnamBench problems, saturated miniF2F, and reached state of the art on FATE-H and FATE-X. More practically, it uncovered 5 previously unknown bugs across 57 real repositories. The model is a Mixture of Experts with 128 experts, 119 billion total parameters and about 6.5 billion active per token, a 256,000 token context, and it is available on Hugging Face with a free API.
Testing tells you a program worked on the inputs you thought to try. Proof tells you it works on every input, including the ones you never imagined. That gap is the whole reason formal verification exists, and it is also why most teams never touch it. Writing proofs is slow and needs a kind of expertise that is genuinely scarce. Mistral's Leanstral 1.5, open sourced on July 2, 2026, is a direct attempt to shrink that cost, and it does it in the open, under an Apache 2.0 license, with weights you can download.
What Leanstral 1.5 is
Leanstral 1.5 is a model tuned for one job, writing and checking proofs in Lean 4. Lean 4 is a proof assistant, a language where you state a precise property and then build an argument the machine verifies mechanically. The practice of doing that at scale is called proof engineering, and it has always been labor intensive. Leanstral is aimed squarely at that labor.
Under the hood it is a Mixture of Experts model. It carries 119 billion parameters in total but activates only about 6.5 billion of them per token, drawn from 128 experts with 4 active at a time. The context window runs to 256,000 tokens, which matters because real proofs and the code they describe are long. The weights are published on Hugging Face under Apache 2.0, and there is a free API, so you can either self host it or try it without signing anything.
Formal verification, minus the jargon
Here is the idea in one example. Suppose you write a function that sorts a list. A test suite feeds it some lists and checks the output looks sorted. Formal verification instead states a claim, that for any input list the output is sorted and is a permutation of the input, and then proves it holds for all lists, not the handful you tested. When the proof checks, there is no remaining doubt about that property. The function cannot surprise you on an input you forgot.
The price has always been the proof itself. It is exacting work, and the people who can do it fluently are rare. A model that can draft, repair, and extend Lean 4 proofs turns a specialist bottleneck into something a broader team can attempt, which is the actual news here.
When this is worth reaching for
Formal methods are not free, and Leanstral does not make them free, it makes them cheaper. The judgment call is where correctness is worth proving rather than testing. Cryptographic code, financial calculations, compilers, protocol implementations, and safety critical control systems are the classic cases, the places where a single wrong edge case is a headline rather than a hotfix. The ordinary web application, with its forms and its database, is usually fine with good tests.
Two details make Leanstral more than an academic curiosity. The first is that it found real bugs, 5 of them across 57 repositories, which means it can point at genuine defects and not just clear textbook benchmarks. The second is the license. Open weights under Apache 2.0 mean the model runs on your infrastructure, so proprietary or sensitive code never leaves your machines to be checked. For a domain that lives and dies on trust in the toolchain, that is not a small thing. Formal verification has spent years as the technique everyone admired and almost nobody used. A capable open model is how that starts to change.
Sources and further reading
- Mistral AI: Leanstral 1.5, proof abundance for all
- MarkTechPost: Mistral AI releases Leanstral 1.5, an Apache 2.0 Lean 4 code agent model solving 587 of 672 PutnamBench problems
- The Decoder: Mistral's open source Leanstral 1.5 aces formal math benchmarks and catches real bugs in code
Frequently asked questions
What is Leanstral 1.5?
Leanstral 1.5 is an open weights model from Mistral, released on July 2, 2026 under an Apache 2.0 license, built specifically for Lean 4, a proof assistant used in formal software verification. Rather than generating code and hoping tests catch the mistakes, it writes machine checkable proofs that a piece of code satisfies a stated property. It is aimed at proof engineering, the practice of building and maintaining these formal guarantees at a realistic scale.
What is Lean 4 and formal verification, in plain terms?
Lean 4 is a language and proof assistant where you state a precise claim, for example that a sorting function always returns a sorted list of the same elements, and then construct a proof the machine can check step by step. Formal verification is that whole discipline. Instead of testing a program on many inputs and inferring it is probably fine, you prove the property holds for all inputs. The catch has always been that writing those proofs is slow and demands rare expertise, which is exactly the bottleneck a capable model can loosen.
How big is the model and can I run it myself?
It uses a Mixture of Experts design with 128 experts, 4 active per token, totaling 119 billion parameters with roughly 6.5 billion activated per inference. The context window is 256,000 tokens. Because only a fraction of the parameters fire on each token, it is lighter to run than its total size suggests, and the open weights are on Hugging Face under Apache 2.0, alongside a free API, so you can self host or try it without a contract.
How well does it actually perform?
On formal math benchmarks it saturates miniF2F, solves 587 of 672 PutnamBench problems, and reaches state of the art scores on FATE-H at 87 percent and FATE-X at 34 percent. The result that matters most for working engineers is the practical one. In testing across 57 code repositories it surfaced 5 previously unknown bugs, which is the difference between a benchmark toy and a tool that earns its place in a pipeline.
When would a normal team actually use this?
Formal verification pays off where a bug is expensive or dangerous, think cryptography, financial logic, compilers, protocol implementations, and safety critical control code. Most web CRUD does not need it. But if you own a small core of code that absolutely must be correct, a model that can help write and maintain Lean 4 proofs lowers the expertise barrier that has kept formal methods out of most shops. Open weights also mean your proprietary code never has to leave your machines.