InformationTheory.Shannon.Kolmogorov.EntropyRate
Kolmogorov complexity converges to the entropy rate #
For an i.i.d. source Xs on a finite alphabet, the expected conditional
Kolmogorov complexity of a length-n block, normalized by n, converges to the
entropy H(X) re-based to bits:
(1 / n) · E[C(X^n ∣ n)] → H(X) / log 2.
The / log 2 re-bases the natural-log entropy entropy (Bridge.lean, base e)
to the bit-length complexity condComplexity (base 2).
The proof is a squeeze between an upper and a lower half. The upper half encodes
a typical block by its index inside the typical set (bits ≈ n(H+ε)) on top of
the conditional literal bound; the lower half combines the counting bound
#{x ∣ C(x ∣ n) < k} < 2^k with the strong-typicality size lower bound. This
file establishes the flagship statement and the plumbing lemmas the two halves
consume.
Main definitions #
encodeBlock— the base-card αnumeral encoding a length-mblock asℕ.
Main statements #
kolmogorov_entropy_rate— the flagship convergence (via the two halves).encodeBlock_injective— that encoding of a block asℕis injective.integrable_condComplexity_jointRV— the block-complexity integrand is integrable.
InformationTheory.Kolmogorov.ofDigits_ofFn
sourceUsed by
InformationTheory.Kolmogorov.encodeBlock
sourceInjective, length-efficient encoding of a length-m block Fin m → α into a
natural number: the little-endian base-Fintype.card α numeral whose i-th digit
is the index of x i under Fintype.equivFin. Its value is below card α ^ m, so
its bit length is m · log₂ (card α) + O(1).
Equations
- InformationTheory.Kolmogorov.encodeBlock m x = ↑(finFunctionFinEquiv fun (i : Fin m) => (Fintype.equivFin α) (x i))
Instances For
Used by
InformationTheory.Kolmogorov.encodeBlock_injective
sourceUsed by
InformationTheory.Kolmogorov.encodeBlock_lt
sourceUsed by
InformationTheory.Kolmogorov.encodeBlock_eq_ofDigits
sourceUsed by
Base-conversion bridges (bit length 2^k ↔ natural-log exp) #
InformationTheory.Kolmogorov.log_two_pos
sourceUsed by
InformationTheory.Kolmogorov.two_pow_eq_exp
sourceUsed by
InformationTheory.Kolmogorov.exp_le_two_pow_iff
sourceUsed by
Type-class decoder matching (upper-bound crux) #
The upper half feeds the type-class decoder typeDecoder (EntropyRateUpper.lean)
to invariance. The matching lemmas below connect the block encoder encodeBlock
to typeDecoder, and bound the index range by the type-class cardinality.
InformationTheory.Kolmogorov.ofDigits_inj
sourceBase-b numerals of equal length with all digits below b are determined by
their value: Nat.ofDigits is injective on such digit lists.
Used by
The entropy-rate theorem #
InformationTheory.Kolmogorov.integrable_condComplexity_jointRV
sourceThe block-complexity integrand takes finitely many values (the block space is finite), so it is a bounded measurable function and hence integrable. @audit:ok
Used by
InformationTheory.Kolmogorov.mem_decoderAlphabet
sourceUsed by
InformationTheory.Kolmogorov.length_decoderAlphabet
sourceUsed by
InformationTheory.Kolmogorov.enumWords_succ
sourceUsed by
InformationTheory.Kolmogorov.mem_enumWords_iff
sourceUsed by
InformationTheory.Kolmogorov.enumWords_nodup
sourceUsed by
InformationTheory.Kolmogorov.length_typeSig
sourceUsed by
InformationTheory.Kolmogorov.typeSig_lt
sourceUsed by
InformationTheory.Kolmogorov.typeCode_lt
sourceThe base-(n+1) numeral of a length-n signature is below K = (n+1) ^ card α.
Used by
InformationTheory.Kolmogorov.typeCount_filter_ofFn
sourceUsed by
InformationTheory.Kolmogorov.typeSig_ofFn
sourceUsed by
InformationTheory.Kolmogorov.toBlock
sourceA partial inverse of List.ofFn: reconstruct a block from a length-n word.
Equations
- InformationTheory.Kolmogorov.toBlock n w i = w.getD (↑i) (Classical.arbitrary α)
Instances For
Used by
InformationTheory.Kolmogorov.ofFn_toBlock
sourceUsed by
InformationTheory.Kolmogorov.filter_typeSig_length_le
sourceThe words sharing a block's signature are no more numerous than its type class.
Used by
InformationTheory.Kolmogorov.exists_mem_typeDecoder_lt
sourceThe block encoder is matched by the type-class decoder at an index below the packed
bound K · |T_c|: there is a program number m decoding to encodeBlock n b whose value
is below (n+1) ^ card α times the type-class cardinality.
Used by
InformationTheory.Kolmogorov.framing_overhead_eventually
sourceThe O(log n) framing overhead is eventually dominated by any positive linear
slack n · δ, since logb 2 (n + 1) = o(n).
Used by
InformationTheory.Kolmogorov.entropyByCount_le_of_strongTypical
sourceOn the strongly-typical set, the empirical entropy of a block's type is bounded
above by the true entropy plus the linear typicality slack ε · L.
Used by
InformationTheory.Kolmogorov.condComplexity_block_typical_le
sourcePer-string upper bound on the strongly typical set (method of types): a typical
block is described by its type descriptor together with its index inside the type
class, costing n · (H + ε·L)/log 2 + o(n) bits. The o(n) overhead (the type
descriptor |α|·log n and the pairing/framing constant) is absorbed as an
arbitrarily small linear slack n · δ, valid for all large n.
@audit:ok
Used by
InformationTheory.Kolmogorov.condComplexity_block_uniform_le
sourceUniform per-string upper bound: every length-n block is describable by echoing
its base-card α numeral, costing natLen ≤ n · ⌈log₂ card α⌉ bits plus the literal
flag, so C(x | n) ≤ (⌈log₂ card α⌉ + 1) · (n + 1).
@audit:ok
Used by
InformationTheory.Kolmogorov.kolmogorov_entropy_rate_upper
sourceUpper half: eventually the normalized expected complexity is within ε above
H / log 2. Method-of-types assembly: split the integral at the strongly typical
set, bound the typical part by condComplexity_block_typical_le and the atypical
part by condComplexity_block_uniform_le, then let the atypical mass vanish. The
assembly itself is unconditional, resting only on the two per-string bounds above.
Used by
Lower-half building blocks #
InformationTheory.Kolmogorov.blockLaw_eq_pi
sourceThe block law of an i.i.d. source is the product measure of the marginal. @audit:ok
Used by
InformationTheory.Kolmogorov.blockProb_eq_prod
sourceThe probability of a single block factors over the coordinates. @audit:ok
Used by
InformationTheory.Kolmogorov.typicalSet_blockProb_le
sourceA typical block has product mass at most exp (-n (H - ε)) (the mirror of the
typicalSet_card_le lower bound).
@audit:ok
Used by
InformationTheory.Kolmogorov.compressibleBlocks_card_lt
sourceFewer than 2 ^ k blocks have conditional complexity below k, via the
injective block encoding and the counting bound condIncompressible_count.
@audit:ok
Used by
InformationTheory.Kolmogorov.compressible_prob_le
sourceThe mass of the typical-and-compressible blocks is at most
2 ^ k · exp (-n (H - ε₁)) (product bound times a count below 2 ^ k).
@audit:ok
Used by
InformationTheory.Kolmogorov.floor_mul_div_tendsto
sourceThe floor ⌊n c⌋₊, normalized by n, converges to c (for c ≥ 0).
@audit:ok
Used by
InformationTheory.Kolmogorov.kolmogorov_entropy_rate_lower
sourceLower half: eventually the normalized expected complexity is within ε below
H / log 2. The counting bound condIncompressible_count caps how many blocks can
be compressed below k, while the strong-typicality mass spreads over ≈ exp (nH)
blocks; a Markov step then pushes the average up to H / log 2 - ε.
@audit:ok
Used by
InformationTheory.Kolmogorov.kolmogorov_entropy_rate
sourceKolmogorov complexity converges to the entropy rate: for an i.i.d. source, the
normalized expected conditional complexity of a length-n block tends to the
bit-rebased entropy H(X) / log 2 (CT 2nd ed.).
@audit:ok