perf: check `match` equations on many `String` literals faster in the kernel

This PR makes the generation of equations faster for a `match` with many `String` literals. The `big_match_string` benchmark with 128 alternatives is about 37% faster (#16313).

The equation of alternative `i` has to show that the `i-1` earlier literals are different from it, and its proof walked the chain of tests of the matcher again. For a matcher with at least 32 `String` literals, two auxiliary theorems are now generated once. The first one states a numeric code for each literal, so a disequality between two literals is a comparison of two numerals. The second one states what the `match` is equal to in each case, so each equation is a projection of it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
6 files changed