I am working on Lean4 for a class project. I want to import some of mathlib4, but I keep getting "unknown package". I got Lean4 through the VSCode extension on Windows. How do I import packages?
Update: I've gotten git to work and I've managed to fork Mathlib. I used lake to set up a project, and now I'm having issues using import... anyone know how to help?
Update: I got it figured out. Should I share?
lake +leanprover/lean4:nightly-2023-02-04 new my_project math
. Themath
keyword adds mathlib4 to the dependencies of your project, so that you can use import Mathlib in your project files. Go inside the my_project folder and runlake update
, thenlake exe cache get
, and thenmkdir MyProject
. Run VS Code by runningcode .
and make sure you are in my_project. The .lean files for your project should go in the MyProject folder. $\endgroup$