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.
26 lines
641 B
Text
26 lines
641 B
Text
-- set_option trace.Meta.Match.match true
|
|
-- set_option trace.Meta.Match.matchEqs true
|
|
|
|
def f (xs : List Nat) : Nat :=
|
|
match xs with
|
|
| [] => 1
|
|
| [a, b] => (a + b).succ
|
|
| _ => 2
|
|
|
|
theorem ex1 (xs : List Nat) (hr : xs.reverse = xs) (ys : Nat) : ys > 0 → f xs > 0 := by
|
|
simp [f]
|
|
split
|
|
next => intro hys; decide
|
|
next => intro hys; apply Nat.zero_lt_succ
|
|
next zs n₁ n₂ => intro hys; decide
|
|
|
|
def g (xs : List Nat) : Nat :=
|
|
match xs with
|
|
| [a, b, c, d, e] => a + e + 1
|
|
| _ => 1
|
|
|
|
theorem ex2 (xs : List Nat) : g xs > 0 := by
|
|
simp [g]
|
|
split
|
|
next a b c d e => apply Nat.zero_lt_succ
|
|
next h => decide
|