Skip to content

Commit 25745dd

Browse files
committed
fix: isForbiddenParent
1 parent bef89c2 commit 25745dd

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/Lean/Meta/Tactic/Grind/Order/Internalize.lean

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,20 @@ def isForbiddenParent (parent? : Option Expr) : Bool :=
5050
-/
5151
true
5252
else if let some parent := parent? then
53-
(getType? parent |>.isSome)
54-
||
55-
/-
56-
**Note**: We currently ignore `•`. We may reconsider it in the future.
57-
-/
58-
match_expr parent with
59-
| HSMul.hSMul _ _ _ _ _ _ => true
60-
| Nat.cast _ _ _ => true
61-
| NatCast.natCast _ _ _ => true
62-
| Grind.IntModule.OfNatModule.toQ _ _ _ => true
63-
| _ => false
53+
if parent.isEq then
54+
false
55+
else
56+
(getType? parent |>.isSome)
57+
||
58+
/-
59+
**Note**: We currently ignore `•`. We may reconsider it in the future.
60+
-/
61+
match_expr parent with
62+
| HSMul.hSMul _ _ _ _ _ _ => true
63+
| Nat.cast _ _ _ => true
64+
| NatCast.natCast _ _ _ => true
65+
| Grind.IntModule.OfNatModule.toQ _ _ _ => true
66+
| _ => false
6467
else
6568
false
6669

0 commit comments

Comments
 (0)