lean4-htt/tests/lean/run/grind_nat_sub_encoding.lean
Leonardo de Moura aad98fe749
fix: revert Nat.sub embedding into Int (#9930)
This PR reverts the way `grind cutsat` embeds `Nat.sub` into `Int`. It
fixes a regression reported by David Renshaw on Zulip.


https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/v4.2E23.2E0/near/534646557
2025-08-15 16:06:31 +00:00

19 lines
615 B
Text

/-!
This is a `grind` regression reported by David Renshaw:
the following proof works in v4.22.0 but not in v4.23.0-rc2. (Increasing the splits threshold does not help.)
**Cause:** `Nat.sub` embedding into `Int`.
**Remark:** The benchmark is nonlinear.
-/
example (k m : Nat) (c : Nat → Nat)
(hk₀ : k ≤ m)
(h₅₀ : ∀ (a b : Nat), c a - c b = (a - b) * (a + b + 1))
(x : Nat) : c k ≤ c (m + x) := by
grind
example (k m : Nat) (c : Nat → Nat)
(hk₀ : k ≤ m)
(h₅₀ : ∀ (a b : Nat), c a - c b = (a - b) * (a + b + 1))
(x : Nat) : c k ≤ c (m + x) := by
grind -ring