lean4-htt/tests/lean/run/grind_match_cond_split.lean
Leonardo de Moura 07662aafe3
fix: better case-split for match-conditions in grind (#8958)
This PR improves the case splitting strategy used in `grind`, and
ensures `grind` also considers simple `match`-conditions for
case-splitting. Example:

```lean
example (x y : Nat)
    : 0 < match x, y with
          | 0, 0   => 1
          | _, _ => x + y := by -- x or y must be greater than 0
  grind
```
2025-06-24 02:56:50 +00:00

11 lines
244 B
Text

example (x n : Nat)
: 0 < match x with
| 0 => 1
| _ => x + n := by
grind
example (x y : Nat)
: 0 < match x, y with
| 0, 0 => 1
| _, _ => x + y := by -- x or y must be greater than 0
grind