<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mistral-releases-leanstral-a-formal-code-verification-agent-for-lean-4-xdxpqgltj" -->

---
title: Mistral releases Leanstral, a formal code verification...
description: Mistral has released Leanstral, an open-source AI coding agent designed for Lean 4, a formal proof assistant language. The model uses a sparse...
canonical: https://daily.dev/posts/mistral-releases-leanstral-a-formal-code-verification-agent-for-lean-4-xdxpqgltj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Mistral releases Leanstral, a formal code verification agent for Lean 4 | daily.dev
og:description: Mistral has released Leanstral, an open-source AI coding agent designed for Lean 4, a formal proof assistant language. The model uses a sparse...
og:url: https://daily.dev/posts/mistral-releases-leanstral-a-formal-code-verification-agent-for-lean-4-xdxpqgltj
og:image: https://api.daily.dev/og/posts/XdxpqgLtJ.png
og:image:alt: Mistral releases Leanstral, a formal code verification agent for Lean 4
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Mistral releases Leanstral, a formal code verification agent for Lean 4

**[Collections](https://daily.dev/sources/collections)** · 2 min read · 2 upvotes · 0 comments

## Summary

Mistral has released Leanstral, an open-source AI coding agent designed for Lean 4, a formal proof assistant language. The model uses a sparse mixture-of-experts architecture with only 6B active parameters but claims to outperform much larger models like Qwen3.5-397B and Kimi-K2.5-1T on the FLTEval benchmark, and beats Claude Sonnet at roughly 1/15th the cost ($36 vs $549 for a pass@2 run). Leanstral handles real proof engineering tasks including migrating code between Lean versions, translating Rocq/Coq properties into Lean 4, and writing and verifying formal proofs. It supports MCP integration and is available via a web interface, free API, and Apache 2.0 weights for self-hosting. The release also includes Mistral Small 4, a general-purpose model. The key promise is making formal verification accessible to teams that previously couldn't afford the expertise or tooling costs.

## Content

Mistral has released [Leanstral](https://mistral.ai/news/leanstral), an open-source coding agent built specifically for Lean 4, a formal proof assistant language. The idea is straightforward: instead of hoping AI-generated code is correct, you ground it in formal proofs and specifications that can actually be verified.

## What it is

Leanstral-120B-A6B uses a sparse mixture-of-experts architecture with only 6 billion active parameters. Despite that relatively lean footprint, Mistral claims it outperforms much larger open-source models on the FLTEval benchmark — including Qwen3.5-397B and Kimi-K2.5-1T — and beats Anthropic's Claude Sonnet on the same benchmark at a fraction of the cost. A pass@2 run costs around $36 with Leanstral versus $549 with Claude Sonnet.

The FLTEval benchmark is based on the Fermat's Last Theorem (FLT) project, a large real-world Lean codebase, which makes it a more realistic test than synthetic benchmarks.

## What it can do

In practice, Leanstral handles the kinds of tasks that come up in real proof engineering work:

- Diagnosing and fixing issues when migrating code between Lean versions
- Translating program properties defined in Rocq (formerly Coq) into Lean 4 and generating proofs
- Writing and verifying formal proofs in realistic codebases

It supports MCP (Model Context Protocol) integration, so it can plug into existing tooling.

## How to access it

Mistral is making Leanstral available in a few ways:

- **Mistral Vibe** — a no-setup web interface for trying it immediately
- **Free API endpoint** — for building on top of it
- **Apache 2.0 weights** — for self-hosting

Mistral also released Mistral Small 4 alongside this, a general-purpose model covering reasoning, coding, and chat.

## Why it matters

Formal verification has always been the gap between "the code looks right" and "the code is provably correct." The tooling has historically been expensive, slow, and required deep expertise in proof assistants. If an agent can handle the mechanical parts of writing and checking Lean proofs at this cost point, it makes formal verification accessible to teams that would have skipped it entirely. Whether Leanstral holds up on real production codebases beyond the benchmark is still an open question, but the cost comparison alone is hard to ignore.

## Similar posts on daily.dev

- [Mistral’s Leanstral wants to kill off human-in-the-loop code checks, but is it blowing in the wind?](https://daily.dev/posts/mistral-s-leanstral-wants-to-kill-off-human-in-the-loop-code-checks-but-is-it-blowing-in-the-wind--mgmv796u9) · The New Stack · 0 upvotes · 0 comments
- [Mistral Releases Leanstral 1.5, an Open Model That Solved 587 of 672 Putnam Math Problems](https://daily.dev/posts/mistral-releases-leanstral-1-5-an-open-model-that-solved-587-of-672-putnam-math-problems-vmefgvpn5) · DevOps.com · 27 upvotes · 7 comments
- [Mistral AI rolls out full suite of Apache-licensed models](https://daily.dev/posts/mistral-ai-rolls-out-full-suite-of-apache-licensed-models-xjqfoa9bt) · The Register · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#mistral-ai](https://daily.dev/tags/mistral-ai), [#mixture-of-experts](https://daily.dev/tags/mixture-of-experts)

[View this post on daily.dev](https://daily.dev/posts/mistral-releases-leanstral-a-formal-code-verification-agent-for-lean-4-xdxpqgltj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Mistral releases Leanstral, a formal code verification agent for Lean 4","url":"https://daily.dev/posts/mistral-releases-leanstral-a-formal-code-verification-agent-for-lean-4-xdxpqgltj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mistral-releases-leanstral-a-formal-code-verification-agent-for-lean-4-xdxpqgltj"},"datePublished":"2026-03-17T18:55:54.011Z","dateModified":"2026-04-02T02:15:27.773Z","description":"Mistral has released Leanstral, an open-source AI coding agent designed for Lean 4, a formal proof assistant language. The model uses a sparse...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/19c89616f5bff1fb91ac3cfaf39e0869?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/19c89616f5bff1fb91ac3cfaf39e0869?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collections","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collections","logo":"https://media.daily.dev/image/upload/s--fk_6ycEi--/f_auto,q_auto/v1780996001/logos/collections?_a=BAMAMiWQ0","url":"https://daily.dev/sources/collections"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/mistral-releases-leanstral-a-formal-code-verification-agent-for-lean-4-xdxpqgltj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,mistral-ai,mixture-of-experts","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collections","item":"https://daily.dev/sources/collections"},{"@type":"ListItem","position":3,"name":"Mistral releases Leanstral, a formal code verification agent for Lean 4"}]}
```

