feat(MeasureTheory): define Hellinger affinity#41517
Conversation
Define the Hellinger affinity (Bhattacharyya coefficient) of two measures as an ENNReal-valued lintegral against the canonical dominating measure mu + nu, making the definition total with no absolute-continuity or integrability side conditions. Provide symmetry, invariance under the choice of sigma-finite dominating measure, the self-affinity of a probability measure, the rnDeriv and withDensity computation rules, the bound <= 1 for probability measures (via Holder with p = q = 2), and the characterization that the affinity vanishes iff the measures are mutually singular. Groundwork for a formalization of Kakutani's dichotomy (1948) for infinite products of probability measures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary 029c16d920Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (weak) |
|---|---|---|
| 5008 | 1 | exposed public sections |
Current commit 029c16d920
Reference commit d45663d02f
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
|
LLM-generated |
Define the Hellinger affinity (Bhattacharyya coefficient) of two measures as an
ENNReal-valued lintegral against the canonical dominating measureμ + ν, making the definition total with no absolute-continuity or integrability side conditions. Provide symmetry, invariance under the choice of sigma-finite dominating measure, the self-affinity of a probability measure, thernDerivandwithDensitycomputation rules, the bound≤ 1for probability measures (via Hölder withp = q = 2), and the characterization that the affinity vanishes iff the measures are mutually singular. Groundwork for a formalization of Kakutani's dichotomy (1948) for infinite products of probability measures.Design notes.
On the value type ("why not
ℝ/ℝ≥0/EReal"): theℝ≥0∞-valued lintegral againstμ + νmakes the affinity total, which is what makes the singular direction of Kakutani's dichotomy (planned follow-up PRs) case-split-free —hellingerAffinity_eq_zero_iffalready characterizes mutual singularity with no absolute-continuity hypothesis.InformationTheory.klDivsets the precedent of anℝ≥0∞-valued, standalone divergence-like quantity. The invariance lemmahellingerAffinity_eq_lintegral_rnDeriv_mul_rnDerivrecovers the textbook∫ √(dμ/dρ · dν/dρ) dρfor any σ-finite dominatingρ.Relation to f-divergences (CC @RemyDegenne for coordination with the planned
fDivupstreaming from TestingLowerBounds): the affinity is the f-integral atf = √·, equivalently1 −the Hellinger-½ divergence, withH²(μ,ν)/2 = 1 − affinity. Rather than block on an unlanded framework, this PR keeps the affinity standalone (theklDivpattern); whenfDivlands, a single bridging lemma of the shapefDiv hellingerFun μ ν = 1 - hellingerAffinity μ νreconciles them, and I am happy to contribute it. Also happy to move the file toMathlib/InformationTheory/if reviewers prefer that home overMathlib/MeasureTheory/Measure/.Roadmap. This is PR 1 of a planned sequence building toward Kakutani's dichotomy for
Measure.infinitePiover an arbitrary index type (stronger than the textbook countable statement): thelintegralproduct Fubini andMeasure.pi_withDensity, the infinite-product/summability bridges, then the singular and absolutely-continuous directions and the packaged dichotomy. Natural follow-up API for this file, available on request:hellingerAffinity_pos_iff, monotonicity in each argument, and the relation to the squared Hellinger distance once a distance exists.Attribution and AI disclosure. This material was developed in the public riemann-venue repository by Daniel Rodriguez in collaboration with Claude Fable 5 (Anthropic), as part of a machine-checked formalization of Kakutani's dichotomy (1948) for infinite products of probability measures. The definitions, proofs, and the drafting of this description were done with Claude Fable 5 via Claude Code, working from a design and statement plan reviewed by the human author; all proofs are checked by Lean (
#print axiomson the main results reports onlypropext,Classical.choice,Quot.sound), and the human author reviewed the final form, takes responsibility for it, and will answer all review comments personally. I am applying theLLM-generatedlabel per the contribution guidelines.