alexi.sh
All articlesBrowser securityNetwork privacyPrivacy toolingThreat modelingAI codingDev tooling

alexi.shAI Engineering Lab

ai-coding

Mistral Leanstral 1.5: The Open-Source AI That Proves Code and Math Correct

PrivSec Lab3 min read
A hand writing calculus equations in chalk on a blackboard

Mistral released Leanstral 1.5, a free Apache-2.0 model for Lean 4 that formally proves math and code correct. What formal verification is, the benchmark numbers Mistral claims, and where the model actually fits for developers.

Mistral has released Leanstral 1.5, a free open-source AI model that does something unusual: it helps prove code and math correct. Most coding assistants generate code and hope it works. Leanstral 1.5 works inside Lean 4, a proof assistant, where every step is checked. According to Mistral, it launched on 30 June 2026 under the Apache-2.0 license. Here is what it is, the numbers Mistral claims, and where it actually fits. For the wider field, see our best coding LLMs 2026 overview.

What Leanstral 1.5 is

According to Mistral, Leanstral 1.5 is a code agent model built for Lean 4. Lean 4 is a proof assistant. It can express complex math objects and also software specifications, like properties of Rust code fragments.

Mistral says the model works like a developer in a real filesystem. It edits files, runs bash commands, and uses the Lean language server. That lets it take on long tasks: completing a partial proof in a repository, building helper lemmas, and pushing through many rounds of context.

On the numbers, Mistral describes a mixture-of-experts model with 119 billion total parameters and about 6.5 billion active per token. It has a 256k-token context window. It is on Hugging Face as mistralai/Leanstral-1.5-119B-A6B, with a free API. If you run models locally, our best local LLM for coding guide gives the wider context.

What formal verification means for developers

This is the part that matters, so here it is plainly. Testing checks your code on some inputs. Formal verification proves it is correct for all inputs, using math. A proof assistant like Lean 4 checks every logical step. If the proof passes, it is a guarantee, not a sample.

That power comes at a cost. Writing formal proofs by hand is slow and hard, which is why most software never gets verified. The hope behind a model like Leanstral is to make that work faster and more reachable. It is closer to an AI code review tool for correctness than to a chatbot.

Colourful lines of programming source code on a dark screen

The benchmark claims

Mistral reports strong benchmark results. Treat these as the vendor's own numbers until others reproduce them.

According to Mistral, Leanstral 1.5 saturates miniF2F and solves 587 of 672 PutnamBench problems. Mistral also claims state-of-the-art results on FATE-H at 87% and FATE-X at 34%. On FLTEval, Mistral says pass@1 rises from 21.9 to 28.9, and pass@8 rises from 31.9 to 43.2.

These are proof benchmarks, not general coding tests. A high PutnamBench score means the model is good at hard formal math. It does not mean it will write your web app. Read the numbers for what they measure.

What it means for you

For most developers, Leanstral 1.5 is not a daily driver today. It is a specialist tool for Lean 4 and formal proofs. If you do not write proofs, it will not change your workflow this week.

But the direction is worth watching. An open-source model aimed at provable correctness is a different bet from the usual code-completion race. Over time, cheaper formal verification could reach more of the code that really needs it: cryptography, aerospace, finance, and smart contracts. If AI-assisted proofs get good and cheap, "tested" may slowly give way to "proven" for the highest-stakes code.

The honest caveats

Two caveats keep this grounded. First, the benchmark numbers are Mistral's own claims, published with the release. They are promising, but independent reproduction is what turns a claim into a fact. Second, this is a narrow tool. Lean 4 has a steep learning curve, and formal verification is still niche work, not something most teams do.

The honest read: Leanstral 1.5 is a real, free, capable step for a hard problem, released openly so anyone can test it. That openness is the strongest part of the story. If provable correctness matters to your work, it is worth a look. If it does not, keep an eye on the space and stick with the tools in our best AI coding assistants roundup.

Photo: Pexels (source)

Also available in

FAQ

What is Mistral Leanstral 1.5?
According to Mistral, Leanstral 1.5 is an open-source AI model for Lean 4, a proof assistant. It helps write and check formal proofs of both mathematics and program correctness. Mistral released it on 30 June 2026 under the Apache-2.0 license, and it is available on Hugging Face and through a free API.
Is Leanstral 1.5 free and open source?
Yes. According to Mistral, Leanstral 1.5 is released under the Apache-2.0 license, which is a permissive open-source license. The model weights are on Hugging Face as mistralai/Leanstral-1.5-119B-A6B, and Mistral also offers a free API and access in Mistral Labs.
How big is Leanstral 1.5?
According to Mistral, Leanstral 1.5 uses a mixture-of-experts (MoE) design with 119 billion total parameters and about 6.5 billion active per token. It has a 256k-token context window, which lets it hold long proof files and related code at once.
What is formal verification and why does it matter?
Formal verification uses math to prove that code or a theorem is correct, not just to test it on some inputs. A proof assistant like Lean 4 checks every step, so a passing proof is a guarantee, not a sample. It matters most for high-stakes code, but it is hard and slow, which is why AI help is of interest.