The current version is Leanstral 1.5, announced on 2 July 2026 under the title "Proof Abundance for All."
The first Leanstral dates from 16 March 2026; it established the concept, and this page keeps its story because it explains the principle. But the numbers that matter today are those of 1.5, and they are not marginally better: on several benchmarks the gap is an order of magnitude.
Both versions are under the Apache 2.0 licence. Version 1.5 is distributed on Hugging Face and through a free API endpoint. Note its laboratory status: Mistral's changelog announces the retirement of that endpoint on 30 September 2026. This is not a model to build production on without a fallback plan.
The Problem: We Trust Code We Don't Verify
AI now writes a considerable share of the code that ships to production. Human review, meanwhile, has not sped up: it takes time, attention, and an expertise few people have over the code they are asked to sign off on.
Mistral frames the problem in exactly those terms: as these models are pushed into high-stakes domains (from frontier research mathematics to mission-critical software) the bottleneck becomes human review. The time and specialised expertise required to verify by hand become the primary brake.
So we have a worrying paradox: we massively use AI to code, while knowing it can make mistakes, and without the means to systematically check whether it has. This is what is called verification debt: a silent risk accumulating in codebases, like a ticking time bomb.
Reviewing AI code line by line is slow, expensive, and doesn't scale. The more models generate code, the more humans become the limiting factor. The solution isn't to review better, it's to automate the verification itself.
Mistral's Idea: What if AI Proved Its Own Code Correct?
That's where Leanstral comes in, announced on 16 March 2026. The concept is simple but radical: instead of generating code and hoping it works, you generate code accompanied by a mathematical proof of its correctness.
The Analogy That Clarifies Everything
Imagine an architect handing you building plans. Today, LLMs are like a very fast but sometimes distracted architect: they draw quickly, but they might forget a load-bearing wall or miscalculate a load.
Leanstral is like that architect delivering their plans with an independent inspection certificate proving the structure holds up. Not an opinion, not a subjective review: a formal proof verified by a mathematical system (the Lean 4 language). If the certificate is valid, the building stands. Period.
What is Lean 4?
Lean 4 is a programming language created by Microsoft Research, designed specifically to write mathematical proofs verifiable by computer. It's what's called a "proof assistant": you formulate a proposition ("this function always correctly sorts a list"), write a proof, and Lean automatically verifies whether that proof is valid.
The crucial point: if the proof compiles in Lean, it's mathematically correct. Not "probably correct," not "correct in the tested cases": correct for all possible cases, without exception.
Unit tests verify particular cases: "for the input [3, 1, 2], the function returns [1, 2, 3]." Formal verification proves the code is correct for all possible inputs. It's the difference between "I tried 1,000 combinations and it worked" and "I have the mathematical proof it will always work, no matter what."
How Leanstral Works
Leanstral isn't just a model that generates text: it's an agent that interacts in a loop with the Lean 4 environment.
The Work Cycle
- Leanstral receives a specification, for example: "prove that this sorting function always produces an ordered list"
- It generates a proof attempt in Lean 4
- Lean verifies the proof automatically, either it compiles (correct), or Lean returns a precise error explaining why
- Leanstral reads the error and corrects its proof accordingly
- Back to step 3, until the proof compiles
It's this loop that makes Leanstral powerful. The LLM is the creative that proposes proof strategies. Lean is the implacable verifier that lets no error pass. One imagines, the other validates. And unlike a human reviewer, Lean never gets tired and never makes a verification error.

