Leanstral
Leanstral by Mistral: What It Is, How It Works, and Why It Matters for Lean 4
Leanstral is Mistral’s new open-source Lean 4 code agent built for proof engineering and formal verification. Here is what it does, how it works, and where it fits.

On this page
- What is Leanstral?
- Why Leanstral matters
- Leanstral model specs
- Leanstral vs general coding models
- Leanstral and Lean 4
- Benchmark claims and performance
- How to use Leanstral
- 1. Mistral Vibe
- 2. Labs API
- 3. Self-hosting the weights
- Who should pay attention to Leanstral?
- Final thoughts
- FAQ
- What is Leanstral?
- Is Leanstral open source?
- What is Leanstral used for?
- How do you access Leanstral?
- Is Leanstral a general coding model?
- Source
Mistral has introduced Leanstral, a new open-source model built specifically for Lean 4, the proof assistant widely used in theorem proving and formal verification. Unlike general coding models that mainly generate code and leave verification to humans, Leanstral is positioned as a model for proof engineering in realistic formal repositories.
This makes Leanstral notable for a simple reason: most AI coding models are optimized for writing code quickly, while Leanstral is aimed at writing and reasoning about code in environments where correctness matters more than raw speed. In other words, it targets a different layer of the development stack.
What is Leanstral?
Leanstral is a specialized AI model from Mistral designed for working with Lean 4 projects. Mistral describes it as the first open-source code agent for Lean 4, intended to operate inside realistic proof repositories rather than only solving isolated benchmark-style math problems.
That positioning matters because Lean 4 is not just another programming language. It is a proof assistant used to define mathematical objects, encode formal specifications, and verify correctness. A model trained for Lean 4 therefore needs stronger repository awareness, better theorem-proving behavior, and more reliable interaction with verification tooling than a standard code model.
Why Leanstral matters
The core idea behind Leanstral is that AI coding should not stop at code generation. In high-stakes domains such as mathematical research, verified software, and mission-critical systems, generated code still needs human review. Mistral frames this as a scaling bottleneck: the limiting factor is no longer only generation quality, but the human effort required to verify outputs.
Leanstral is Mistral’s attempt to move toward a workflow where the model does more than propose code. It is meant to help with tasks that can be formally checked, using Lean as a verifier. This is a meaningful shift from “AI that writes code” toward “AI that writes code and works within systems that can prove it satisfies specifications.”
Leanstral model specs
Based on Mistral’s published materials, Leanstral has the following public characteristics:
- Release date: March 16, 2026
- Positioning: first open-source code agent for Lean 4
- Context window: 256k
- Active parameters: 6B active parameters
- License: Apache 2.0
- Availability: Mistral Vibe, Labs API, and self-hosted weights
- API endpoint:
labs-leanstral-2603
For developers and researchers, the practical significance is clear: Leanstral is not locked into a single cloud UI. It can be tried in Mistral’s ecosystem or downloaded for local or controlled deployment.
Leanstral vs general coding models
The easiest way to understand Leanstral is to compare it with a normal coding model.
A general coding model is usually optimized for:
- code completion
- bug fixing
- refactoring
- documentation generation
- broad programming language support
Leanstral is optimized for:
- Lean 4 workflows
- formal proof completion
- repository-level proof engineering
- theorem and specification-oriented tasks
- interaction with verification tooling and MCP-based workflows
This does not make Leanstral “better” than a general code model in every context. It makes it better aligned for one specific class of work: verified reasoning in Lean environments.
If a developer wants help writing React components, API routes, or SQL migrations, a broader coding model may still be the better fit. If the goal is proving properties, migrating Lean code, or operating in formal repositories where correctness is machine-checkable, Leanstral is much more relevant.
Leanstral and Lean 4
Lean 4 has become one of the most important environments for interactive theorem proving and formal methods. A model tuned for Lean 4 needs to do more than memorize syntax. It must understand tactic behavior, theorem structure, repository conventions, and the difference between “text that looks plausible” and “proof steps that actually check.”
Mistral’s examples emphasize exactly this. In one case study, Leanstral handled a real-world Lean version migration issue involving a failed rw tactic and correctly identified that replacing def with abbrev would restore the intended definitional transparency. In another example, it translated definitions from Rocq into Lean and then proved properties about programs in that language.
These examples suggest that Mistral wants Leanstral to be seen not as a demo model for toy problems, but as an assistant that can participate in practical formal development tasks.
Benchmark claims and performance
Mistral evaluates Leanstral on FLTEval, an evaluation setup focused on formal proof completion and concept definition tasks within pull requests to the FLT project, rather than isolated competition-style problems. According to Mistral, Leanstral outperforms several much larger open-source peers on this benchmark while maintaining a strong efficiency profile.
These benchmark claims are important, but they should still be read carefully. At this stage, the public information comes primarily from Mistral’s own announcement materials, so developers should treat the results as promising vendor-published evidence rather than final consensus. That said, the benchmark framing is interesting because it focuses on repository realism, which is more relevant than abstract math contest scores for many serious users.
How to use Leanstral
Mistral currently provides three main ways to use Leanstral:
1. Mistral Vibe
Leanstral is integrated into Mistral Vibe for direct use. Mistral says users can start it there with the /leanstall command.
2. Labs API
Developers can access Leanstral through the labs-leanstral-2603 endpoint. Mistral describes this endpoint as free or near-free for a limited period while gathering real-world feedback and observability data.
3. Self-hosting the weights
Because the model is released under Apache 2.0, teams can download the weights and run them on their own infrastructure.
For research teams, infrastructure-sensitive companies, and formal methods groups, the self-hosted option may be especially attractive.
Who should pay attention to Leanstral?
Leanstral is most relevant for:
- researchers working in theorem proving
- developers using Lean 4 for formal verification
- teams exploring verified software workflows
- people building proof engineering tools
- anyone interested in AI models that can operate in machine-checkable reasoning environments
It is less relevant for users who simply want a general chatbot or a general-purpose coding assistant. Leanstral is a specialized model, and its value comes from that specialization.
Final thoughts
Leanstral is one of the more interesting recent model releases because it targets a real bottleneck in AI-assisted engineering: verification. Many models can generate code. Far fewer are designed around environments where correctness can be checked formally and where repository realism matters as much as raw fluency.
For anyone following the intersection of AI coding, formal verification, Lean 4, and proof engineering, Leanstral is a model worth watching.
FAQ
What is Leanstral?
Leanstral is Mistral’s open-source AI model for Lean 4, designed for code-agent and proof-engineering workflows in formal repositories.
Is Leanstral open source?
Yes. Mistral says Leanstral is released under the Apache 2.0 license.
What is Leanstral used for?
It is used for Lean 4 proof engineering, formal verification workflows, theorem-proving assistance, and related repository-level tasks.
How do you access Leanstral?
Mistral says it is available in Mistral Vibe, through the labs-leanstral-2603 API endpoint, and as downloadable weights for self-hosting.
Is Leanstral a general coding model?
Not primarily. It is specialized for Lean 4 and formal proof workflows rather than broad general-purpose programming.
Source
Official Mistral announcement: https://mistral.ai/news/leanstral