@[reducible, inline]
Equations
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
- { val := n }.decLt { val := m } = inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_uint8_dec_le]
Equations
- { val := n }.decLe { val := m } = inferInstanceAs (Decidable (n ≤ m))
Instances For
Equations
- instDecidableLtUInt8 a b = a.decLt b
Equations
- instDecidableLeUInt8 a b = a.decLe b
@[reducible, inline]
Equations
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
- { val := n }.decLt { val := m } = inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_uint16_dec_le]
Equations
- { val := n }.decLe { val := m } = inferInstanceAs (Decidable (n ≤ m))
Instances For
Equations
- instDecidableLtUInt16 a b = a.decLt b
Equations
- instDecidableLeUInt16 a b = a.decLe b
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
@[reducible, inline]
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 }
@[reducible, inline]
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
- { val := n }.decLt { val := m } = inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_uint64_dec_le]
Equations
- { val := n }.decLe { val := m } = inferInstanceAs (Decidable (n ≤ m))
Instances For
Equations
- instDecidableLtUInt64 a b = a.decLt b
Equations
- instDecidableLeUInt64 a b = a.decLe b
@[extern lean_usize_of_nat]
Equations
- USize.ofNat n = { val := Fin.ofNat' n usize_size_gt_zero }
Instances For
@[reducible, inline]
Equations
Instances For
@[extern lean_usize_shift_left]
Equations
- a.shiftLeft b = { val := a.val <<< (b.modn System.Platform.numBits).val }
Instances For
@[extern lean_usize_shift_right]
Equations
- a.shiftRight b = { val := a.val >>> (b.modn System.Platform.numBits).val }
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
- { val := n }.decLt { val := m } = inferInstanceAs (Decidable (n < m))
Instances For
@[extern lean_usize_dec_le]
Equations
- { val := n }.decLe { val := m } = inferInstanceAs (Decidable (n ≤ m))
Instances For
Equations
- instDecidableLtUSize a b = a.decLt b
Equations
- instDecidableLeUSize a b = a.decLe b