CloseTo, the finite statistical distance and total variation #
Three notions measure the distance between PMFs: the all-event relation CloseTo μ ν ε
(error in ℝ≥0∞, any type), the finite-type metric dist μ ν (half the L1 distance, in ℝ),
and Mathlib's total variation etvDist/tvDist of the induced measures (the full L1 distance).
Each is determined by the positive-part sum ∑' a, (μ a - ν a) of closeTo_iff_tsum_tsub_le, so
CloseTo is exactly a bound on either distance, with no slack in the coercions.
Main results #
Cslib.Probability.closeTo_iff_ofReal_dist_le: on a finite type,CloseTo μ ν ε ↔ ENNReal.ofReal (dist μ ν) ≤ ε, for everyε : ℝ≥0∞.Cslib.Probability.closeTo_coe_iff_dist_le,Cslib.Probability.closeTo_ofReal_iff_dist_le: the same with anℝ≥0error, or a nonnegative real one.Cslib.Probability.closeTo_of_dist_le,Cslib.Probability.closeTo_of_dist_le_ofReal: the forward bridges, used by finite-source hashing and approximate sampling.Cslib.Probability.closeTo_iff_etvDist_le: on any type with measurable singletons,CloseTo μ ν ε ↔ etvDist μ.toMeasure ν.toMeasure ≤ 2 * ε.Cslib.Probability.closeTo_ofReal_iff_tvDist_le: the same withtvDistand a nonnegative real error.Cslib.Probability.PMF.dist_eq_tvDist_toMeasure_div_two: statistical distance is half oftvDist.
Mathlib's total variation distance of PMF measures is twice the positive-part sum.
Statistical distance is half of Mathlib's total variation distance tvDist of the PMF
measures.
Real-valued finite-support statistical distance bounds CloseTo via ENNReal.ofReal, with
no separate 0 ≤ ε premise.
On any type with measurable singletons, CloseTo μ ν ε holds exactly when the total
variation distance of the induced measures is at most 2 * ε.
Real-valued form of closeTo_iff_etvDist_le.