Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Encodings.Nat.OfBits

Reading words as numbers through lsbValue #

Turing.MultiTapeTM.ofBits and Cslib.BitString.lsbValue both read a word as a number, least significant bit first. This module identifies them and transfers the facts that Cslib.BitString already proves about lsbValue to ofBits.

The module is kept apart from Encodings.Nat.Words, which many modules import, so that only its clients depend on it.

Main results #

Reading a finite bit string gives its index under Cslib.BitString.equivFin.

An all-false word reads as zero.

A word of length m reads as a number below 2 ^ m.

Words of the same length that read as the same number are equal.

Reading a concatenation shifts the second word past the first.

The W low-order digits of x < 2 ^ W read as x.

Padding a word to n bits with false does not change the number it reads as.