This PR adds the ability to register theorems with the `cbv_eval` attribute in the reverse direction using the `←` modifier, mirroring the existing `simp` attribute behavior. When `@[cbv_eval ←]` is used, the equation `lhs = rhs` is inverted to `rhs = lhs`, allowing `cbv` to rewrite occurrences of `rhs` to `lhs`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
12 lines
234 B
Text
12 lines
234 B
Text
module
|
|
|
|
set_option cbv.warning false
|
|
|
|
@[cbv_opaque] public def f7 (x : Nat) :=
|
|
x + 1
|
|
|
|
private axiom myAx : x + 1 = f7 x
|
|
|
|
@[local cbv_eval ←] public theorem f7_spec : x + 1 = f7 x := myAx
|
|
|
|
example : f7 1 = 2 := by conv => lhs; cbv
|