fix: do not evaluate bit-vector literals of width 2^32 or more

This PR fixes process aborts with `INTERNAL PANIC: Nat.pow exponent is too big` in `simp`, `grind`, `cbv`, `bv_decide` and `bv_normalize`. They happened on goals containing a `BitVec` literal of width `2^32` or more, such as `example (x : BitVec 5000000000) : 1#5000000000 = x := by simp`, and on powers with an exponent of `2^32` or more when `exponentiation.threshold` was raised above `2^32`. These terms are now left unevaluated. The examples from #15786 now pass.

The runtime implementation of `Nat.pow` aborts the process when the base is greater than `1` and the exponent does not fit in 32 bits, and most bit-vector operations compute `2^w`. The new function `isSafeBitVecWidth` is checked by the bit-vector literal decoders (`getBitVecValue?`, `Sym.getBitVecValue?`, `getLitValueModulus?`), by the evaluators of operations that build a new width (`setWidth`, `append`, `replicate`, `extractLsb`, `ofNat`, `allOnes`, and similar) in `simp`, `grind`, `Sym` and the `bv_decide` normalizer, and by `bv_decide` when it selects bit-vector atoms. `checkExponent` now rejects exponents that do not fit in 32 bits regardless of the threshold, as `checkShiftLeft` does.

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