This PR adds `cbv_eval` attribute that allows to evaluate functions in `cbv` tactic using pre-registered theorems.
11 lines
209 B
Text
11 lines
209 B
Text
module
|
|
|
|
set_option cbv.warning false
|
|
|
|
@[cbv_opaque] public def f5 (x : Nat) :=
|
|
x + 1
|
|
|
|
@[cbv_eval] private theorem f5_spec : f5 x = x + 1 := rfl
|
|
|
|
/- works locally -/
|
|
example : f5 1 = 2 := by conv => lhs; cbv
|