Lean Co-pilot enables you to use LLM in Lean

2023-12-12

This innovative system utilizes LLM to propose proof strategies in the Lean theorem prover, providing a seamless environment for human intervention and modification.



The LeanDojo team and the California Institute of Technology have launched Lean Co-pilot, a collaborative tool designed for interaction between LLM and humans, to build 100% accurate formal mathematical proofs.





This innovative system utilizes LLM to propose proof strategies in the Lean theorem prover, providing a seamless environment for human intervention and modification.


The challenging field of automated theorem proving has long been hindered by the unreliability of current LLM in mathematical and reasoning tasks, which often result in errors and illusions. Traditionally, mathematical proofs heavily relied on manual deduction and required meticulous verification.


Lean is a powerful theorem prover, but humans find it to be a tedious task when writing Lean. Lean Co-pilot significantly speeds up the process by automating the recommendation of Lean proof strategies using LLM. The system only allows human input when necessary, striking a balance between machine intelligence and human intelligence.


Key features of Lean Co-pilot include LLM-driven proof step suggestions, proof search, and selection of useful lemmas from a wide range of mathematical libraries. The tool seamlessly integrates into Lean's Visual Studio Code workflow, ensuring a user-friendly experience.


Users can configure Lean Co-pilot with the built-in LeanDojo model, or integrate custom models that can run locally or in the cloud.


LeanDojo, the platform supporting Lean Co-pilot, supports accessibility by providing open-source models and tools under the MIT license. The tool can run on various platforms, including Linux, macOS, and Windows WSL, with optional support for CUDA-enabled GPUs.


Requirements for Lean Co-pilot include Git LFS, CUDA and cuDNN (recommended for GPU support), as well as CMake>= 3.7 and a C++17 compatible compiler for building Lean Co-pilot itself.


The introduction of Lean Co-pilot aims to make LLM more accessible to Lean users, fostering a positive feedback loop where automated proof assists in improving data quality and ultimately advancing LLM in mathematical tasks.