This repository hosts the Liquid tensor experiment blueprint and website. The Lean code for this project can be found there.
If you simply want to produce the pdf version of the blueprint, you don't
need anything beyond your usual TeX installation.
In order to build the html version you need
plasTeX and its
blueprint plugin.
You first need to make sure you have a decent python (at least 3.6).
Then you can install:
pip install git+https://github.com/plastex/plastex.git
pip install git+https://github.com/PatrickMassot/leanblueprint.git
pip install invokeAlso installing pdf2svg, pdfcrop, and xelatex may be useful:
apt install pdf2svg
apt install texlive-extra-utils
apt install texlive-xetexThe blueprint needs to know where a compiled version
of the Lean source code lives.
In the root directory of the blueprint repo,
create a symlink project pointing to the root of
the lean-liquid repository:
ln -s ../lean-liquid project # modify as neededThe source for the blueprint is in src.
If you only want to build it as a pdf file then you can simply run
xelatex blueprint.tex or lualatex blueprint.tex (or even pdflatex blueprint.tex
if you are stuck in the past).
More complicated goals are easier to handle using python invoke.
You can run inv -l to see the available actions. In particular inv web will build the website
and inv serve will serve it locally on port 8000.
Note that the dependency graph using graph-viz won't work if you simply open web/dep_graph.html in
a browser because of browser paranoia. It has to be accessed through a web server.
The main TeX file to edit is content.tex. It is a normal TeX file except that
each definition and statement must have a \label and there are four special LaTeX macros:
\lean{name}indicates the fully namespaced Lean declaration that formalizes the current definition or statement.\leanokmeans the current definition, statement or proof has been fully formalized (in particular a lemma can have\leanokin its statement without having it in its proof environment.\uses{refs}whererefsis a comma-separated list of LaTeX label can be put inside a definition, statement or proof environment. It means each of those labels is used by the current environment. This is what creates edges in the dependency graph. This mechanism is completely independent from\ref. Withleanokthis is the most important command to organize work. Note that\usesin proofs don't need to repeat those in the statement.\proves{label}can be put in aproofenvironment to indicate which statement is proved if this is not obvious (ie it is not proving the preceding statement).