Levin's coding theorem, O(1) form #
Over the online Kraft–Chaitin assignment
PrefixMachine.kcRun/kcWord of AIT/KraftChaitin.lean and the universal prefix machine
PrefixMachine.KB of AIT/PrefixMachine.lean.
What this establishes #
level,improves,levinReq: a total request stream over a lower-semicomputable witnessa, every improving step requesting its own level plus two, every silent step requesting its own index plus two.levinReq_mass: the stream's partial sums stay at most one, for any semimeasureaapproximates.levinDecode: replay the assignment until the input word is found, and output its request's second coordinate.coding_theorem,coding_theorem_QB,QB_le_two_pow_mul: the coding theorem with an additive constant loss (no logarithmic term), and both directions of theQBestimate it gives.coding_theorem_mul,QB_universal,QB_universal_nonvacuous: the coding theorem in multiplicative form at a general semimeasure, its universality corollary —QBdominates every lower-semicomputable semimeasure up to a constant factor — and a witness to the joint satisfiability of that corollary's hypotheses.
What this does NOT establish (flagged) #
Nothing further is deferred: this closes the boundary AIT/KraftChaitin.lean and
AIT/CodingTheoremDecoder.lean both flag.
The level of y at stage t: the least k with 2 ^ t ≤ 2 ^ k * a t y (k = t suffices once
a t y ≥ 1), and 0 when a t y = 0, a case the stream never requests on.
Instances For
The request stream, total: an improving step asks for its level plus two, a silent step for its own index plus two.
Equations
- PrefixMachine.levinReq a m = if PrefixMachine.improves a m = true then PrefixMachine.level a (Nat.unpair m).1 (Nat.unpair m).2 + 2 else m + 2
Instances For
A Finset bound: distinct naturals above (or at) a threshold carry bounded mass #
levinReq_mass: the stream's partial sums stay at most one #
The budget. The dummies cost less than half and the real requests at most half.
The KC assignment never repeats a served pair or a served word #
levinDecode: replay the assignment until the input word is found #
The domain of the decoder, read as bit-strings, is prefix-free.
The coding theorem, O(1) form #
Levin's coding theorem, the upper bound: on the prefix machine every lower-semicomputable semimeasure is an ideal code up to an additive constant.
The coding theorem, multiplicative form, at a general semimeasure: coding_theorem's
additive-in-the-exponent bound restated as a multiplicative one, over any lower-semicomputable
semimeasure μ (not only QB).
QB is a universal (maximal) lower-semicomputable semimeasure:
it dominates every lower-semicomputable semimeasure up to a constant factor. The classical
statement fixes its m as ANY maximal such semimeasure, so this shows QB is a universal
semimeasure — never "the" universal semimeasure.
A witness to the joint satisfiability of QB_universal's hypotheses, beyond the instance
the theorem already proves at μ = QB (true there at C = 0) and the instance it makes vacuous at
μ = 0 (whose conclusion is 0 ≤ 2 ^ C * QB x): the point mass at 0, lower-semicomputable via
the dyadic approximation a t x := if x = 0 then 2 ^ t else 0, is a genuine semimeasure the
theorem says something about — it forces 1 ≤ 2 ^ C * QB 0.