TLDRocket
Sign in

Leanstral: Open-Source foundation for trustworthy vibe-coding

Mistral AI

Mistral released Leanstral, an open-source AI agent that writes and formally proves code in Lean 4 instead of just guessing at it. It's a shot at fixing AI coding's real bottleneck: humans stuck verifying machine-written logic by hand.

Based on reporting by Mistral AI — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

Mistral just dropped Leanstral, a coding agent built specifically for Lean 4, the proof assistant that mathematicians and software engineers use to formally verify that code actually does what it claims. The pitch is simple but ambitious: instead of an AI writing plausible-looking code that a human then has to painstakingly check, you get an agent that proves its work is correct before you ever see it. Mistral frames this as the real bottleneck in high-stakes coding right now — not model capability, but the review overhead required when nobody trusts the output.

What's notable is the architecture choice. Leanstral runs on 6 billion active parameters, a sparse setup that punches well above its weight class. Against open-source rivals like Qwen3.5 (397B-A17B) and GLM5 (744B-A40B), Leanstral wins outright on Mistral's new FLTEval benchmark, which tests agents on completing full pull requests to the Formalized Language Theory project rather than isolated math puzzles. GLM5 and Kimi-K2.5 plateau around scores of 16 and 20; Leanstral clears both with a single attempt and keeps climbing with more passes.

The cost comparison against Anthropic's Claude family is where things get genuinely uncomfortable for the incumbents. Leanstral at pass@2 beats Sonnet 4.6's score while costing $36 versus Sonnet's $549 for the same benchmark run. Push to pass@16 and Leanstral hits 31.9, eight points above Sonnet, for $290 total. Claude Opus 4.6 still wins on raw quality with a 39.6 score, but at $1,650 a run — 92 times pricier than Leanstral's baseline pass. Mistral used its own Vibe scaffold for every model with no special tuning, so the comparison isn't rigged in obvious ways.

The case studies are the more convincing part, honestly. Fed a real Stack Exchange question about a Lean script that broke on a version released after its training cutoff, Leanstral didn't guess — it rebuilt the failing environment, diagnosed that a rigid `def` was blocking a rewrite tactic from matching a type alias, and fixed it by swapping in `abbrev`. In a separate test, it converted Rocq definitions for a simple imperative language into Lean, invented matching notation, and proved a theorem about program behavior from a bare statement with no proof attached. That's the kind of task that usually eats an afternoon of a formal-methods grad student's time.

Leanstral ships under Apache 2.0, is baked into Mistral Vibe for immediate use, and has a free-ish API endpoint (labs-leanstral-2603) that Mistral says it'll keep open for a while to collect real usage data. A technical report and the FLTEval suite are coming alongside it, aimed at giving the field a benchmark that isn't just another leaderboard of competition math problems.

My take — AI-written commentary, not fact-checked reporting

This is the first Lean-native agent I've seen that isn't just a wrapper slapped on a general-purpose model, and the cost numbers against Sonnet and Opus make a real case that closed labs are charging a premium for capability that a well-built sparse open model can match at a fraction of the price. I'll believe the 'no more debugging machine logic' vision once it survives contact with a messy enterprise codebase rather than a curated FLT repo, but releasing the weights under Apache 2.0 instead of hiding this behind an API is exactly the move that keeps European AI relevant instead of perpetually catching up.'

Read more about this at: Mistral AI

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.