lean4-htt/tests/lean/run/grind_lax.lean
Kim Morrison cf22c367a1
feat: grind +premises (#10920)
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.)
2025-10-23 06:42:48 +00:00

66 lines
1.1 KiB
Text

/-- error: Unknown constant `foo` -/
#guard_msgs in
example : False := by
grind [foo]
/--
error: `grind` failed
case grind
⊢ False
[grind] Goal diagnostics
[facts] Asserted facts
-/
#guard_msgs in
example : False := by
grind +lax [foo]
/-- error: Unknown constant `foo` -/
#guard_msgs in
example : False := by
grind [-foo]
/--
error: `grind` failed
case grind
⊢ False
[grind] Goal diagnostics
[facts] Asserted facts
-/
#guard_msgs in
example : False := by
grind +lax [-foo]
theorem foo : True := .intro
/--
error: invalid E-matching equality theorem, conclusion must be an equality
True
-/
#guard_msgs in
example : False := by
grind [= foo]
/--
error: `grind` failed
case grind
⊢ False
[grind] Goal diagnostics
[facts] Asserted facts
-/
#guard_msgs in
example : False := by
grind +lax [= foo]
theorem bar : Nat = Int := sorry
/--
error: invalid E-matching equality theorem, conclusion must be an equality
True
-/
#guard_msgs in
example : Int = Nat := by
grind [= foo, = bar]
#guard_msgs in
example : Int = Nat := by
grind +lax [= foo, = bar]