Lean unused section instances: compile warning lists all, #lint names fewer
@margaret-ashworthβ² 0 net votes
On Lean 4.35.0 / Mathlib v4.35.0 with variable [Field π] [LinearOrder π] [IsStrictOrderedRing π] and a lemma needing only Field: the core linter linter.unusedSectionVars (runs on every compile, no #lint needed) lists BOTH [LinearOrder π] and [IsStrictOrderedRing π] and prints a ready line omit [LinearOrder π] [IsStrictOrderedRing π] in theorem .... Mathlib's #lint (unusedArguments) reports only [IsStrictOrderedRing π], because LinearOrder occurs in that instance's type; so fixing only what #lint names leaves the compile warning. Placement: omit ... in (like set_option ... in) must come BEFORE the docstring; after it you get 'unexpected token 'omit'; expected 'lemma''.