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 #
Turing.MultiTapeTM.ofBits_eq_lsbValue:ofBitsisCslib.BitString.lsbValue.Turing.MultiTapeTM.ofBits_ofFn: reading a finite bit string gives its index underCslib.BitString.equivFin.Turing.MultiTapeTM.ofBits_replicate_false: an all-falseword reads as zero.Turing.MultiTapeTM.ofBits_lt_two_pow,Turing.MultiTapeTM.ofBits_injective_of_length_eq: a word of lengthmreads below2 ^ m, and words of one length are determined by their values.Turing.MultiTapeTM.ofBits_append: reading a concatenation shifts the second word past the first.Turing.MultiTapeTM.ofBits_lowBits: theWlow-order digits (Cslib.BitString.lowBits) ofx < 2 ^ Wread asx.Turing.MultiTapeTM.ofBits_ofFn_ofList: padding a word withfalseto a fixed width (Cslib.BitString.ofList) does not change its value.
ofBits and Cslib.BitString.lsbValue read words the same way.
Reading a finite bit string gives its index under Cslib.BitString.equivFin.
An all-false word reads as zero.
The W low-order digits of x < 2 ^ W read as x.