Skip to content

Commit d67180a

Browse files
committed
feat: easy case for isEqv
1 parent dca874e commit d67180a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,12 @@ def isEqFalse (e : Expr) : GoalM Bool := do
312312

313313
/-- Returns `true` if `a` and `b` are in the same equivalence class. -/
314314
def isEqv (a b : Expr) : GoalM Bool := do
315-
let na ← getENode a
316-
let nb ← getENode b
317-
return isSameExpr na.root nb.root
315+
if isSameExpr a b then
316+
return true
317+
else
318+
let na ← getENode a
319+
let nb ← getENode b
320+
return isSameExpr na.root nb.root
318321

319322
/-- Returns `true` if the root of its equivalence class. -/
320323
def isRoot (e : Expr) : GoalM Bool := do

0 commit comments

Comments
 (0)