Shannon entropy #
Definitions and facts about the Shannon entropy function -x*ln(x), both on a single variable and on a distribution.
There is significant overlap with Real.negMulLog and Real.binEntropy in Mathlib,
and probably these files could be combined in some form.
@[simp]
H₁ of 0 is zero.
Equations
Instances For
Shannon entropy of a distribution is at most ln d.
@[simp]
The shannon entropy of a constant variable is zero.
Shannon entropy of a uniform distribution is ln d.
Shannon entropy of two-event distribution.
theorem
Hₛ_eq_of_multiset_map_eq
{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(d₁ : ProbDistribution α)
(d₂ : ProbDistribution β)
(h : Multiset.map d₁.prob Finset.univ.val = Multiset.map d₂.prob Finset.univ.val)
: