lean4-htt/tests/lean/attribute_bug1.lean
2017-03-09 18:41:19 -08:00

19 lines
477 B
Text

open tactic
constant f : nat → nat
constant fdef : ∀ n, f n = n + 1
example (n : nat) : f n = n + 1 :=
by simp -- Failed as expected, since fdef is not marked as [simp]
local attribute [simp] fdef
example (n : nat) : f n = n + 1 :=
by simp -- Succeeded as expected
local attribute [-simp] fdef
#print fdef -- we don't get the [simp] attribute when printing fdef
example (n : nat) : f n = n + 1 :=
by simp -- Failed as expected, since we removed [simp] attribute