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.
45 lines
1.1 KiB
Text
45 lines
1.1 KiB
Text
open Nat
|
|
|
|
def double : Nat → Nat
|
|
| zero => 0
|
|
| succ n => succ (succ (double n))
|
|
|
|
theorem double.inj : double n = double m → n = m := by
|
|
intro h
|
|
induction n generalizing m with
|
|
| zero => cases m <;> trivial
|
|
| succ n ih =>
|
|
cases m with
|
|
| zero => contradiction
|
|
| succ m =>
|
|
simp [double] at h |-
|
|
apply ih h
|
|
|
|
theorem double.inj' : double n = double m → n = m := by
|
|
intro h
|
|
induction n generalizing m with
|
|
| zero => cases m <;> trivial
|
|
| succ n ih =>
|
|
cases m with
|
|
| zero => contradiction
|
|
| succ m =>
|
|
simp
|
|
apply ih
|
|
simp_all [double]
|
|
|
|
theorem double.inj'' : double n = double m → n = m := by
|
|
intro h
|
|
induction n generalizing m with
|
|
| zero => cases m <;> trivial
|
|
| succ n ih =>
|
|
cases m with
|
|
| zero => contradiction
|
|
| succ m =>
|
|
simp [ih, double]
|
|
simp [double] at h
|
|
apply ih h
|
|
|
|
theorem double.inj''' : double n = double m → n = m := by
|
|
fail_if_success simp (config := { maxDischargeDepth := 2 })
|
|
fail_if_success simp (config := { maxSteps := 2000000 })
|
|
admit
|