)]}'
{
  "commit": "4b812422fc31d7b00f0ab5be293378daa5e000e0",
  "tree": "7bad5dce2672343e2a37ce5259620ab580bdb333",
  "parents": [
    "130a561f98be9d524cebd018cabc78b3f4e41585"
  ],
  "author": {
    "name": "Leonardo de Moura",
    "email": "leomoura@amazon.com",
    "time": "Tue Nov 17 05:21:12 2026 +0000"
  },
  "committer": {
    "name": "Leonardo de Moura",
    "email": "leomoura@amazon.com",
    "time": "Tue Nov 17 05:21:12 2026 +0000"
  },
  "message": "fix: do not evaluate bit-vector literals of width 2^32 or more\n\nThis 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 \u003d x :\u003d 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.\n\nThe 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.\n\nCo-Authored-By: Claude Fable 5.2 \u003cnoreply@anthropic.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5d9156a2a1a0723fde3b63d3a006725a7b9d99f3",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/LitValues.lean",
      "new_id": "f0d9858b8d4aea552500ebebe0091fb0a09d28f1",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/LitValues.lean"
    },
    {
      "type": "modify",
      "old_id": "321b817f2f9d750592698bd6b186353e31b8bbba",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/Sym/DSimp/EvalGround.lean",
      "new_id": "2f48136448e29ed1c9b298b498db3f1120595b7d",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/Sym/DSimp/EvalGround.lean"
    },
    {
      "type": "modify",
      "old_id": "cef258782de5a5756c678abbca6754208f4eecb1",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/Sym/LitValues.lean",
      "new_id": "dbaace3cec58820766a4628f8b3d723452a41ad7",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/Sym/LitValues.lean"
    },
    {
      "type": "modify",
      "old_id": "d7c3093fc08de854dadcd745b9d6510240fe5eb8",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/Sym/Simp/EvalGround.lean",
      "new_id": "2afb41325a64752ee939d30788612b961aafb8ae",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/Sym/Simp/EvalGround.lean"
    },
    {
      "type": "modify",
      "old_id": "97aee46e5046518174ae7c1e32103635d310f9ff",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/Tactic/BVDecide/Normalize/Simproc.lean",
      "new_id": "2f0d11ba6ac43a9e78ca758d5d7fedce67700a75",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/Tactic/BVDecide/Normalize/Simproc.lean"
    },
    {
      "type": "modify",
      "old_id": "aaca401b3489891f17aeeb982e7e05f5224470df",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/Tactic/BVDecide/Reflect/Reify.lean",
      "new_id": "937237d4ca96c6843af1b17fdef4b359025cf764",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/Tactic/BVDecide/Reflect/Reify.lean"
    },
    {
      "type": "modify",
      "old_id": "7bf5d665720bff6437b1c9d5d8a319a869b7c844",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/Tactic/Grind/BitVec.lean",
      "new_id": "44274787597de84dc4540d384048bda2f105685d",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/Tactic/Grind/BitVec.lean"
    },
    {
      "type": "modify",
      "old_id": "39085ea68e6e8e89a38186d5f398f76480d12f3e",
      "old_mode": 33188,
      "old_path": "src/Lean/Meta/Tactic/Simp/BuiltinSimprocs/BitVec.lean",
      "new_id": "e760cdc631de20071b082040a9f26e07e9251cec",
      "new_mode": 33188,
      "new_path": "src/Lean/Meta/Tactic/Simp/BuiltinSimprocs/BitVec.lean"
    },
    {
      "type": "modify",
      "old_id": "275e4dfe4a8e1de207d67ed7b0741d44a665a308",
      "old_mode": 33188,
      "old_path": "src/Lean/Util/SafeExponentiation.lean",
      "new_id": "66b310deef5642ab0fbf4b844f00bfb7a556a680",
      "new_mode": 33188,
      "new_path": "src/Lean/Util/SafeExponentiation.lean"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f137f273b7a666817bd4f1781f14141da9433c8d",
      "new_mode": 33188,
      "new_path": "tests/elab/bitvec_huge_width.lean"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3dc7e30fd996bf3e03e0e78879d8159cded49085",
      "new_mode": 33188,
      "new_path": "tests/elab/bv_decide_huge_width.lean"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "423757ecda8da62be29a8c628d87f6dac1c6b213",
      "new_mode": 33188,
      "new_path": "tests/elab/grind_bitvec_huge_width.lean"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4b2cb4f17114eb96bb08fa432b2a16daf2fe6489",
      "new_mode": 33188,
      "new_path": "tests/elab/safeExpCap.lean"
    }
  ]
}
