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.
52 lines
1.1 KiB
Text
52 lines
1.1 KiB
Text
opaque π : Rat
|
|
axiom pi_pos : 0 < π
|
|
|
|
theorem two_pi_pos : 0 < 2 * π := by
|
|
grind [pi_pos]
|
|
|
|
/--
|
|
info: Try these:
|
|
[apply] grind only [pi_pos]
|
|
[apply] grind =>
|
|
instantiate only [pi_pos]
|
|
linarith
|
|
-/
|
|
#guard_msgs in
|
|
theorem two_pi_pos' : 0 < 2 * π := by
|
|
grind? [pi_pos]
|
|
|
|
attribute [grind .] pi_pos
|
|
|
|
theorem two_pi_pos'' : 0 < 2 * π := by
|
|
grind
|
|
|
|
/--
|
|
info: Try these:
|
|
[apply] grind only [pi_pos]
|
|
[apply] grind =>
|
|
instantiate only [pi_pos]
|
|
linarith
|
|
-/
|
|
#guard_msgs in
|
|
theorem two_pi_pos''' : 0 < 2 * π := by
|
|
grind?
|
|
|
|
def f (x : Nat) := x
|
|
|
|
-- Should not instantiate/activate pi_pos
|
|
/--
|
|
trace: [grind.ematch] activated `f.eq_1`, [f #0]
|
|
[grind.ematch.instance] f.eq_1: f x = x
|
|
-/
|
|
#guard_msgs (drop error, trace) in
|
|
example : 1 < x → 2 < f x := by
|
|
set_option trace.grind.ematch true in
|
|
set_option trace.grind.ematch.instance true in
|
|
grind [f]
|
|
|
|
-- Should instantiate/activate pi_pos
|
|
/-- trace: [grind.ematch] activated `pi_pos`, [@LT.lt `[Rat] `[Rat.instLT] `[0] `[π]] -/
|
|
#guard_msgs in
|
|
example : π < x → 0 < x := by
|
|
set_option trace.grind.ematch true in
|
|
grind
|