Skip to content

Commit 7181b02

Browse files
committed
chore: cleanup
1 parent d31fd65 commit 7181b02

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

src/Lean/Meta/Tactic/Grind/EMatch.lean

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Leonardo de Moura
55
-/
66
prelude
77
import Lean.Meta.Tactic.Grind.Types
8-
import Lean.Meta.Tactic.Grind.Internalize
8+
import Lean.Meta.Tactic.Grind.Intro
99

1010
namespace Lean.Meta.Grind
1111
namespace EMatch
@@ -278,4 +278,15 @@ def ematch : GoalM Unit := do
278278
gmt := s.gmt + 1
279279
}
280280

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+
281292
end Lean.Meta.Grind

src/Lean/Meta/Tactic/Grind/Main.lean

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import Lean.Meta.Tactic.Grind.PropagatorAttr
1111
import Lean.Meta.Tactic.Grind.Proj
1212
import Lean.Meta.Tactic.Grind.ForallProp
1313
import Lean.Meta.Tactic.Grind.Util
14-
import Lean.Meta.Tactic.Grind.Simp
15-
import Lean.Meta.Tactic.Grind.PP
1614
import Lean.Meta.Tactic.Grind.Inv
1715
import Lean.Meta.Tactic.Grind.Intro
16+
import Lean.Meta.Tactic.Grind.EMatch
1817

1918
namespace Lean.Meta.Grind
2019

@@ -65,17 +64,6 @@ private def initCore (mvarId : MVarId) : GrindM (List Goal) := do
6564
goals.forM (·.checkInvariants (expensive := true))
6665
return goals.filter fun goal => !goal.inconsistent
6766

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-
7967
def all (goals : List Goal) (f : Goal → GrindM (List Goal)) : GrindM (List Goal) := do
8068
goals.foldlM (init := []) fun acc goal => return acc ++ (← f goal)
8169

src/Lean/Meta/Tactic/Grind/Simp.lean

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ import Lean.Meta.Tactic.Simp.Main
1010
import Lean.Meta.Tactic.Grind.Util
1111
import Lean.Meta.Tactic.Grind.Types
1212
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
1713

1814
namespace Lean.Meta.Grind
1915
/-- Simplifies the given expression using the `grind` simprocs and normalization theorems. -/

0 commit comments

Comments
 (0)