Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 2
    $\begingroup$ See here: github.com/leanprover-community/…. (In particular see the end about if you already have a project and what to use mathlib 4 as a dependency.) $\endgroup$
    – Jason Rute
    Commented May 3, 2023 at 10:01
  • 1
    $\begingroup$ As the question stands, it's quite uninformative ("There's a student with a problem."). I would recommend that you not only share the solution, but also what was confusing to you. $\endgroup$ Commented May 11, 2023 at 6:55
  • 2
    $\begingroup$ I'm new to stackexchange so sorry if writing this counts as 'necro' or is in some other way inappropiate. Could you please share how you managed to import mathlib4? I'm having the same problem you were having. Thanks in advance. $\endgroup$ Commented Sep 14, 2023 at 20:59
  • $\begingroup$ @blackbirdsr Where are you in the process? Have you set up lean with VS Code? $\endgroup$
    – Alex Byard
    Commented Sep 18, 2023 at 23:27
  • $\begingroup$ @blackbirdsr Here's how I set up a project: In a terminal go to the folder you want to create your project folder my_project inside. Run lake +leanprover/lean4:nightly-2023-02-04 new my_project math. The math 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 run lake update, then lake exe cache get, and then mkdir MyProject. Run VS Code by running code . and make sure you are in my_project. The .lean files for your project should go in the MyProject folder. $\endgroup$
    – Alex Byard
    Commented Sep 19, 2023 at 0:33