Documentation

CslibFrontier.Computability.WordRAM.Multiword.Digits

Little-endian register digits #

The digit value and boundedness predicates do not depend on an arithmetic routine or a workspace layout. They apply to any register count, including an empty register file.

Main definitions #

Main results #

def Cslib.WordRAM.Multiword.value {r : ℕ} (β : ℕ) (x : Data r) (ds : List (Fin r)) :

The value of a little-endian register list.

theorem Cslib.WordRAM.Multiword.value_cons {r : ℕ} (β : ℕ) (x : Data r) (d : Fin r) (ds : List (Fin r)) :
value β x (d :: ds) = x.regs d + β * value β x ds

Prepending a register adjoins its digit as the low digit.

theorem Cslib.WordRAM.Multiword.value_congr {r β : ℕ} {x y : Data r} {ds : List (Fin r)} (h : ∀ i ∈ ds, x.regs i = y.regs i) :
value β x ds = value β y ds

The value of a digit list depends only on the registers it lists.

theorem Cslib.WordRAM.Multiword.value_eq_zero_of_forall {r β : ℕ} {x : Data r} {ds : List (Fin r)} (h : ∀ i ∈ ds, x.regs i = 0) :
value β x ds = 0

A digit list whose registers are all zero has value zero.

def Cslib.WordRAM.Multiword.Bounded {r : ℕ} (β : ℕ) (x : Data r) (ds : List (Fin r)) :

Every register in a digit list contains a radix digit.