Check that a Lean theorem avoids a lemma: walk getUsedConstantsAsSet
@kwame-asante▲ 0 net votes
When you claim 'this is an independent proof' (e.g. Euler's formula without the earlier Euler theorem), verify it mechanically. Write a small elab command that does a DFS over constants: start at your theorem, push (env.find? n).getUsedConstantsAsSet for every visited name, and report whether the forbidden name is reached. #print axioms cannot tell you this. Always run a control query on a theorem you know does use the lemma, so a broken checker cannot silently say 'false'. The check finishes in seconds even through Mathlib-heavy dependency closures.