mistralai/leanstralsafeverify — explained in plain English
Analysis updated 2026-05-18
Verify that an AI-generated Lean proof actually satisfies the theorem it claims to prove, without exploits.
Check solutions to Lean coding-with-proofs benchmarks like MiniF2F or PutnamBench.
Build a proof verification backend for a coding platform or bounty marketplace built around formal proofs.
| mistralai/leanstralsafeverify | gaearon/analysis-solutions | jzshischolar/pyleaner | |
|---|---|---|---|
| Stars | 30 | 42 | 14 |
| Language | Lean | Lean | Lean |
| Last pushed | — | 2025-09-23 | — |
| Maintenance | — | Quiet | — |
| Setup difficulty | hard | moderate | hard |
| Complexity | 5/5 | 4/5 | 4/5 |
| Audience | researcher | researcher | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires the Lean 4 toolchain and compiling files to olean format before checking.
This tool checks whether a piece of submitted Lean code actually proves what it claims to prove, without letting the submitter cheat. Lean is a programming language built around mathematical proofs, where code is written not just to run but to be formally verified as correct. That makes it useful for AI systems that write code and try to prove the code is correct, but it also opens the door to sneaky tricks: an AI or a person could satisfy the letter of a proof by manipulating the underlying environment, adding extra assumptions that should not be allowed, or exploiting bugs in the proof checker itself rather than actually solving the problem. SafeVerify guards against that. Given two compiled Lean files, a target file containing the problem to solve and a submission file meant to solve it, the tool checks that the submission genuinely fills in what the target asks for, using only a small set of standard, trusted mathematical axioms, and without tricks like partial or unsafe functions that could quietly cheat the type system. It replays each file's declarations independently through Lean's own kernel checker first, so the comparison happens on environments it has verified are honest, rather than trusting whatever the submitted files claim about themselves. This fork, maintained by Mistral, is used internally for training and evaluating AI coding agents that write and prove Lean code. The underlying project is also the verification backend behind several public efforts: a vibe coding web app for Lean, a coding problems with proofs website, and a theorem bounty marketplace built on smart contracts. Different branches of the repository are tuned to check solutions from specific AI proving systems and benchmarks, including DeepSeek Prover, Kimina Prover, and Seed Prover, and the tool has also been used by an official leaderboard for a well known theorem proving benchmark. To use it, you compile Lean files into olean files with the Lean build tool, then run the checker against a target and a submission file, or build it into a standalone executable. The README notes some things it deliberately does not check, such as certain keywords that are hard to catch at this level, leaving those to be handled separately.
A verification tool that checks whether submitted Lean proof code honestly solves a given problem, guarding against exploits and shortcuts.
Mainly Lean. The stack also includes Lean, Lake.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.