File tree Expand file tree Collapse file tree 3 files changed +13
-18
lines changed
src/Lean/Meta/Tactic/Grind Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Authors: Leonardo de Moura
5
5
-/
6
6
prelude
7
7
import Lean.Meta.Tactic.Grind.Types
8
- import Lean.Meta.Tactic.Grind.Internalize
8
+ import Lean.Meta.Tactic.Grind.Intro
9
9
10
10
namespace Lean.Meta.Grind
11
11
namespace EMatch
@@ -278,4 +278,15 @@ def ematch : GoalM Unit := do
278
278
gmt := s.gmt + 1
279
279
}
280
280
281
+ /-- Performs one round of E-matching, and assert new instances. -/
282
+ def ematchAndAssert? (goal : Goal) : GrindM (Option (List Goal)) := do
283
+ let numInstances := goal.numInstances
284
+ let goal ← GoalM.run' goal ematch
285
+ if goal.numInstances == numInstances then
286
+ return none
287
+ assertAll goal
288
+
289
+ def ematchStar (goal : Goal) : GrindM (List Goal) := do
290
+ iterate goal ematchAndAssert?
291
+
281
292
end Lean.Meta.Grind
Original file line number Diff line number Diff line change @@ -11,10 +11,9 @@ import Lean.Meta.Tactic.Grind.PropagatorAttr
11
11
import Lean.Meta.Tactic.Grind.Proj
12
12
import Lean.Meta.Tactic.Grind.ForallProp
13
13
import Lean.Meta.Tactic.Grind.Util
14
- import Lean.Meta.Tactic.Grind.Simp
15
- import Lean.Meta.Tactic.Grind.PP
16
14
import Lean.Meta.Tactic.Grind.Inv
17
15
import Lean.Meta.Tactic.Grind.Intro
16
+ import Lean.Meta.Tactic.Grind.EMatch
18
17
19
18
namespace Lean.Meta.Grind
20
19
@@ -65,17 +64,6 @@ private def initCore (mvarId : MVarId) : GrindM (List Goal) := do
65
64
goals.forM (·.checkInvariants (expensive := true ))
66
65
return goals.filter fun goal => !goal.inconsistent
67
66
68
- /-- Performs one round of E-matching, and assert new instances. -/
69
- def ematchAndAssert? (goal : Goal) : GrindM (Option (List Goal)) := do
70
- let numInstances := goal.numInstances
71
- let goal ← GoalM.run' goal ematch
72
- if goal.numInstances == numInstances then
73
- return none
74
- assertAll goal
75
-
76
- def ematchStar (goal : Goal) : GrindM (List Goal) := do
77
- iterate goal ematchAndAssert?
78
-
79
67
def all (goals : List Goal) (f : Goal → GrindM (List Goal)) : GrindM (List Goal) := do
80
68
goals.foldlM (init := []) fun acc goal => return acc ++ (← f goal)
81
69
Original file line number Diff line number Diff line change @@ -10,10 +10,6 @@ import Lean.Meta.Tactic.Simp.Main
10
10
import Lean.Meta.Tactic.Grind.Util
11
11
import Lean.Meta.Tactic.Grind.Types
12
12
import Lean.Meta.Tactic.Grind.MarkNestedProofs
13
- import Lean.Meta.Tactic.Grind.Cases
14
- import Lean.Meta.Tactic.Grind.Injection
15
- import Lean.Meta.Tactic.Grind.Core
16
- import Lean.Meta.Tactic.Grind.EMatch
17
13
18
14
namespace Lean.Meta.Grind
19
15
/-- Simplifies the given expression using the `grind` simprocs and normalization theorems. -/
You can’t perform that action at this time.
0 commit comments