Skip to content

Commit 0ab722e

Browse files
committed
feat: extend isRelevant
1 parent ee36cac commit 0ab722e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Lean/Meta/Tactic/Grind/Arith/IsRelevant.lean

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,26 @@ module
77
prelude
88
public import Lean.Meta.Tactic.Grind.Types
99
import Lean.Meta.Tactic.Grind.Arith.Util
10+
import Lean.Meta.Tactic.Grind.Arith.Cutsat.ToInt
11+
import Lean.Meta.Tactic.Grind.Arith.Linear.StructId
1012
public section
1113
namespace Lean.Meta.Grind.Arith
1214

13-
def isSupportedType (e : Expr) : GoalM Bool := do
14-
return isNatType e || isIntType e
15+
def isSupportedType (α : Expr) : GoalM Bool := do
16+
if isNatType α || isIntType α then
17+
return true
18+
else if (← Cutsat.getToIntId? α).isSome then
19+
return true
20+
else if (← Linear.getStructId? α).isSome then
21+
return true
22+
else
23+
return false
1524

1625
partial def isRelevantPred (e : Expr) : GoalM Bool :=
1726
match_expr e with
1827
| Not p => isRelevantPred p
1928
| LE.le α _ _ _ => isSupportedType α
29+
| LT.lt α _ _ _ => isSupportedType α
2030
| Eq α _ _ => isSupportedType α
2131
| Dvd.dvd α _ _ _ => isSupportedType α
2232
| _ => return false

0 commit comments

Comments
 (0)