lean4-htt/tests/lean/run/cbv3.lean
Wojciech Różowski 64bd08e1f9
feat: add non-conv, user-facing cbv tactic (#12408)
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>
2026-02-11 09:04:11 +00:00

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