AI Briefing
KO

Leanstral: An Open-Source Foundation for Trustworthy Vibe-Coding

·2026.03.16 09:00

Key point

Leanstral, the first open-source code agent for Lean 4, has been released with formal proof as a target as well.

Details

Leanstral is the first open-source code agent for Lean 4, presenting a direction that combines code generation with formal proof in areas where human verification costs are high, such as advanced mathematics and mission-critical software.

The core is an efficient sparse architecture with 6B active parameters. Mistral AI optimized it for formal proof tasks, and it aims for both performance and cost efficiency through a parallel inference strategy that uses Lean as a full verifier.

The deployment scope is also broad. They released weights under the Apache 2.0 license, and announced Mistral vibe's agent mode, a free API endpoint, and a future tech report and a new evaluation set called FLTEval. They also stated it supports MCP and was trained to fit the commonly used lean-lsp-mcp.

The evaluation was conducted with criteria closer to real proof engineering rather than typical competition math. It checks whether all formal proofs are completed and new mathematical concepts are correctly defined in each PR, and compares against Claude Opus 4.6, Sonnet 4.6, Haiku 4.5, and open-source models (Qwen3.5 397B-A17B, Kimi-K2.5 1T-A32B, GLM5 744B-A40B).

The comparison showed that Leanstral-120B-A6B was more efficient than much larger open-source models. GLM5-744B-A40B and Kimi-K2.5-1T-32B remained at FLTEval scores of about 16.6 and 20.1 respectively, while Qwen3.5-397B-A17B required 4 passes, but Leanstral achieved higher scores with less investment. It rose to 26.3 at pass@2 and 29.3 at pass@4.

The cost-performance comparison with the Claude family was also emphasized. Leanstral scored 26.3 points at pass@2, surpassing Sonnet's 23.7 points, while costing only $36, and recorded 31.9 points at pass@16. In contrast, Claude Opus 4.6 led in quality with 39.6 points, but its execution cost was very high at $1,650.

Two case studies were presented.

  • It reproduced a StackExchange question that broke in the latest version of Lean 4, even building a reproduction environment, explained why def blocks rw from the perspective of definitional equality, and then proposed a fix by changing it to abbrev.
  • It ported Rocq's Imp definition to Lean, even implementing custom notation, and showed an example proving the behavior of the plus2 command.

A practical entry point is also opened right away. In Mistral Vibe, it can be activated with /leanstall, Leanstral can be selected with Shift+Tab, or vibe --agent lean can be used. It also provides the labs-leanstral-2603 API endpoint and Apache 2.0 weights, putting forward a formally-verified code agent that can be run directly.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.