Zulip Chat Archive

Stream: mathlib4

Topic: linter.unusedSimpArgs


Kenny Lau (Jul 04 2025 at 10:27):

I think the unused simp args linter should only activate when the goal has been cleared.

Kenny Lau (Jul 04 2025 at 10:30):

#mwe :

import Mathlib.Data.Nat.Basic

def addOne (n : ) :  := n + 1
def addTwo (n : ) :  := n + 2

lemma addOne_eq_add_one (n : ) : id (addOne n) = n + 1 := by
  simp [id, addTwo] -- linter activates but shouldn't

lemma addOne_eq_add_one' (n : ) : id (addOne n) = n + 1 := by
  simp [id, addOne, addTwo] -- linter correctly activates

Eric Wieser (Jul 04 2025 at 10:47):

I think it's pretty useful to know immediately that a simp lemma didn't fire when you expected it to

Damiano Testa (Jul 04 2025 at 10:47):

I agree with Eric: knowing which lemmas you thought would apply, but didn't, can be useful to figure out what is going on.

Kenny Lau (Jul 04 2025 at 10:49):

fair point


Last updated: Dec 20 2025 at 21:32 UTC