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.
16 lines
582 B
Text
16 lines
582 B
Text
-- A function that reduced badly, as a canary for kernel reduction
|
|
def bad (n : Nat) : Nat :=
|
|
if h : n = 0 then 0 else bad (n / 2)
|
|
termination_by n
|
|
|
|
theorem foo : 2 * bad 42000 = bad 42000 + bad 42000 := by simp +arith
|
|
|
|
theorem foo2 (h : 2 * bad 42000 = bad 42000 + bad 42000 + 1) : False := by simp +arith at h
|
|
|
|
theorem foo3 (h : bad 42000 + bad 42000 = x) : (2 * bad 42000 = x) := by simp +arith at h; assumption
|
|
|
|
@[irreducible] def f : Nat → Nat := fun x => x
|
|
|
|
theorem doesn't_do_anything : f 3 = 3 := by
|
|
fail_if_success simp_arith -- does not apply f_eq and g_eq
|
|
rw [f]
|