LeanDojo-v2: A Comprehensive Library for AI-Assisted Theorem Proving in Lean
AuthorsRyan Hsiang, William Adkisson, Robert Joseph George, Anima Anandkumar
AffiliationsNational Taiwan University · Washington University in St. Louis · California Institute of Technology
LeanDojo-v2 brings Lean-based AI theorem proving into one toolkit, making it easier to train models and explore proofs.
Key results
Example model used for supervised fine-tuning.
Model offered through Hugging Face API inference.
Build time was over 10 minutes before the API-based approach reduced it to a few seconds.
What the paper found
LeanDojo-v2 brings Lean theorem-proving tools into one extensible pipeline: it extracts theorems, proofs, premises, and proof states from Lean repositories, then supports supervised fine-tuning, LoRA, and reinforcement learning with GRPO or PPO. For proving, it combines step-by-step tactic generation with Pantograph’s depth-first or Monte Carlo tree search, and also supports whole-proof generation. Users can train models such as DeepSeek-Prover-V2-7B or call hosted models such as DeepSeek-Prover-V2-671B through the Hugging Face API; the API-based autocomplete avoids local inference setup and cuts build time from over 10 minutes to a few seconds. The companion Lean4Code editor packages these tools in a VSCodium-based interface, alongside extensions for LeanDojo, LeanCopilot, and ByteDance’s Agent TARS; its Agent TARS integration uses an OpenAI access token. Rather than reporting new theorem-proving benchmark scores, the work’s central contribution is a unified, modular workflow that makes data extraction, model training, proof search, and AI-assisted editing easier to run and extend.
Original abstract
Building on recent progress in machine learning for formal theorem proving in Lean, we introduce LeanDojo-v2: an end-to-end framework that unifies repository data extraction, LLM fine-tuning, proof search, AI autocompletion, and LLM-assisted theorem proving in a single software library. In addition, we provide Lean4Code, a lightweight IDE that integrates the various features of LeanDojo-v2 through a simple, mathematician-friendly UI. These tools will enable mathematicians and researchers to easily fine-tune language models on domain-specific Lean codebases and experiment with LLM-assisted theorem proving without a complex setup.
Read the original paperMore in AI Reasoning
Browse all 54 papers →Learning Evidence-Grounded Reasoning for Context-Aware Time Series Forecasting
Xingpeng Gao, Mingyue Cheng, Daoyu Wang, Huajian Zhang, Xiaoyu Tao
CastReasoner teaches language models to identify useful contextual evidence and use it to improve time-series forecasts.
LongCapHarness: Capability-Guided Auto-Harnessing for Long-Context Reasoning
Tao Zhang, Yuhang He
LongCapHarness aims to improve long-context reasoning by refining how an LLM uses its existing capabilities rather than training it on more data.
Scaling Lean Theorem Proving for Real-World Code Verification
Debargha Ganguly, Divya Raghunathan, Dejan Jovanović, Vikash Singh, Soonho Kong, Aaron Tomb, Aman Goel, Ferhat Erata, Sam Bayless
EasyProver tackles Lean proofs at scale and introduces harder verification challenges grounded in real Rust code.