File: Mathlib/Geometry/Manifold/BumpFunction.lean

full_name: SmoothBumpFunction.closedBall_subset
code: /-- Given a smooth manifold modelled on a finite dimensional space `E`,
`f : SmoothBumpFunction I M` is a smooth function on `M` such that in the extended chart `e` at
`f.c`:

* `f x = 1` in the closed ball of radius `f.rIn` centered at `f.c`;
* `f x = 0` outside of the ball of radius `f.rOut` centered at `f.c`;
* `0 ≤ f x ≤ 1` for all `x`.

The structure contains data required to construct a function with these properties. The function is
available as `⇑f` or `f x`. Formal statements of the properties listed above involve some
(pre)images under `extChartAt I f.c` and are given as lemmas in the `SmoothBumpFunction`
namespace. -/
structure SmoothBumpFunction (c : M) extends ContDiffBump (extChartAt I c c) where
  closedBall_subset : closedBall (extChartAt I c c) rOut ∩ range I ⊆ (extChartAt I c).target
goal: Metric.closedBall (↑(extChartAt I c) c) self.rOut ∩ Set.range ↑I ⊆ (extChartAt I c).target

full_name: SmoothBumpFunction
code: /-- Given a smooth manifold modelled on a finite dimensional space `E`,
`f : SmoothBumpFunction I M` is a smooth function on `M` such that in the extended chart `e` at
`f.c`:

* `f x = 1` in the closed ball of radius `f.rIn` centered at `f.c`;
* `f x = 0` outside of the ball of radius `f.rOut` centered at `f.c`;
* `0 ≤ f x ≤ 1` for all `x`.

The structure contains data required to construct a function with these properties. The function is
available as `⇑f` or `f x`. Formal statements of the properties listed above involve some
(pre)images under `extChartAt I f.c` and are given as lemmas in the `SmoothBumpFunction`
namespace. -/
structure SmoothBumpFunction (c : M) extends ContDiffBump (extChartAt I c c) where
  closedBall_subset : closedBall (extChartAt I c c) rOut ∩ range I ⊆ (extChartAt I c).target
goal: Type

full_name: SmoothBumpFunction.toFun
code: /-- The function defined by `f : SmoothBumpFunction c`. Use automatic coercion to function
instead. -/
@[coe] def toFun : M → ℝ 
goal: M → ℝ

full_name: SmoothBumpFunction.instCoeFunForallReal
code: instance : CoeFun (SmoothBumpFunction I c) fun _ => M → ℝ 
goal: CoeFun (SmoothBumpFunction I c) fun x => M → ℝ

full_name: SmoothBumpFunction.coe_def
code: theorem coe_def : ⇑f = indicator (chartAt H c).source (f.toContDiffBump ∘ extChartAt I c) 
goal: ↑f = (chartAt H c).source.indicator (↑f.toContDiffBump ∘ ↑(extChartAt I c))

full_name: SmoothBumpFunction.rOut_pos
code: theorem rOut_pos : 0 < f.rOut 
goal: 0 < f.rOut

full_name: SmoothBumpFunction.ball_subset
code: theorem ball_subset : ball (extChartAt I c c) f.rOut ∩ range I ⊆ (extChartAt I c).target 
goal: Metric.ball (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I ⊆ (extChartAt I c).target

full_name: SmoothBumpFunction.ball_inter_range_eq_ball_inter_target
code: theorem ball_inter_range_eq_ball_inter_target :
    ball (extChartAt I c c) f.rOut ∩ range I =
      ball (extChartAt I c c) f.rOut ∩ (extChartAt I c).target 
goal: Metric.ball (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I =
  Metric.ball (↑(extChartAt I c) c) f.rOut ∩ (extChartAt I c).target

full_name: SmoothBumpFunction.eqOn_source
code: theorem eqOn_source : EqOn f (f.toContDiffBump ∘ extChartAt I c) (chartAt H c).source 
goal: Set.EqOn (↑f) (↑f.toContDiffBump ∘ ↑(extChartAt I c)) (chartAt H c).source

full_name: SmoothBumpFunction.eventuallyEq_of_mem_source
code: theorem eventuallyEq_of_mem_source (hx : x ∈ (chartAt H c).source) :
    f =ᶠ[𝓝 x] f.toContDiffBump ∘ extChartAt I c 
goal: ↑f =ᶠ[𝓝 x] ↑f.toContDiffBump ∘ ↑(extChartAt I c)

full_name: SmoothBumpFunction.one_of_dist_le
code: theorem one_of_dist_le (hs : x ∈ (chartAt H c).source)
    (hd : dist (extChartAt I c x) (extChartAt I c c) ≤ f.rIn) : f x = 1 
goal: ↑f x = 1

full_name: SmoothBumpFunction.support_eq_inter_preimage
code: theorem support_eq_inter_preimage :
    support f = (chartAt H c).source ∩ extChartAt I c ⁻¹' ball (extChartAt I c c) f.rOut 
goal: Function.support ↑f = (chartAt H c).source ∩ ↑(extChartAt I c) ⁻¹' Metric.ball (↑(extChartAt I c) c) f.rOut

full_name: SmoothBumpFunction.isOpen_support
code: theorem isOpen_support : IsOpen (support f) 
goal: IsOpen (Function.support ↑f)

full_name: SmoothBumpFunction.support_eq_symm_image
code: theorem support_eq_symm_image :
    support f = (extChartAt I c).symm '' (ball (extChartAt I c c) f.rOut ∩ range I) 
goal: Function.support ↑f = ↑(extChartAt I c).symm '' (Metric.ball (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I)

full_name: SmoothBumpFunction.support_subset_source
code: theorem support_subset_source : support f ⊆ (chartAt H c).source 
goal: Function.support ↑f ⊆ (chartAt H c).source

full_name: SmoothBumpFunction.image_eq_inter_preimage_of_subset_support
code: theorem image_eq_inter_preimage_of_subset_support {s : Set M} (hs : s ⊆ support f) :
    extChartAt I c '' s =
      closedBall (extChartAt I c c) f.rOut ∩ range I ∩ (extChartAt I c).symm ⁻¹' s 
goal: ↑(extChartAt I c) '' s = Metric.closedBall (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I ∩ ↑(extChartAt I c).symm ⁻¹' s

full_name: SmoothBumpFunction.mem_Icc
code: theorem mem_Icc : f x ∈ Icc (0 : ℝ) 1 
goal: ↑f x ∈ Set.Icc 0 1

full_name: SmoothBumpFunction.nonneg
code: theorem nonneg : 0 ≤ f x 
goal: 0 ≤ ↑f x

full_name: SmoothBumpFunction.le_one
code: theorem le_one : f x ≤ 1 
goal: ↑f x ≤ 1

full_name: SmoothBumpFunction.eventuallyEq_one_of_dist_lt
code: theorem eventuallyEq_one_of_dist_lt (hs : x ∈ (chartAt H c).source)
    (hd : dist (extChartAt I c x) (extChartAt I c c) < f.rIn) : f =ᶠ[𝓝 x] 1 
goal: ↑f =ᶠ[𝓝 x] 1

full_name: SmoothBumpFunction.eventuallyEq_one
code: theorem eventuallyEq_one : f =ᶠ[𝓝 c] 1 
goal: ↑f =ᶠ[𝓝 c] 1

full_name: SmoothBumpFunction.eq_one
code: @[simp]
theorem eq_one : f c = 1 
goal: ↑f c = 1

full_name: SmoothBumpFunction.support_mem_nhds
code: theorem support_mem_nhds : support f ∈ 𝓝 c 
goal: Function.support ↑f ∈ 𝓝 c

full_name: SmoothBumpFunction.tsupport_mem_nhds
code: theorem tsupport_mem_nhds : tsupport f ∈ 𝓝 c 
goal: tsupport ↑f ∈ 𝓝 c

full_name: SmoothBumpFunction.c_mem_support
code: theorem c_mem_support : c ∈ support f 
goal: c ∈ Function.support ↑f

full_name: SmoothBumpFunction.nonempty_support
code: theorem nonempty_support : (support f).Nonempty 
goal: (Function.support ↑f).Nonempty

full_name: SmoothBumpFunction.isCompact_symm_image_closedBall
code: theorem isCompact_symm_image_closedBall :
    IsCompact ((extChartAt I c).symm '' (closedBall (extChartAt I c c) f.rOut ∩ range I)) 
goal: IsCompact (↑(extChartAt I c).symm '' (Metric.closedBall (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I))

full_name: SmoothBumpFunction.nhdsWithin_range_basis
code: /-- Given a smooth bump function `f : SmoothBumpFunction I c`, the closed ball of radius `f.R` is
known to include the support of `f`. These closed balls (in the model normed space `E`) intersected
with `Set.range I` form a basis of `𝓝[range I] (extChartAt I c c)`. -/
theorem nhdsWithin_range_basis :
    (𝓝[range I] extChartAt I c c).HasBasis (fun _ : SmoothBumpFunction I c => True) fun f =>
      closedBall (extChartAt I c c) f.rOut ∩ range I 
goal: (𝓝[Set.range ↑I] ↑(extChartAt I c) c).HasBasis (fun x => True) fun f =>
  Metric.closedBall (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I

full_name: SmoothBumpFunction.isClosed_image_of_isClosed
code: theorem isClosed_image_of_isClosed {s : Set M} (hsc : IsClosed s) (hs : s ⊆ support f) :
    IsClosed (extChartAt I c '' s) 
goal: IsClosed (↑(extChartAt I c) '' s)

full_name: SmoothBumpFunction.exists_r_pos_lt_subset_ball
code: /-- If `f` is a smooth bump function and `s` closed subset of the support of `f` (i.e., of the open
ball of radius `f.rOut`), then there exists `0 < r < f.rOut` such that `s` is a subset of the open
ball of radius `r`. Formally, `s ⊆ e.source ∩ e ⁻¹' (ball (e c) r)`, where `e = extChartAt I c`. -/
theorem exists_r_pos_lt_subset_ball {s : Set M} (hsc : IsClosed s) (hs : s ⊆ support f) :
    ∃ r ∈ Ioo 0 f.rOut,
      s ⊆ (chartAt H c).source ∩ extChartAt I c ⁻¹' ball (extChartAt I c c) r 
goal: ∃ r ∈ Set.Ioo 0 f.rOut, s ⊆ (chartAt H c).source ∩ ↑(extChartAt I c) ⁻¹' Metric.ball (↑(extChartAt I c) c) r

full_name: SmoothBumpFunction.updateRIn_rOut
code: /-- Replace `rIn` with another value in the interval `(0, f.rOut)`. -/
@[simps rOut rIn]
def updateRIn (r : ℝ) (hr : r ∈ Ioo 0 f.rOut) : SmoothBumpFunction I c 
goal: (f.updateRIn r hr).rOut = f.rOut

full_name: SmoothBumpFunction.updateRIn
code: /-- Replace `rIn` with another value in the interval `(0, f.rOut)`. -/
@[simps rOut rIn]
def updateRIn (r : ℝ) (hr : r ∈ Ioo 0 f.rOut) : SmoothBumpFunction I c 
goal: SmoothBumpFunction I c

full_name: SmoothBumpFunction.updateRIn_rIn
code: /-- Replace `rIn` with another value in the interval `(0, f.rOut)`. -/
@[simps rOut rIn]
def updateRIn (r : ℝ) (hr : r ∈ Ioo 0 f.rOut) : SmoothBumpFunction I c 
goal: (f.updateRIn r hr).rIn = r

full_name: SmoothBumpFunction.support_updateRIn
code: @[simp]
theorem support_updateRIn {r : ℝ} (hr : r ∈ Ioo 0 f.rOut) :
    support (f.updateRIn r hr) = support f 
goal: Function.support ↑(f.updateRIn r hr) = Function.support ↑f

full_name: SmoothBumpFunction.instNonempty
code: instance : Nonempty (SmoothBumpFunction I c) 
goal: Nonempty (SmoothBumpFunction I c)

full_name: SmoothBumpFunction.isClosed_symm_image_closedBall
code: theorem isClosed_symm_image_closedBall :
    IsClosed ((extChartAt I c).symm '' (closedBall (extChartAt I c c) f.rOut ∩ range I)) 
goal: IsClosed (↑(extChartAt I c).symm '' (Metric.closedBall (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I))

full_name: SmoothBumpFunction.tsupport_subset_symm_image_closedBall
code: theorem tsupport_subset_symm_image_closedBall :
    tsupport f ⊆ (extChartAt I c).symm '' (closedBall (extChartAt I c c) f.rOut ∩ range I) 
goal: tsupport ↑f ⊆ ↑(extChartAt I c).symm '' (Metric.closedBall (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I)

full_name: SmoothBumpFunction.tsupport_subset_extChartAt_source
code: theorem tsupport_subset_extChartAt_source : tsupport f ⊆ (extChartAt I c).source 
goal: tsupport ↑f ⊆ (extChartAt I c).source

full_name: SmoothBumpFunction.tsupport_subset_chartAt_source
code: theorem tsupport_subset_chartAt_source : tsupport f ⊆ (chartAt H c).source 
goal: tsupport ↑f ⊆ (chartAt H c).source

full_name: SmoothBumpFunction.hasCompactSupport
code: protected theorem hasCompactSupport : HasCompactSupport f 
goal: HasCompactSupport ↑f

full_name: SmoothBumpFunction.nhds_basis_tsupport
code: /-- The closures of supports of smooth bump functions centered at `c` form a basis of `𝓝 c`.
In other words, each of these closures is a neighborhood of `c` and each neighborhood of `c`
includes `tsupport f` for some `f : SmoothBumpFunction I c`. -/
theorem nhds_basis_tsupport :
    (𝓝 c).HasBasis (fun _ : SmoothBumpFunction I c => True) fun f => tsupport f 
goal: (𝓝 c).HasBasis (fun x => True) fun f => tsupport ↑f

full_name: SmoothBumpFunction.nhds_basis_support
code: /-- Given `s ∈ 𝓝 c`, the supports of smooth bump functions `f : SmoothBumpFunction I c` such that
`tsupport f ⊆ s` form a basis of `𝓝 c`.  In other words, each of these supports is a
neighborhood of `c` and each neighborhood of `c` includes `support f` for some
`f : SmoothBumpFunction I c` such that `tsupport f ⊆ s`. -/
theorem nhds_basis_support {s : Set M} (hs : s ∈ 𝓝 c) :
    (𝓝 c).HasBasis (fun f : SmoothBumpFunction I c => tsupport f ⊆ s) fun f => support f 
goal: (𝓝 c).HasBasis (fun f => tsupport ↑f ⊆ s) fun f => Function.support ↑f

full_name: SmoothBumpFunction.smooth
code: /-- A smooth bump function is infinitely smooth. -/
protected theorem smooth : Smooth I 𝓘(ℝ) f 
goal: Smooth I 𝓘(ℝ, ℝ) ↑f

full_name: SmoothBumpFunction.smoothAt
code: protected theorem smoothAt {x} : SmoothAt I 𝓘(ℝ) f x 
goal: SmoothAt I 𝓘(ℝ, ℝ) (↑f) x

full_name: SmoothBumpFunction.continuous
code: protected theorem continuous : Continuous f 
goal: Continuous ↑f

full_name: SmoothBumpFunction.smooth_smul
code: /-- If `f : SmoothBumpFunction I c` is a smooth bump function and `g : M → G` is a function smooth
on the source of the chart at `c`, then `f • g` is smooth on the whole manifold. -/
theorem smooth_smul {G} [NormedAddCommGroup G] [NormedSpace ℝ G] {g : M → G}
    (hg : SmoothOn I 𝓘(ℝ, G) g (chartAt H c).source) : Smooth I 𝓘(ℝ, G) fun x => f x • g x 
goal: Smooth I 𝓘(ℝ, G) fun x => ↑f x • g x