lean4-htt/tests/pkg/builtin_attr/UserAttr/Tst.lean
Leonardo de Moura 2df35360ee
feat: validate reducibility attribute setting (#4052)
and new option `set_option allowUnsafeReductibility true` to override
validation.

---------

Co-authored-by: Mario Carneiro <di.gama@gmail.com>
2024-05-03 13:44:42 +00:00

18 lines
301 B
Text

import UserAttr.BlaAttr
@[bar] def f (x : Nat) := x + 2
@[bar] def g (x : Nat) := x + 1
attribute [local irreducible] myFun
/--
error: type mismatch
rfl
has type
myFun x = myFun x : Prop
but is expected to have type
myFun x = x + 1 : Prop
-/
#guard_msgs in
example : myFun x = x + 1 :=
rfl