Equations
- instHModUInt8Nat = { hMod := UInt8.modn }
Equations
- instComplementUInt8 = { complement := UInt8.complement }
Equations
- instShiftLeftUInt8 = { shiftLeft := UInt8.shiftLeft }
Equations
- instShiftRightUInt8 = { shiftRight := UInt8.shiftRight }
@[extern lean_uint8_dec_lt]
Equations
- a.decLt b = inferInstanceAs (Decidable (a.toBitVec < b.toBitVec))
Instances For
@[extern lean_uint16_div]
Equations
- a.div b = { toBitVec := a.toBitVec.udiv b.toBitVec }
Instances For
Equations
- instHModUInt16Nat = { hMod := UInt16.modn }
Equations
- instComplementUInt16 = { complement := UInt16.complement }
Equations
- instShiftRightUInt16 = { shiftRight := UInt16.shiftRight }
@[extern lean_uint16_dec_lt]
Equations
- a.decLt b = inferInstanceAs (Decidable (a.toBitVec < b.toBitVec))
Instances For
Equations
- instDecidableLeUInt16 a b = a.decLe b
Equations
- instShiftRightUInt32 = { shiftRight := UInt32.shiftRight }
@[extern lean_uint64_mod]
Equations
- a.mod b = { toBitVec := a.toBitVec.umod b.toBitVec }
Instances For
Equations
- instComplementUInt64 = { complement := UInt64.complement }
@[extern lean_uint64_dec_lt]
Equations
- a.decLt b = inferInstanceAs (Decidable (a.toBitVec < b.toBitVec))
Instances For
@[extern lean_uint64_dec_le]
Equations
- a.decLe b = inferInstanceAs (Decidable (a.toBitVec ≤ b.toBitVec))
Instances For
Equations
- instDecidableLeUInt64 a b = a.decLe b
@[extern lean_usize_shift_left]
Equations
- a.shiftLeft b = { toBitVec := a.toBitVec <<< (b.mod (USize.ofNat System.Platform.numBits)).toBitVec }
Instances For
@[extern lean_usize_shift_right]
Equations
- a.shiftRight b = { toBitVec := a.toBitVec >>> (b.mod (USize.ofNat System.Platform.numBits)).toBitVec }
Instances For
@[extern lean_usize_of_nat]
Upcast a Nat
less than 2^32
to a USize
.
This is lossless because USize.size
is either 2^32
or 2^64
.
This function is overridden with a native implementation.
Instances For
@[extern lean_uint64_to_usize]
Converts a UInt64
to a USize
by reducing modulo USize.size
.
Equations
- a.toUSize = a.toNat.toUSize
Instances For
@[extern lean_usize_to_uint64]
Upcast a USize
to a UInt64
.
This is lossless because USize.size
is either 2^32
or 2^64
.
This function is overridden with a native implementation.
Instances For
Equations
- instHModUSizeNat = { hMod := USize.modn }
Equations
- instComplementUSize = { complement := USize.complement }