Prefix-free Kolmogorov complexity and the invariance theorem #
A description method M : DescriptionMethod α is prefix-free (M.IsPrefixFree) when its
halting domain M.haltingSet = {p | ∃ x, M.Produces p x} is prefix-free in the sense of
InformationTheory.IsPrefixFree: no halting program is a strict prefix of another halting
program [LV19].
Given any partial recursive code c : Nat.Partrec.Code, ofPrefixCode c dovetails the clocked
evaluations of c and accepts a halting pair (q, x) only when q is prefix-incomparable with
every previously accepted program. Thus ofPrefixCode c is always both partial recursive and
prefix-free, and agrees exactly with ofCode c whenever ofCode c is already prefix-free.
The universal prefix-free description method universalPrefix : DescriptionMethod ℕ parses a
strict self-delimiting code header codeHeader c (parseCodeHeader) followed by a program p,
and runs p under ofPrefixCode c. Because Set.range codeHeader is prefix-free and each
ofPrefixCode c is prefix-free, universalPrefix is prefix-free (isPrefixFree_universalPrefix),
partial recursive (isPartrec_universalPrefix), and additively optimal for the class of prefix-free
partial recursive description methods (isAdditivelyOptimal_universalPrefix: the prefix-free
invariance theorem). Pushing universalPrefix forward along binary-string decoding yields the
universal prefix-free description method universalPrefixBits : DescriptionMethod (List Bool) on
binary strings.
Main definitions #
Cslib.Kolmogorov.DescriptionMethod.haltingSet: the set of programs on whichMhalts.Cslib.Kolmogorov.DescriptionMethod.IsPrefixFree: prefix-freeness ofM.haltingSet.Cslib.Kolmogorov.decodeSelfDelimiting?: strict partial decoder forselfDelimitingCode.Cslib.Kolmogorov.DescriptionMethod.parseCodeHeader: strict parser forcodeHeader c ++ p.Cslib.Kolmogorov.DescriptionMethod.prefixAccepted,Cslib.Kolmogorov.DescriptionMethod.ofPrefixCode: prefix-free restriction ofofCode c.Cslib.Kolmogorov.DescriptionMethod.universalPrefix: the universal prefix-free description method for natural numbers.Cslib.Kolmogorov.DescriptionMethod.universalPrefixBits: the universal prefix-free description method for binary strings.Cslib.Kolmogorov.DescriptionMethod.MinorizesPrefixPartrec: prefix-free minorization predicate for arbitraryPrimcodabletypes.
Main results #
Cslib.Kolmogorov.DescriptionMethod.isPrefixFree_ofPrefixCode,Cslib.Kolmogorov.DescriptionMethod.isPartrec_ofPrefixCode: everyofPrefixCode cis prefix-free and partial recursive.Cslib.Kolmogorov.DescriptionMethod.ofPrefixCode_produces_iff_of_isPrefixFree:ofPrefixCode cpreservesofCode cwheneverofCode cis already prefix-free.Cslib.Kolmogorov.DescriptionMethod.isPrefixFree_universalPrefix,Cslib.Kolmogorov.DescriptionMethod.isPartrec_universalPrefix:universalPrefixis prefix-free and partial recursive.Cslib.Kolmogorov.DescriptionMethod.isAdditivelyOptimal_universalPrefix: prefix-free invariance theorem for{M : DescriptionMethod ℕ | M.IsPartrec ∧ M.IsPrefixFree}.Cslib.Kolmogorov.DescriptionMethod.minorizesPrefixPartrec_universalPrefix,Cslib.Kolmogorov.DescriptionMethod.minorizesPrefixPartrec_universalPrefixBits,Cslib.Kolmogorov.DescriptionMethod.exists_ecomplexity_universalPrefixBits_le_of_partrec_eval: prefix-free minorization and invariance for natural numbers and binary strings.Cslib.Kolmogorov.DescriptionMethod.exists_ecomplexity_universalPrefixBits_le_selfDelimiting:K(x) ≤ |x| + 2 size |x| + O(1)for binary strings underuniversalPrefixBits.Cslib.Kolmogorov.DescriptionMethod.MinorizesPrefixPartrec.not_computable_complexity: prefix-free complexity is uncomputable.Cslib.Kolmogorov.DescriptionMethod.MinorizesPrefixPartrec.exists_forall_le_of_rePred: Chaitin's incompleteness theorem for prefix-free complexity.
References #
Strict self-delimiting decoder #
decodeSelfDelimiting? succeeds with (b, p) exactly when q = selfDelimitingCode b ++ p.
selfDelimitingCode has a prefix-free range.
The strict self-delimiting decoder is primitive recursive.
Prefix-free description methods #
The halting set of a description method M: the programs that eventually output some object.
A description method is prefix-free when its halting set is prefix-free: no halting program is a prefix of a distinct halting program.
Strict code-header parser #
Strict parser for codeHeader c ++ p: returns some (c, p) if and only if
codeHeader c ++ p = q.
parseCodeHeader q = some (c, p) if and only if codeHeader c ++ p = q.
The set of code headers codeHeader c is prefix-free.
parseCodeHeader is primitive recursive.
Prefix-free trimming of partial recursive codes #
Candidate (q, x) at dovetailing index k: decodes k to (q, t) and returns (q, x)
when Code.evaln t c (encode q) = some x.
The list of prefix-free (program, output) pairs accepted for code c after n dovetailing
steps.
The prefix-free restriction of ofCode c: a program p outputs x at stage n if (p, x)
appears in prefixAccepted c n.
Every ofPrefixCode c is prefix-free.
Every program halting under ofPrefixCode c halts with the same output under ofCode c.
When ofCode c is already prefix-free, ofPrefixCode c has the exact same outputs as
ofCode c.
Joint partial recursive evaluation of ofPrefixCode c in (c, p).
Every ofPrefixCode c is partial recursive.
The universal prefix-free description method #
The universal prefix-free description method for natural numbers: parseCodeHeader strictly
parses a program into codeHeader c ++ p, and then runs p under ofPrefixCode c.
universalPrefix is partial recursive.
Prefix-free invariance theorem [LV19]: universalPrefix is additively optimal
for the class of prefix-free partial recursive description methods of natural numbers.
Every natural number has a finite complexity under universalPrefix.
There exists a code header of universalPrefix that is prefix-incomparable with every halting
program of universalPrefix, witnessing haltingSet ≠ univ and Ω < 1.
Prefix-free minorization and binary strings #
The description method U minorizes prefix-free partial recursive decoders: for every
partial recursive g : List Bool →. α whose halting domain {p | (g p).Dom} is prefix-free,
there is a constant c with K_U(x) ≤ |p| + c whenever x ∈ g p.
universalPrefix minorizes every prefix-free partial recursive decoder.
Pushing forward along f preserves prefix-free minorization when f has a computable
section s.
Prefix-free invariance for partial recursive decoders over any Primcodable type.
The universal prefix-free description method for binary strings: universalPrefix, read
through the decoding of ℕ.
Prefix-free invariance theorem for binary strings: universalPrefixBits is at most an
additive constant worse than every prefix-free description method of binary strings with a partial
recursive evaluator.
Self-delimiting upper bound: K(x) ≤ |x| + 2 size |x| + O(1) for every binary string.
Uncomputability and Chaitin's incompleteness for prefix-free complexity #
No computable unbounded lower bound on prefix-free complexity: if U minorizes prefix-free
partial recursive decoders, no computable unbounded function f : α → ℕ satisfies f x ≤ K_U(x)
everywhere (Berry's paradox with self-delimiting programs).
A minorizing prefix-free description method on an infinite type with finite complexities cannot have a computable complexity function.
The prefix-free Kolmogorov complexity of natural numbers is not computable.
The prefix-free Kolmogorov complexity of binary strings is not computable.
Chaitin's incompleteness theorem for prefix-free complexity, quantitative form for theories
[Cha74], [LV19]: a sound r.e. theory semi-decided by e proves n ≤ K_U(x) only
for n ≤ K(encode e) + c, where K is the prefix-free complexity under universalPrefix.
Chaitin's incompleteness theorem for prefix-free complexity, quantitative form
[Cha74], [LV19]: every sound code e semi-deciding pairs (x, n) with
n ≤ K_U(x) satisfies n ≤ K(encode e) + c.
Chaitin's incompleteness theorem for prefix-free complexity: a sound r.e. theory proves
n ≤ K_U(x) only for boundedly many n.
Chaitin's incompleteness theorem for prefix-free complexity: an r.e. set of pairs
(x, n) with n ≤ K_U(x) for every member has bounded n.