lean4-htt/tests/lean/run/grind_eqres_bug.lean
Leonardo de Moura 2d14d51935
fix: equality resolution in grind (#10480)
This PR fixes a bug in the equality resolution frontend used in `grind`.
2025-09-21 02:40:38 +00:00

23 lines
662 B
Text

module
/--
trace: [grind.eqResolution] ∀ (x : Nat), p x a → ∀ (y : Nat), p y b → ¬x = y, ∀ (y : Nat), p y a → p y b → False
[grind.ematch.instance] h: p c a → p c b → ¬c = c
[grind.ematch.instance] local_0: p c a → ¬p c b
-/
#guard_msgs (trace) in
example
(p : Nat → Nat → Prop)
(a b c : Nat)
(h : ∀ x, p x a → ∀ y, p y b → x ≠ y)
(h₁ : p c a)
(h₂ : p c b)
: False := by
set_option trace.grind.eqResolution true in
set_option trace.grind.ematch.instance true in
grind
example
(f : Nat → Nat)
(h : ∀ x y, f x = f y → x = y)
: f (f a) = f (f b) → a = b := by
grind only