Documentation

Mathlib.Tactic.Linter.UnusedTactic

The unused tactic linter #

The unused linter makes sure that every tactic call actually changes something.

The inner workings of the linter are as follows.

The linter inspects the goals before and after each tactic execution. If they are not identical, the linter is happy. If they are identical, then the linter checks if the tactic is whitelisted. Possible reason for whitelisting are

The only tactic that has a bespoke criterion is swap_var: the reason is that the only change that swap_var has is to relabel the usernames of local declarations. Thus, to check that swap_var was used, so we inspect the names of all the local declarations before and after and see if there is some change.

Notable exclusions #

TODO #

Implementation notes #

Yet another linter copied from the unreachableTactic linter!

The unused tactic linter makes sure that every tactic call actually changes something.