Zulip Chat Archive
Stream: general
Topic: How to obtain the dependency relationship of a theorem?
ZYR (Nov 27 2023 at 05:39):
I want to build a graph to show the dependencies of theorems by scanning a workspace directory. For example, a part of the Peano system may look like this nat.svg(this graph is built manually).
I've tried using Language Service Prorocol for "textDocument/documentSymbol" and "textDocument/semanticTokens/full" requests, they can obtain which theorems are defined in the current file, but cannot parse theorems defined through the lemma keyword, and cannot obtain which other theorems are referenced in the theorems.
So, is there any way to obtain the dependency relationships?
Floris van Doorn (Nov 27 2023 at 09:30):
This is possible to write yourself with a bit of Lean metaprogramming. See for example this thread where I do something similar.
Last updated: Dec 20 2023 at 11:08 UTC