This PR improves the heuristic used to select patterns for local `forall` expressions occurring in the goal being solved by `grind`. It now considers all singleton patterns in addition to the selected multi-patterns. Example: ```lean example (p : Nat → Prop) (h₁ : x < n) (h₂ : ¬ p x) : ∃ i, i < n ∧ ¬ p i := by grind ```
16 lines
469 B
Text
16 lines
469 B
Text
example (p : Nat → Prop) (h₁ : x < n) (h₂ : ¬ p x) : ∃ i, i < n ∧ ¬ p i := by
|
|
grind
|
|
|
|
example (p : Nat → Prop) (h : ¬ p x) : ∃ i, ¬ p i := by
|
|
grind
|
|
|
|
example (p : Nat → Prop) (h₁ : x < n) (h₂ : ¬ p x) : ¬ (∀i < n, p i) := by
|
|
grind
|
|
|
|
@[grind] def A (p q : Prop) := p ∧ q
|
|
|
|
example (p q : Nat → Prop) (h : ∀ x, A (p x) (q x)) : q a := by
|
|
grind
|
|
|
|
example (p q r : Nat → Prop) (h : ∀ x, A (p x) (A (r x) (q x))) : r a := by
|
|
grind
|