The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Data.UInt

51 declarations. Mathlib docs · Source

theorem USize.toBitVec_intCast E0 #

∀ (z : ℤ), (↑z).toBitVec = ↑z

theorem UInt8.toBitVec_zsmul E0 #

∀ (z : ℤ) (a : UInt8), (z • a).toBitVec = z • a.toBitVec

theorem UInt64.toBitVec_zsmul E0 #

∀ (z : ℤ) (a : UInt64), (z • a).toBitVec = z • a.toBitVec

theorem UInt32.toBitVec_natCast E0 #

∀ (n : ℕ), (↑n).toBitVec = ↑n

theorem UInt16.toBitVec_nsmul E1 #

∀ (n : ℕ) (a : UInt16), (n • a).toBitVec = n • a.toBitVec

theorem USize.toBitVec_zsmul E0 #

∀ (z : ℤ) (a : USize), (z • a).toBitVec = z • a.toBitVec

theorem UInt64.toBitVec_nsmul E1 #

∀ (n : ℕ) (a : UInt64), (n • a).toBitVec = n • a.toBitVec

theorem UInt8.toBitVec_natCast E0 #

∀ (n : ℕ), (↑n).toBitVec = ↑n

theorem UInt32.toBitVec_nsmul E1 #

∀ (n : ℕ) (a : UInt32), (n • a).toBitVec = n • a.toBitVec

theorem UInt8.toBitVec_nsmul E1 #

∀ (n : ℕ) (a : UInt8), (n • a).toBitVec = n • a.toBitVec

theorem UInt32.toBitVec_intCast E0 #

∀ (z : ℤ), (↑z).toBitVec = ↑z

theorem USize.toBitVec_natCast E0 #

∀ (n : ℕ), (↑n).toBitVec = ↑n

theorem UInt16.toBitVec_intCast E0 #

∀ (z : ℤ), (↑z).toBitVec = ↑z

theorem UInt64.toBitVec_natCast E0 #

∀ (n : ℕ), (↑n).toBitVec = ↑n

theorem UInt16.toBitVec_zsmul E0 #

∀ (z : ℤ) (a : UInt16), (z • a).toBitVec = z • a.toBitVec

theorem UInt32.toBitVec_zsmul E0 #

∀ (z : ℤ) (a : UInt32), (z • a).toBitVec = z • a.toBitVec

theorem USize.toBitVec_nsmul E1 #

∀ (n : ℕ) (a : USize), (n • a).toBitVec = n • a.toBitVec

theorem UInt16.toBitVec_natCast E0 #

∀ (n : ℕ), (↑n).toBitVec = ↑n

theorem UInt8.toBitVec_intCast E0 #

∀ (z : ℤ), (↑z).toBitVec = ↑z

theorem UInt64.toBitVec_intCast E0 #

∀ (z : ℤ), (↑z).toBitVec = ↑z

def UInt16.instCommRing E1 #

CommRing UInt16

To use this instance, use open scoped UInt16.CommRing.

See the module docstring for an explanation

def UInt64.instCommRing E1 #

CommRing UInt64

To use this instance, use open scoped UInt64.CommRing.

See the module docstring for an explanation

instance UInt64.instNonUnitalCommRing E0 #

NonUnitalCommRing UInt64

theorem UInt8.toBitVec_injective E1 #

Function.Injective UInt8.toBitVec

theorem USize.toBitVec_injective E1 #

Function.Injective USize.toBitVec

instance USize.instNonUnitalCommRing E0 #

NonUnitalCommRing USize

instance UInt32.instCommMonoid E0 #

CommMonoid UInt32

instance USize.instCommMonoid E0 #

CommMonoid USize

theorem UInt8.toFin_injective E1 #

Function.Injective UInt8.toFin

def UInt8.instCommRing E1 #

CommRing UInt8

To use this instance, use open scoped UInt8.CommRing.

See the module docstring for an explanation

theorem UInt64.toBitVec_injective E1 #

Function.Injective UInt64.toBitVec

theorem USize.toFin_injective E1 #

Function.Injective USize.toFin

instance UInt16.instCommMonoid E0 #

CommMonoid UInt16

theorem UInt32.toFin_injective E1 #

Function.Injective UInt32.toFin

instance UInt16.instNonUnitalCommRing E0 #

NonUnitalCommRing UInt16

instance UInt8.instNonUnitalCommRing E0 #

NonUnitalCommRing UInt8

instance UInt64.instCommMonoid E0 #

CommMonoid UInt64

theorem UInt32.toBitVec_injective E1 #

Function.Injective UInt32.toBitVec

instance UInt8.instCommMonoid E0 #

CommMonoid UInt8

def UInt32.instCommRing E1 #

CommRing UInt32

To use this instance, use open scoped UInt32.CommRing.

See the module docstring for an explanation

theorem UInt16.toBitVec_injective E1 #

Function.Injective UInt16.toBitVec

theorem UInt64.toFin_injective E1 #

Function.Injective UInt64.toFin

instance UInt32.instNonUnitalCommRing E0 #

NonUnitalCommRing UInt32

def USize.instCommRing E1 #

CommRing USize

To use this instance, use open scoped USize.CommRing.

See the module docstring for an explanation

theorem UInt16.toFin_injective E1 #

Function.Injective UInt16.toFin

def UInt8.isASCIIUpper E1 #

UInt8 → Bool

Is this an uppercase ASCII letter?

def UInt8.isASCIILower E1 #

UInt8 → Bool

Is this a lowercase ASCII letter?

def UInt8.isASCIIAlpha E1 #

UInt8 → Bool

Is this an alphabetic ASCII character?

def UInt8.isASCIIDigit E1 #

UInt8 → Bool

Is this an ASCII digit character?

def UInt8.isASCIIAlphanum E1 #

UInt8 → Bool

Is this an alphanumeric ASCII character?

def UInt8.toChar E1 #

UInt8 → Char

The numbers from 0 to 256 are all valid UTF-8 characters, so we can embed one in the other.