Self-delimiting padding of bounded words #
The machine calculus's existing frame encoding makes bounded words equally long without
identifying distinct words. Words longer than the bound retain their complete frame. This
representation bridge is separate from the pure bit-string foundations and from its
polynomial-time certificate in
Complexity/Computability/Machines/Turing/MultiTape/Complexity/PolyTime/BitString.lean.
Main definitions #
Cslib.BitString.padWord: frame a word and pad it to a supplied width bound.
Main results #
Cslib.BitString.word_eq_of_padWord_eq: injectivity even across different bounds.Cslib.BitString.length_padWord: bounded words have length2 * bound + 1.Cslib.BitString.word_eq_of_paddedBits_eq: bounded words embed into a fixed finite cube.
References #
Adapted from Computability/Probabilistic/BitString.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the existing tidy machine frame encoding.
theorem Cslib.BitString.word_eq_of_paddedBits_eq {bound : ℕ} {left right : List Bool} (hleft : left.length ≤ bound) (hright : right.length ≤ bound) (h : ofList (2 * bound + 1) (padWord bound left) = ofList (2 * bound + 1) (padWord bound right)) :
Padding embeds bounded words into a fixed finite bit-string space.