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.
38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
import Lean.LibrarySuggestions.Default
|
|
|
|
/-!
|
|
# Test that set_library_suggestions can override the default
|
|
|
|
This test verifies that even after importing Default (which sets Sine Qua Non as the default),
|
|
we can override it with a different selector.
|
|
-/
|
|
|
|
-- First, verify the default is set by using it
|
|
example {x : Dyadic} {prec : Int} : x.roundDown prec ≤ x := by
|
|
grind +suggestions
|
|
|
|
-- Now override with an empty selector
|
|
set_library_suggestions (fun _ _ => pure #[])
|
|
|
|
-- Verify that grind +suggestions now fails because the empty selector provides no suggestions
|
|
/--
|
|
error: `grind` failed
|
|
case grind
|
|
x : Dyadic
|
|
prec : Int
|
|
h : ¬x.roundDown prec ≤ x
|
|
⊢ False
|
|
[grind] Goal diagnostics
|
|
[facts] Asserted facts
|
|
[prop] ¬x.roundDown prec ≤ x
|
|
[eqc] False propositions
|
|
[prop] x.roundDown prec ≤ x
|
|
[cutsat] Assignment satisfying linear constraints
|
|
[assign] prec := 2
|
|
[linarith] Linarith assignment for `Dyadic`
|
|
[assign] x := -1
|
|
[assign] x.roundDown prec := 0
|
|
-/
|
|
#guard_msgs in
|
|
example {x : Dyadic} {prec : Int} : x.roundDown prec ≤ x := by
|
|
grind +suggestions
|