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.
28 lines
958 B
Text
28 lines
958 B
Text
import Lean
|
||
|
||
-- This checks that binderNameHint freshens up a variable.:
|
||
|
||
axiom allPairs (l : List α) (p : α → α → Bool) : Bool
|
||
|
||
#guard_msgs (drop warning) in
|
||
theorem all_eq_allPairs (l : List α) (p : α → Bool) :
|
||
l.all p ↔ ∀ x y z, binderNameHint x p <| binderNameHint y () <| p x && p y && p z:= sorry
|
||
|
||
-- below we should get `a` from the user (no dagger), `y` with dagger (binderNameHint added a macro
|
||
-- scope) and `z` without dagger (because intro1P is not hygienic)
|
||
|
||
/--
|
||
error: Failed: `fail` tactic was invoked
|
||
f : String → Bool
|
||
names : List String
|
||
a y✝ z : String
|
||
⊢ (f a && f y✝ && f z) = true
|
||
-/
|
||
#guard_msgs in
|
||
open Lean Elab Tactic in
|
||
example {f : String → Bool} (names : List String) : names.all (fun a => f a) = true := by
|
||
rw [all_eq_allPairs]
|
||
run_tac liftMetaTactic1 ((some ·.2) <$> ·.intro1P)
|
||
run_tac liftMetaTactic1 ((some ·.2) <$> ·.intro1P)
|
||
run_tac liftMetaTactic1 ((some ·.2) <$> ·.intro1P)
|
||
fail
|