Total decoders with plain degree certificates #
A decoder is total on every word, inverts its encoding, and carries independent cost and encoded output degrees. The basic constructors preserve totality and the round-trip law.
Main definitions #
Turing.MultiTapeTM.Decoder: total decoding with independent cost and output degrees.Turing.MultiTapeTM.Decoder.computableInPolyTime: the ordinary polynomial-time certificate.Turing.MultiTapeTM.Decoder.bits,.unary,.bool,.option,.pair,.map: basic decoders.
A total decoder with polynomial cost and encoded-output growth on every input word.
The decoded value of any word.
Decoding inverts the encoding.
- computable : ∃ (d : ℕ) (e : ℕ), ComputableInDegree self.decode encBits enc d e
Decoding has independent cost and encoded-output degrees, including zero.
Instances For
Bit strings are their own encoding.
Instances For
Unary numbers are decoded by the length of the word.
Instances For
Booleans are decoded from the first symbol.