Layer-cake formulas for products, distances, and moments #
For two nonnegative measurable functions, their product integral is the double integral of the measures of intersections of their strict superlevel sets. This is the two-function form of the layer-cake formula and is useful for comparing pairings through level-set geometry.
This file expresses the L¹ distance between two almost everywhere measurable real functions as
the integral, over all levels, of the measure of the symmetric difference of their sublevel sets.
Consequently, along a subsequence of an L¹-convergent sequence the superlevel sets converge in
measure at almost every level. Averaging the same identity over the levels shows that, if finitely
many functions are close in L¹ to a nonnegative function p, then some superlevel set of p has
small total boundary relative to its measure; for counting measure this produces Følner sets from
almost invariant finitely supported functions.
Thresholding a real function at a level t with δ ≤ t ≤ 1 - δ, where δ > 0,
approximates a set in measure with error at most its L¹ distance from the set's indicator
divided by δ.
It also expresses the integral of the positive part (g - f)⁺ as the integral, over all levels
s, of the measure of the set where f ≤ s < g: the one-sided form, which sees which of the two
functions lies above the level. Its extended version expresses the integral of the truncated
difference f - g of two ℝ≥0∞-valued functions through the differences of their strict
superlevel sets.
For 1 < p it writes the power |x - y| ^ p as a mixture of hinges: it is the
integral over the thresholds r > 0, with weight p (p - 1) r ^ (p - 2), of
(y - x - r)⁺ + (x - y - r)⁺. Integrated against a measure, this turns the p-th moment of a
difference into a mixture of one-sided integrals of the form above. The same mixture represents
d ^ p for every d : ℝ≥0∞, with truncated subtraction.
Finally, it records the signed layer-cake representation of a real number,
a = ∫ (1_{t < a} - 1_{t < 0}) dt, which applied pointwise to a real function u writes it as
the integral over all levels t of the indicators of its superlevel sets {u > t}, corrected by
1_{t < 0} so that the integrand is integrable.
The truncated power formula ∫ min(f, k) ^ p = p ∫_0^k m {f > t} t ^ (p - 1) dt is recorded
together with the measurability of the distribution function t ↦ m {f > t}. The truncation lets
a layer-cake argument work with finite quantities; monotone convergence removes it again, and the
truncated integrals ∫ g ^ q min(g, k) ^ δ increase to ∫ g ^ (q + δ) as k → ∞.
For positive real powers on a finite measure space, it also characterizes integrability by the
weighted strict tail μ.real {x | t < f x} * t ^ (p - 1), either on (0, ∞) or at infinity.
The weighted tail is measurable without any measurability assumption on f, and its contribution
from bounded thresholds is integrable. For measures on the nonnegative half-line, the integral
of the shifted tail is the extended integral of a truncated difference. A finite first moment
therefore makes every shifted tail integrable.
Main statements #
TauCeti.lintegral_mul_eq_lintegral_lintegral_measure_inter— the integral of a product of nonnegative functions, as a double integral of intersections of superlevel sets;TauCeti.lintegral_enorm_sub_eq_lintegral_measure_symmDiff— theL¹distance of two real functions, level by level;MeasureTheory.Measure.lintegral_enorm_sub_eq_lintegral_measure_symmDiff_setOf_lt— the same identity with strict superlevel sets;MeasureTheory.Measure.measure_symmDiff_setOf_lt_indicator_le— a uniform bound on the measure error of thresholding at levels separated from0and1, in terms of theL¹distance from a set's indicator;MeasureTheory.Measure.exists_pos_sum_measure_symmDiff_lt_mul_measure— a superlevel set ofpwhose total boundary relative to finitely manyL¹-close functions is small compared with its measure;MeasureTheory.Measure.exists_strictMono_ae_tendsto_measure_symmDiff_setOf_lt— along a subsequence of anL¹-convergent sequence, the superlevel sets converge in measure at almost every level;MeasureTheory.Measure.measurable_measure_ofReal_lt— the distribution functiont ↦ m {f > t}is measurable;MeasureTheory.Measure.lintegral_min_rpow_eq— the integral of a truncated powermin f k ^ p, level by level up to the capk;MeasureTheory.Measure.tendsto_lintegral_mul_min_rpow— the truncated integrals∫ g ^ q min(g, k) ^ δincrease to∫ g ^ (q + δ)ask → ∞;TauCeti.lintegral_ofReal_sub_eq_lintegral_measure— the integral of a positive part(g - f)⁺, level by level;TauCeti.lintegral_sub_eq_lintegral_measure_sdiff— the integral of a truncated differencef - gof extended functions, level by level;TauCeti.ofReal_rpow_eq_lintegral_mul_ofReal_sub,TauCeti.rpow_eq_lintegral_mul_subandTauCeti.edist_rpow_eq_lintegral— a real or extended powerd ^ p, and the power|x - y| ^ pof a distance, as mixtures of hinges.TauCeti.lintegral_ofReal_sub_sub_eqandTauCeti.lintegral_edist_rpow_eq— their integrated forms for a measure on pairs of real variables;TauCeti.integral_indicator_Iio_sub_indicator_Iio_zero— the signed layer-cake representationa = ∫ (1_{t < a} - 1_{t < 0}) dtof a real number, withTauCeti.integral_abs_indicator_Iio_sub_indicator_Iio_zerocomputing theL¹norm|a|of its integrand;TauCeti.integrable_rpow_iff_integrableOn_weighted_tailandTauCeti.integrable_rpow_iff_integrableAtFilter_weighted_tail— the weighted-tail integrability criteria for positive real-power moments.
Two-function layer cake. The integral of the product of two nonnegative functions is the double integral of the measures of the intersections of their strict superlevel sets:
∫⁻ x, f x * g x ∂m = ∫⁻ t > 0, ∫⁻ s > 0, m ({ofReal t < f} ∩ {ofReal s < g}).
The formula allows infinite values and requires no finiteness or σ-finiteness assumption on the measure.
The area between two graphs. The L¹ distance of two almost everywhere measurable real
functions is the integral, over the levels s, of the measure of the set where exactly one of the
two functions is at most s.
The layer cake formula for a truncation. For p > 0 and a cap k, the integral of
min f k ^ p is p times the integral of m {t < f} t ^ (p - 1) over the heights 0 < t < k.
The distribution function t ↦ m {f > t} is measurable, being antitone.
Removing a truncation. As k → ∞, the integrals of g ^ q min(g, k) ^ δ increase to the
integral of g ^ (q + δ).
Thresholding a real function at a level separated from 0 and 1 by δ > 0
approximates a set in measure, with error at most its L¹ distance from the indicator
divided by δ. The function need not take values in [0, 1].
The area between two graphs, through superlevel sets. The L¹ distance of two almost
everywhere measurable real functions is the integral, over the levels s, of the measure of the
set where exactly one of the two functions exceeds s.
The measure of the set where exactly one of two almost everywhere measurable real functions
exceeds the level s is a measurable function of s.
A superlevel set with small boundary. Let p be an almost everywhere measurable real
function and let q i, for i ∈ K, be finitely many functions whose total L¹ distance to p
is less than ε times the extended nonnegative integral of the positive part of p. Then at some
level t > 0 the superlevel set {p > t} has total boundary ∑ i ∈ K, m ({q i > t} ∆ {p > t})
less than ε times its measure.
Superlevel sets along an L¹-convergent sequence. If f n → g in L¹(m), then along a
subsequence the strict superlevel sets {f n > s} converge in measure to {g > s} at almost every
level s: m ({f (ns j) > s} ∆ {g > s}) → 0.
The positive part of a difference, level by level. For two almost everywhere measurable
real functions f and g, the integral of the positive part of g - f is the integral, over the
levels s, of the measure of the set where f ≤ s < g.
Truncated difference, level by level. For two almost everywhere measurable functions
f g : α → ℝ≥0∞, the integral of the truncated difference f - g is the integral, over the
levels s > 0, of the measure of the set where g ≤ ofReal s < f. Infinite values are allowed;
in particular ∞ - ∞ = 0 is matched by the empty level sets.
The expected hinge cost (y - x - r)⁺ is the integral, over the levels a, of the mass
given to the quadrant Iic a ×ˢ Ioi (a + r).
For a nonnegative threshold r, the two hinges of a pair of reals add up to the single hinge
(|x - y| - r)⁺ of their distance, since at most one of y - x - r and x - y - r is positive.
Powers are mixtures of hinges. For 1 < p and d ≥ 0,
d ^ p = ∫_{r > 0} p (p - 1) r ^ (p - 2) (d - r)⁺ dr.
Extended powers are mixtures of hinges. For 1 < p and d : ℝ≥0∞,
d ^ p = ∫_{r > 0} p (p - 1) r ^ (p - 2) (d - r) dr, with truncated subtraction.
The power of a distance as a mixture of hinges. For 1 < p, the power |x - y| ^ p is
the integral, over the thresholds r > 0 with weight p (p - 1) r ^ (p - 2), of the two hinges
(y - x - r)⁺ + (x - y - r)⁺.
The p-th moment of the distance between pairs of real variables, for 1 < p, is the
corresponding mixture of their two expected hinge costs.
The signed layer-cake representation of a real number #
The signed indicator t ↦ 1_{t < a} - 1_{t < 0} is Lebesgue integrable.
The L¹ norm of the signed indicator t ↦ 1_{t < a} - 1_{t < 0} is |a|:
∫ |1_{t < a} - 1_{t < 0}| dt = |a|. This is stated with |·|, the simp-normal form of the norm
on ℝ, so that simp also evaluates the ‖·‖ form of the integral.
Real-power moments and weighted tails #
The real-valued strict tail weighted by a real power is measurable in the threshold.
No measurability of f or finiteness of μ is required.
The layer-cake integrability test for positive real powers on a finite measure space. The function may be nonnegative only almost everywhere.
On a finite measure space, the tail weighted by t ^ (p - 1) is integrable over every
bounded interval (0, b] when 0 < p, without any measurability assumption on f.
On a finite measure space, only the behavior of the weighted tail at infinity matters for the existence of a positive real-power moment.
The integral of the shifted tail of a half-line measure is the extended integral of its truncated distance above the threshold. No finiteness or normalization is required.