Documentation

AIT.CodingTheoremDecoder

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 #

What this does NOT establish (flagged) #

The level-k request/firing combinatorics #

@[reducible, inline]
abbrev PrefixMachine.Crossed (a : ℕ → ℕ → ℕ) (k t y : ℕ) :

y's dyadic approximation has crossed the level-k threshold by stage t.

Equations
Instances For
    def PrefixMachine.firesAt (a : ℕ → ℕ → ℕ) (k m : ℕ) :

    The level-k request encoded at step m = Nat.pair t y fires: t is the first stage at which y crosses.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      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 : ℕ) :
      {m ∈ Finset.range (N + 1) | firesAt a k m = true}.card < 2 ^ k

      Markov's bound for the firing steps: at level k, fewer than 2 ^ k firing steps occur by any stage N.

      def PrefixMachine.firingCountBefore (a : ℕ → ℕ → ℕ) (k m : ℕ) :

      The number of level-k firing steps strictly before m.

      Equations
      Instances For

        Computability of the request/firing machinery #

        def PrefixMachine.searchFiring (a : ℕ → ℕ → ℕ) (k i : ℕ) :

        Search over steps for the (i + 1)-th level-k firing, and output its target.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          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

            On its intended input, the parser recovers (k, i) exactly.

            The parser's domain is prefix-free.

            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
            Instances For

              The domain of the decoder, read as bit-strings, is prefix-free.

              The coding theorem with a logarithmic loss #

              theorem PrefixMachine.coding_theorem_weak {μ : ℕ → ℝ} (hμ : LowerSemicomputable μ) (hnn : ∀ (x : ℕ), 0 ≤ μ x) (hsum : ∀ (F : Finset ℕ), ∑ x ∈ F, μ x ≤ 1) :
              ∃ (C : ℕ), ∀ (x k : ℕ), (1 / 2) ^ k < μ x → KB x ≤ k + 2 * k.size + C

              The coding theorem with a logarithmic loss.

              theorem PrefixMachine.coding_theorem_weak_QB :
              ∃ (C : ℕ), ∀ (x k : ℕ), (1 / 2) ^ k < QB x → KB x ≤ k + 2 * k.size + C

              The instance at QB.