Mistral AI’s Leanstral 1.5 Solves 587 Putnam Problems in Lean 4

Todaymany developers working with Lean 4 hit a wall when trying to automate proofs. Manual tactics are time‑consuming, and existing AI helpers either cost too much per problem or fail on larger statements. The new Leanstral 1.5 model tackles these pains head‑on. It is a free API endpoint that accepts plain text or image prompts and returns Lean 4 proof steps. Because it uses a mixture‑of‑experts architecture with 128 experts and only 6.5 B active parameters per token, the compute stays low while the model can reason over a 256 k token window. This means you can feed long problem statements or whole files without hitting the context limit.

In practice, start with a clear theorem statement and let the model run its multiturn loop: it proposes a proof, reads the Lean compiler feedback, and revises until success or budget runs out. You control the token budget per attempt; raising it from 50 k to 4 million tokens lifts the solved count on PutnamBench from 44 to 587 out of 672 problems. For most routine lemmas a budget of 200 k tokens already gives >240 solved proofs, which is enough to cover everyday library development.

Cost wise, Mistral estimates roughly $4 per PutnamBench problem, far below the $300+ needed for high‑budget provers. The free API removes any upfront fee, so you can experiment without worrying about per‑call charges. If you need tighter latency, switch to the code‑agent mode where the model edits files, runs bash, and queries the Lean language server directly, giving real‑time goal and type information.

To get the most out of Leanstral 1.5, keep your statements succinct, use the provided feedback loop, and adjust the token slider until the proof succeeds. This combines low cost, high accuracy, and seamless Lean integration.

#AI #Lean4 #TheoremProving #FormalMethods #OpenSource #DeveloperTools