InformationTheory.Shannon.AEP.Basic.Core
I.i.d. sequence and block joint random variable #
InformationTheory.Shannon.jointRV
sourceBlock joint random variable: jointRV Xs n ω = (Xs 0 ω, Xs 1 ω, …, Xs (n-1) ω).
Equations
- InformationTheory.Shannon.jointRV Xs n ω i = Xs (↑i) ω
Instances For
Used by
InformationTheory.Shannon.jointRV_apply
sourceUsed by
InformationTheory.Shannon.measurable_jointRV
sourceUsed by
Probability AEP #
The per-symbol log-likelihood is −Real.log ((μ.map (Xs 0)).real {Xs i ω}). It
is factored through the alphabet-side function pmfLog μ Xs : α → ℝ so that
logLikelihood μ Xs i ω = pmfLog μ Xs (Xs i ω). This shape lets IdentDistrib (Xs i) (Xs 0) and IndepFun (Xs i) (Xs j) lift to the logLikelihood sequence
by composition with the (always-measurable, finite-domain) pmfLog.
InformationTheory.Shannon.pmfLog
sourceAlphabet-side −log p(x) function (independent of i).
Equations
- InformationTheory.Shannon.pmfLog μ Xs x = -Real.log ((MeasureTheory.Measure.map (Xs 0) μ).real {x})
Instances For
Used by
InformationTheory.Shannon.measurable_pmfLog
sourceUsed by
InformationTheory.Shannon.logLikelihood
sourcePer-symbol log-likelihood: (−log P(Xs i ω)).
Equations
- InformationTheory.Shannon.logLikelihood μ Xs i ω = InformationTheory.Shannon.pmfLog μ Xs (Xs i ω)
Instances For
Used by
InformationTheory.Shannon.logLikelihood_eq_comp
sourceUsed by
InformationTheory.Shannon.measurable_logLikelihood
sourceUsed by
InformationTheory.Shannon.integrable_logLikelihood
sourceUsed by
InformationTheory.Shannon.integral_logLikelihood_zero
source∫ logLikelihood μ Xs 0 ∂μ = entropy μ (Xs 0).
Used by
InformationTheory.Shannon.identDistrib_logLikelihood
sourceUsed by
InformationTheory.Shannon.indepFun_logLikelihood
sourceUsed by
InformationTheory.Shannon.aep_ae
sourceAsymptotic equipartition property (almost-sure form): for an i.i.d.
discrete sequence Xs : ℕ → Ω → α with finite alphabet α, the empirical
entropy estimator (1/n) ∑ i, (−log P(Xs i ω)) converges almost surely to the
entropy H(Xs 0).
Used by
InformationTheory.Shannon.aep_inProbability
sourceAsymptotic equipartition property (in probability): the empirical entropy
estimator converges to entropy μ (Xs 0) in probability.
Used by
Typical set T_ε^n #
InformationTheory.Shannon.typicalSet
sourceTypical set: blocks x : Fin n → α whose empirical entropy is within ε
of the true entropy H(Xs 0).
Equations
- InformationTheory.Shannon.typicalSet μ Xs n ε = {x : Fin n → α | |(∑ i : Fin n, InformationTheory.Shannon.pmfLog μ Xs (x i)) / ↑n - InformationTheory.Shannon.entropy μ (Xs 0)| < ε}
Instances For
Used by
InformationTheory.Shannon.mem_typicalSet_iff
sourceUsed by
InformationTheory.Shannon.measurableSet_typicalSet
sourceMeasurability of the typical set.
Used by
InformationTheory.Shannon.typicalSet_card_le
sourceSize bound: |T_ε^n| ≤ exp (n · (H + ε)). The bound is stated with
Real.exp rather than 2^x to avoid the log 2 plumbing; the textbook form
follows by re-basing the logarithm.
The full-support hypothesis hpos is required because, under the Mathlib
Real.log 0 = 0 convention, a typical block containing an out-of-support point
cannot be evaluated by the sum (for P(x_i) = 0 we get pmfLog x i = 0, so
exp(-∑ pmfLog) is strictly larger than P^n(x) = 0 and fails as a lower
bound), so [∀ x, P(x) > 0] is taken as an extra hypothesis.
Used by
InformationTheory.Shannon.typicalSet_prob_tendsto_one
sourceTypicality probability: P(jointRV Xs n ∈ T_ε^n) → 1.
See also aep_inProbability.