PFR/Mathlib/Analysis/SpecialFunctions/NegMulLog.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Polynomial Freiman-Ruzsa proof paper, arXiv v2
3 declarations, 0 contain sorry, 0 declared as axioms
Entropy function
The purpose of this file is to record basic analytic properties of the function $$h(x) = - x * \log x$$ on the unit interval, for use in the theory of Shannon entropy.
Main results
sum_negMulLog_le: a Jensen inequality fornegMulLogsum_negMulLog_eq: the equality case of this inequality
Imports (3)
Imported by 2 files
- lemma
Real.sum_mul_log_div_leqDocumented declaration: sum_mul_log_div_leq line 32 sourceSource documentation
If $S$ is a finite set, and $a_s$, $b_s$ are non-negative for $s\in S$, then $$\sum_{s\in S} a_s \log\frac{a_s}{b_s}\ge \left(\sum_{s\in S}a_s\right)\log\frac{\sum_{s\in S} a_s}{\sum_{s\in S} b_s}$$. We require additionally that, if $b_s=0$, then $s_s=0$ as otherwise the right hand side should morally be infinite, which it can't be in the formalization using real numbers.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Real,Membership.mem,LE.le,OfNat.ofNat,Eq,HMul.hMul,Finset.sum,Real.log,HDiv.hDivProof uses:
dite,Finset.sum_congr,rfl,of_eq_true,Eq.trans,True,congr,congrArg,div_zero,Real.log_zero,MulZeroClass.mul_zero,eq_self,Finset.sum_const_zero,Eq.refl,Not,LT.lt,Finset.sum_pos',Exists,And,Eq.mpand 117 more148 instances, coercions and auxiliary constants left out.
Tactic trace: 41 steps
Open to load the checked before-and-after goal states.
lemma sum_mul_log_div_leq {a b : ι → ℝ} (ha : ∀ i ∈ s, 0 ≤ a i) (hb : ∀ i ∈ s, 0 ≤ b i) (habs : ∀ i ∈ s, b i = 0 → a i = 0) : (∑ i ∈ s, a i) * log ((∑ i ∈ s, a i) / (∑ i ∈ s, b i)) ≤ ∑ i ∈ s, a i * log (a i / b i) := by … - lemma
Real.sum_mul_log_div_eq_iff_auxIf equality holds in the previous bound, then $a_s=r\cdot b_s$ for every $s\in S$, for some constant $r\in \mathbb{R}$ line 71 sourceSource documentation
If equality holds in the previous bound, then $a_s=r\cdot b_s$ for every $s\in S$, for some constant $r\in \mathbb{R}$. Auxiliary version assuming the
b iare positive.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Real,Membership.mem,LE.le,OfNat.ofNat,LT.lt,Eq,Finset.sum,HMul.hMul,Real.log,HDiv.hDiv,ExistsProof uses:
EmptyCollection.emptyCollection,Finset.Nonempty,Or,Finset.eq_empty_or_nonempty,of_eq_true,Eq.trans,True,congrArg,funext,forall_congr,False,implies_congr,Eq.refl,implies_true,Eq.symm,Finset.sum_pos,congrFun',Finset.sum_congr,div_self,LT.lt.ne'and 66 more125 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
lemma sum_mul_log_div_eq_iff_aux {a b : ι → ℝ} (ha : ∀ i ∈ s, 0 ≤ a i) (hb : ∀ i ∈ s, 0 < b i) (heq : ∑ i ∈ s, a i * log (a i / b i) = (∑ i ∈ s, a i) * log ((∑ i ∈ s, a i) / ∑ i ∈ s, b i)) : ∃ r, ∀ i ∈ s, a i = r * (b i) := by … - lemma
Real.sum_mul_log_div_eq_iffIf equality holds in the previous bound, then $a_s=r\cdot b_s$ for every $s\in S$, for some constant $r\in \mathbb{R}$ line 99 sourceSource documentation
If equality holds in the previous bound, then $a_s=r\cdot b_s$ for every $s\in S$, for some constant $r\in \mathbb{R}$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Real,Membership.mem,LE.le,OfNat.ofNat,Eq,Finset.sum,HMul.hMul,Real.log,HDiv.hDiv,ExistsProof uses:
Finset.filter,LT.lt,Finset.sum_subset,Finset.filter_subset,Not,le_antisymm,Eq.mp,Eq.trans,congrArg,And,True,congrFun',eq_true,true_and,Eq.mpr,eq_of_heq,HEq,Eq.refl,HEq.refl,Eq.symmand 13 more51 instances, coercions and auxiliary constants left out.
Tactic trace: 36 steps
Open to load the checked before-and-after goal states.
lemma sum_mul_log_div_eq_iff {a b : ι → ℝ} (ha : ∀ i ∈ s, 0 ≤ a i) (hb : ∀ i ∈ s, 0 ≤ b i) (habs : ∀ i ∈ s, b i = 0 → a i = 0) (heq : ∑ i ∈ s, a i * log (a i / b i) = (∑ i ∈ s, a i) * log ((∑ i ∈ s, a i) / (∑ i ∈ s, b i))) : ∃ r, ∀ i ∈ s, a i = r * (b i) := by …