Lean Copilot: Large Language Models as Copilots for Theorem Proving in Lean
Peiyang Song, Kaiyu Yang, Anima Anandkumar

TL;DR
Lean Copilot leverages large language models as copilots within the Lean proof assistant to enhance theorem proving by suggesting proof steps, completing goals, and automating proofs, significantly outperforming existing rule-based methods.
Contribution
This paper introduces Lean Copilot, a framework for integrating LLMs into Lean, enabling proof automation and human-assisted theorem proving with improved efficiency and flexibility.
Findings
Reduces manual proof steps to an average of 2.08 with human assistance.
Automates 74.2% of proof steps, outperforming rule-based methods by 85%.
Open-sourced code to facilitate further research.
Abstract
Neural theorem proving combines large language models (LLMs) with proof assistants such as Lean, where the correctness of formal proofs can be rigorously verified, leaving no room for hallucination. With existing neural theorem provers pretrained on a fixed collection of data and offering valuable suggestions at times, it is challenging for them to continually prove novel theorems in a fully autonomous mode, where human insights may be critical. In this paper, we explore LLMs as copilots that assist humans in proving theorems. We introduce Lean Copilot, a general framework for running LLM inference natively in Lean. It enables programmers to build various LLM-based proof automation tools that integrate seamlessly into the workflow of Lean users. Lean users can use our pretrained models or bring their own ones that run either locally (with or without GPUs) or on the cloud. Using Lean…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBusiness Process Modeling and Analysis
