This PR adds a user facing `cbv` tactic that can be used outside of the `conv` mode. Example usage: ```lean4 example : "hello" ++ " " ++ "world" = "hello world" := by cbv ``` --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
21 lines
343 B
Text
21 lines
343 B
Text
set_option cbv.warning false
|
|
|
|
def f (n : Nat) : Nat := match n with
|
|
| 0 => 0
|
|
| (n + 1) => (f n) + 1
|
|
termination_by n
|
|
|
|
example : f 1 = f 1 := by cbv
|
|
|
|
/--
|
|
trace: ⊢ 1 = 2
|
|
---
|
|
warning: declaration uses `sorry`
|
|
-/
|
|
#guard_msgs in
|
|
example : f 1 = f 2 := by
|
|
cbv
|
|
trace_state
|
|
sorry
|
|
|
|
example : "hello" ++ " " ++ "world" = "hello world" := by cbv
|