lean4-htt/src/Init/Data/BitVec
Tobias Grosser ab4febd1df
feat: add BitVec.[toInt_append|toFin_append] (#7835)
This PR adds `BitVec.[toInt_append|toFin_append]`.

`toInt_append` states:

```lean
(x ++ y).toInt = if n == 0 then y.toInt else (2 ^ m) * x.toInt + y.toNat
```

We also add the following `Nat` theorem (derived from a corresponding
theorem `two_pow_add_eq_or_of_lt`) as it faciliates the `append` proofs:

```lean
theorem shiftLeft_add_eq_or_of_lt {b : Nat} (b_lt : b < 2^i) (a : Nat) :
  a <<< i + b = a <<< i ||| b
```
2025-04-07 05:50:12 +00:00
..
Basic.lean feat: add BitVec.umulOverflow and BitVec.smulOverflow definitions and additional theorems (#7659) 2025-04-03 08:42:52 +00:00
BasicAux.lean doc: docstring review for bitvectors (#7713) 2025-03-31 08:04:33 +00:00
Bitblast.lean chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
Folds.lean doc: docstring review for bitvectors (#7713) 2025-03-31 08:04:33 +00:00
Lemmas.lean feat: add BitVec.[toInt_append|toFin_append] (#7835) 2025-04-07 05:50:12 +00:00