Skip to content
Rush Commerce
Software & Dev3 min read

Mistral's Leanstral 1.5 proves your code correct — for free

Mistral open-sourced Leanstral 1.5, a Lean 4 model that proves code satisfies a formal spec. Why verification, not generation, is the real AI-dev bottleneck.

Everyone has an AI that writes code. Almost nobody has one that proves the code is right. Mistral just shipped the second thing and gave it away. Leanstral 1.5, released July 2, is an Apache-2.0 model that takes your code plus a formal specification and generates a machine-checked proof that the implementation actually meets the spec. Not "looks correct" — provably correct, in Lean 4, verified by a compiler that doesn't care how confident the model sounds.

What actually happened

Per Mistral's announcement, Leanstral 1.5 is a 119B-parameter mixture-of-experts model with 6B active parameters — small enough to run cheaply, and available as open weights on Hugging Face plus a free API endpoint (leanstral-1-5).

The benchmarks are the kind that don't leave much room to argue, because a proof either checks or it doesn't:

  • Saturates miniF2F — effectively 100% on the standard formal-math validation and test sets.
  • 587 of 672 PutnamBench problems solved (competition-level theorem proving).
  • 87% on FATE-H, 34% on FATE-X — harder formal-verification suites where state-of-the-art still has room to run.

The part that matters for working engineers isn't the math-olympiad score. Mistral pointed Leanstral at real repositories: across 57 tested repos, it flagged 47 violated properties, of which 11 were genuine bugs — 5 never previously reported on GitHub. A model that finds real, unreported bugs by trying to prove code correct is doing something a linter and a test suite structurally can't.

Why it matters for your business

The industry spent two years optimizing code generation. The bottleneck moved. When an agent can write a thousand lines an hour, the expensive question isn't "can it write it" — it's "how do you know it's right before it ships to your customers." Tests check the cases you thought of. Formal verification checks the ones you didn't.

We're not going to pretend every CRUD endpoint needs a Lean 4 proof — most don't. But the direction is the signal: the durable value in AI-assisted development is shifting from typing speed to correctness guarantees, especially for the code that touches money, inventory, or auth. If you're leaning on AI to write more of your stack, your verification story has to scale with it, or you're just generating bugs faster.

And it's open weights under Apache-2.0. That's the whole ballgame for a small shop: a verification capability you can run yourself, on your own hardware, with no vendor able to reprice it or pull it out from under you.

Key takeaways

  • Leanstral 1.5 (Apache-2.0, 119B total / 6B active) generates Lean 4 proofs that code satisfies a formal spec — not "looks right," provably right
  • It saturates miniF2F and solves 587/672 PutnamBench problems; more usefully, it found 5 previously unreported bugs across 57 real repos
  • The AI-dev bottleneck has moved from generating code to verifying it — tests catch what you thought of, proofs catch what you didn't
  • Open weights and a free API mean you can own the verification layer instead of renting it

If AI is writing more of your code, verification has to keep up. We build systems where the AI-generated parts are tested, checked, and owned by you — not shipped on vibes. See how we build software you can trust or tell us where your stack feels shaky.

Sources: Mistral AI, The Register.

  • #mistral
  • #code-verification
  • #open-weights
  • #ai-coding
  • #formal-methods
TR

Tommy Rush — Founder, Rush Commerce

Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More

Get The Rush Report weekly — one email, zero fluff.