mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
27 lines
616 B
Plaintext
27 lines
616 B
Plaintext
@f_main_eq : ∀ {x : Nat} {b : Bool},
|
|
f x b =
|
|
match x, b with
|
|
| 0, true => 1
|
|
| 0, false => 2
|
|
| 1, true => 3
|
|
| 1, x => 4
|
|
| x.succ.succ, true => f x true
|
|
| x.succ.succ, b => f x !b
|
|
g_main_eq : ∀ (xs ys : List Nat),
|
|
g xs ys =
|
|
match xs, ys with
|
|
| [], y :: ys => y
|
|
| [], x => 0
|
|
| x :: x_1 :: xs, ys => g xs ys
|
|
| x :: xs, y :: ys => g xs ys + y
|
|
| x :: xs, [] => g xs []
|
|
foo_main_eq : ∀ (xs : List Nat),
|
|
foo xs =
|
|
match xs with
|
|
| [] => []
|
|
| x :: xs =>
|
|
have y := 2 * x;
|
|
match xs with
|
|
| [] => []
|
|
| x :: xs => (y + x) :: foo xs
|