Leanstral uses the MCP protocol (Model Context Protocol) with the lean-lsp-mcp server to interact with Lean, and it was specifically trained to get the most out of it. It installs as an agent inside Mistral Vibe, Mistral's unified assistant, described on the Vibe page: no longer just a CLI, but a product available in the IDE and on the web as well. So formal verification isn't an isolated tool: it plugs into an existing workflow.
The Architecture: Very Large on Paper, Very Small in Use
Under the hood, Leanstral uses a highly sparse architecture: a large number of parameters in total, but only a small fraction mobilised for each token produced.
| Characteristic | Leanstral (March 2026) | Leanstral 1.5 (July 2026) |
|---|---|---|
| Total parameters | 120 billion | 119 billion |
| Active parameters per token | 6 billion | 6 billion |
Mistral in fact refers to the first model as "Leanstral-120B-A6B," where "A6B" means 6B active. This is the mixture-of-experts principle covered on the MoE page: you keep a large firm of specialists on the books, but summon only a few of them per question. You pay the compute of a 6-billion-parameter model while drawing on the knowledge of a model twenty times larger.
That is what makes the rest possible. A model with 6 billion active parameters is cheap enough to run that you can launch it several times on the same problem, and that is exactly the winning strategy when an automatic verifier can tell you which attempt is the good one.
The Results of the First Version (March 2026)
The first Leanstral was measured on FLTEval, a benchmark Mistral built for the occasion and published: instead of isolated competition problems, it asks the model to complete the formal proofs of real pull requests to the Fermat's Last Theorem formalisation project. Proof engineering as actually practised, not exercises.
| Configuration | FLTEval Score | Cost |
|---|---|---|
| Leanstral pass@1 | 21.9 | $18 |
| Leanstral pass@2 | 26.3 | $36 |
| Leanstral pass@4 | 29.3 | $72 |
| Leanstral pass@8 | 31.0 | $145 |
| Leanstral pass@16 | 31.9 | $290 |
| Claude Haiku | 23.0 | $184 |
| Claude Sonnet | 23.7 | $549 |
| Claude Opus 4.6 | 39.6 | $1,650 |
This table carries a two-part message, and you need both halves. For $36, Leanstral beats Sonnet (26.3 against 23.7) at one-fifteenth of the price. But Claude Opus 4.6 stayed ahead on raw quality at 39.6, a score the first Leanstral did not reach at any budget. Mistral acknowledged this openly at the time, simply pointing out that Opus cost 92 times more.
Keep that 39.6 in mind: it is the number version 1.5 goes after.
Formal verification plays a key role here: you can launch multiple attempts and keep the one that compiles, with no risk of selecting a false positive.
pass@k means: "we run the model k times, and keep the best result." Normally, selecting the "best" result among k is a problem in itself (how do you know which one is good?). But with formal verification, it's free: Lean automatically verifies whether each proof is correct. You launch k attempts, keep the one that compiles. It's a fundamental advantage of the "generate + prove" paradigm.

