Smoothing Lipschitz functions by repeated moving averages #
The moving average A_h φ (s) = h⁻¹ ∫₀ʰ φ(s + t) dt of a continuous φ : ℝ → ℝ is
differentiable with derivative D_h φ (s) = h⁻¹ (φ(s + h) - φ(s)), and A_h commutes with
D_h. Hence the m-fold moving average A_hᵐ φ is of class Cᵐ, with
(A_hᵐ φ)⁽ᵏ⁾ = A_hᵐ⁻ᵏ (D_hᵏ φ) for k ≤ m. If ψ is c-Lipschitz, then |D_h ψ| ≤ c, every
further difference quotient multiplies the sup norm by at most 2 / h, and A_h moves ψ by at
most c h. This gives Proposition 11.58 of O'Donnell, Proposition 11.58
for derivatives of order at most m: for every η > 0 there is a Cᵐ function ψ̃ with
|ψ̃ - ψ| ≤ c η and |ψ̃⁽ᵏ⁺¹⁾| ≤ (2m)ᵏ c / ηᵏ for k < m.
The book smooths with a Gaussian, ψ̃(s) = E[ψ(s + η g)] (its Exercise 11.38), which gives a
single C^∞ function. Here the smoothing variable is instead h (U₁ + ⋯ + Uₘ) for independent
Uᵢ uniform on [0, 1], a bounded-support smoothing (cf. its Exercise 11.40); it yields Cᵐ
rather than C^∞, which suffices for the applications (m = 3 for the invariance principle for
sums and Corollaries 11.59 and 11.61, m = 4 for Corollaries 11.68 and 11.70), and all constants
are explicit.
The same smoothing turns the step 1_{s ≤ u} into the Cᵐ function Real.stepSmoothing m u h,
the m-fold moving average of a ramp of width h: it is 1 on (-∞, u], 0 on
[u + (m + 1) h, ∞), takes values in [0, 1] and has |φ⁽ᵐ⁾| ≤ 2ᵐ⁻¹ / hᵐ
(cf. O'Donnell, Figure 11.2 and Exercise 11.41(b), whose smoothed step is
monotone, two-sided around u and C^∞). Unlike Mathlib's Real.smoothTransition and
Cslib.smoothSwitch, which are C^∞ but come without derivative bounds, it carries the explicit
bound on φ⁽ᵐ⁾ that the smoothing arguments need.
Main definitions #
Real.movingAverage: the moving averageh⁻¹ ∫₀ʰ φ(s + t) dt.Real.stepSmoothing: aCᵐsmoothing of the step1_{s ≤ u}.
Main results #
Real.hasDerivAt_movingAverage: the derivative of a moving average.Real.continuous_movingAverage: moving averages of continuous functions are continuous.Real.contDiff_iterate_movingAverage:A_hᵐ φis of classCᵐ.Real.movingAverage_mem_Icc,Real.iterate_movingAverage_mem_Icc:A_hᵐ φ (s)lies in[a, b]whenφdoes on[s, s + m h](m = 1for the first).Real.stepSmoothing_mem_Icc,Real.stepSmoothing_eq_one_of_le,Real.stepSmoothing_eq_zero_of_le,Real.contDiff_stepSmoothing,Real.abs_iteratedDeriv_stepSmoothing_le: the properties of the smoothed step.LipschitzWith.movingAverage: moving averages preservec-Lipschitz functions.LipschitzWith.abs_movingAverage_sub_le:|A_h ψ - ψ| ≤ c h.LipschitzWith.abs_iterate_movingAverage_sub_le:|A_hᵐ ψ - ψ| ≤ m c h.LipschitzWith.abs_iteratedDeriv_iterate_movingAverage_le:|(A_hᵐ ψ)⁽ᵏ⁺¹⁾| ≤ 2ᵏ c / hᵏfork < m.LipschitzWith.exists_contDiff_smoothing: a finite-order form of Proposition 11.58.
References #
The moving average of a continuous φ has derivative h⁻¹ (φ(s + h) - φ(s)).
The moving average of a continuous function is continuous.
The m-fold moving average of a continuous function is of class Cᵐ.
The m-fold moving average with window h > 0 at s lies in [a, b] when φ does on
[s, s + m h]: it averages φ over that window.
A moving average of a c-Lipschitz function is c-Lipschitz.
A moving average with window h > 0 moves a c-Lipschitz function by at most c h.
The derivatives of the m-fold moving average of a c-Lipschitz function with window
h > 0: |(A_hᵐ ψ)⁽ᵏ⁺¹⁾| ≤ 2ᵏ c / hᵏ for k < m.
A finite-order form of Proposition 11.58 O'Donnell, Proposition 11.58:
if ψ : ℝ → ℝ is c-Lipschitz, η > 0 and m : ℕ, there is a Cᵐ function ψ̃ with
|ψ̃ - ψ| ≤ c η and |ψ̃⁽ᵏ⁺¹⁾| ≤ (2m)ᵏ c / ηᵏ for every k < m. One may take the m-fold
moving average with window η / m. Unlike the book, which gives one C^∞ function ψ̃_η
serving every order k with a constant depending only on k, here both ψ̃ and the constant
(2m)ᵏ depend on the chosen order m.
Smoothed steps #
The smoothed step stepSmoothing m u h: the m-fold moving average, with window h, of
the ramp that falls linearly from 1 at u + m h to 0 at u + (m + 1) h. For h > 0 it is a
Cᵐ function with values in [0, 1], equal to 1 on (-∞, u] and to 0 on
[u + (m + 1) h, ∞), whose m-th derivative is at most 2ᵐ⁻¹ / hᵐ. This one-sided step is
the test of the Lévy-distance arguments (cf. O'Donnell, Exercise 11.41(b), whose
smoothed step is monotone, two-sided around u and C^∞). It exists beside Mathlib's
Real.smoothTransition and Cslib.smoothSwitch because it comes with the explicit bound on its
m-th derivative.
A smoothed step with window h > 0 is 1 on (-∞, u].
A smoothed step is of class Cᵐ.