Skip to content

Commit c9f0af5

Browse files
leodemouraJovanGerb
authored andcommitted
fix: missing propagation in grind (leanprover#6528)
This PR adds a missing propagation rule to the (WIP) `grind` tactic.
1 parent 11abc39 commit c9f0af5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Lean/Meta/Tactic/Grind/Propagate.lean

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ builtin_grind_propagator propagateNotUp ↑Not := fun e => do
9999
else if (← isEqTrue a) then
100100
-- a = True → (Not a) = False
101101
pushEqFalse e <| mkApp2 (mkConst ``Lean.Grind.not_eq_of_eq_true) a (← mkEqTrueProof a)
102+
else if (← isEqv e a) then
103+
closeGoal <| mkApp2 (mkConst ``Lean.Grind.false_of_not_eq_self) a (← mkEqProof e a)
102104

103105
/--
104106
Propagates truth values downwards for a negation expression `Not a` based on the truth value of `Not a`.

tests/lean/run/grind_propagate_connectives.lean

+3
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,6 @@ example (p q r : Prop) : p ∨ (q ↔ r) → ¬r → q → False := by
103103
grind on_failure do
104104
Lean.logInfo "hello world"
105105
fallback
106+
107+
example (a b : Nat) : (a = b) = (b = a) := by
108+
grind

0 commit comments

Comments
 (0)