Documentation

AIT.PrefixInvarianceKB

KB's invariance under computable maps #

The universal-machine invariance, over the prefix complexity KB of AIT/PrefixMachine.lean in place of the additive measure KE that CodeLayer/PrefixInvariance.lean already carries.

What this establishes #

What this does NOT establish (flagged) #

The universal prefix machine, as a code #

The universal prefix machine's simulation step is partial recursive.

The universal prefix machine, as a code. Parses a description's serialized machine d and trailing argument q off any input (read as bits), then runs d on q through pfy.

Equations
Instances For

    univPrefix reproduces pfy d on any serialized-machine-plus-argument description E d ++ q.

    univPrefix's own halting domain, read as bit-strings, is prefix-free. Two accepted inputs decompose (univPrefix_decomp) to serialized machines and arguments; a prefix relation between them forces the same machine (E_append_inj) and then the same argument (pfy_prefixFree).

    KB's invariance under computable maps #

    theorem PrefixMachine.KB_partial_map_le (f : ℕ →. ℕ) (hf : Partrec f) :
    ∃ (c : ℕ), ∀ (x y : ℕ), y ∈ f x → KB y ≤ KB x + c

    KB's invariance under partial computable maps. Applying a Partrec partial f to any x, y with y ∈ f x costs only f's own code's length plus univPrefix's, plus O(1): KB y ≤ KB x + c. exists_code gives a code cf with cf.eval = f outright — no totality step is needed, unlike KB_map_le's original route through a total f. Take the KB-optimal description (d, q) for x (exists_min_KB) and compose cf with univPrefix: comp cf univPrefix outputs y on E d ++ q's bits (univPrefix_spec, then CodeEvalLaws.eval_comp_some), and its domain is prefix-free (prefixFree_comp_univPrefix_dom, a subset of univPrefix's own), so pfy reproduces it exactly and KB_le applies.

    theorem PrefixMachine.KB_map_le (f : ℕ → ℕ) (hf : Computable f) :
    ∃ (c : ℕ), ∀ (x : ℕ), KB (f x) ≤ KB x + c

    KB's invariance under computable maps, a corollary of KB_partial_map_le at f's total-to-partial coercion (Part.mem_some witnesses f x ∈ (↑f) x).