The smooth transition function and cutoffs near zero #
Mathlib's Analysis/SpecialFunctions/SmoothTransition.lean proves that
Real.smoothTransition is smooth and equals one on [1, ∞), but states no derivative values.
This file records that its derivative vanishes on the open rays (-∞, 0) and (1, ∞), where the
function is locally constant, so that the derivative is compactly supported. Being continuous, it
is then bounded, which bounds the gradients of cutoffs built from Real.smoothTransition. It is
also integrable with integral one, so its rescalings t ↦ c ψ'(c (a - t)) are approximate
identities; together with the chain rule and local Lipschitz continuity of ψ (c (u - t)), this
is what is needed to smooth the indicator of a superlevel set {u > t}. The one-sided rescalings
y ↦ c ψ'(c (y - a)), supported in [a, a + c⁻¹], converge at every Lebesgue point: if the mean
oscillation of u about v on closedBall a r tends to zero, then
∫ c ψ'(c (y - a)) u y dy → v as c → ∞. Pairing a function with the derivative of a smooth
step ψ (c (y - a)) therefore recovers its Lebesgue value at a.
It also uses the smooth transition to cut a function off near zero. For m > 0 and a function
g : ℝ → ℝ, TauCeti.positiveCutoff m g is the product of g with a smooth transition from 0
to 1 on [m/4, m/2]. It vanishes for t ≤ m/4 and agrees with g for t ≥ m/2, so it is a
globally defined replacement for a function such as t ↦ 1/t or Real.log that is only well
behaved on (0, ∞). If g is C¹ on (0, ∞) then the cutoff is C¹ on ℝ, and if g' is
bounded on [m, ∞) then the derivative of the cutoff is bounded on ℝ; these are the hypotheses
of chain rules for Sobolev functions. Finally, rescaling the smooth transition gives a smooth
nonincreasing step from any value v ≥ 0 down to 0 across an interval [a, b]. A smooth
plateau, built from two smooth transitions, is equal to 1 on [a + δ, b - δ] and vanishes outside
(a, b); integrating it gives such a step with slope at most τ whenever
v < τ (b - a), which is the best possible bound, since the mean slope of the step is
v / (b - a).
Main declarations #
expNegInvGlue.lt_one:expNegInvGlue x < 1.expNegInvGlue.hasDerivAt: the derivative ofexpNegInvGlueatxisx⁻² expNegInvGlue x.Real.smoothTransition.abs_le_one:|Real.smoothTransition x| ≤ 1.Real.smoothTransition.deriv_of_neg:deriv Real.smoothTransition x = 0forx < 0.Real.smoothTransition.deriv_of_one_lt:deriv Real.smoothTransition x = 0for1 < x.Real.smoothTransition.hasCompactSupport_deriv: the derivative is compactly supported.Real.smoothTransition.deriv_deriv_of_neg: the second derivative vanishes on the negative half-line.Real.smoothTransition.exists_forall_norm_deriv_leandReal.smoothTransition.exists_forall_norm_deriv_deriv_le: the first two derivatives are bounded.Real.smoothTransition.abs_deriv_mul_mul_le:|ψ'(a t) (a y)| ≤ M CwhenMboundsψ',a ≥ 0and|y| ≤ C |t|.Real.smoothTransition.integral_deriv: the derivative has integral one.Real.smoothTransition.setIntegral_Icc_deriv,Real.smoothTransition.setIntegral_deriv_le_one: its integral over an interval containing[0, 1]is one, and over any set at most one.Real.smoothTransition.lintegral_ofReal_mul_deriv:∫_ℝ c ψ'(c (a - t)) dt = 1forc > 0.Real.smoothTransition.integral_mul_deriv_mul_sub:∫_ℝ c ψ'(c (y - a)) dy = 1forc > 0.Real.smoothTransition.integral_deriv_mul_sub:∫_ℝ ψ'(c y - a) dy = |c|⁻¹.Real.smoothTransition.lintegral_ofReal_deriv_mul_subandReal.smoothTransition.lintegral_ofReal_deriv_sub_mul:∫⁻_ℝ ψ'(± (c y - a)) dy = |c|⁻¹.Real.smoothTransition.tendsto_integral_deriv_mul_sub_mul:∫_ℝ ψ'(c y - T) a y dytends to|c|⁻¹ a₀asT → ∞whena (c⁻¹ σ) → a₀asσ → ∞.Real.smoothTransition.integrable_mul_deriv_mul_sub_smul: its product with a function integrable onclosedBall a c⁻¹is integrable.Real.smoothTransition.tendsto_integral_mul_deriv_mul_sub_smul: at a Lebesgue pointaofuwith valuev,∫ c ψ'(c (y - a)) u y dy → vasc → ∞.HasFDerivAt.smoothTransitionandHasDerivAt.smoothTransition: the chain rule forψ ∘ f.LocallyLipschitzOn.smoothTransition_mul_sub:ψ (c (u - t))is locally Lipschitz onswhenuis.TauCeti.positiveCutoff: the cutoff ofgnear zero.TauCeti.contDiff_positiveCutoff: the cutoff of a function that isC¹on(0, ∞)isC¹.TauCeti.exists_nnnorm_deriv_positiveCutoff_le: its derivative is bounded wheng'is bounded on[m, ∞).TauCeti.exists_contDiff_antitone_cutoff: a smooth nonincreasing step from a valuev ≥ 0on(-∞, a]down to0on[b, ∞), positive on(-∞, b)whenv > 0.TauCeti.exists_contDiff_plateau: a smooth function with values in[0, 1], vanishing outside(a, b)and equal to1on[a + δ, b - δ].TauCeti.exists_contDiff_antitone_cutoff_abs_deriv_le: such a step whose slope is at mostτ, for everyv < τ (b - a).
The function expNegInvGlue is less than 1 everywhere.
The derivative of expNegInvGlue at x is x⁻² expNegInvGlue x, also for x ≤ 0, where
both sides vanish.
The smooth transition function takes values of absolute value at most one.
The smooth transition function has derivative zero to the left of 0, where it is
identically zero.
The smooth transition function has derivative zero to the right of 1, where it is
identically one.
The derivative of the smooth transition function is supported in [0, 1].
The second derivative of the smooth transition function is zero to the left of 0.
The derivative of the smooth transition function is bounded.
The second derivative of the smooth transition function is bounded.
A bound for the error term of a smooth transition rescaled by a ≥ 0: if M bounds the
derivative of the smooth transition function ψ and |y| ≤ C |t|, then
|ψ'(a t) (a y)| ≤ M C. The factor a y only matters where 0 ≤ a t ≤ 1, the support of
ψ', and there |a y| ≤ C |a t| ≤ C.
The derivative of the smooth transition function is integrable.
The derivative of the smooth transition function has integral one, the total increase of the
function from 0 to 1.
The rescaled derivatives t ↦ c ψ'(c (a - t)) of the smooth transition function ψ
integrate to one: ∫_ℝ c ψ'(c (a - t)) dt = 1 for c > 0.
The rescaled derivative s ↦ ψ'(c s - a) of the smooth transition function ψ has integral
|c|⁻¹ for c ≠ 0, the total increase of ψ divided by the speed |c| at which it is traversed.
The derivative of the smooth transition function ψ, evaluated at the affine argument
a - c y with c ≠ 0, has lower Lebesgue integral |c|⁻¹: ∫⁻_ℝ ψ'(a - c y) dy = |c|⁻¹.
Averaging a function a against the derivative ψ'(c y - T) of the smooth transition
function ψ, for c ≠ 0, recovers |c|⁻¹ times its limit a₀ along the direction of c as
T → ∞: the weight has integral |c|⁻¹ and is supported where c y ≥ T.
The rescaled derivative y ↦ ψ'(c (y - a)) of the smooth transition function ψ vanishes
outside closedBall a c⁻¹; it is supported in [a, a + c⁻¹].
The product of the rescaled derivative y ↦ c ψ'(c (y - a)) of the smooth transition
function ψ with a function integrable on closedBall a c⁻¹ is integrable.
The rescaled derivatives of the smooth transition function are an approximate identity at
Lebesgue points. If u is integrable near a and its mean oscillation about v on
closedBall a r tends to zero as r → 0, then ∫ c ψ'(c (y - a)) u y dy → v as c → ∞.
The pointwise limit of d + ψ ((n + 1) t) e + ψ' ((n + 1) t) ((n + 1) k) for the smooth
transition ψ: the sequence tends to d for t ≤ 0 and to d + e for 0 < t. At t = 0 the
last term vanishes because ψ' 0 = 0, whatever k is.
x + (1 - smoothTransition x) is at least x.
x + (1 - smoothTransition x) is nonzero for x ≥ 0.
The chain rule for the smooth transition function ψ: if f has derivative f' at x,
then ψ ∘ f has derivative ψ'(f x) • f' there.
The chain rule for the smooth transition function ψ in one variable: if f has derivative
f' at x, then ψ ∘ f has derivative ψ'(f x) * f' there.
If u is locally Lipschitz on s, then so is ψ (c (u - t)) for the smooth transition
function ψ.
The function t ↦ s((4t - m)/m) g(t), where s is Real.smoothTransition. For m > 0 it
vanishes for t ≤ m/4 and agrees with g for t ≥ m/2, so it is a globally defined replacement
for a function g that is only well behaved on (0, ∞).
Instances For
The cutoff of a function that is C¹ on (0, ∞) is C¹ on the whole line.
A smooth nonincreasing step down from a value v ≥ 0 to 0: for a < b there is a smooth
antitone function μ ≥ 0 equal to v on (-∞, a] and to 0 on [b, ∞). When v > 0 it is
positive on (-∞, b), so b is exactly where it reaches 0.
A smooth plateau on [a, b]: for δ > 0 there is a smooth function with values in
[0, 1], vanishing outside (a, b) and equal to 1 on [a + δ, b - δ]. Its integral over
[a, b] is therefore at least b - a - 2δ.
A smooth nonincreasing step down from v ≥ 0 to 0 across [a, b] with slope at most
τ: if v < τ (b - a), there is a smooth antitone function μ ≥ 0 equal to v on (-∞, a]
and to 0 on [b, ∞), with |μ'| ≤ τ everywhere and μ' = 0 outside (a, b).