Path finder
Ask how a definition reaches a theorem. The answer comes in plain words, one step a line.
proofmap reads your compiled Lean project and writes one offline HTML page: the main theorems, what each one rests on, and any sorry or extra axiom beneath them.
Views
Every line on the map is a dependency Lean stored when it checked the proof. Nothing is drawn or written by hand.
Ask how a definition reaches a theorem. The answer comes in plain words, one step a line.
A result is flagged when anything below it uses sorry, at any depth. Why? names the chain.
proofmap compare reads two snapshots and lists each result added, removed or changed.
Install
It needs elan, git and a project on Lean v4.28.0 or newer. It adds nothing to your project.
One command. After that it works in every Lean project you have.
Run it in the folder with the lakefile. The first build for each Lean version takes a few minutes; later ones take seconds.
Commit proofmap.html and turn on GitHub Pages, or send the file. Readers install nothing.
lake build does. Run it only on code you would also build.Examples
Each one is built with proofmap and served by GitHub Pages. Open one and read the proofs.
Questions
Yes, as lake build does: it imports the compiled modules. Run it only on code you would also build. The page itself runs no Lean code.
Yes. Nothing leaves your machine. The page holds your statements and source, so share it as you would share the code.
Lean v4.28.0 and newer. proofmap builds a matching engine for each Lean version it meets, so projects on different versions all work.
On a 130-module Mathlib project, about 2.5 minutes from scratch and 10 seconds when nothing changed. Walkthroughs take about as long as lake build.
From the ## Main statements sections of your module docstrings, as Mathlib writes them, or from roots in proofmap.toml.
proofmap check --strict exits with code 3 when anything depends on sorry or on an extra axiom.
Free and open source under Apache 2.0. One command to install, one to build.