Documentation

PFR.ForMathlib.Entropy.Measure

Entropy of a measure #

Main definitions #

Notations #

noncomputable def ProbabilityTheory.measureEntropy {S : Type u_2} [MeasurableSpace S] (μ : MeasureTheory.Measure S := by volume_tac) :

Entropy of a measure on a measurable space.

We normalize the measure by (μ Set.univ)⁻¹ to extend the entropy definition to finite measures. What we really want to do is deal with μ=0 or IsProbabilityMeasure μ, but we don't have a typeclass for that (we could create one though). The added complexity in the expression is not an issue because if μ is a probability measure, a call to simp will simplify (μ Set.univ)⁻¹ • μ to μ.

Equations
  • Hm[μ] = ∑' (s : S), (((μ Set.univ)⁻¹ μ) {s}).toReal.negMulLog
Instances For
    theorem ProbabilityTheory.measureEntropy_def {S : Type u_2} [MeasurableSpace S] (μ : MeasureTheory.Measure S) :
    Hm[μ] = ∑' (s : S), (((μ Set.univ)⁻¹ μ) {s}).toReal.negMulLog
    theorem ProbabilityTheory.measureEntropy_def' {S : Type u_2} [MeasurableSpace S] (μ : MeasureTheory.Measure S) :
    Hm[μ] = ∑' (s : S), (((μ.real Set.univ)⁻¹ μ.real) {s}).negMulLog

    Entropy of a measure on a measurable space.

    We normalize the measure by (μ Set.univ)⁻¹ to extend the entropy definition to finite measures. What we really want to do is deal with μ=0 or IsProbabilityMeasure μ, but we don't have a typeclass for that (we could create one though). The added complexity in the expression is not an issue because if μ is a probability measure, a call to simp will simplify (μ Set.univ)⁻¹ • μ to μ.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      class ProbabilityTheory.FiniteSupport {S : Type u_2} [MeasurableSpace S] (μ : MeasureTheory.Measure S := by volume_tac) :

      A measure has finite support if there exists a finite set whose complement has zero measure.

      Instances

        A set on which a measure with finite support is supported.

        Equations
        Instances For
          @[simp]
          theorem ProbabilityTheory.mem_support {S : Type u_2} [MeasurableSpace S] {μ : MeasureTheory.Measure S} [hμ : ProbabilityTheory.FiniteSupport μ] {x : S} :
          x μ.support μ {x} 0
          noncomputable def ProbabilityTheory.FiniteEntropy {S : Type u_2} [MeasurableSpace S] (μ : MeasureTheory.Measure S := by volume_tac) :

          TODO: replace FiniteSupport hypotheses in these files with FiniteEntropy hypotheses.

          Equations
          Instances For

            The countability hypothesis can probably be dropped here. Proof is unwieldy and can probably be golfed.

            theorem ProbabilityTheory.integral_congr_finiteSupport {Ω : Type u_1} [mΩ : MeasurableSpace Ω] {μ : MeasureTheory.Measure Ω} {G : Type u_5} [NormedAddCommGroup G] [NormedSpace G] {f g : ΩG} [ProbabilityTheory.FiniteSupport μ] (hfg : ∀ (x : Ω), μ {x} 0f x = g x) :
            ∫ (x : Ω), f xμ = ∫ (x : Ω), g xμ

            This generalizes Measure.ext_iff_singleton in MeasureReal

            theorem ProbabilityTheory.measureEntropy_def_finite {S : Type u_2} [MeasurableSpace S] {μ : MeasureTheory.Measure S} {A : Finset S} (hA : μ (↑A) = 0) :
            Hm[μ] = sA, (((μ Set.univ)⁻¹ μ) {s}).toReal.negMulLog
            theorem ProbabilityTheory.measureEntropy_def_finite' {S : Type u_2} [MeasurableSpace S] {μ : MeasureTheory.Measure S} {A : Finset S} (hA : μ (↑A) = 0) :
            Hm[μ] = sA, (((μ.real Set.univ)⁻¹ μ.real) {s}).negMulLog
            theorem ProbabilityTheory.measureEntropy_of_isProbabilityMeasure_finite {S : Type u_2} [MeasurableSpace S] {μ : MeasureTheory.Measure S} {A : Finset S} (hA : μ (↑A) = 0) [MeasureTheory.IsZeroOrProbabilityMeasure μ] :
            Hm[μ] = sA, (μ {s}).toReal.negMulLog
            theorem ProbabilityTheory.measureEntropy_of_isProbabilityMeasure_finite' {S : Type u_2} [MeasurableSpace S] {μ : MeasureTheory.Measure S} {A : Finset S} (hA : μ (↑A) = 0) [MeasureTheory.IsZeroOrProbabilityMeasure μ] :
            Hm[μ] = sA, (μ.real {s}).negMulLog

            Auxiliary lemma for measureEntropy_le_log_card_of_mem, which removes the probability measure assumption.

            noncomputable def ProbabilityTheory.measureMutualInfo {S : Type u_2} {T : Type u_3} [MeasurableSpace S] [MeasurableSpace T] (μ : MeasureTheory.Measure (S × T) := by volume_tac) :

            The mutual information between the marginals of a measure on a product space.

            Equations
            Instances For

              The mutual information between the marginals of a measure on a product space.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                An ambitious goal would be to replace FiniteSupport with finite entropy. Proof is long and slow; needs to be optimized