Skip to content

Commit

Permalink
feat: add isEqv
Browse files Browse the repository at this point in the history
  • Loading branch information
leodemoura committed Dec 24, 2024
1 parent bb339e1 commit 5ecd40c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Lean/Meta/Tactic/Grind/Types.lean
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@ def isEqFalse (e : Expr) : GoalM Bool := do
let n ← getENode e
return isSameExpr n.root (← getFalseExpr)

/-- Returns `true` if `a` and `b` are in the same equivalence class. -/
def isEqv (a b : Expr) : GoalM Bool := do
let na ← getENode a
let nb ← getENode b
return isSameExpr na.root nb.root

/-- Returns `true` if the root of its equivalence class. -/
def isRoot (e : Expr) : GoalM Bool := do
let some n ← getENode? e | return false -- `e` has not been internalized. Panic instead?
Expand Down

0 comments on commit 5ecd40c

Please sign in to comment.