Compare commits

...

3 Commits

Author SHA1 Message Date
Kim Morrison
0784ed4b23 fix tests 2025-11-14 12:24:16 +11:00
Kim Morrison
253d9e464b careful about open 2025-11-14 12:22:47 +11:00
Kim Morrison
1afc52ed18 chore: include current file in default premise selector 2025-11-14 12:06:18 +11:00
2 changed files with 12 additions and 6 deletions

View File

@@ -11,15 +11,17 @@ import all Lean.LibrarySuggestions.SineQuaNon
/-!
# Default library suggestions engine
This module sets the default library suggestions engine to Sine Qua Non.
This module sets the default library suggestions engine to "Sine Qua Non",
along with the theorems from the current file.
.
Any module that imports this (directly or transitively) will have library suggestions enabled.
-/
namespace Lean.LibrarySuggestions
open Lean LibrarySuggestions SineQuaNon
-- Set the default library suggestions engine to Sine Qua Non
set_library_suggestions Lean.LibrarySuggestions.sineQuaNonSelector
-- Set the default library suggestions engine to
-- a combination of "Sine Qua Non" and the theorems from the current file.
-- For now we just intersperse the results, but in future we should re-rank them.
set_library_suggestions open Lean.LibrarySuggestions in sineQuaNonSelector.intersperse currentFile
end Lean.LibrarySuggestions

View File

@@ -13,7 +13,11 @@ already be set from importing Lean.LibrarySuggestions (which imports Default).
-/
/--
info: ✓ Selector found in imported state: `Lean.LibrarySuggestions.sineQuaNonSelector
info: ✓ Selector found in imported state: (Term.open
"open"
(Command.openSimple [`Lean.LibrarySuggestions])
"in"
(Term.app `sineQuaNonSelector.intersperse [`currentFile]))
---
info: ✓ Successfully retrieved selector using getSelector!
-/