You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds support for `grind +premises`, calling the currently
configured premise selection algorithm and including the results as
parameters to `grind`. (Recall that there is not currently a default
premise selector provided by Lean4: you need a downstream premise
selector to make use of this.)
error: No premise selector registered. (Note that Lean does not provide a default premise selector, these must be provided by a downstream library, and configured using `set_premise_selector`.)
5
+
-/
6
+
#guard_msgs in
7
+
example : True := by
8
+
grind +premises
9
+
10
+
set_premise_selector (fun _ _ => pure #[])
11
+
12
+
#guard_msgs in
13
+
example : True := by
14
+
grind +premises
15
+
16
+
defP (_ : Nat) := True
17
+
theoremp : P 7 := trivial
18
+
19
+
/--
20
+
error: `grind` failed
21
+
case grind
22
+
h : ¬P 37
23
+
⊢ False
24
+
[grind] Goal diagnostics
25
+
[facts] Asserted facts
26
+
[prop] ¬P 37
27
+
[eqc] False propositions
28
+
[prop] P 37
29
+
-/
30
+
#guard_msgs in
31
+
example : P 37 := by
32
+
grind
33
+
34
+
example : P 7 := by
35
+
grind [p]
36
+
37
+
set_premise_selector (fun _ _ => pure #[{ name := `p, score := 1.0 }])
Copy file name to clipboardExpand all lines: tests/lean/run/premise_selection.lean
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ error: Failed to elaborate Nat as a `MVarId → Config → MetaM (Array Suggesti
15
15
set_premise_selector Nat
16
16
17
17
/--
18
-
error: No premise selector registered. (Note the Lean does not provide a default premise selector, these must be installed by a downstream library.)
18
+
error: No premise selector registered. (Note that Lean does not provide a default premise selector, these must be provided by a downstream library, and configured using `set_premise_selector`.)
0 commit comments