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 ```
13 lines
405 B
Text
13 lines
405 B
Text
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]
|