fix: missing propagation in grind (#6528)

This PR adds a missing propagation rule to the (WIP) `grind` tactic.
This commit is contained in:
Leonardo de Moura 2025-01-04 19:45:55 +01:00 committed by GitHub
parent 31435e9cd1
commit 37127ead07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -99,6 +99,8 @@ builtin_grind_propagator propagateNotUp ↑Not := fun e => do
else if (← isEqTrue a) then
-- a = True → (Not a) = False
pushEqFalse e <| mkApp2 (mkConst ``Lean.Grind.not_eq_of_eq_true) a (← mkEqTrueProof a)
else if (← isEqv e a) then
closeGoal <| mkApp2 (mkConst ``Lean.Grind.false_of_not_eq_self) a (← mkEqProof e a)
/--
Propagates truth values downwards for a negation expression `Not a` based on the truth value of `Not a`.

View file

@ -103,3 +103,6 @@ example (p q r : Prop) : p (q ↔ r) → ¬r → q → False := by
grind on_failure do
Lean.logInfo "hello world"
fallback
example (a b : Nat) : (a = b) = (b = a) := by
grind