lean4-htt/tests/elab/1829.lean
Wojciech Różowski 91dd99165a
feat: add warning when applying global attribute using in (#13223)
This PR adds a warning preventing a user from applying global attribute
using `... in ...`, e.g.
```lean4
theorem a : True := trivial
attribute [simp] a in
def b : True := a
```
2026-04-08 06:20:34 +00:00

13 lines
405 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

attribute [simp] eq_iff_true_of_subsingleton
example : True := trivial
structure Func' (α : Sort _) (β : Sort _) :=
(toFun : α → β)
def r : Func' α α := ⟨id⟩
@[simp] theorem r_toFun {α : Sort u_1} (a : α) : Func'.toFun r a = id a := rfl
example (x y : α) (h : x = y) : r.toFun x = y := by simp <;> rw [h]
theorem noissue (x y : α) (h : x = y) : r.toFun x = y := by simp <;> rw [h]