Reading back encoded natural numbers #
ofBits inverts the binary-digit encoding encNat. Clients that decode encoded numbers (keys,
exponents, commitments) use these round trips instead of unfolding ofBits to reach
Nat.foldr_bit_bits. The module is kept separate from Encodings/Nat/Words, which has a large
import fan-out.
Main results #
Turing.MultiTapeTM.ofBits_bits: reading back the binary digits ofngivesn.Turing.MultiTapeTM.ofBits_encNat: the same round trip throughencNat.Turing.MultiTapeTM.bits_ofBits_append_true: appending a trailingtruesentinel makesbits ∘ ofBitsa round trip.