- Web : https://leanprover.github.io/programming_in_lean
- PDF : https://leanprover.github.io/programming_in_lean/programming_in_lean.pdf
We use cask to install emacs dependencies (org-mode, lean-mode, htmlize). We assume that you already have emacs-24.3 or higher installed in your system.
sudo apt-get install mercurial python2.7 texlive-latex-recommended \
texlive-humanities texlive-xetex texlive-science \
texlive-latex-extra texlive-fonts-recommended texlive-luatex\
bibtex2html git make mercurial autoconf automake gcc curl
git clone https://github.com/leanprover/programming_in_lean
cd programming_in_lean
tar xvfz header/l3kernel.tar.gz -C ~/
make install-cask # after this, you need to add the cask binary to your $PATH
make
Using watchman, we can detect any changes on the org-files, and trigger re-builds automatically on the background.
To install watchman:
sudo apt-get install automake
make install-watchman
To enable watch:
make watch-on
To disable watch:
make watch-off
It requires a webserver to preview generated HTML files. We can use Python's SimpleHTTPServer
module:
programming_in_lean $ python -m SimpleHTTPServer
The above command starts a HTTP server at programming_in_lean
directory (default port: 8000
). For example, 01_Introduction.html
is available at http://localhost:8000/01_Introduction.html
.
-
Firefox: Auto Reload add-on
-
Chrome: Tincr (does not work on Linux)
-
Using Native Lean: First, you need to install Lean. Please follow the instructions at the download page. You can test all Lean code blocks in
*.org
files by executing the following command:
make test ```
To use a specific binary of Lean in test, please do the following:
bash LEAN_BIN=/path/to/your/lean make test
-
Using Lean.JS:
make test_js
```