lean4-htt/tests/elab/grind_mbtc_1.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
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.
2026-02-25 13:51:53 +00:00

69 lines
1.9 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module
example (f : Int → Int) (x : Int)
: 0 ≤ x → x ≠ 0 → x ≤ 1 → f x = 2 → f 1 = 2 := by
grind
-- In the following example, model-based theory combination is disabled,
-- and we have an invalid counterexample where `x := 1`,
-- but `f x` and `f 1` have different assignments.
/--
trace: [grind.lia.model] x := 1
[grind.lia.model] f x := 2
[grind.lia.model] f 1 := 5
-/
#guard_msgs (trace) in
set_option trace.grind.lia.model true in
example (f : Int → Int) (x : Int)
: 0 ≤ x → x ≠ 0 → x ≤ 1 → f x = 2 → f 1 = 2 := by
fail_if_success grind -mbtc
sorry
/--
trace: [grind.lia.model] x := 2
[grind.lia.model] f x := 2
[grind.lia.model] f 1 := 5
-/
#guard_msgs (trace) in
set_option trace.grind.lia.model true in
example (f : Int → Int) (x : Int)
: 0 ≤ x → x ≠ 0 → x ≤ 3 → f x = 2 → f 1 = 2 := by
fail_if_success grind
sorry
example (f : Int → Int → Int) (x y : Int)
: 0 ≤ x → x ≠ 0 → x ≤ 1 → f x y = 2 → f 1 y = 2 := by
grind
example (f : Nat → Nat) (x : Nat)
: x ≠ 0 → x ≤ 1 → f x = 2 → f 1 = 2 := by
grind
example (f : Nat → Nat → Nat) (x y : Nat)
: x ≠ 0 → x ≤ 1 → f x y = 2 → f 1 y = 2 := by
grind
-- `b` must not be `2`. Otherwise, `f (b+1)` and `f 3` must be equal.
/--
trace: [grind.lia.model] a := 5
[grind.lia.model] b := 3
-/
#guard_msgs (trace) in
set_option trace.grind.lia.model true in
example (f : Int → α) (a b : Int) : b > 1 → f (b + 1) = x → f 3 = y → x = y := by
(fail_if_success grind); sorry
-- `b` must not be `2`. Otherwise, `f (b+1)` and `f 3` must be equal.
/--
trace: [grind.lia.model] x := 5
[grind.lia.model] y := 6
[grind.lia.model] a := 7
[grind.lia.model] b := 3
[grind.lia.model] f 3 := 6
[grind.lia.model] f (b + 1) := 5
-/
#guard_msgs (trace) in
set_option trace.grind.lia.model true in
example (f : Int → Int) (a b : Int) : b > 1 → f (b + 1) = x → f 3 = y → x = y := by
(fail_if_success grind); sorry