Partial recursive description methods and the invariance theorem #
A code c of a partial recursive function (Mathlib's Nat.Partrec.Code) gives a description
method ofCode c for natural numbers: a program p is the input encode p of c, and after t
steps its output is Nat.Partrec.Code.evaln t c (encode p), the result of evaluating c with
fuel t. More generally, a description method is partial recursive (IsPartrec) when a partial
recursive function of the programs has exactly its outputs, whatever its clock.
The universal description method universal reads a program as the self-delimiting code of the
binary representation of encode c, for a code c, followed by a program p, and runs p under
ofCode c, with the same clock. The header of c costs a constant number of bits, so universal
is at most a constant worse than ofCode c (ecomplexity_universal_le). It is itself partial
recursive, since the decoder of the self-delimiting code is primitive recursive and evaluating
codes is partial recursive (Nat.Partrec.Code.eval_part), and every partial recursive method has
the outputs of some ofCode c. So universal is additively optimal for the class of partial
recursive description methods: this is the invariance theorem of Kolmogorov complexity
Li and Vitányi, Section 2.1, and by
Cslib.Kolmogorov.DescriptionMethod.IsAdditivelyOptimal.invariance any two additively optimal
partial recursive methods have complexities within an additive constant of each other. Every
natural number has a description under universal, so its complexity is a natural number
(natCast_complexity_universal).
The simulation of ofCode c by universal has no time overhead, which gives the time-bounded
invariance C_U^t(x) ≤ C_{ofCode c}^t(x) + |header c|
(etimeBoundedComplexity_universal_le). Its clock, however, is the fuel of evaln, which bounds
the depth of the evaluation and the size of the numbers it inspects rather than counting the steps
of a machine; time-bounded complexity for a machine model needs a universal machine for that model.
Main definitions #
Cslib.Kolmogorov.DescriptionMethod.ofCode: the description method of a code.Cslib.Kolmogorov.DescriptionMethod.IsPartrec: partial recursive description methods.Cslib.Kolmogorov.DescriptionMethod.codeHeader: the header announcing a code.Cslib.Kolmogorov.DescriptionMethod.universal: the universal description method.Cslib.Kolmogorov.DescriptionMethod.universalSimulation: the simulation ofofCode cbyuniversal.
Main results #
Cslib.Kolmogorov.DescriptionMethod.ofCode_produces_iff:ofCode cdescribesxbypexactly whencoutputsxonencode p.Cslib.Kolmogorov.primrec_decodeSelfDelimiting: the decoder of the self-delimiting code is primitive recursive.Cslib.Kolmogorov.DescriptionMethod.isPartrec_universal: the universal method is partial recursive.Cslib.Kolmogorov.DescriptionMethod.isAdditivelyOptimal_universal: the invariance theorem.Cslib.Kolmogorov.DescriptionMethod.IsPartrec.of_partrec_eval,Cslib.Kolmogorov.DescriptionMethod.exists_ecomplexity_universal_le_of_partrec_eval: generic partial-recursiveness and additive-optimality bridges for description methods with aPartrecevaluation function.Cslib.Kolmogorov.DescriptionMethod.ecomplexity_universal_le,Cslib.Kolmogorov.DescriptionMethod.etimeBoundedComplexity_universal_le: the constant is the length of the header.
References #
The decoder of the self-delimiting code is primitive recursive.
The description method of a code #
The description method of the code c of a partial recursive function: the program p is the
input encode p of c, and after t steps its output is Code.evaln t c (encode p), the result
of evaluating c with fuel t.
Instances For
A program describes x under ofCode c exactly when c outputs x on its encoding.
Partial recursive description methods #
A description method for natural numbers is partial recursive when a partial recursive function of the programs has exactly its outputs. Nothing is assumed about its clock.
Instances For
A partial recursive description method has the outputs of the description method of some code.
If M : DescriptionMethod α has a partial recursive evaluation function eval : List Bool →. α
characterizing M.Produces, then mapping any computable decoder dec : α → ℕ over M yields a
partial recursive description method.
The universal description method #
The header announcing the code c to the universal method: the self-delimiting code of the
binary representation of encode c.
Instances For
The universal description method: the decoder of the self-delimiting code splits a program
into the binary representation of a number n and a program p (decodeSelfDelimiting), and p
runs under the description method of the code ofNat Code n, with the same clock.
Instances For
The universal description method is partial recursive.
The universal method simulates the description method of every code c, with the header of
c as program overhead and no time overhead.
Instances For
Invariance: the universal method is at most |codeHeader c| worse than the description
method of the code c.
Time-bounded invariance for the clock of evaln: the universal method is at most
|codeHeader c| worse than the description method of the code c, within the same fuel.
Invariance theorem Li and Vitányi, Section 2.1. The universal method is additively optimal for the class of partial recursive description methods: it is partial recursive, and at most a constant worse than every partial recursive description method.
If M : DescriptionMethod α has a partial recursive evaluation function eval : List Bool →. α
characterizing M.Produces, then for every computable decoder dec : α → ℕ, universal is at most
an additive constant worse than M.
Every natural number has a description under the universal method.