perf: avoid isDefEq test at simpEq simproc used in grind (#9385)

This PR replaces the `isDefEq` test in the `simpEq` simproc used in
`grind`. It is too expensive.
This commit is contained in:
Leonardo de Moura 2025-07-15 11:38:11 -07:00 committed by GitHub
parent 0926d27100
commit 166d1c0dab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,7 @@ builtin_simproc_decl simpEq (@Eq _ _ _) := fun e => do
return .visit { expr := e', proof? := mkApp2 (mkConst ``Grind.bool_eq_to_prop) lhs rhs }
return .continue
| _ =>
if (← isDefEq lhs rhs) then
if lhs == rhs then
let u := f.constLevels!
return .done { expr := mkConst ``True, proof? := mkApp2 (mkConst ``eq_self u) α lhs }
else if rhs == mkConst ``True then