Skip to content

Instantly share code, notes, and snippets.

@kckennylau
Last active March 15, 2018 16:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kckennylau/611cc453c67df074ad492b4939ddd356 to your computer and use it in GitHub Desktop.
Save kckennylau/611cc453c67df074ad492b4939ddd356 to your computer and use it in GitHub Desktop.
How to install Lean with mathlib
This assumes that you have:
1. msys2
2. cmake
3. VSCode with Lean plugin
4. ninja
Run the following commands in order in msys2:
cd /c/
git clone https://github.com/leanprover/lean
cd lean
mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=RELEASE -G Ninja ../../src
ninja
cd /c/
git clone https://github.com/leanprover/mathlib
cd mathlib
/c/lean/bin/leanpkg build
remark: the core library is loaded by default. One only needs to set the workplace to the folder containing mathlib.
----
update:
cd /c/lean
git pull
cd build/release
ninja clean-olean
ninja
cd /c/mathlib
git pull
/c/lean/bin/leanpkg build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment