KB's Elias bound #
The Elias-γ encoding overhead of KB.
What this establishes #
eliasDecoder: aCodeparsing an input'sgammaCode/bitsFixedstructure (AIT/CodingTheoremDecoder.lean'sparseBits) and outputting the encoded value directly.prefixFree_eliasDecoder_dom: its halting domain, read as bit-strings, is prefix-free.KB_le_size_add_two_mul_size_size—KB's Elias bound, unabsorbed:∃ c, ∀ n, KB n ≤ Nat.size n + 2 * Nat.size (Nat.size n) + c— the same self-delimiting description, one step before its two bit-length terms are absorbed together.KB_le_two_mul_size—KB's Elias bound, now a corollary of the unabsorbed bound attwo_mul_size_size_le:∃ c, ∀ n, KB n ≤ 2 * Nat.size n + c— every natural has a self-delimiting description on the prefix machine at twice its own bit-length plus a constant, the Elias-γ overhead over a fixed-width binary block.
What this does NOT establish (flagged) #
- The
O(1)coding theorem (AIT/CodingTheoremDecoder.lean's own boundary) is unrelated to and unaffected by this bound.
The Elias decoder, as a code #
The Elias decoder's underlying partial function is partial recursive.
The Elias decoder, as a code. Parses an input's bit-string as gammaCode k ++ bitsFixed k i
(AIT/CodingTheoremDecoder.lean's parseBits) and outputs i directly.
Instances For
eliasDecoder's own halting domain, read as bit-strings, is prefix-free. Its domain is
contained in the parser's own domain (eliasDecoder_eval, Option.map preserving isSome), and
that domain is prefix-free (AIT.CodingTheoremDecoder.prefixFree_parseBits_dom).
KB's Elias bound #
KB's Elias bound, unabsorbed. Every natural n has a self-delimiting description on the
prefix machine — gammaCode (Nat.size n) ++ bitsFixed (Nat.size n) n, decoded by eliasDecoder —
at its own bit-length plus twice the bit-length of that, plus a constant: the same description
KB_le_two_mul_size uses, one step before two_mul_size_size_le absorbs the two bit-length terms
together.
KB's Elias bound, a corollary of the unabsorbed bound KB_le_size_add_two_mul_size_size
at the elementary two_mul_size_size_le: every natural n has a self-delimiting description on
the prefix machine at twice its own bit-length plus a constant, the Elias-γ overhead over a
fixed-width binary block.