Research

Mistral Releases Leanstral 1.5 for Formal Verification in Lean 4

Mistral AI has launched Leanstral 1.5, an open-source model with 6 billion active parameters designed specifically for automated theorem proving and code verification.

A
AIDeveloper44 Team
July 3, 2026·5 min read
Mistral Releases Leanstral 1.5 for Formal Verification in Lean 4

Leanstral 1.5 leverages Lean 4 to formally verify mathematical theorems and software logic.

TL;DR
  • Mistral AI released Leanstral 1.5, an Apache-2.0 licensed AI model for formal reasoning in Lean 4.
  • The model utilizes a mixture-of-experts architecture with 119B total parameters and 6B active parameters.
  • It achieved a 100% score on the miniF2F benchmark and solved 587 out of 672 PutnamBench problems.
  • In automated codebase testing, Leanstral 1.5 discovered 11 genuine bugs across 57 open-source repositories.

On July 2, 2026, Mistral AI announced the release of Leanstral 1.5, an open-source model tailored for formal mathematical verification and proof engineering. Released under an Apache-2.0 license, the model relies on the Lean 4 proof assistant to validate software properties and mathematical theorems automatically. Leanstral 1.5 is designed as a mixture-of-experts model, operating with 119 billion total parameters but requiring only 6 billion active parameters during inference, reducing the computational overhead typically associated with large-scale automated reasoning.

Training Methodology and RL Environments

Leanstral 1.5 was trained through a structured three-stage pipeline consisting of mid-training, supervised fine-tuning (SFT), and reinforcement learning (RL) using the CISPO algorithm. The reinforcement learning phase exposed the model to two distinct environments to develop both mathematical deduction and software engineering capabilities.

The first environment is a multiturn theorem-proving setup. In this loop, the model receives a theorem statement and attempts to construct a formal proof. Once submitted, the Lean compiler provides immediate feedback. If the code compiles, the task is marked successful; if it fails, the model iteratively refines its proof based on the compiler's error messages until it succeeds or exhausts its computational budget.

The second environment is a code agent simulation. Here, Leanstral 1.5 functions as an autonomous developer within a raw filesystem. It is capable of editing files, executing bash commands, and querying the Lean language server (LSP) for real-time type information, goals, and syntax errors. This environment was designed for long-horizon tasks, such as resolving partial proofs across a repository and persisting context through multiple rounds of data compaction. The outputs in this environment are ultimately validated by SafeVerify, a Mistral-maintained fork designed to check target theorem correctness.

Benchmark Performance and Test-Time Scaling

Mistral reported performance metrics across multiple mathematical and proof-engineering benchmarks. Leanstral 1.5 completely saturated the miniF2F benchmark, scoring 100% on both the validation and test sets, which include problems ranging from elementary algebra to International Mathematical Olympiad (IMO) level challenges.

On PutnamBench, a dataset of 672 highly complex problems from the Putnam Mathematical Competition, Leanstral solved 587 problems. The model also reported scores of 87% and 34% on FATE-H and FATE-X, respectively, which test advanced abstract algebra concepts such as group theory and ring theory. Furthermore, Mistral open-sourced the FLTEval benchmark—based on pull requests from a Fermat’s Last Theorem repository—where Leanstral 1.5 achieved a pass@1 score of 28.9 and a pass@8 score of 43.2.

A notable feature of Leanstral 1.5 is its test-time scaling behavior. Data provided by Mistral shows a monotonic increase in performance as the model's token budget per attempt is expanded. On PutnamBench, pass@8 performance scaled from 44 problems solved at a 50,000-token budget to 244 problems at 200,000 tokens, eventually reaching 587 solved problems when given a 4 million-token budget. The model demonstrates an ability to continuously revise files and edit proofs across millions of tokens without prematurely halting.

Diagram: Leanstral 1.5 Automated Code Verification & Bug Discovery Pipeline

Real-World Code Verification and Bug Discovery

Beyond abstract mathematical proofs, Leanstral 1.5 was tested on real-world software verification tasks. In one detailed case study, the model proved the O(log n) time complexity guarantees for an implementation of AVL trees. This task required structural induction, tracking computations through a monadic environment (TimeM), and exhaustive case analysis of rebalancing paths. The model completed this proof using over 2.7 million tokens and 22 context compactions to systematically map out the step bounds for node insertion and deletion.

To evaluate its bug-detection capabilities, Mistral constructed an automated pipeline combining Leanstral with Aeneas, a tool that translates Rust code into Lean. Leanstral was tasked with inferring user intent and generating correctness properties for the code. The system allowed the model four attempts to prove each property; if unsuccessful, it was given four attempts to prove the negation.

Across 57 open-source repositories, this pipeline flagged 47 violated properties. Analysis of these flags revealed 11 genuine software bugs, 5 of which were previously undocumented on GitHub. One specific flaw was found in the datrs/varinteger library's zigzag decoding function. Leanstral mathematically proved that the expression (value + 1) would overflow when the input reached Std.U64.MAX, an edge case capable of causing silent corruption in release builds.

Deployment and Accessibility

The model weights for Leanstral 1.5 are available for download on Hugging Face. Mistral AI is also providing access via a free API endpoint (leanstral-1-5). For developers integrating the model locally, Mistral recommends using the Mistral Vibe command-line interface, where the model can be launched as an agent via the vibe --agent lean command in combination with the Lean LSP MCP server.

Enjoyed this?

Get more posts like this delivered to your inbox.