In the course of the development, I grabbed facts about right shifting over integers [from `mathlib4`](https://github.com/leanprover-community/mathlib4/blob/master/Mathlib/Data/Int/Bitwise.lean). The core proof strategy is to perform a case analysis of the msb: - If `msb = false`, then `sshiftRight = ushiftRight`. - If `msb = true`. then `x >>>s i = ~~~(~~~(x >>>u i))`. The double negation introduces the high `1` bits that one expects of the arithmetic shift. --------- Co-authored-by: Kim Morrison <scott@tqft.net> |
||
|---|---|---|
| .. | ||
| Lemmas.lean | ||