The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V17. Differential calculus in normed spaces

Mathlib.Analysis.Calculus.BumpFunction.Basic

51 declarations. Mathlib docs · Source

Infinitely smooth "bump" functions

A smooth bump function is an infinitely smooth function f : E → ℝ supported on a ball that is equal to 1 on a ball of smaller radius.

These functions have many uses in real analysis. E.g.,

  • they can be used to construct a smooth partition of unity which is a very useful tool;
  • they can be used to approximate a continuous function by infinitely smooth functions.

There are two classes of spaces where bump functions are guaranteed to exist: inner product spaces and finite-dimensional spaces.

In this file we define a typeclass HasContDiffBump saying that a normed space has a family of smooth bump functions with certain properties.

We also define a structure ContDiffBump that holds the center and radii of the balls from above. An element f : ContDiffBump c can be coerced to a function which is an infinitely smooth function such that

  • f is equal to 1 in Metric.closedBall c f.rIn;
  • support f = Metric.ball c f.rOut;
  • 0 ≤ f x ≤ 1 for all x.

Main Definitions

  • ContDiffBump (c : E): a structure holding data needed to construct an infinitely smooth bump function.
  • ContDiffBumpBase (E : Type*): a family of infinitely smooth bump functions that can be used to construct coercion of a ContDiffBump (c : E) to a function.
  • HasContDiffBump (E : Type*): a typeclass saying that E has a ContDiffBumpBase. Two instances of this typeclass (for inner product spaces and for finite-dimensional spaces) are provided elsewhere.

Tags

smooth function, smooth bump function

def ContDiffBump.ctorIdx E1 #

{E : Type u_1} → {c : E} → ContDiffBump c → ℕ

theorem ContDiffBumpBase.mk.injEq E0 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] (toFun : ℝ → E → ℝ)
  (mem_Icc : ∀ (R : ℝ) (x : E), toFun R x ∈ Set.Icc 0 1) (symmetric : ∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x)
  (smooth : ContDiffOn ℝ (↑⊤) (Function.uncurry toFun) (Set.Ioi 1 ×ˢ Set.univ))
  (eq_one : ∀ (R : ℝ), 1 < R → ∀ (x : E), ‖x‖ ≤ 1 → toFun R x = 1)
  (support : ∀ (R : ℝ), 1 < R → Function.support (toFun R) = Metric.ball 0 R) (toFun_1 : ℝ → E → ℝ)
  (mem_Icc_1 : ∀ (R : ℝ) (x : E), toFun_1 R x ∈ Set.Icc 0 1)
  (symmetric_1 : ∀ (R : ℝ) (x : E), toFun_1 R (-x) = toFun_1 R x)
  (smooth_1 : ContDiffOn ℝ (↑⊤) (Function.uncurry toFun_1) (Set.Ioi 1 ×ˢ Set.univ))
  (eq_one_1 : ∀ (R : ℝ), 1 < R → ∀ (x : E), ‖x‖ ≤ 1 → toFun_1 R x = 1)
  (support_1 : ∀ (R : ℝ), 1 < R → Function.support (toFun_1 R) = Metric.ball 0 R),
  ({ toFun := toFun, mem_Icc := mem_Icc, symmetric := symmetric, smooth := smooth, eq_one := eq_one,
        support := support } =
      { toFun := toFun_1, mem_Icc := mem_Icc_1, symmetric := symmetric_1, smooth := smooth_1, eq_one := eq_one_1,
        support := support_1 }) =
    (toFun = toFun_1)

theorem ContDiffBump.mk.injEq E0 #

∀ {E : Type u_1} {c : E} (rIn rOut : ℝ) (rIn_pos : 0 < rIn) (rIn_lt_rOut : rIn < rOut) (rIn_1 rOut_1 : ℝ)
  (rIn_pos_1 : 0 < rIn_1) (rIn_lt_rOut_1 : rIn_1 < rOut_1),
  ({ rIn := rIn, rOut := rOut, rIn_pos := rIn_pos, rIn_lt_rOut := rIn_lt_rOut } =
      { rIn := rIn_1, rOut := rOut_1, rIn_pos := rIn_pos_1, rIn_lt_rOut := rIn_lt_rOut_1 }) =
    (rIn = rIn_1 ∧ rOut = rOut_1)

def ContDiffBumpBase.ctorIdx E1 #

{E : Type u_3} → {inst : NormedAddCommGroup E} → {inst_1 : NormedSpace ℝ E} → ContDiffBumpBase E → ℕ

theorem ContDiffBump.mk.inj E1 #

∀ {E : Type u_1} {c : E} {rIn rOut : ℝ} {rIn_pos : 0 < rIn} {rIn_lt_rOut : rIn < rOut} {rIn_1 rOut_1 : ℝ}
  {rIn_pos_1 : 0 < rIn_1} {rIn_lt_rOut_1 : rIn_1 < rOut_1},
  { rIn := rIn, rOut := rOut, rIn_pos := rIn_pos, rIn_lt_rOut := rIn_lt_rOut } =
      { rIn := rIn_1, rOut := rOut_1, rIn_pos := rIn_pos_1, rIn_lt_rOut := rIn_lt_rOut_1 } →
    rIn = rIn_1 ∧ rOut = rOut_1

theorem someContDiffBumpBase.congr_simp E1 #

∀ (E : Type u_3) [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [hb : HasContDiffBump E],
  someContDiffBumpBase E = someContDiffBumpBase E

theorem ContDiffBumpBase.mk.inj E1 #

∀ {E : Type u_3} {inst : NormedAddCommGroup E} {inst_1 : NormedSpace ℝ E} {toFun : ℝ → E → ℝ}
  {mem_Icc : ∀ (R : ℝ) (x : E), toFun R x ∈ Set.Icc 0 1} {symmetric : ∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x}
  {smooth : ContDiffOn ℝ (↑⊤) (Function.uncurry toFun) (Set.Ioi 1 ×ˢ Set.univ)}
  {eq_one : ∀ (R : ℝ), 1 < R → ∀ (x : E), ‖x‖ ≤ 1 → toFun R x = 1}
  {support : ∀ (R : ℝ), 1 < R → Function.support (toFun R) = Metric.ball 0 R} {toFun_1 : ℝ → E → ℝ}
  {mem_Icc_1 : ∀ (R : ℝ) (x : E), toFun_1 R x ∈ Set.Icc 0 1}
  {symmetric_1 : ∀ (R : ℝ) (x : E), toFun_1 R (-x) = toFun_1 R x}
  {smooth_1 : ContDiffOn ℝ (↑⊤) (Function.uncurry toFun_1) (Set.Ioi 1 ×ˢ Set.univ)}
  {eq_one_1 : ∀ (R : ℝ), 1 < R → ∀ (x : E), ‖x‖ ≤ 1 → toFun_1 R x = 1}
  {support_1 : ∀ (R : ℝ), 1 < R → Function.support (toFun_1 R) = Metric.ball 0 R},
  { toFun := toFun, mem_Icc := mem_Icc, symmetric := symmetric, smooth := smooth, eq_one := eq_one,
        support := support } =
      { toFun := toFun_1, mem_Icc := mem_Icc_1, symmetric := symmetric_1, smooth := smooth_1, eq_one := eq_one_1,
        support := support_1 } →
    toFun = toFun_1

theorem ContDiffBump.toFun.congr_simp E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f f_1 : ContDiffBump c), f = f_1 → ∀ (a a_1 : E), a = a_1 → ↑f a = ↑f_1 a_1

structure ContDiffBump E1 #

{E : Type u_1} → E → Type

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

  • f is equal to 1 in Metric.closedBall c f.rIn;
  • support f = Metric.ball c f.rOut;
  • 0 ≤ f x ≤ 1 for all x.

The structure ContDiffBump contains the data required to construct the function: real numbers rIn, rOut, and proofs of 0 < rIn < rOut. The function itself is available through CoeFun when the space is nice enough, i.e., satisfies the HasContDiffBump typeclass.

ctor ContDiffBump.mk E0 #

{E : Type u_1} → {c : E} → (rIn rOut : ℝ) → 0 < rIn → rIn < rOut → ContDiffBump c

abbrev ContDiffBump.rOut E1 #

{E : Type u_1} → {c : E} → ContDiffBump c → ℝ

real numbers 0 < rIn < rOut

abbrev ContDiffBump.rIn E1 #

{E : Type u_1} → {c : E} → ContDiffBump c → ℝ

real numbers 0 < rIn < rOut

theorem ContDiffBump.rIn_pos E1 #

∀ {E : Type u_1} {c : E} (self : ContDiffBump c), 0 < self.rIn

theorem ContDiffBump.rIn_lt_rOut E1 #

∀ {E : Type u_1} {c : E} (self : ContDiffBump c), self.rIn < self.rOut

structure ContDiffBumpBase E3 #

(E : Type u_3) → [inst : NormedAddCommGroup E] → [NormedSpace ℝ 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.

TODO: do we ever need f x = 1 ↔ ‖x‖ ≤ 1?

ctor ContDiffBumpBase.mk E0 #

{E : Type u_3} →
  [inst : NormedAddCommGroup E] →
    [inst_1 : NormedSpace ℝ E] →
      (toFun : ℝ → E → ℝ) →
        (∀ (R : ℝ) (x : E), toFun R x ∈ Set.Icc 0 1) →
          (∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x) →
            ContDiffOn ℝ (↑⊤) (Function.uncurry toFun) (Set.Ioi 1 ×ˢ Set.univ) →
              (∀ (R : ℝ), 1 < R → ∀ (x : E), ‖x‖ ≤ 1 → toFun R x = 1) →
                (∀ (R : ℝ), 1 < R → Function.support (toFun R) = Metric.ball 0 R) → ContDiffBumpBase E

abbrev ContDiffBumpBase.toFun E1 #

{E : Type u_3} → [inst : NormedAddCommGroup E] → [inst_1 : NormedSpace ℝ E] → ContDiffBumpBase E → ℝ → E → ℝ

The function underlying this family of bump functions

theorem ContDiffBumpBase.mem_Icc E0 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] (self : ContDiffBumpBase E) (R : ℝ) (x : E),
  self.toFun R x ∈ Set.Icc 0 1

theorem ContDiffBumpBase.symmetric E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] (self : ContDiffBumpBase E) (R : ℝ) (x : E),
  self.toFun R (-x) = self.toFun R x

theorem ContDiffBumpBase.smooth E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] (self : ContDiffBumpBase E),
  ContDiffOn ℝ (↑⊤) (Function.uncurry self.toFun) (Set.Ioi 1 ×ˢ Set.univ)

theorem ContDiffBumpBase.support E1 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] (self : ContDiffBumpBase E) (R : ℝ),
  1 < R → Function.support (self.toFun R) = Metric.ball 0 R

class HasContDiffBump E1 #

(E : Type u_3) → [inst : NormedAddCommGroup E] → [NormedSpace ℝ E] → Prop

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 (ContDiffBumpBase E) for performance reasons.

ctor HasContDiffBump.mk E0 #

∀ {E : Type u_3} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E],
  Nonempty (ContDiffBumpBase E) → HasContDiffBump E

theorem HasContDiffBump.out E1 #

∀ {E : Type u_3} {inst : NormedAddCommGroup E} {inst_1 : NormedSpace ℝ E} [self : HasContDiffBump E],
  Nonempty (ContDiffBumpBase E)

def someContDiffBumpBase E1 #

(E : Type u_3) →
  [inst : NormedAddCommGroup E] → [inst_1 : NormedSpace ℝ E] → [hb : HasContDiffBump E] → ContDiffBumpBase 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.

theorem ContDiffBump.rOut_pos E1 #

∀ {E : Type u_1} {c : E} (f : ContDiffBump c), 0 < f.rOut

theorem ContDiffBump.one_lt_rOut_div_rIn E1 #

∀ {E : Type u_1} {c : E} (f : ContDiffBump c), 1 < f.rOut / f.rIn

instance ContDiffBump.instInhabited E0 #

{E : Type u_1} → (c : E) → Inhabited (ContDiffBump c)

def ContDiffBump.toFun E1 #

{E : Type u_1} →
  [inst : NormedAddCommGroup E] → [inst_1 : NormedSpace ℝ E] → [HasContDiffBump E] → {c : E} → ContDiffBump c → E → ℝ

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

instance ContDiffBump.instCoeFunForallReal E0 #

{E : Type u_1} →
  [inst : NormedAddCommGroup E] →
    [inst_1 : NormedSpace ℝ E] → [HasContDiffBump E] → {c : E} → CoeFun (ContDiffBump c) fun x ↦ E → ℝ

theorem ContDiffBump.apply E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) (x : E), ↑f x = (someContDiffBumpBase E).toFun (f.rOut / f.rIn) (f.rIn⁻¹ • (x - c))

theorem ContDiffBump.sub E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) (x : E), ↑f (c - x) = ↑f (c + x)

theorem ContDiffBump.neg E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E]
  (f : ContDiffBump 0) (x : E), ↑f (-x) = ↑f x

theorem ContDiffBump.one_of_mem_closedBall E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E}, x ∈ Metric.closedBall c f.rIn → ↑f x = 1

theorem ContDiffBump.nonneg E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E}, 0 ≤ ↑f x

theorem ContDiffBump.nonneg' E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) (x : E), 0 ≤ ↑f x

A version of ContDiffBump.nonneg with x explicit

theorem ContDiffBump.le_one E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E}, ↑f x ≤ 1

theorem ContDiffBump.support_eq E0 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c), Function.support ↑f = Metric.ball c f.rOut

theorem ContDiffBump.tsupport_eq E0 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c), tsupport ↑f = Metric.closedBall c f.rOut

theorem ContDiffBump.pos_of_mem_ball E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E}, x ∈ Metric.ball c f.rOut → 0 < ↑f x

theorem ContDiffBump.zero_of_le_dist E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E}, f.rOut ≤ dist x c → ↑f x = 0

theorem ContDiffBump.hasCompactSupport E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) [FiniteDimensional ℝ E], HasCompactSupport ↑f

theorem ContDiffBump.eventuallyEq_one_of_mem_ball E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E}, x ∈ Metric.ball c f.rIn → ↑f =ᶠ[nhds x] 1

theorem ContDiffBump.eventuallyEq_one E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c), ↑f =ᶠ[nhds c] 1

theorem ContDiffWithinAt.contDiffBump E1 #

∀ {E : Type u_1} {X : Type u_2} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : NormedAddCommGroup X]
  [inst_3 : NormedSpace ℝ X] [inst_4 : HasContDiffBump E] {n : ℕ∞} {c g : X → E} {s : Set X}
  {f : (x : X) → ContDiffBump (c x)} {x : X},
  ContDiffWithinAt ℝ (↑n) c s x →
    ContDiffWithinAt ℝ (↑n) (fun x ↦ (f x).rIn) s x →
      ContDiffWithinAt ℝ (↑n) (fun x ↦ (f x).rOut) s x →
        ContDiffWithinAt ℝ (↑n) g s x → ContDiffWithinAt ℝ (↑n) (fun x ↦ ↑(f x) (g x)) s x

ContDiffBump is 𝒞ⁿ in all its arguments.

theorem ContDiffAt.contDiffBump E1 #

∀ {E : Type u_1} {X : Type u_2} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : NormedAddCommGroup X]
  [inst_3 : NormedSpace ℝ X] [inst_4 : HasContDiffBump E] {n : ℕ∞} {c g : X → E} {f : (x : X) → ContDiffBump (c x)}
  {x : X},
  ContDiffAt ℝ (↑n) c x →
    ContDiffAt ℝ (↑n) (fun x ↦ (f x).rIn) x →
      ContDiffAt ℝ (↑n) (fun x ↦ (f x).rOut) x → ContDiffAt ℝ (↑n) g x → ContDiffAt ℝ (↑n) (fun x ↦ ↑(f x) (g x)) x

ContDiffBump is 𝒞ⁿ in all its arguments.

theorem ContDiff.contDiffBump E1 #

∀ {E : Type u_1} {X : Type u_2} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : NormedAddCommGroup X]
  [inst_3 : NormedSpace ℝ X] [inst_4 : HasContDiffBump E] {n : ℕ∞} {c g : X → E} {f : (x : X) → ContDiffBump (c x)},
  ContDiff ℝ (↑n) c →
    (ContDiff ℝ ↑n fun x ↦ (f x).rIn) →
      (ContDiff ℝ ↑n fun x ↦ (f x).rOut) → ContDiff ℝ (↑n) g → ContDiff ℝ ↑n fun x ↦ ↑(f x) (g x)

theorem ContDiffBump.contDiff E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {n : ℕ∞}, ContDiff ℝ ↑n ↑f

theorem ContDiffBump.contDiffAt E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E} {n : ℕ∞}, ContDiffAt ℝ (↑n) (↑f) x

theorem ContDiffBump.contDiffWithinAt E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c) {x : E} {n : ℕ∞} {s : Set E}, ContDiffWithinAt ℝ (↑n) (↑f) s x

theorem ContDiffBump.continuous E1 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] [inst_2 : HasContDiffBump E] {c : E}
  (f : ContDiffBump c), Continuous ↑f