@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
USize.toNat_sub
(a b : USize)
:
(a - b).toNat = (2 ^ System.Platform.numBits - b.toNat + a.toNat) % 2 ^ System.Platform.numBits
@[simp]
@[simp]
theorem
USize.mk_ofNat
(n : Nat)
:
{ toBitVec := BitVec.ofNat System.Platform.numBits n } = OfNat.ofNat n
@[simp]
@[simp]
theorem
USize.toBitVec_ofNat
(n : Nat)
:
(OfNat.ofNat n).toBitVec = BitVec.ofNat System.Platform.numBits n
@[simp]
@[simp]
@[simp]
@[simp]
theorem
UInt32.toNat_lt_of_lt
{n : UInt32}
{m : Nat}
(h : m < UInt32.size)
:
n < UInt32.ofNat m → n.toNat < m
theorem
UInt32.lt_toNat_of_lt
{n : UInt32}
{m : Nat}
(h : m < UInt32.size)
:
UInt32.ofNat m < n → m < n.toNat
theorem
UInt32.toNat_le_of_le
{n : UInt32}
{m : Nat}
(h : m < UInt32.size)
:
n ≤ UInt32.ofNat m → n.toNat ≤ m
theorem
UInt32.le_toNat_of_le
{n : UInt32}
{m : Nat}
(h : m < UInt32.size)
:
UInt32.ofNat m ≤ n → m ≤ n.toNat
@[reducible, inline, deprecated UInt8.toNat_zero]
Equations
Instances For
@[reducible, inline, deprecated UInt8.toNat_div]
Equations
Instances For
@[reducible, inline, deprecated UInt8.toNat_mod]
Equations
Instances For
@[reducible, inline, deprecated UInt16.toNat_zero]
Equations
Instances For
@[reducible, inline, deprecated UInt16.toNat_div]
Equations
Instances For
@[reducible, inline, deprecated UInt16.toNat_mod]
Equations
Instances For
@[reducible, inline, deprecated UInt32.toNat_zero]
Equations
Instances For
@[reducible, inline, deprecated UInt32.toNat_div]
Equations
Instances For
@[reducible, inline, deprecated UInt32.toNat_mod]
Equations
Instances For
@[reducible, inline, deprecated UInt64.toNat_zero]
Equations
Instances For
@[reducible, inline, deprecated UInt64.toNat_div]
Equations
Instances For
@[reducible, inline, deprecated UInt64.toNat_mod]
Equations
Instances For
@[reducible, inline, deprecated USize.toNat_zero]
Equations
Instances For
@[reducible, inline, deprecated USize.toNat_div]
Equations
Instances For
@[reducible, inline, deprecated USize.toNat_mod]