Documentation

AIT.CodingTheoremWeak

Toward the coding theorem with a logarithmic loss #

Over the universal prefix machine PrefixMachine.KB and the algorithmic probability PrefixMachine.QB. Extends AIT/AlgorithmicProbability.lean.

What this establishes #

The two combinatorial ingredients of the weak coding theorem's codeword and Markov's bound on the number of level-k requests, none of which needs the decoder's effectiveness:

What this does NOT establish (flagged) #

The coding theorem itself (coding_theorem_weak) and QB_lsc — the boundaries this module once flagged, over the bit-string computability layer of CodeLayer/BitStringPrimrec.lean — are established in AIT/CodingTheoremBitwise.lean and AIT/CodingTheoremDecoder.lean.

A self-delimiting unary-length header code #

A self-delimiting code of a natural: a unary length header (as many falses as natToBits k is long), a true stop bit, then the binary digits of k themselves.

Equations
Instances For
    theorem PrefixMachine.gammaCode_append_inj (k₁ k₂ : ℕ) (r₁ r₂ : List Bool) (h : gammaCode k₁ ++ r₁ = gammaCode k₂ ++ r₂) :
    k₁ = k₂ ∧ r₁ = r₂

    Parse uniqueness for gammaCode. No gammaCode k is a proper prefix of another's extension: the leading run of falses recovers its own length exactly.

    The serialization is prefix-free.

    A fixed-width binary code #

    The k-bit binary representation of i, most-significant-bit first, padded with leading zeros to width k (unlike natToBits, which drops them).

    Equations
    Instances For

      The inverse of bitsFixed: read a bit-string as a natural, most-significant-bit first.

      Equations
      Instances For

        Markov's bound #

        theorem PrefixMachine.card_exceeds_lt {μ : ℕ → ℝ} (_hnn : ∀ (x : ℕ), 0 ≤ μ x) (hsum : ∀ (F : Finset ℕ), ∑ x ∈ F, μ x ≤ 1) (k : ℕ) (F : Finset ℕ) (hF : ∀ x ∈ F, (1 / 2) ^ k < μ x) :
        F.card < 2 ^ k

        Markov's bound: fewer than 2 ^ k objects carry mass above 2 ^ (-k) under a semimeasure.