Leanstral also beat much larger generalist open-source models: Mistral reports that GLM5 (744 billion parameters) and Kimi-K2.5 (1 trillion) capped out around 16.6 and 20.1 on FLTEval, and that Qwen3.5 (397 billion), the strongest of the three, needed four passes to reach 25.4, a score Leanstral exceeded in two.
Leanstral 1.5 (2 July 2026): The Jump
Version 1.5 changes scale on three fronts at once: training, mathematical results, and (this part is new) verification of real code.
How it was trained
Three stages follow one another: mid-training, supervised fine-tuning, then reinforcement learning with the CISPO algorithm. That last stage runs in two environments worth distinguishing, because they correspond to two different jobs.
- The multiturn environment is the mathematician's. The model is given a theorem statement and must prove or disprove it. It submits a proof, receives the Lean compiler's verdict, revises, tries again, until the proof compiles or its budget runs out.
- The code agent environment is the engineer's. Leanstral finds itself in a raw filesystem: it edits files, runs shell commands, and queries the Lean language server to inspect goals, errors and type information in real time. This is what lets it sustain long-horizon tasks, completing partial proofs in a repository, building auxiliary lemmas along the way.
The mathematical results
| Benchmark | What it measures | Leanstral 1.5 |
|---|---|---|
| miniF2F | Formal mathematics, from elementary to olympiad level | 100% (validation and test) |
| PutnamBench | 672 Putnam competition problems, long proof chains | 587 / 672 |
| FATE-H | Abstract algebra, graduate level | 87% |
| FATE-X | Abstract algebra, PhD level | 34% |
| FLTEval | Proof engineering on real repositories | 28.9 at pass@1, 43.2 at pass@8 |
Two readings stand out.
miniF2F is saturated. 100% on validation and on test: the benchmark no longer measures anything, it is finished. That is the usual signal that a new one has to be built.
Opus's 39.6 has been passed. On FLTEval, Leanstral 1.5 goes from 21.9 to 28.9 at pass@1, and from 31.9 to 43.2 at pass@8, above Claude Opus 4.6's 39.6, and, per Mistral, at one-seventh of the cost. In four months, what was a "much cheaper but not as good" trade-off became "better and cheaper."
Cost per problem is the other striking figure: roughly $4 per Putnam problem, against an estimated $300 or more for Seed-Prover 1.5, the closest competitor on that benchmark.
Mistral publishes a curve that explains the mechanics behind these scores. It tracks the number of Putnam problems solved as the token budget per attempt rises: 44 problems at 50,000 tokens, 244 at 200,000, 493 at 1 million, 587 at 4 million.
What matters is that the curve climbs without ever flattening. The model does not give up when a proof runs long: it keeps reasoning, editing files and revising across millions of tokens. In other words, compute budget converts directly into solved problems, you can buy performance.
What it can do on real code
This is the most concrete part, and the most telling for anyone concerned with safety-critical software. Leanstral 1.5 was trained primarily for mathematics, but Mistral shows two code use cases.
Proving a complexity bound. On a real AVL tree implementation (a self-balancing binary search tree), Leanstral proved the time-complexity guarantees: that insertion and deletion really are O(log n). The effort is remarkable, over 2.7 million tokens and 22 context compactions. The model established a bound of about 48 steps per unit of height for insertion, then connected height to tree size through a logarithmic relationship.
Finding bugs that tests miss. Mistral built an automated pipeline: the Aeneas tool translates Rust code into Lean, Leanstral infers the programmer's intent, derives correctness properties from it, then tries to prove them, and, after four failures, tries to prove their negation instead. Across 57 repositories tested, the pipeline flagged 47 violated properties, of which 11 were genuine bugs, and 5 were previously unreported on GitHub.
Mistral's example is a textbook case. In the datrs/varinteger library, the zigzag decoding function computed (value + 1). On input U64.MAX, that addition overflowed: a crash in debug mode, silent corruption in release mode.
This is precisely the kind of edge case testing and fuzzing miss, because you have to think of trying exactly that value. A formal proof, by contrast, must cover every possible input, the overflow cannot slip through. The pipeline found it on its own.
For anyone assessing product risk, that is the central argument: formal verification does not hunt for likely bugs, it eliminates an entire class of possible ones.
Access and Deployment
Leanstral 1.5 is distributed under an Apache 2.0 license, with three access modes:
- Via Mistral Vibe, install Vibe (
uv tool install mistral-vibe), install the agent, then launch it withvibe --agent leanin a project containing.leanfiles. Mistral strongly recommends adding thelean-lspMCP server. - Free API, the
leanstral-1-5endpoint, free of charge. The changelog lists it on the labs side (labs-leanstral-1-5) and announces its retirement on 30 September 2026. - Self-hosted, download the weights from Hugging Face and deploy on your own infrastructure. This is the only route with no expiry date.
Why This Is a Paradigm Shift
Leanstral doesn't just settle for being another good model. It changes the fundamental question of AI-assisted coding. Until now, the workflow was: generate code, review it, hope it's correct. With formal verification, it becomes: generate code, prove it, have the mathematical guarantee it's correct.
This is particularly critical in three domains:
- Safety-critical code (aerospace, medical, finance, nuclear) where a bug can cost lives or billions
- Mathematics, Leanstral can help mathematicians formalize and verify complex proofs
- Trust in AI, if generated code is proven correct, the question of AI reliability is resolved (at least for the formally verified portion)
The first Leanstral announcement, on 16 March 2026, landed the same day as Mistral Small 4 and the NVIDIA partnership, a busy day for Mistral.
The title chosen for version 1.5, "Proof Abundance for All," states the ambition plainly: make formal proof abundant rather than scarce. Until now, formally proving a program required a specialist, weeks of work, and a budget only aerospace or rail could justify. A free, Apache 2.0 model that finds previously unreported bugs in open-source repositories for a few dollars a problem moves that frontier.
- Leanstral 1.5: Proof Abundance for All, the 2 July 2026 announcement, benchmarks and case studies
- Leanstral: Open-Source foundation for trustworthy vibe-coding, the founding announcement of 16 March 2026
- Mistral model catalogue, current versions, licences and status