InformationTheory

InformationTheory.Shannon.DifferentialEntropy

source

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 #

Main statements #

Differential entropy: definition and basic integrability #

noncomputable def

InformationTheory.Shannon.differentialEntropy

source

Differential 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
      theorem

      InformationTheory.Shannon.differentialEntropy_eq_integral_withDensity

      source

      For μ = volume.withDensity f with measurable f, differentialEntropy μ equals ∫ x, negMulLog (f x).toReal ∂volume.

      Used by
        theorem

        InformationTheory.Shannon.differentialEntropy_eq_integral_density

        source
        {f : } (hf : Measurable f) (hf_nn : ∀ (x : ), 0 f x) (μ : MeasureTheory.Measure ) ( : μ = MeasureTheory.volume.withDensity fun (x : ) => ENNReal.ofReal (f x)) :

        For μ = volume.withDensity (fun x => ENNReal.ofReal (f x)) with 0 ≤ f, differentialEntropy μ = -∫ x, f x * Real.log (f x) ∂volume.

        Used by
          theorem

          InformationTheory.Shannon.integrable_density_log_density_of_gaussian

          source

          The integrand gaussianPDFReal m v x * Real.log (gaussianPDFReal m v x) is integrable on Lebesgue volume.

          Used by
            theorem

            InformationTheory.Shannon.differentialEntropy_dirac

            source

            The differential entropy of Measure.dirac m is 0.

            Used by

              Translation invariance and scaling #

              theorem

              InformationTheory.Shannon.differentialEntropy_map_add_const

              source

              Differential entropy is translation invariant: h(X + y) = h(X).

              Used by
                theorem

                InformationTheory.Shannon.differentialEntropy_map_mul_const

                source

                Differential 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
                  theorem

                  InformationTheory.Shannon.differentialEntropy_map_affine

                  source

                  The 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) #

                    theorem

                    InformationTheory.Shannon.differentialEntropy_gaussianReal_form

                    source
                    Used by
                      theorem

                      InformationTheory.Shannon.log_gaussianPDFReal_eq

                      source
                      (m : ) {v : NNReal} (hv : v 0) (x : ) :
                      Real.log (ProbabilityTheory.gaussianPDFReal m v x) = -(1 / 2) * Real.log (2 * Real.pi * v) - (x - m) ^ 2 / (2 * v)
                      Used by
                        theorem

                        InformationTheory.Shannon.differentialEntropy_gaussianReal

                        source

                        The differential entropy of a Gaussian: h(𝒩(m, v)) = (1/2) log (2πe v).

                        Used by
                          theorem

                          InformationTheory.Shannon.differentialEntropy_gaussianReal_std

                          source

                          h(𝒩(0, 1)) = (1/2) log (2πe).

                          Used by

                            Gaussian maximum-entropy theorem #

                            theorem

                            InformationTheory.Shannon.differentialEntropy_le_gaussian_of_variance_le

                            source
                            {μ : MeasureTheory.Measure } [MeasureTheory.IsProbabilityMeasure μ] ( : μ.AbsolutelyContinuous MeasureTheory.volume) (m : ) {v : NNReal} (hv : v 0) (h_mean : (x : ), x μ = m) (h_var : (x : ), (x - m) ^ 2 μ v) (h_var_int : MeasureTheory.Integrable (fun (x : ) => (x - m) ^ 2) μ) (h_ent_int : MeasureTheory.Integrable (fun (x : ) => (μ.rnDeriv MeasureTheory.volume x).toReal.negMulLog) MeasureTheory.volume) :

                            Gaussian 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 #

                              theorem

                              InformationTheory.Shannon.gaussianReal_variance_eq

                              source
                              (m : ) {v : NNReal} (_hv : v 0) :
                              Used by
                                theorem

                                InformationTheory.Shannon.gaussianReal_integrable_sq

                                source
                                (m : ) {v : NNReal} (_hv : v 0) :
                                Used by
                                  theorem

                                  InformationTheory.Shannon.gaussianReal_integrable_sq_sub

                                  source
                                  (m : ) {v : NNReal} (hv : v 0) (c : ) :
                                  Used by
                                    theorem

                                    InformationTheory.Shannon.gaussianReal_integral_sq_sub_eq

                                    source
                                    (m : ) {v : NNReal} (hv : v 0) (c : ) :
                                    (x : ), (x - c) ^ 2 ProbabilityTheory.gaussianReal m v = v + (m - c) ^ 2
                                    Used by
                                      theorem

                                      InformationTheory.Shannon.gaussianReal_integrable_log_gaussianPDFReal

                                      source
                                      (m m' : ) {v v' : NNReal} (hv : v 0) (hv' : v' 0) :
                                      Used by
                                        theorem

                                        InformationTheory.Shannon.gaussianReal_integral_log_gaussianPDFReal_eq

                                        source
                                        (m m' : ) {v v' : NNReal} (hv : v 0) (hv' : v' 0) :
                                        (x : ), Real.log (ProbabilityTheory.gaussianPDFReal m' v' x) ProbabilityTheory.gaussianReal m v = -(1 / 2) * Real.log (2 * Real.pi * v') - (v + (m - m') ^ 2) / (2 * v')
                                        Used by
                                          theorem

                                          InformationTheory.Shannon.klDiv_gaussianReal_gaussianReal_eq

                                          source
                                          (m₁ m₂ : ) {v₁ v₂ : NNReal} (hv₁ : v₁ 0) (hv₂ : v₂ 0) :
                                          (klDiv (ProbabilityTheory.gaussianReal m₁ v₁) (ProbabilityTheory.gaussianReal m₂ v₂)).toReal = 1 / 2 * (Real.log (v₂ / v₁) + v₁ / v₂ + (m₁ - m₂) ^ 2 / v₂ - 1)

                                          Closed-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).

                                            theorem

                                            InformationTheory.Shannon.concaveOn_log_one_add_div

                                            source
                                            {N : } (hN_pos : 0 < N) :
                                            ConcaveOn (Set.Ici 0) fun (x : ) => Real.log (1 + x / N)
                                            Used by