InformationTheory.Shannon.LZ78.ZivCondGrouping
LZ78 conditional (k-state, length) grouping bridge #
This file supplies the conditional analogue of the length-grouping measure
bridge for the LZ78 achievability bound ziv_aseventual_le_blockLogAvg₂
(LZ78/AsymptoticOptimality/ParentBridgeAchievability.lean), via the
markovFactor route.
Approach #
The dead marginal route (ZivMeasureBridge.lean,
lz78PhraseStrings_mul_log_le_sum_neg_log_marginal_add_overhead) fibers phrases
by List.length and lower-bounds the entropy by ∑ -log P_ℓ for the marginal
P_ℓ. That direction is dead (the marginal sum bound runs the wrong way for
the Ziv connection). This file instead uses the conditional per-k-state
product sub-distribution condQkState μ p k s (from markovFactor) as
the grouping vehicle, fibering phrases by the pair (k-state, length):
Group over
ι = (Fin k → α) × ℕ: applycard_mul_log_le_sum_group_mul_log_add_card_logto the imageG = phrases.image (st w, w.length), givingc · log c ≤ ∑_g c_g · log c_g + c · log (G.card), where the fibersgrp g = phrases.filter (st w, w.length) = gpartitionphrases.Apply the per-fiber log-sum step: within a fiber
(s, ℓ), all phrases have lengthℓ, sotoFinVec ℓinjects them intoFin ℓ → α. WithP Z = (condQkState μ p k s ℓ Z).toReal,group_card_mul_log_le_sum_neg_loggivescard · log card ≤ ∑ -log P.- The
.toRealsub-distribution bound∑_{Z} P Z ≤ 1is derived from theℝ≥0∞factcondQkState_sum_le_oneviaENNReal.toReal_sum(each term is≤ 1 < ⊤, so finite) andENNReal.toReal_mono. This is the route's.toRealbridge(iii).
- The
Aggregate: sum the per-fiber bounds back into a single sum over phrases.
The result condState_grouping_bound is stated abstractly (a Finset (List α)
of phrases with an arbitrary k-state assignment st); wiring it to the actual
LZ78 parse structure is a downstream leg.
Per-element bound and finiteness for condQkState #
InformationTheory.Shannon.condQkState_le_one
sourceEach conditional mass condQkState μ p k s ℓ Z is at most 1: a single
summand is bounded by the total ≤ 1 sub-distribution sum.
Used by
The .toReal sub-distribution bridge (route step iii) #
InformationTheory.Shannon.sum_condQkState_toReal_le_one
sourceThe real-valued conditional masses on a
finite set S of distinct strings sum to at most 1. Pushes the ℝ≥0∞ fact
condQkState_sum_le_one through .toReal (each term ≤ 1 < ⊤).
Used by
Conditional (k-state, length) grouping bound #
InformationTheory.Shannon.condState_grouping_lengthProfile_counts
sourceUsed by
InformationTheory.Shannon.condState_grouping_perFiber_logsum
sourceUsed by
InformationTheory.Shannon.condState_grouping_bound
sourceConditional (k-state, length) grouped entropy bound for an abstract phrase
set.
Given a finite phrase set phrases : Finset (List α), a k-state assignment
st : List α → (Fin k → α), and positivity of the per-phrase conditional mass,
c · log c ≤ ∑_{w ∈ phrases} -log (condQkState μ p k (st w) |w| (toFinVec |w| w))
+ c · log D,
where c = #phrases and D = #{(st w, |w|)} is the number of distinct
(k-state, length) pairs. This is the conditional analogue of the dead marginal
bound lz78PhraseStrings_mul_log_le_sum_neg_log_marginal_add_overhead, with the
grouping index lifted from length to (k-state, length) and the marginal
replaced by the markovFactor-derived conditional sub-distribution condQkState.
Used by
State-marginalization (a finer partition has higher entropy) #
InformationTheory.Shannon.state_marginalization_bound
sourceThe state-marginalization grouping inequality (abstract Finset/Real).
Fibering a pair-indexed count function kk : (σ × ℕ) → ℕ by the length
coordinate, the length-marginal ∑·log sum is bounded by the full pair ∑·log
sum plus an entropy correction (∑ kk)·log nStates, provided every length fiber
has at most nStates distinct states:
∑_ℓ (c_ℓ · log c_ℓ) ≤ ∑_g (c_g · log c_g) + (∑_g c_g) · log nStates,
where c_ℓ = ∑_{g.2 = ℓ} kk g and c_g = kk g. This is the discrete form of
H(state | length) ≤ log nStates: a finer partition (by (state, length))
carries at most log nStates more entropy per phrase than the coarser
length-only partition. Applying card_mul_log_le_sum_group_mul_log_add_card_log
inside each length fiber and bounding the fiber's group count ≤ nStates.
Used by
Conditional grouping bound with mean-length overhead #
InformationTheory.Shannon.condState_grouping_bound_mean
sourceConditional (k-state, length) grouped entropy bound with mean-length
overhead, the o(n) form used for LZ78 achievability.
This is the mean-length / empirical-entropy upgrade of condState_grouping_bound: the
loose c · log D overhead (worst-case Θ(n)) is replaced by the manifestly
o(n) empirical-entropy overhead c · log (N / c) + c + c · log #states, where
N = ∑_{w ∈ phrases} |w| is the total parsed length and
#states = (Fintype.card α)^k:
c · log c ≤ ∑_{w ∈ phrases} -log (condQkState μ p k (st w) |w| (toFinVec |w| w))
+ (c · log (N / c) + c + c · log #states).
Here c · log (N / c) is the mean-length term (o(n) since the mean length is
~ log n for the LZ78 parse) and c · log #states = c · k · log (card α) is
o(n) for fixed k (since c = O(n / log n)). The proof composes
empirical_entropy_le_log_mean (length empirical entropy ≤ c·log(mean)+c),
state_marginalization_bound (state correction ≤ c·log #states), and the
per-fiber log-sum step of condState_grouping_bound.