lean4-htt/src/Init/Data/Nat
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
..
Bitwise feat: add BitVec.[toInt_append|toFin_append] (#7835) 2025-04-07 05:50:12 +00:00
Div feat: supporting Nat and BitVec material for finite types (#7598) 2025-03-24 15:04:53 +00:00
Basic.lean feat: Nat.gcd lemmas (#7756) 2025-04-01 17:05:42 +00:00
Bitwise.lean chore: update copyrights (#5449) 2024-09-24 05:27:53 +00:00
Compare.lean feat: Ord-related instances for various types (#7687) 2025-03-28 13:31:09 +00:00
Control.lean doc: review of Nat docstrings (#7552) 2025-03-20 09:13:36 +00:00
Div.lean feat: lemmas about Std.Range (#6396) 2024-12-16 03:16:46 +00:00
Dvd.lean feat: Nat.gcd lemmas (#7756) 2025-04-01 17:05:42 +00:00
Fold.lean doc: review of Nat docstrings (#7552) 2025-03-20 09:13:36 +00:00
Gcd.lean feat: Int.gcd/Int.lcm lemmas (#7802) 2025-04-04 12:44:59 +00:00
Lcm.lean feat: Int.gcd/Int.lcm lemmas (#7802) 2025-04-04 12:44:59 +00:00
Lemmas.lean feat: Nat.lcm lemmas (#7791) 2025-04-03 08:31:05 +00:00
Linear.lean fix: simp +arith (#7515) 2025-03-17 03:11:48 +00:00
Log2.lean doc: review of Nat docstrings (#7552) 2025-03-20 09:13:36 +00:00
MinMax.lean feat: revision of Nat/Int lemmas (#7435) 2025-03-12 05:52:09 +00:00
Mod.lean chore: remove unnecessary simp priorities (#6812) 2025-01-28 23:50:33 +00:00
Power2.lean chore: fix naming of several theorems (#7499) 2025-04-04 10:52:52 +00:00
Simproc.lean fix: replace unary Nat.succ simp rules with simprocs (#3808) 2024-04-04 23:15:26 +00:00
SOM.lean chore: remove staging workarounds 2022-04-26 08:23:43 -07:00