-
Install Lean 4 + VSCode.
-
Clone this repository.
-
lake exe cache get -
Install
pygraphvizThis is tricky for MacOS (I don't know how to proceed with Windows). For modern MacOS, do the following.
brew install graphviz export PATH=$(brew --prefix graphviz):$PATH export CFLAGS="-I $(brew --prefix graphviz)/include" export LDFLAGS="-L $(brew --prefix graphviz)/lib" pip install pygraphviz -
pip install leanblueprint
We use Lean Blueprint to document proof details and sync it with Lean formalization. Usage copied from here:
leanblueprint pdfto build the pdf version (this requires a TeX installation of course).leanblueprint webto build the web versionleanblueprint checkdeclsto check that every Lean declaration name that appear in the blueprint exist in the project. Make sure to do the followings beforehand.- Include any new
.leanfile to the mainBrunnMinkowski.leanto make it visible tolake. - Then do
lake buildto make compiled files.
- Include any new
leanblueprint allto run the previous three commands.leanblueprint serveto start a local webserver showing your local blueprint. The url you should use in your browser will be displayed.
The main file for documentation is blueprint/src/content.tex.
Doing
\begin{theorem}\label{thm:A}\lean{BrunnMikowski.theorem_A}
Theorem A
\end{theorem}
\begin{theorem}\label{thm:B}\uses{thm:A}\lean{BrunnMinkowski.theorem_B}
Theorem B
\end{theorem}will link dependencies and map each theorem/definition to their corresponding Lean definition.
Do the following if you have issues with lake.
rm -rf .lakelake exe cache get
This will clean out all .lake compiled cache and re-download them.