Skip to content

Commit a4022c7

Browse files
committed
merge master
1 parent bf9178b commit a4022c7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Lean/Elab/Tactic/SimpTrace.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ prelude
99
public import Lean.Elab.ElabRules
1010
public import Lean.Elab.Tactic.Simp
1111
public import Lean.Meta.Tactic.TryThis
12-
public import Lean.PremiseSelection.Basic
12+
public import Lean.LibrarySuggestions.Basic
1313

1414
public section
1515

@@ -56,7 +56,7 @@ def mkSimpCallStx (stx : Syntax) (usedSimps : UsedSimps) : MetaM (TSyntax `tacti
5656
if let some a := args then a.getElems else #[]
5757
if config.suggestions then
5858
-- Get premise suggestions from the premise selector
59-
let suggestions ← Lean.PremiseSelection.select (← getMainGoal)
59+
let suggestions ← Lean.LibrarySuggestions.select (← getMainGoal)
6060
-- Convert suggestions to simp argument syntax and add them to the args
6161
for sugg in suggestions do
6262
let arg ← `(Parser.Tactic.simpLemma| $(mkIdent sugg.name):term)
@@ -91,7 +91,7 @@ def mkSimpCallStx (stx : Syntax) (usedSimps : UsedSimps) : MetaM (TSyntax `tacti
9191
if let some a := args then a.getElems else #[]
9292
if config.suggestions then
9393
-- Get premise suggestions from the premise selector
94-
let suggestions ← Lean.PremiseSelection.select (← getMainGoal)
94+
let suggestions ← Lean.LibrarySuggestions.select (← getMainGoal)
9595
-- Convert suggestions to simp argument syntax and add them to the args
9696
for sugg in suggestions do
9797
let arg ← `(Parser.Tactic.simpLemma| $(mkIdent sugg.name):term)

tests/lean/run/simp_suggestions.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Lean.PremiseSelection
1+
import Lean.LibrarySuggestions
22

33
-- A custom function that simp doesn't know about
44
def myCustomAdd (x y : Nat) : Nat := x + y
@@ -8,7 +8,7 @@ theorem myCustomAdd_comm (x y : Nat) : myCustomAdd x y = myCustomAdd y x := by
88
simp [myCustomAdd, Nat.add_comm]
99

1010
-- Set up a premise selector that suggests our helper theorem
11-
set_premise_selector (fun _ _ => pure #[{ name := `myCustomAdd_comm, score := 1.0 }])
11+
set_library_suggestions (fun _ _ => pure #[{ name := `myCustomAdd_comm, score := 1.0 }])
1212

1313
-- Test that regular simp? fails without the premise
1414
example (a b : Nat) : myCustomAdd a b = myCustomAdd b a := by

0 commit comments

Comments
 (0)