Converts a Fin UInt8.size
into the corresponding UInt8
.
Equations
- UInt8.ofFin a = { toBitVec := { toFin := a } }
Instances For
Pack a Nat
less than 2^8
into a UInt8
.
This function is overridden with a native implementation.
Equations
- UInt8.ofNatCore n h = UInt8.ofNatLT n h
Instances For
Instances For
Equations
- instHModUInt8Nat = { hMod := UInt8.modn }
Equations
- instComplementUInt8 = { complement := UInt8.complement }
Equations
- instShiftLeftUInt8 = { shiftLeft := UInt8.shiftLeft }
Equations
- instShiftRightUInt8 = { shiftRight := UInt8.shiftRight }
Equations
- instDecidableLtUInt8 a b = a.decLt b
Equations
- instDecidableLeUInt8 a b = a.decLe b
Converts a Fin UInt16.size
into the corresponding UInt16
.
Equations
- UInt16.ofFin a = { toBitVec := { toFin := a } }
Instances For
Pack a Nat
less than 2^16
into a UInt16
.
This function is overridden with a native implementation.
Equations
- UInt16.ofNatCore n h = UInt16.ofNatLT n h
Instances For
Instances For
Equations
- instHModUInt16Nat = { hMod := UInt16.modn }
Equations
- instComplementUInt16 = { complement := UInt16.complement }
Equations
- instShiftLeftUInt16 = { shiftLeft := UInt16.shiftLeft }
Equations
- instShiftRightUInt16 = { shiftRight := UInt16.shiftRight }
Equations
- instDecidableLtUInt16 a b = a.decLt b
Equations
- instDecidableLeUInt16 a b = a.decLe b
Converts a Fin UInt32.size
into the corresponding UInt32
.
Equations
- UInt32.ofFin a = { toBitVec := { toFin := a } }
Instances For
Pack a Nat
less than 2^32
into a UInt32
.
This function is overridden with a native implementation.
Equations
- UInt32.ofNatCore n h = UInt32.ofNatLT n h
Instances For
Instances For
Equations
- instHModUInt32Nat = { hMod := UInt32.modn }
Equations
- instComplementUInt32 = { complement := UInt32.complement }
Equations
- instShiftLeftUInt32 = { shiftLeft := UInt32.shiftLeft }
Equations
- instShiftRightUInt32 = { shiftRight := UInt32.shiftRight }
Converts a Fin UInt64.size
into the corresponding UInt64
.
Equations
- UInt64.ofFin a = { toBitVec := { toFin := a } }
Instances For
Pack a Nat
less than 2^64
into a UInt64
.
This function is overridden with a native implementation.
Equations
- UInt64.ofNatCore n h = UInt64.ofNatLT n h
Instances For
Instances For
Equations
- instHModUInt64Nat = { hMod := UInt64.modn }
Equations
- instComplementUInt64 = { complement := UInt64.complement }
Equations
- instShiftLeftUInt64 = { shiftLeft := UInt64.shiftLeft }
Equations
- instShiftRightUInt64 = { shiftRight := UInt64.shiftRight }
Equations
- instDecidableLtUInt64 a b = a.decLt b
Equations
- instDecidableLeUInt64 a b = a.decLe b
Converts a Fin USize.size
into the corresponding USize
.
Equations
- USize.ofFin a = { toBitVec := { toFin := a } }
Instances For
Create a USize
from a BitVec System.Platform.numBits
. This function is overridden with a
native implementation.
Instances For
Pack a Nat
less than USize.size
into a USize
.
This function is overridden with a native implementation.
Equations
- USize.ofNatCore n h = USize.ofNatLT n h
Instances For
Equations
- a.shiftLeft b = { toBitVec := a.toBitVec <<< (b.mod (USize.ofNat System.Platform.numBits)).toBitVec }
Instances For
Equations
- a.shiftRight b = { toBitVec := a.toBitVec >>> (b.mod (USize.ofNat System.Platform.numBits)).toBitVec }
Instances For
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.
Equations
- USize.ofNat32 n h = USize.ofNatLT n ⋯
Instances For
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.
Equations
- a.toUInt64 = UInt64.ofNatLT a.toBitVec.toNat ⋯
Instances For
Equations
- instHModUSizeNat = { hMod := USize.modn }
Equations
- instComplementUSize = { complement := USize.complement }
Equations
- instShiftLeftUSize = { shiftLeft := USize.shiftLeft }
Equations
- instShiftRightUSize = { shiftRight := USize.shiftRight }