File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ import Lean.LibrarySuggestions.Basic
2+
3+ -- Define some initial local constants
4+ def myLocalDef : Nat := 42
5+
6+ theorem myLocalTheorem : myLocalDef = 42 := rfl
7+
8+ -- Add a theorem in the Lean namespace (should be filtered by isDeniedPremise)
9+ namespace Lean
10+ theorem shouldBeFiltered : True := trivial
11+ end Lean
12+
13+ -- Test the currentFile selector (should only show theorems, not definitions)
14+ set_library_suggestions Lean.LibrarySuggestions.currentFile
15+
16+ -- First test: should show only myLocalTheorem
17+ -- (not myLocalDef since it's a def, not Lean.shouldBeFiltered since it's in Lean namespace)
18+ /--
19+ info: Library suggestions: [ myLocalTheorem ]
20+ -/
21+ #guard_msgs in
22+ example : True := by
23+ suggestions
24+ trivial
25+
26+ -- Add more local constants (mix of theorems and definitions)
27+ theorem anotherTheorem : True := trivial
28+
29+ def myFunction (x : Nat) : Nat := x + 1
30+
31+ -- Second test: should show only the two theorems (not myFunction)
32+ /--
33+ info: Library suggestions: [anotherTheorem, myLocalTheorem]
34+ -/
35+ #guard_msgs in
36+ example : False → True := by
37+ suggestions
38+ intro h
39+ trivial
You can’t perform that action at this time.
0 commit comments