Uses proof body terms to disambiguate the names encoutered in
dependency extraction, rather than using (for example)
Thm.full_prop_of.
The result is that this catches a few more missing dependencies,
enough to correctly identify unused lemmas large sessions
like CRefine.
- Previously printed `~` for negative numbers, which is invalid
JSON. Now prints `-`.
- Previously the outpout would unconditionally trim
'underscore-number' suffixes. Now uses theory context to determine
if it's likely to be an index into a theory list or an existing
fact name.
- Changed JSON structure to avoid using dynamic names for keys, i.e.
from this:
{
"my_theory_name": {...}
}
to this:
{
"theory": "my_theory_name",
"content": {...}
}
This should make processing the output slightly nicer by matching
what other tools expect.
- Changed JSON structure to consolidate dependencies. Lemmas are no
longer special-cased.
Also remove at-end theory hook due to unfinished proofs causing issues. Autolevity must be run from a completed session (see lib/AutoLevity_Run).
Per-apply dependency tracking requires a small isabelle patch.