fix: assertion violation in `mkEqProofImpl`

This PR fixes an assertion violation in `grind` reported at #12246
This assertion fails when in examples containing heterogenous
equalities with elements of different types (e.g., `Fin n` and `Fin m`) attached to the same
theory solver.

Closes #12246
3 files changed