Skip to content

Conversation

@leodemoura
Copy link
Member

This PR implements (nested term) equality propagation in grind order. That is, it propagates implied equalities from grind order back to the grind core. Examples:

open Lean Grind Std

example [LE α] [IsPartialOrder α] (a b : α) (f : α → Nat) : a ≤ b → b ≤ c → c ≤ a → f a = f b := by
  grind (splits := 0)

example [CommRing α] [LE α] [LT α] [LawfulOrderLT α] [IsPartialOrder α] [OrderedRing α]
    (a b : α) (f : α → Int) : a ≤ b + 1 → b ≤ a - 1 → f a = f (2 + b - 1) := by
  grind -mbtc -lia -linarith (splits := 0)

example (a b : Int) (f : Int → Int) : a ≤ b + 1 → b ≤ a - 1 → f a = f (2 + b - 1) := by
  grind -mbtc -lia -linarith (splits := 0)

@leodemoura leodemoura added the changelog-tactics User facing tactics label Nov 1, 2025
@leodemoura leodemoura enabled auto-merge November 1, 2025 13:38
@leodemoura leodemoura added this pull request to the merge queue Nov 1, 2025
Merged via the queue into master with commit faed852 Nov 1, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-tactics User facing tactics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants