# mathlib3documentation

analysis.calculus.bump_function_inner

# Infinitely smooth bump function #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

In this file we construct several infinitely smooth functions with properties that an analytic function cannot have:

noncomputable def exp_neg_inv_glue (x : ) :

exp_neg_inv_glue is the real function given by x ↦ exp (-1/x) for x > 0 and 0 for x ≤ 0. It is a basic building block to construct smooth partitions of unity. Its main property is that it vanishes for x ≤ 0, it is positive for x > 0, and the junction between the two behaviors is flat enough to retain smoothness. The fact that this function is C^∞ is proved in exp_neg_inv_glue.smooth.

Equations
noncomputable def exp_neg_inv_glue.P_aux  :

Our goal is to prove that exp_neg_inv_glue is C^∞. For this, we compute its successive derivatives for x > 0. The n-th derivative is of the form P_aux n (x) exp(-1/x) / x^(2 n), where P_aux n is computed inductively.

Equations
noncomputable def exp_neg_inv_glue.f_aux (n : ) (x : ) :

Formula for the n-th derivative of exp_neg_inv_glue, as an auxiliary function f_aux.

Equations

The 0-th auxiliary function f_aux 0 coincides with exp_neg_inv_glue, by definition.

theorem exp_neg_inv_glue.f_aux_deriv (n : ) (x : ) (hx : x 0) :
has_deriv_at (λ (x : ), / x ^ (2 * n)) (exp_neg_inv_glue.P_aux (n + 1)) * rexp (-x⁻¹) / x ^ (2 * (n + 1))) x

For positive values, the derivative of the n-th auxiliary function f_aux n (given in this statement in unfolded form) is the n+1-th auxiliary function, since the polynomial P_aux (n+1) was chosen precisely to ensure this.

theorem exp_neg_inv_glue.f_aux_deriv_pos (n : ) (x : ) (hx : 0 < x) :
(exp_neg_inv_glue.P_aux (n + 1)) * rexp (-x⁻¹) / x ^ (2 * (n + 1))) x

For positive values, the derivative of the n-th auxiliary function f_aux n is the n+1-th auxiliary function.

theorem exp_neg_inv_glue.f_aux_limit (n : ) :
filter.tendsto (λ (x : ), / x ^ (2 * n)) (set.Ioi 0)) (nhds 0)

To get differentiability at 0 of the auxiliary functions, we need to know that their limit is 0, to be able to apply general differentiability extension theorems. This limit is checked in this lemma.

Deduce from the limiting behavior at 0 of its derivative and general differentiability extension theorems that the auxiliary function f_aux n is differentiable at 0, with derivative 0.

At every point, the auxiliary function f_aux n has a derivative which is equal to f_aux (n+1).

The successive derivatives of the auxiliary function f_aux 0 are the functions f_aux n, by induction.

@[protected]

The function exp_neg_inv_glue is smooth.

theorem exp_neg_inv_glue.zero_of_nonpos {x : } (hx : x 0) :

The function exp_neg_inv_glue vanishes on (-∞, 0].

theorem exp_neg_inv_glue.pos_of_pos {x : } (hx : 0 < x) :

The function exp_neg_inv_glue is positive on (0, +∞).

theorem exp_neg_inv_glue.nonneg (x : ) :

The function exp_neg_inv_glue` is nonnegative.

noncomputable def real.smooth_transition (x : ) :

An infinitely smooth function f : ℝ → ℝ such that f x = 0 for x ≤ 0, f x = 1 for 1 ≤ x, and 0 < f x < 1 for 0 < x < 1.

Equations
theorem real.smooth_transition.one_of_one_le {x : } (h : 1 x) :
@[protected, simp]
@[protected, simp]
@[protected, simp]

Since real.smooth_transition is constant on $(-∞, 0]$ and $[1, ∞)$, applying it to the projection of x : ℝ to $[0, 1]$ gives the same result as applying it to x.

theorem real.smooth_transition.pos_of_pos {x : } (h : 0 < x) :
@[protected]
@[protected]
@[protected]
@[protected]
structure cont_diff_bump {E : Type u_1} (c : E) :
• r :
• R :
• r_pos : 0 < self.r
• r_lt_R : self.r < self.R

f : cont_diff_bump c, where c is a point in a normed vector space, is a bundled smooth function such that

The structure cont_diff_bump contains the data required to construct the function: real numbers r, R, and proofs of 0 < r < R. The function itself is available through coe_fn when the space is nice enough, i.e., satisfies the has_cont_diff_bump typeclass.

Instances for cont_diff_bump
@[nolint]
structure cont_diff_bump_base (E : Type u_3) [ E] :
Type u_3

The base function from which one will construct a family of bump functions. One could add more properties if they are useful and satisfied in the examples of inner product spaces and finite dimensional vector spaces, notably derivative norm control in terms of R - 1.

Instances for cont_diff_bump_base
• cont_diff_bump_base.has_sizeof_inst
@[class]
structure has_cont_diff_bump (E : Type u_3) [ E] :
Prop
• out :

A class registering that a real vector space admits bump functions. This will be instantiated first for inner product spaces, and then for finite-dimensional normed spaces. We use a specific class instead of nonempty (cont_diff_bump_base E) for performance reasons.

Instances of this typeclass
noncomputable def some_cont_diff_bump_base (E : Type u_1) [ E] [hb : has_cont_diff_bump E] :

In a space with C^∞ bump functions, register some function that will be used as a basis to construct bump functions of arbitrary size around any point.

Equations
@[protected, instance]

Any inner product space has smooth bump functions.

theorem cont_diff_bump.R_pos {E : Type u_1} {c : E} (f : cont_diff_bump c) :
0 < f.R
theorem cont_diff_bump.one_lt_R_div_r {E : Type u_1} {c : E} (f : cont_diff_bump c) :
1 < f.R / f.r
@[protected, instance]
def cont_diff_bump.inhabited {E : Type u_1} (c : E) :
Equations
• = {default := {r := 1, R := 2, r_pos := cont_diff_bump.inhabited._proof_1, r_lt_R := cont_diff_bump.inhabited._proof_2}}
noncomputable def cont_diff_bump.to_fun {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) :

The function defined by f : cont_diff_bump c. Use automatic coercion to function instead.

Equations
@[protected, instance]
noncomputable def cont_diff_bump.has_coe_to_fun {E : Type u_1} [ E] {c : E} :
(λ (_x : , E )
Equations
@[protected]
theorem cont_diff_bump.def {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) (x : E) :
f x = (f.R / f.r) ((f.r)⁻¹ (x - c))
@[protected]
theorem cont_diff_bump.sub {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) (x : E) :
f (c - x) = f (c + x)
@[protected]
theorem cont_diff_bump.neg {E : Type u_1} [ E] (f : cont_diff_bump 0) (x : E) :
f (-x) = f x
theorem cont_diff_bump.one_of_mem_closed_ball {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} (hx : x ) :
f x = 1
theorem cont_diff_bump.nonneg {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} :
0 f x
theorem cont_diff_bump.nonneg' {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) (x : E) :
0 f x

A version of cont_diff_bump.nonneg with x explicit

theorem cont_diff_bump.le_one {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} :
f x 1
theorem cont_diff_bump.pos_of_mem_ball {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} (hx : x f.R) :
0 < f x
theorem cont_diff_bump.zero_of_le_dist {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} (hx : f.R ) :
f x = 0
theorem cont_diff_bump.support_eq {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) :
theorem cont_diff_bump.tsupport_eq {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) :
@[protected]
theorem cont_diff_bump.has_compact_support {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c)  :
theorem cont_diff_bump.eventually_eq_one_of_mem_ball {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} (h : x f.r) :
theorem cont_diff_bump.eventually_eq_one {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) :
@[protected]
theorem cont_diff_at.cont_diff_bump {E : Type u_1} {X : Type u_2} [ E] [ X] {n : ℕ∞} {c g : X E} {f : Π (x : X), cont_diff_bump (c x)} {x : X} (hc : c x) (hr : (λ (x : X), (f x).r) x) (hR : (λ (x : X), (f x).R) x) (hg : g x) :
(λ (x : X), (f x) (g x)) x

cont_diff_bump is 𝒞ⁿ in all its arguments.

theorem cont_diff.cont_diff_bump {E : Type u_1} {X : Type u_2} [ E] [ X] {n : ℕ∞} {c g : X E} {f : Π (x : X), cont_diff_bump (c x)} (hc : c) (hr : (λ (x : X), (f x).r)) (hR : (λ (x : X), (f x).R)) (hg : g) :
(λ (x : X), (f x) (g x))
@[protected]
theorem cont_diff_bump.cont_diff {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {n : ℕ∞} :
f
@[protected]
theorem cont_diff_bump.cont_diff_at {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} {n : ℕ∞} :
f x
@[protected]
theorem cont_diff_bump.cont_diff_within_at {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {x : E} {n : ℕ∞} {s : set E} :
s x
@[protected]
theorem cont_diff_bump.continuous {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) :
@[protected]
noncomputable def cont_diff_bump.normed {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) (μ : measure_theory.measure E) :

A bump function normed so that ∫ x, f.normed μ x ∂μ = 1.

Equations
theorem cont_diff_bump.normed_def {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} (x : E) :
f.normed μ x = f x / (x : E), f x μ
theorem cont_diff_bump.nonneg_normed {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} (x : E) :
0 f.normed μ x
theorem cont_diff_bump.cont_diff_normed {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} {n : ℕ∞} :
(f.normed μ)
theorem cont_diff_bump.continuous_normed {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} :
theorem cont_diff_bump.normed_sub {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} (x : E) :
f.normed μ (c - x) = f.normed μ (c + x)
theorem cont_diff_bump.normed_neg {E : Type u_1} [ E] {μ : measure_theory.measure E} (f : cont_diff_bump 0) (x : E) :
f.normed μ (-x) = f.normed μ x
@[protected]
theorem cont_diff_bump.integrable {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} [borel_space E]  :
@[protected]
theorem cont_diff_bump.integrable_normed {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} [borel_space E]  :
μ
theorem cont_diff_bump.integral_pos {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} [borel_space E]  :
0 < (x : E), f x μ
theorem cont_diff_bump.integral_normed {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} [borel_space E]  :
(x : E), f.normed μ x μ = 1
theorem cont_diff_bump.support_normed_eq {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} [borel_space E]  :
theorem cont_diff_bump.tsupport_normed_eq {E : Type u_1} [ E] {c : E} (f : cont_diff_bump c) {μ : measure_theory.measure E} [borel_space E]  :
tsupport (f.normed μ) =
theorem cont_diff_bump.tendsto_support_normed_small_sets {E : Type u_1} [ E] {c : E} {μ : measure_theory.measure E} [borel_space E] {ι : Type u_2} {φ : ι } {l : filter ι} (hφ : filter.tendsto (λ (i : ι), (φ i).R) l (nhds 0)) :
filter.tendsto (λ (i : ι), function.support (λ (x : E), (φ i).normed μ x)) l (nhds c).small_sets
theorem cont_diff_bump.integral_normed_smul {E : Type u_1} {X : Type u_2} [ E] [ X] {c : E} (f : cont_diff_bump c) (μ : measure_theory.measure E) [borel_space E] (z : X) :
(x : E), f.normed μ x z μ = z