lean4-htt/tests/elab/grind_cutsat_diseq_2.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

61 lines
1.7 KiB
Text

module
set_option grind.debug true
open Int.Linear
theorem ex₁ (a b c : Int) : a + 2*b = 0 → c + b = -b → a = c := by
grind
theorem ex₂ (a b c : Int) : a + 2*b = 0 → a = c → c + b = -b := by
grind
theorem ex₃ (a b c : Int) : a + b + c = 0 → a = c → b = 4 → c = -2 := by
grind
/--
trace: [grind.lia.assert] -1*「a + -2 * b + -2 * c」 + a + -2*b + -2*c = 0
[grind.lia.assert] -1*「0」 = 0
[grind.lia.assert] 「a + -2 * b + -2 * c」 = 0
[grind.lia.assert] -1*「a + -2 * b + -2 * d」 + a + -2*b + -2*d = 0
[grind.lia.assert] 「a + -2 * b + -2 * d」 ≠ 0
[grind.lia.assert] -1*d + c = 0
[grind.lia.assert] 0 ≠ 0
-/
#guard_msgs (trace) in
set_option trace.grind.lia.assert true in
theorem ex₄ (a b c d : Int) : a = 2*b + 2*c → a - 2*b - 2*d ≠ 0 → c ≠ d := by
grind
theorem ex₅ (a b c : Int) : c = a → a + b ≤ 3 → 2 < b + c → a + b = 3 := by
grind
theorem ex₆ (a b : Int) : 3 ≤ a + b → b + a ≠ 3 → a ≠ 4 - b → a ≠ 5 - b → a ≠ -b + 6 → b + a ≠ 7 → a + b ≠ 8 → b + a < 9 → False := by
grind
example (a b : Int) :
b + a < 8 →
3 ≤ a + b →
b + a ≠ 3 →
a ≠ 4 - b →
a ≠ 5 - b →
a ≠ -b + 6 →
b + a ≠ 7 → False := by
grind
#print ex₁
#print ex₂
#print ex₃
#print ex₄
#print ex₅
#print ex₆
example (a : Int) : 1 ≤ a → a ≠ 1 → a ≤ 2 → a ≠ 2 → False := by
grind
example (a : Int) : 1 ≤ a → a ≤ 2 → a ≠ 1 → a ≠ 2 → False := by
grind
example (a : Int) : a ≠ 2 → 1 ≤ a → a ≤ 2 → a ≠ 1 → False := by
grind
example (a : Int) : a ≠ 1 → a ≠ 2 → 1 ≤ a → a ≤ 2 → False := by
grind