@[inline, reducible]
Equations
Instances For
@[extern lean_uint8_shift_left]
Equations
- UInt8.shiftLeft a b = { val := a.val <<< (UInt8.modn b 8).val }
Instances For
@[extern lean_uint8_shift_right]
Equations
- UInt8.shiftRight a b = { val := a.val >>> (UInt8.modn b 8).val }
Instances For
Equations
- UInt8.instOfNat = { ofNat := UInt8.ofNat n }
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
- UInt8.decLt a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_uint8_dec_le]
Equations
- UInt8.decLe a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n ≤ m))
Instances For
Equations
Equations
@[inline, reducible]
Equations
Instances For
@[extern lean_uint16_shift_left]
Equations
- UInt16.shiftLeft a b = { val := a.val <<< (UInt16.modn b 16).val }
Instances For
@[extern lean_uint16_to_uint8]
Equations
Instances For
@[extern lean_uint8_to_uint16]
Equations
Instances For
@[extern lean_uint16_shift_right]
Equations
- UInt16.shiftRight a b = { val := a.val >>> (UInt16.modn b 16).val }
Instances For
Equations
- UInt16.instOfNat = { ofNat := UInt16.ofNat n }
Equations
- instHModUInt16Nat = { hMod := UInt16.modn }
Equations
- instComplementUInt16 = { complement := UInt16.complement }
Equations
- instShiftLeftUInt16 = { shiftLeft := UInt16.shiftLeft }
Equations
- instShiftRightUInt16 = { shiftRight := UInt16.shiftRight }
@[extern lean_uint16_dec_lt]
Equations
- UInt16.decLt a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_uint16_dec_le]
Equations
- UInt16.decLe a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n ≤ m))
Instances For
Equations
Equations
@[extern lean_uint32_of_nat]
Equations
- UInt32.ofNat' n h = { val := { val := n, isLt := h } }
Instances For
Converts the given natural number to UInt32
, but returns 2^32 - 1
for natural numbers >= 2^32
.
Equations
- UInt32.ofNatTruncate n = if h : n < UInt32.size then UInt32.ofNat' n h else UInt32.ofNat' (UInt32.size - 1) UInt32.ofNatTruncate.proof_1
Instances For
@[inline, reducible]
Equations
Instances For
@[extern lean_uint32_shift_left]
Equations
- UInt32.shiftLeft a b = { val := a.val <<< (UInt32.modn b 32).val }
Instances For
@[extern lean_uint32_shift_right]
Equations
- UInt32.shiftRight a b = { val := a.val >>> (UInt32.modn b 32).val }
Instances For
@[extern lean_uint32_to_uint8]
Equations
Instances For
@[extern lean_uint32_to_uint16]
Equations
Instances For
@[extern lean_uint8_to_uint32]
Equations
Instances For
@[extern lean_uint16_to_uint32]
Equations
Instances For
Equations
- UInt32.instOfNat = { ofNat := UInt32.ofNat n }
Equations
- instHModUInt32Nat = { hMod := UInt32.modn }
Equations
- instComplementUInt32 = { complement := UInt32.complement }
Equations
- instShiftLeftUInt32 = { shiftLeft := UInt32.shiftLeft }
Equations
- instShiftRightUInt32 = { shiftRight := UInt32.shiftRight }
@[inline, reducible]
Equations
Instances For
@[extern lean_uint64_shift_left]
Equations
- UInt64.shiftLeft a b = { val := a.val <<< (UInt64.modn b 64).val }
Instances For
@[extern lean_uint64_shift_right]
Equations
- UInt64.shiftRight a b = { val := a.val >>> (UInt64.modn b 64).val }
Instances For
@[extern lean_uint64_to_uint8]
Equations
Instances For
@[extern lean_uint64_to_uint16]
Equations
Instances For
@[extern lean_uint64_to_uint32]
Equations
Instances For
@[extern lean_uint8_to_uint64]
Equations
Instances For
@[extern lean_uint16_to_uint64]
Equations
Instances For
@[extern lean_uint32_to_uint64]
Equations
Instances For
Equations
- UInt64.instOfNat = { ofNat := UInt64.ofNat n }
Equations
- instHModUInt64Nat = { hMod := UInt64.modn }
Equations
- instComplementUInt64 = { complement := UInt64.complement }
Equations
- instShiftLeftUInt64 = { shiftLeft := UInt64.shiftLeft }
Equations
- instShiftRightUInt64 = { shiftRight := UInt64.shiftRight }
@[extern lean_uint64_dec_lt]
Equations
- UInt64.decLt a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_uint64_dec_le]
Equations
- UInt64.decLe a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n ≤ m))
Instances For
Equations
Equations
@[extern lean_usize_of_nat]
Equations
- USize.ofNat n = { val := Fin.ofNat' n usize_size_gt_zero }
Instances For
@[inline, reducible]
Equations
Instances For
@[extern lean_usize_shift_left]
Equations
- USize.shiftLeft a b = { val := a.val <<< (USize.modn b System.Platform.numBits).val }
Instances For
@[extern lean_usize_shift_right]
Equations
- USize.shiftRight a b = { val := a.val >>> (USize.modn b System.Platform.numBits).val }
Instances For
@[extern lean_uint32_to_usize]
Equations
Instances For
@[extern lean_usize_to_uint32]
Equations
Instances For
Equations
- USize.instOfNat = { ofNat := USize.ofNat n }
Equations
- instHModUSizeNat = { hMod := USize.modn }
Equations
- instComplementUSize = { complement := USize.complement }
Equations
- instShiftLeftUSize = { shiftLeft := USize.shiftLeft }
Equations
- instShiftRightUSize = { shiftRight := USize.shiftRight }
@[extern lean_usize_dec_lt]
Equations
- USize.decLt a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_usize_dec_le]
Equations
- USize.decLe a b = match a, b with | { val := n }, { val := m } => inferInstanceAs (Decidable (n ≤ m))