Skip to content

grind fails to prove conjunction of two things it can prove #12581

@TwoFX

Description

@TwoFX

Prerequisites

Description

See the following snippet:

example {a b c d : Int} (f : Int → Nat → Int) (h₁ : a = 0) (h₁' : ∀ k, 0 ≤ f c k) (h₂ : b = 0) (h₂' : ∀ k, 0 ≤ f d k) :
    a + b = 0 := by
  grind -- works

example {a b c d : Int} (f : Int → Nat → Int) (h₁ : a = 0) (h₁' : ∀ k, 0 ≤ f c k) (h₂ : b = 0) (h₂' : ∀ k, 0 ≤ f d k) :
    ∀ k, 0 ≤ f c k + f d k := by
  grind -- works

example {a b c d : Int} (f : Int → Nat → Int) (h₁ : a = 0) (h₁' : ∀ k, 0 ≤ f c k) (h₂ : b = 0) (h₂' : ∀ k, 0 ≤ f d k) :
    a + b = 0 ∧ ∀ k, 0 ≤ f c k + f d k := by
  rw [h₁]
  grind -- works

example {a b c d : Int} (f : Int → Nat → Int) (h₁ : a = 0) (h₁' : ∀ k, 0 ≤ f c k) (h₂ : b = 0) (h₂' : ∀ k, 0 ≤ f d k) :
    a + b = 0 ∧ ∀ k, 0 ≤ f c k + f d k :=
  ⟨by grind, by grind⟩ -- works

example {a b c d : Int} (f : Int → Nat → Int) (h₁ : a = 0) (h₁' : ∀ k, 0 ≤ f c k) (h₂ : b = 0) (h₂' : ∀ k, 0 ≤ f d k) :
    a + b = 0 ∧ ∀ k, 0 ≤ f c k + f d k := by
  grind -- fails

The diagnostics don't show any reached thresholds.

Expected behavior: grind solves last goal

Actual behavior: grind fails

Versions

4.28.0 and 4.30.0-nightly-2026-02-18 on live.lean-lang.org

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-mediumWe may work on this issue if we find the timebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions