We highly recommend using Lean with VSCode. More information about Lean and its VSCode features can be found here.
- Install VSCode.
- Install Lean.
- Install Lean4 extension in VSCode.
- Clone this git repository.
git clone [email protected]:ToposInstitute/lean-poly.git - Install Lean packages using
lake(lean make) and restart VSCode.cd lean-poly lake update lake exe cache get code .
If you are getting the unknown package Mathlib error, the version of Lean you are using in VSCode could be different from that specified in the file lean-toolchain in the repository.
- Update
elanwhich is the Lean version manager.elan self update - Make
lean4:stablethe default version.elan default leanprover/lean4:stable - Update dependencies to their latest versions using
lake(lean make).lake update - Get cached precompiled
oleanfiles for dependencies.lake exe cache get - You may be asked at the end of the last command to update the
lean-toolchainfile so that it matches the Lean version of the updated dependencies.cp lake-packages/mathlib/lean-toolchain ./lean-toolchain - Restart VS Code to make sure the correct Lean interpreter and server is running.
This is a record of how this project was created using lake. The steps were taken from these notes. Please do not repeat these steps in the repository.
- Create project with
mathlib.lake +leanprover/lean4:nightly-2023-02-04 new lean-poly math - Update packages with
lake(lean make).lake update - Cache package executables.
lake exe cache get