Mistral

Mistral Open-Sources Leanstral, a Lean 4 Proof Agent

Mistral released Leanstral-120B-A6B under Apache 2.0 — the first open-source agent purpose-built for Lean 4 proof engineering. One pass costs $18; pass@2 beats Claude Sonnet at roughly 1/15 the cost.

Mistral Open-Sources Leanstral, a Lean 4 Proof Agent — article cover
On this page6 SECTIONS
  1. The First Open-Source Agent Purpose-Built for Lean 4
  2. Why Lean 4 Matters
  3. A 120B-Parameter, 6B-Active Cost Structure
  4. Reading the FLTEval Results
  5. How to Get It and Run It
  6. Sources

Mistral has released Leanstral, the first open-source code agent built for Lean 4. The model is named Leanstral-120B-A6B: 120B total parameters with roughly 6B active in a highly sparse architecture, with weights fully open under Apache 2.0 (the Hugging Face model card, mistralai/Leanstral-2603, lists it as 119B-A6B). The positioning is not a demo toy but realistic proof engineering — completing proofs and defining concepts inside full repositories, not solving isolated exercise problems. For teams doing formal verification, this is the first same-class tool you can install and run on your own metal.

The First Open-Source Agent Purpose-Built for Lean 4

Ordinary code agents produce code that looks right; in the world of Lean 4 there are only two states, machine-verified or false. Mistral’s move is to aim an agent squarely at that high-bar domain: the model was trained against lean-lsp-mcp and supports arbitrary MCP servers, so it can actually read and mutate the state of a Lean project rather than guessing from a frozen snapshot of the file. The task framing is also more honest than most agent marketing — completing proofs and defining new concepts inside full repositories is a different, harder job than one-shotting isolated lemmas, and it is the job real formal-verification teams actually have. The Hacker News thread captured the typical reception: the direction is broadly welcomed, but judgment on how it stacks up against the Qwen family is reserved until independent benchmarks land on someone else’s hardware.

Why Lean 4 Matters

Lean 4 is a proof assistant that can express frontier mathematical objects such as perfectoid spaces, and also software specifications — for example, verified properties of Rust code. Its value is swapping the bottleneck of “humans reviewing machine-generated code” for “machines proving it”: once a proof checks, correctness is a mathematical fact, not a probability. That property is why formal methods have long lived in compilers, kernels, and cryptography — places where a bug is expensive enough to justify the pain. As the volume of AI-generated code explodes, the review bottleneck scales linearly with output while trust does not, and formal verification is shifting from a mathematician’s luxury to a requirement for high-stakes software. That is precisely the trend Leanstral is betting on: if code is going to be machine-written anyway, machine-checked is the only review pipeline that keeps up.

A 120B-Parameter, 6B-Active Cost Structure

Sparsity here is not a cost slogan; it is the product logic. Proof search is fundamentally massive parallel trial, and multi-sample strategies (pass@k) only work when a single inference is cheap: one pass costs $18, and sixteen passes cost $290. Compare Claude Opus at $1,650 for a single run — 92 times the cost of one Leanstral pass, before you have even attempted a second angle on the proof. The economics compound in the other direction too: because the model runs on your own hardware when self-hosted, the marginal cost of another sampling round is electricity and GPU time, not a per-token bill. Mistral’s arithmetic is clear: a cheap, parallel-iterable specialized model buys the standing to fight general-purpose flagships in a vertical where iteration count matters more than raw single-shot intelligence.

Reading the FLTEval Results

On FLTEval, benchmarked against real pull requests from the FLT project, the Anthropic family sets the reference line: Claude Haiku spent $184 for a score of 23.0, Sonnet $549 for 23.7, and Opus $1,650 for 39.6. Leanstral scored 21.9 on a single $18 pass; pass@2 ($36) reached 26.3, already ahead of Sonnet at roughly one-fifteenth the cost; pass@16 ($290) hit 31.9, eight points above Sonnet while still costing less than a single Haiku run. Among open-source peers, Qwen3.5-397B-A17B needed four passes to reach 25.4, Kimi-K2.5-1T-A32B landed around 20.1, and GLM5-744B-A40B around 16.6 — specialization clearly paid off on this benchmark. Two caveats worth keeping in mind: FLTEval is close to Leanstral’s home turf, since it was built from the FLT project the model was developed around, and Opus at 39.6 remains the outright ceiling. The honest summary is that Opus still wins the score, while Leanstral wins cost per point by an order of magnitude — which, at proof-search scale, is often the game that matters.

How to Get It and Run It

Three routes. First, Mistral Vibe with zero setup: run the /leanstall command, press Shift+Tab to select Leanstral, or start with vibe –agent lean. Second, the API: the labs-leanstral-2603 endpoint is free or near-free for a limited period, which makes trying it against your own proof backlog cheap. Third, self-hosting: download the Apache 2.0 weights and run them on your own metal — Mistral’s own framing, and no stated GPU floor, though a 120B-parameter sparse model is not a laptop workload. For regulated environments, proprietary-math teams, or anyone who refuses to send code out the door, the third route is the entire point — and it is exactly why open weights remain a scarce, differentiated asset in 2026.

Sources

AI-assisted summary compiled from the sources above, reviewed by a human before publishing.

FOUND_THIS_USEFUL?

Support more practical AI articles, tutorials, and build notes.

BUY_ME_A_COFFEE
SHAREXEMAIL