lean4-htt/tests/lean/run/grind_all_singleton_patterns.lean
Leonardo de Moura f8c743e37d
feat: consider all singleton patterns in local forall expressions in grind (#9896)
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
```
2025-08-13 18:45:29 +00:00

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