UInt8 #
theorem
UInt8.toNat_sub
(x y : UInt8)
:
(x - y).toNat = (UInt8.size - y.toNat + x.toNat) % UInt8.size
UInt16 #
theorem
UInt16.toNat_sub
(x y : UInt16)
:
(x - y).toNat = (UInt16.size - y.toNat + x.toNat) % UInt16.size
UInt32 #
theorem
UInt32.toNat_sub
(x y : UInt32)
:
(x - y).toNat = (UInt32.size - y.toNat + x.toNat) % UInt32.size
UInt64 #
theorem
UInt64.toNat_sub
(x y : UInt64)
:
(x - y).toNat = (UInt64.size - y.toNat + x.toNat) % UInt64.size
USize #
theorem
USize.toNat_sub
(x y : USize)
:
(x - y).toNat = (USize.size - y.toNat + x.toNat) % USize.size