Zulip Chat Archive
Stream: new members
Topic: Getting the InfoTree for a theorem
Olivier Bousquet (Mar 21 2024 at 17:06):
Let's say I have defined and proved a theorem called my_theorem. What is the easiest way to programmatically get the InfoTree corresponding to its proof?
Anand Rao Tadipatri (Mar 23 2024 at 20:59):
The only way I know of is to first figure out the file where the declaration is contained, get the InfoTree
of that file and then try to locate the declaration within, but someone might have a better way.
Mario Carneiro (Mar 24 2024 at 06:36):
There is currently no real support for this, if you are interested in theorems from files other than the current one. You would have to re-elaborate the relevant file from scratch (and doing this in the same process as an existing lean elaboration is somewhat hazardous due to the use of global variables in the elaborator), and watch for when the theorem of interest is added to the environment to deduce which command is relevant and has the info trees you want. Doable, but very expensive, and untested (there may be additional unforeseen issues that arise when attempting this).
Last updated: May 02 2025 at 03:31 UTC