Writing encodings in polynomial time — proof internals #
The fold behind Complexitylib.Classes.P.DataEncode. DataEncode writes a list
of bits as its entries' encodings between a leading false and a trailing
true, and a bit's encoding is 01 for false and 0011 for true. The part
between the brackets, encodeBody, is built by a fold that puts one bit's
encoding in front of the encoding of the rest, so its state is at most four times
as long as the list.
Contents #
bitstringEncode_false,bitstringEncode_true— the encodings of a bitencodeBody— the entries' encodings, run togetherbitstringEncode_eq_encodeBody— a list's encoding is its body in bracketsencodeBody_mem_FP— writing the body is polynomial-time
The encoding of false is 01.
The encodings of a list's bits, run together: the encoding of the list without its two brackets.
Equations
Instances For
A list's encoding is its body between a leading false and a trailing
true.
The body is at most four bits per entry.