lean4-htt/tests/lean/run/grind_11001.lean
Leonardo de Moura 40e1e097c1
fix: grind order nontermination and propagation issues (#11026)
This PR fixes a nontermination and missing propagation bug in `grind
order`. It also register relevant case-splits for arithmetic.

Closes #11001
2025-10-30 23:12:51 +00:00

34 lines
1 KiB
Text

example (n : Nat)
(f : Nat → Rat → Rat)
(x : Rat)
(H : ∀ (x : Rat), 0 ≤ x →
(4 < x → f n x < 2 * x) ∧ (x = 4 → f n x = 2 * x) ∧ (x < 4 → 2 * x < f n x)) :
x ∈ [4] ↔ f n x = 2 * x := by
fail_if_success grind
sorry
example (n : Nat)
(f : Nat → Rat → Rat)
(x : Rat)
(_ : x ≥ 0)
(H : ∀ (x : Rat), 0 ≤ x →
(4 < x → f n x < 2 * x) ∧ (x = 4 → f n x = 2 * x) ∧ (x < 4 → 2 * x < f n x)) :
x ∈ [4] ↔ f n x = 2 * x := by
grind
example (n : Nat)
(f : Nat → Rat → Rat)
(x : Rat)
(_ : x ≥ 0)
(H : ∀ (x : Rat), 0 ≤ x →
(4 < x → f n x < 2 * x) ∧ (x = 4 → f n x = 2 * x) ∧ (x < 4 → 2 * x < f n x)) :
f n x = 2 * x → x ∈ [4] := by
grind
example (n : Nat)
(f : Nat → Rat → Rat)
(x : Rat)
(H : ∀ (x : Rat), 0 ≤ x →
(4 < x → f n x < 2 * x) ∧ (x = 4 → f n x = 2 * x) ∧ (x < 4 → 2 * x < f n x)) :
x ∈ [4] → f n x = 2 * x := by
grind