InformationTheory.Shannon.DifferentialEntropy
Differential entropy and Gaussian max-entropy #
Differential entropy h(X) = -∫ f log f dx for real-valued random variables
and the Gaussian maximum-entropy theorem (Cover–Thomas).
Main definitions #
differentialEntropy—-∫ negMulLog (dμ/dλ) dλwhereλis the Lebesgue measure.
Main statements #
differentialEntropy_eq_integral_withDensity— rewrite forμ = volume.withDensity f.differentialEntropy_eq_integral_density— rewrite as-∫ f log f dλfor a real density.integrable_density_log_density_of_gaussian— integrability off log ffor Gaussianf.differentialEntropy_map_add_const— translation invariance:h(X + y) = h(X).differentialEntropy_map_mul_const— scaling:h(cX) = h(X) + log |c|.differentialEntropy_map_affine— affine corollary:h(aX + b) = h(X) + log |a|.differentialEntropy_gaussianReal—h(𝒩(m, v)) = (1/2) log (2πe v).differentialEntropy_le_gaussian_of_variance_le— Gaussian max-entropy theorem.klDiv_gaussianReal_gaussianReal_eq— closed-form KL between two Gaussians.concaveOn_log_one_add_div— concavity ofx ↦ log(1 + x/N)on[0, ∞).
Differential entropy: definition and basic integrability #
InformationTheory.Shannon.differentialEntropy
sourceDifferential entropy. For a measure μ on ℝ, define
differentialEntropy μ := ∫ x, Real.negMulLog ((μ.rnDeriv volume x).toReal) ∂volume,
i.e. -∫ f log f dx where f := dμ/dvolume is the Radon-Nikodym derivative w.r.t.
the Lebesgue measure. Real.negMulLog 0 = 0 covers the support boundary automatically.
The value is meaningful primarily when μ ≪ volume; under singular μ, the rnDeriv
captures only the absolutely continuous part.
Equations
Instances For
Used by
InformationTheory.Shannon.differentialEntropy_eq_integral_withDensity
sourceFor μ = volume.withDensity f with measurable f, differentialEntropy μ equals
∫ x, negMulLog (f x).toReal ∂volume.
Used by
InformationTheory.Shannon.differentialEntropy_eq_integral_density
sourceFor μ = volume.withDensity (fun x => ENNReal.ofReal (f x)) with 0 ≤ f,
differentialEntropy μ = -∫ x, f x * Real.log (f x) ∂volume.
Used by
InformationTheory.Shannon.integrable_density_log_density_of_gaussian
sourceThe integrand gaussianPDFReal m v x * Real.log (gaussianPDFReal m v x) is integrable
on Lebesgue volume.
Used by
InformationTheory.Shannon.differentialEntropy_dirac
sourceThe differential entropy of Measure.dirac m is 0.
Used by
Translation invariance and scaling #
InformationTheory.Shannon.differentialEntropy_map_add_const
sourceDifferential entropy is translation invariant: h(X + y) = h(X).
Used by
InformationTheory.Shannon.differentialEntropy_map_mul_const
sourceDifferential entropy under scaling: h(cX) = h(X) + log |c|.
Requires h_ent_int: integrability of negMulLog (μ.rnDeriv volume) (not automatic from
μ ≪ volume; heavy-tail densities can have non-integrable negMulLog).
Used by
InformationTheory.Shannon.differentialEntropy_map_affine
sourceThe affine corollary: h(aX + b) = h(X) + log |a|.
Used by
Differential entropy of the Gaussian: h(𝒩(m, v)) = (1/2) log (2πe v) #
InformationTheory.Shannon.differentialEntropy_gaussianReal_form
sourceUsed by
InformationTheory.Shannon.log_gaussianPDFReal_eq
sourceUsed by
InformationTheory.Shannon.differentialEntropy_gaussianReal
sourceThe differential entropy of a Gaussian: h(𝒩(m, v)) = (1/2) log (2πe v).
Used by
InformationTheory.Shannon.differentialEntropy_gaussianReal_std
sourceh(𝒩(0, 1)) = (1/2) log (2πe).
Used by
Gaussian maximum-entropy theorem #
InformationTheory.Shannon.differentialEntropy_le_gaussian_of_variance_le
sourceGaussian maximum-entropy theorem: for μ ≪ volume with mean m and variance ≤ v,
differentialEntropy μ ≤ (1/2) log (2πe v).
The side hypotheses h_ent_int (integrability of negMulLog (dμ/dλ)) and h_var_int
(integrability of (x - m)²) are needed because Bochner integration returns 0 for
non-integrable functions, so without them the formal statement degenerates.
Used by
KL divergence between Gaussians and corollaries #
Gaussian moment helpers for KL computation #
InformationTheory.Shannon.gaussianReal_variance_eq
sourceUsed by
InformationTheory.Shannon.gaussianReal_integrable_sq
sourceUsed by
InformationTheory.Shannon.gaussianReal_integrable_sq_sub
sourceUsed by
InformationTheory.Shannon.gaussianReal_integral_sq_sub_eq
sourceUsed by
InformationTheory.Shannon.gaussianReal_integrable_log_gaussianPDFReal
sourceUsed by
InformationTheory.Shannon.gaussianReal_integral_log_gaussianPDFReal_eq
sourceUsed by
InformationTheory.Shannon.klDiv_gaussianReal_gaussianReal_eq
sourceClosed-form KL divergence between two Gaussians.
Used by
Helper — concavity of x ↦ log(1 + x/N) on Ici 0 #
Affine-substitution concavity used by AWGN converse C-1c
(ConverseCapacityBound.sum_log_one_add_le_n_log_one_add_avg).
Built by composing Real.strictConcaveOn_log_Ioi.concaveOn (concavity of Real.log
on Ioi 0) with the affine map x ↦ 1 + x/N, then restricting via ConcaveOn.subset
to Ici 0 (since 1 + x/N ≥ 1 > 0 for x ≥ 0).