perf: split a refuting discriminant first in the match compiler (#16618)

This PR speeds up `nofun`, `nomatch` and `match` with missing cases when
a later discriminant refutes the goal by itself. Before, `∀ v :
FloatValue, (none : Option FloatValue) ≠ some v := nofun` split `v` and
all its fields before reaching `h : none = some v`. It now splits `h`
first, and the example goes from 829ms to 1.5ms.

When no alternatives are left, the match compiler looks for a
discriminant whose type reduces (`whnfD`) to an empty inductive type, or
to an equation between different constructors. It moves that
discriminant to the front, and the constructor split then closes the
problem. Only discriminants are inspected, not the local context. The
new test `tests/elab/matchRefutingVar.lean` covers both cases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2 files changed