Skip to content

grind regression: fails on goals that previously worked #11539

@kim-em

Description

@kim-em

The grind tactic has regressed in nightly-2025-11-02, failing on goals that previously worked in v4.24.0 and nightly-2025-11-01.

Bisect Result

We bisected the regression to PR #11047 (commit faed852) - "feat: equality propagation in grind order".

Example 1

This Mathlib-free example now requires simp and norm_cast preprocessing:

example {n a b : Nat}
  (this : (b : Int) ^ (n + 1) + ↑(n + 1) * ↑b ^ (n + 1 - 1) * (↑a - ↑b) ≤
          (↑b + (↑a - ↑b)) ^ (n + 1)) :
    (n + 1) * a * b ^ n ≤ a ^ (n + 1) + n * b * b ^ n := by
  -- This used to work in v4.24.0 and nightly-2025-11-01
  grind  -- now fails

  -- Workaround:
  simp [Int.mul_sub, ← Int.add_sub_assoc] at this
  norm_cast at this
  grind

Example 2

A simpler example where a superfluous hypothesis trips up grind:

example (a b : Nat) (f g : Nat → Nat)
    (hf : (∀ i ≤ a, f i ≤ f (i + 1)) ∧ f 0 = 0)
    (hg : (∀ i ≤ b, g i ≤ g (i + 1)) ∧ g 0 = 0 ∧ g b = 0) :
    g (a + b - a) = 0 := by
  -- This used to work in v4.24.0 and nightly-2025-11-01
  grind  -- now fails

  -- Workaround:
  simp_all

Context

These examples come from https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/.60simp.20only.60.20.2B.20.60grind.60.20failure/near/560621777

The regression appears to be caused by the new equality propagation in grind order reasoning, which may be creating unhelpful case splits or reaching the case-split limit prematurely.

🤖 Created by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions