This PR implements the basic tactics for the new `grind` interactive
mode. While many additional `grind` tactics will be added later, the
foundational framework is already operational. The following `grind`
tactics are currently implemented: `skip`, `done`, `finish`, `lia`, and
`ring`.
This PR also removes the notion of `grind` fallback procedure since it
is subsumed by the new framework. Examples:
```lean
example (x y : Nat) : x ≥ y + 1 → x > 0 := by
grind => skip; lia; done
open Lean Grind
example [CommRing α] (a b c : α)
: a + b + c = 3 →
a^2 + b^2 + c^2 = 5 →
a^3 + b^3 + c^3 = 7 →
a^4 + b^4 + c^4 = 9 := by
grind => ring
```
20 lines
545 B
Text
20 lines
545 B
Text
module
|
|
set_option warn.sorry false
|
|
|
|
def f (a : Nat) := a + a + a
|
|
def g (a : Nat) := a + a
|
|
def h (n : Nat) : Prop :=
|
|
match n with
|
|
| 0 => f 0 = f 1
|
|
| n+1 => f (n+1) = f n ∧ g (2*n + 1) = g (2*n) ∧ h n
|
|
|
|
example : h 5 → False := by
|
|
simp [h]
|
|
-- TODO: use `grind => print_eqc; sorry` to display equivalence classes containing `f`-applications
|
|
sorry
|
|
|
|
set_option maxRecDepth 2048
|
|
example : h 100 → False := by
|
|
simp [h]
|
|
-- TODO: use `grind => print_eqc; sorry` to display equivalence classes containing `f`-applications
|
|
sorry
|