Files
lean4/tests/elab/cbv4.lean
Wojciech Różowski eacb82e5f3 test: move cbv tests to appropriate directories (#12791)
This PR moves cbv tests to the correct test directories. `cbv4.lean` is
a
straightforward elaboration test and is moved to `tests/elab/`. The AES
and ARM
load/store tests are performance-oriented stress tests and are moved to
`tests/elab_bench/`.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:53:05 +00:00

15 lines
525 B
Lean4
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/- Minimized example extracted from verifying the Collatz conjecture for small numbers.
Suggested by Bhavik Mehta (@b-mehta). -/
set_option cbv.warning false
def collatzStep (n : Nat) : Nat := if n % 2 = 0 then n / 2 else (3 * n + 1) / 2
def manyStep (n m : Nat) : Nat Bool
| 0 => false
| k + 1 => m < n manyStep n (collatzStep m) k
def checkAll (gas : Nat) : Nat Bool
| 0 => true
| n + 1 => bif manyStep (n + 2) (n + 2) gas then checkAll gas n else false
example : checkAll 70 100 = true := by cbv