You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The linter fails here, but I claim it should succeed:
import Std
@[simp]theoremcast_fin_h {n m : Nat} (h : m = n) (a : Fin (m + 2)) : (cast (by rw [h]) a : Fin (n + 2)) = (a : Nat) := by cases h; rfl
#lint
#check @cast_fin_h /- Left-hand side does not simplify, when using the simp lemma on itself.This usually means that it will never apply. -/-- but `simp` works just fineexample {n m : Nat} (h : m = n) (a : Fin (m + 2)) : (cast (by rw [h]) a : Fin (n + 2)) = (a : Nat) := by
simp [h]
The linter fails here, but I claim it should succeed:
I think this code is falsely concluding that this is not a conditional simp lemma:
https://github.com/leanprover/std4/blob/c14f6a65b2c08caa38e1ab5db83451460d6cde3e/Std/Tactic/Lint/Simp.lean#L35-L45
The check for "appears on the LHS" should not visit
Prop
subexpressions, as those aren't found by unification.The text was updated successfully, but these errors were encountered: