feat: more UInt lemmas (#6205) This PR upstreams some UInt theorems from Batteries and adds more `toNat`-related theorems. It also adds the missing `UInt8` and `UInt16` to/from `USize` conversions so that the the interface is uniform across the UInt types. **Summary of all changes:** * Upstreamed and added `toNat` constructors lemmas: `toNat_mk`, `ofNat_toNat`, `toNat_ofNat`, `toNat_ofNatCore`, and `USize.toNat_ofNat32` * Upstreamed and added `toNat` canonicalization; `val_val_eq_toNat` and `toNat_toBitVec_eq_toNat` * Added injectivity iffs: `toBitVec_inj`, `toNat_inj`, and `val_inj` * Added inequality iffs: `le_iff_toNat_le` and `lt_iff_toNat_lt` * Upstreamed antisymmetry lemmas: `le_antisymm` and `le_antisymm_iff` * Upstreamed missing `toNat` lemmas on arithmetic operations: `toNat_add`, `toNat_sub`, `toNat_mul` * Upstreamed and added missing conversion lemmas: `toNat_toUInt*` and `toNat_USize` * Added missing `USize` conversions: `USize.toUInt8`, `UInt8.toUSize`, `USize.toUInt16`, `UInt16.toUSize`
This is the repository for Lean 4.
See Setting Up Lean.
Please read our Contribution Guidelines first.
See Building Lean (documentation source: doc/make/index.md).