The coding theorem with a logarithmic loss #
Over the universal prefix machine PrefixMachine.KB, a
LowerSemicomputable semimeasure, and the combinatorial ingredients of AIT/CodingTheoremWeak.lean
(gammaCode, bitsFixed, card_exceeds_lt).
What this establishes #
coding_theorem_weak: for a lower-semicomputable semimeasureμ,∃ C, ∀ x k, (1/2)^k < μ x → KB x ≤ k + 2 * Nat.size k + C— the coding theorem with a logarithmic loss.coding_theorem_weak_QB: the instance atPrefixMachine.QB.- The decoder behind it:
firesAt/firingCountBefore, the level-krequest/firing search over aLowerSemicomputablewitnessa;parseBits, recovering(k, i)from agammaCode/bitsFixedbit-string;decodeFn, the two composed into one partial recursive function, andprefixFree_decodeFn_dom, its domain's prefix-freeness.
What this does NOT establish (flagged) #
- The
O(1)coding theorem and the online Kraft–Chaitin invariant it needs are not attempted here.
The level-k request/firing combinatorics #
theorem
PrefixMachine.card_firesAt_lt
(a : ℕ → ℕ → ℕ)
{μ : ℕ → ℝ}
(ha_mono : ∀ (t x : ℕ), ↑(a t x) / 2 ^ t ≤ ↑(a (t + 1) x) / 2 ^ (t + 1))
(ha_le : ∀ (t x : ℕ), ↑(a t x) / 2 ^ t ≤ μ x)
(hnn : ∀ (x : ℕ), 0 ≤ μ x)
(hsum : ∀ (F : Finset ℕ), ∑ x ∈ F, μ x ≤ 1)
(k N : ℕ)
:
Markov's bound for the firing steps: at level k, fewer than 2 ^ k firing steps occur by
any stage N.
Computability of the request/firing machinery #
The parser: recovering (k, i) from an input's gammaCode/bitsFixed structure #
Parse a bit-string as gammaCode k ++ bitsFixed k i: the leading false-run's length gives
k's own header length; the next block of that length gives k itself; what remains, if it has
exactly k bits, gives i.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The decoder: parser and search combined #
The decoder: parse the input's bit-string as gammaCode k ++ bitsFixed k i, then search
for the (i + 1)-th level-k firing and output its target.
Equations
- PrefixMachine.decodeFn a n = do let ki ← ↑(PrefixMachine.parseBits (PrefixMachine.natToBits n)) PrefixMachine.searchFiring a ki.1 ki.2
Instances For
theorem
PrefixMachine.prefixFree_decodeFn_dom
(a : ℕ → ℕ → ℕ)
:
PrefixFree (natToBits '' (decodeFn a).Dom)
The domain of the decoder, read as bit-strings, is prefix-free.