Interactive visualization of dependencies for any theorem/definitions in your Lean project.
Run in your browser: lean-graph.com
- Get Rustup
- Install
Lean Graph
by executing this command in your terminal:cargo install --git "https://github.com/patrik-cihal/lean-graph"
- Run
Lean Graph
from the terminmal under the namelean-graph
- Copy the
DependencyExtractor.lean
into your project folder (either from GitHub, or download it in the web app) - In the top of the file import the files where are the theorems/definitions you want to extract the graph for
- In the bottom of the file there is an #eval line where you can specify your own custom theorem/definition name
- Uncomment that same line to get the
.json
file
- After clicking on node, allow for seeing the documentation
- Lazy loading of depending nodes
- Option to visualize any Mathlib constant, without the need of running script locally
If you want to see these features, any contribution is welcome.