doc-next-gen

Mathlib.Analysis.NormedSpace.Pointwise

Module docstring

{"# Properties of pointwise scalar multiplication of sets in normed spaces.

We explore the relationships between scalar multiplication of sets in vector spaces, and the norm. Notably, we express arbitrary balls as rescaling of other balls, and we show that the multiplication of bounded sets remain bounded. "}

ediam_smul_le theorem
(c : 𝕜) (s : Set E) : EMetric.diam (c • s) ≤ ‖c‖₊ • EMetric.diam s
Full source
theorem ediam_smul_le (c : 𝕜) (s : Set E) : EMetric.diam (c • s) ≤ ‖c‖₊EMetric.diam s :=
  (lipschitzWith_smul c).ediam_image_le s
Upper Bound on Diameter of Scaled Sets in Normed Spaces
Informal description
For any scalar $c$ in a normed field $\mathbb{K}$ and any subset $s$ of a normed space $E$ over $\mathbb{K}$, the extended diameter of the scaled set $c \cdot s$ is bounded above by the product of the seminorm of $c$ and the extended diameter of $s$, i.e., \[ \text{diam}(c \cdot s) \leq \|c\| \cdot \text{diam}(s). \]
ediam_smul₀ theorem
(c : 𝕜) (s : Set E) : EMetric.diam (c • s) = ‖c‖₊ • EMetric.diam s
Full source
theorem ediam_smul₀ (c : 𝕜) (s : Set E) : EMetric.diam (c • s) = ‖c‖₊EMetric.diam s := by
  refine le_antisymm (ediam_smul_le c s) ?_
  obtain rfl | hc := eq_or_ne c 0
  · obtain rfl | hs := s.eq_empty_or_nonempty
    · simp
    simp [zero_smul_set hs, ← Set.singleton_zero]
  · have := (lipschitzWith_smul c⁻¹).ediam_image_le (c • s)
    rwa [← smul_eq_mul, ← ENNReal.smul_def, Set.image_smul, inv_smul_smul₀ hc s, nnnorm_inv,
      le_inv_smul_iff_of_pos (nnnorm_pos.2 hc)] at this
Exact Diameter of Scaled Sets in Normed Spaces
Informal description
For any scalar $c$ in a normed field $\mathbb{K}$ and any subset $s$ of a normed space $E$ over $\mathbb{K}$, the extended diameter of the scaled set $c \cdot s$ is equal to the product of the seminorm of $c$ and the extended diameter of $s$, i.e., \[ \text{diam}(c \cdot s) = \|c\| \cdot \text{diam}(s). \]
diam_smul₀ theorem
(c : 𝕜) (x : Set E) : diam (c • x) = ‖c‖ * diam x
Full source
theorem diam_smul₀ (c : 𝕜) (x : Set E) : diam (c • x) = ‖c‖ * diam x := by
  simp_rw [diam, ediam_smul₀, ENNReal.toReal_smul, NNReal.smul_def, coe_nnnorm, smul_eq_mul]
Exact Diameter of Scaled Sets in Normed Spaces: $\text{diam}(c \cdot x) = \|c\| \cdot \text{diam}(x)$
Informal description
For any scalar $c$ in a normed field $\mathbb{K}$ and any subset $x$ of a normed space $E$ over $\mathbb{K}$, the diameter of the scaled set $c \cdot x$ is equal to the product of the norm of $c$ and the diameter of $x$, i.e., \[ \text{diam}(c \cdot x) = \|c\| \cdot \text{diam}(x). \]
infEdist_smul₀ theorem
{c : 𝕜} (hc : c ≠ 0) (s : Set E) (x : E) : EMetric.infEdist (c • x) (c • s) = ‖c‖₊ • EMetric.infEdist x s
Full source
theorem infEdist_smul₀ {c : 𝕜} (hc : c ≠ 0) (s : Set E) (x : E) :
    EMetric.infEdist (c • x) (c • s) = ‖c‖₊EMetric.infEdist x s := by
  simp_rw [EMetric.infEdist]
  have : Function.Surjective ((c • ·) : E → E) :=
    Function.RightInverse.surjective (smul_inv_smul₀ hc)
  trans ⨅ (y) (_ : y ∈ s), ‖c‖₊ • edist x y
  · refine (this.iInf_congr _ fun y => ?_).symm
    simp_rw [smul_mem_smul_set_iff₀ hc, edist_smul₀]
  · have : (‖c‖₊ : ENNReal) ≠ 0 := by simp [hc]
    simp_rw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_iInf_of_ne this ENNReal.coe_ne_top]
Scaled Infimum Distance Identity: $\text{infEdist}(c \cdot x, c \cdot s) = \|c\| \cdot \text{infEdist}(x, s)$
Informal description
For any nonzero scalar $c$ in a normed field $\mathbb{K}$, any subset $s$ of a normed space $E$ over $\mathbb{K}$, and any point $x \in E$, the extended infimum distance from the scaled point $c \cdot x$ to the scaled set $c \cdot s$ is equal to the product of the seminorm of $c$ and the extended infimum distance from $x$ to $s$, i.e., \[ \text{infEdist}(c \cdot x, c \cdot s) = \|c\| \cdot \text{infEdist}(x, s). \]
infDist_smul₀ theorem
{c : 𝕜} (hc : c ≠ 0) (s : Set E) (x : E) : Metric.infDist (c • x) (c • s) = ‖c‖ * Metric.infDist x s
Full source
theorem infDist_smul₀ {c : 𝕜} (hc : c ≠ 0) (s : Set E) (x : E) :
    Metric.infDist (c • x) (c • s) = ‖c‖ * Metric.infDist x s := by
  simp_rw [Metric.infDist, infEdist_smul₀ hc s, ENNReal.toReal_smul, NNReal.smul_def, coe_nnnorm,
    smul_eq_mul]
Scaled Infimum Distance Identity: $\text{infDist}(c \cdot x, c \cdot s) = \|c\| \cdot \text{infDist}(x, s)$
Informal description
For any nonzero scalar $c$ in a normed field $\mathbb{K}$, any subset $s$ of a normed space $E$ over $\mathbb{K}$, and any point $x \in E$, the infimum distance from the scaled point $c \cdot x$ to the scaled set $c \cdot s$ is equal to the product of the norm of $c$ and the infimum distance from $x$ to $s$, i.e., \[ \text{infDist}(c \cdot x, c \cdot s) = \|c\| \cdot \text{infDist}(x, s). \]
smul_ball theorem
{c : 𝕜} (hc : c ≠ 0) (x : E) (r : ℝ) : c • ball x r = ball (c • x) (‖c‖ * r)
Full source
theorem smul_ball {c : 𝕜} (hc : c ≠ 0) (x : E) (r : ) : c • ball x r = ball (c • x) (‖c‖ * r) := by
  ext y
  rw [mem_smul_set_iff_inv_smul_mem₀ hc]
  conv_lhs => rw [← inv_smul_smul₀ hc x]
  simp [← div_eq_inv_mul, div_lt_iff₀ (norm_pos_iff.2 hc), mul_comm _ r, dist_smul₀]
Scalar Multiplication of Open Balls: $c \cdot B(x, r) = B(c \cdot x, \|c\| \cdot r)$
Informal description
For any nonzero scalar $c$ in a normed field $\mathbb{K}$, any point $x$ in a normed space $E$, and any radius $r \in \mathbb{R}$, the scalar multiplication of the open ball centered at $x$ with radius $r$ by $c$ equals the open ball centered at $c \cdot x$ with radius $\|c\| \cdot r$. That is, $$ c \cdot B(x, r) = B(c \cdot x, \|c\| \cdot r), $$ where $B(x, r)$ denotes the open ball of radius $r$ centered at $x$.
smul_unitBall theorem
{c : 𝕜} (hc : c ≠ 0) : c • ball (0 : E) (1 : ℝ) = ball (0 : E) ‖c‖
Full source
theorem smul_unitBall {c : 𝕜} (hc : c ≠ 0) : c • ball (0 : E) (1 : ) = ball (0 : E) ‖c‖ := by
  rw [_root_.smul_ball hc, smul_zero, mul_one]
Scalar Multiplication of Unit Ball: $c \cdot B(0, 1) = B(0, \|c\|)$
Informal description
For any nonzero scalar $c$ in a normed field $\mathbb{K}$, the scalar multiplication of the unit open ball centered at the origin in a normed space $E$ by $c$ equals the open ball centered at the origin with radius $\|c\|$. That is, $$ c \cdot B(0, 1) = B(0, \|c\|), $$ where $B(0, r)$ denotes the open ball of radius $r$ centered at the origin.
smul_sphere' theorem
{c : 𝕜} (hc : c ≠ 0) (x : E) (r : ℝ) : c • sphere x r = sphere (c • x) (‖c‖ * r)
Full source
theorem smul_sphere' {c : 𝕜} (hc : c ≠ 0) (x : E) (r : ) :
    c • sphere x r = sphere (c • x) (‖c‖ * r) := by
  ext y
  rw [mem_smul_set_iff_inv_smul_mem₀ hc]
  conv_lhs => rw [← inv_smul_smul₀ hc x]
  simp only [mem_sphere, dist_smul₀, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne',
    mul_comm r]
Scalar Multiplication of a Sphere: $c \cdot S(x, r) = S(c \cdot x, \|c\| \cdot r)$
Informal description
For any nonzero scalar $c$ in a normed field $\mathbb{K}$, any point $x$ in a normed space $E$, and any radius $r \in \mathbb{R}$, the scalar multiplication of the sphere centered at $x$ with radius $r$ by $c$ equals the sphere centered at $c \cdot x$ with radius $\|c\| \cdot r$. That is, $$ c \cdot S(x, r) = S(c \cdot x, \|c\| \cdot r), $$ where $S(x, r)$ denotes the sphere of radius $r$ centered at $x$.
smul_closedBall' theorem
{c : 𝕜} (hc : c ≠ 0) (x : E) (r : ℝ) : c • closedBall x r = closedBall (c • x) (‖c‖ * r)
Full source
theorem smul_closedBall' {c : 𝕜} (hc : c ≠ 0) (x : E) (r : ) :
    c • closedBall x r = closedBall (c • x) (‖c‖ * r) := by
  simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc]
Scalar Multiplication of Closed Balls: $c \cdot \overline{B}(x, r) = \overline{B}(c \cdot x, \|c\| \cdot r)$
Informal description
For any nonzero scalar $c$ in a normed field $\mathbb{K}$, any point $x$ in a normed space $E$, and any radius $r \in \mathbb{R}$, the scalar multiplication of the closed ball centered at $x$ with radius $r$ by $c$ equals the closed ball centered at $c \cdot x$ with radius $\|c\| \cdot r$. That is, $$ c \cdot \overline{B}(x, r) = \overline{B}(c \cdot x, \|c\| \cdot r), $$ where $\overline{B}(x, r)$ denotes the closed ball of radius $r$ centered at $x$.
set_smul_sphere_zero theorem
{s : Set 𝕜} (hs : 0 ∉ s) (r : ℝ) : s • sphere (0 : E) r = (‖·‖) ⁻¹' ((‖·‖ * r) '' s)
Full source
theorem set_smul_sphere_zero {s : Set 𝕜} (hs : 0 ∉ s) (r : ) :
    s • sphere (0 : E) r = (‖·‖) ⁻¹' ((‖·‖ * r) '' s) :=
  calc
    s • sphere (0 : E) r = ⋃ c ∈ s, c • sphere (0 : E) r := iUnion_smul_left_image.symm
    _ = ⋃ c ∈ s, sphere (0 : E) (‖c‖ * r) := iUnion₂_congr fun c hc ↦ by
      rw [smul_sphere' (ne_of_mem_of_not_mem hc hs), smul_zero]
    _ = (‖·‖) ⁻¹' ((‖·‖ * r) '' s) := by ext; simp [eq_comm]
Scalar Multiplication of Origin-Centered Sphere by Nonzero Scalars: $s \cdot S(0, r) = \| \cdot \|^{-1}(\{\|c\| r \mid c \in s\})$
Informal description
For any subset $s$ of a normed field $\mathbb{K}$ not containing zero and any radius $r \in \mathbb{R}$, the scalar multiplication of the sphere centered at the origin $0$ in a normed space $E$ with radius $r$ by $s$ is equal to the preimage under the norm of the image of $s$ under the function $\lambda c, \|c\| \cdot r$. That is, $$ s \cdot S(0, r) = \{x \in E \mid \|x\| \in \{\|c\| \cdot r \mid c \in s\}\}, $$ where $S(0, r)$ denotes the sphere of radius $r$ centered at $0$.
Bornology.IsBounded.smul₀ theorem
{s : Set E} (hs : IsBounded s) (c : 𝕜) : IsBounded (c • s)
Full source
/-- Image of a bounded set in a normed space under scalar multiplication by a constant is
bounded. See also `Bornology.IsBounded.smul` for a similar lemma about an isometric action. -/
theorem Bornology.IsBounded.smul₀ {s : Set E} (hs : IsBounded s) (c : 𝕜) : IsBounded (c • s) :=
  (lipschitzWith_smul c).isBounded_image hs
Boundedness under Scalar Multiplication in Normed Spaces
Informal description
For any bounded subset $s$ of a normed space $E$ over a field $\mathbb{K}$ and any scalar $c \in \mathbb{K}$, the set obtained by scaling $s$ by $c$ (denoted $c \cdot s$) is also bounded.
eventually_singleton_add_smul_subset theorem
{x : E} {s : Set E} (hs : Bornology.IsBounded s) {u : Set E} (hu : u ∈ 𝓝 x) : ∀ᶠ r in 𝓝 (0 : 𝕜), { x } + r • s ⊆ u
Full source
/-- If `s` is a bounded set, then for small enough `r`, the set `{x} + r • s` is contained in any
fixed neighborhood of `x`. -/
theorem eventually_singleton_add_smul_subset {x : E} {s : Set E} (hs : Bornology.IsBounded s)
    {u : Set E} (hu : u ∈ 𝓝 x) : ∀ᶠ r in 𝓝 (0 : 𝕜), {x} + r • s ⊆ u := by
  obtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ closedBall x ε ⊆ u := nhds_basis_closedBall.mem_iff.1 hu
  obtain ⟨R, Rpos, hR⟩ : ∃ R : ℝ, 0 < R ∧ s ⊆ closedBall 0 R := hs.subset_closedBall_lt 0 0
  have : Metric.closedBallMetric.closedBall (0 : 𝕜) (ε / R) ∈ 𝓝 (0 : 𝕜) := closedBall_mem_nhds _ (div_pos εpos Rpos)
  filter_upwards [this] with r hr
  simp only [image_add_left, singleton_add]
  intro y hy
  obtain ⟨z, zs, hz⟩ : ∃ z : E, z ∈ s ∧ r • z = -x + y := by simpa [mem_smul_set] using hy
  have I : ‖r • z‖ ≤ ε :=
    calc
      ‖r • z‖ = ‖r‖ * ‖z‖ := norm_smul _ _
      _ ≤ ε / R * R :=
        (mul_le_mul (mem_closedBall_zero_iff.1 hr) (mem_closedBall_zero_iff.1 (hR zs))
          (norm_nonneg _) (div_pos εpos Rpos).le)
      _ = ε := by field_simp
  have : y = x + r • z := by simp only [hz, add_neg_cancel_left]
  apply hε
  simpa only [this, dist_eq_norm, add_sub_cancel_left, mem_closedBall] using I
Local containment of scaled bounded sets near a point: $\{x\} + r \cdot s \subseteq u$ for small $r$
Informal description
Let $E$ be a normed space over a field $\mathbb{K}$, $x \in E$ a point, and $s \subseteq E$ a bounded set. For any neighborhood $u$ of $x$, there exists a neighborhood of $0$ in $\mathbb{K}$ such that for all sufficiently small scalars $r$ in this neighborhood, the set $\{x\} + r \cdot s$ is contained in $u$.
smul_unitBall_of_pos theorem
{r : ℝ} (hr : 0 < r) : r • ball (0 : E) 1 = ball (0 : E) r
Full source
/-- In a real normed space, the image of the unit ball under scalar multiplication by a positive
constant `r` is the ball of radius `r`. -/
theorem smul_unitBall_of_pos {r : } (hr : 0 < r) : r • ball (0 : E) 1 = ball (0 : E) r := by
  rw [smul_unitBall hr.ne', Real.norm_of_nonneg hr.le]
Positive Scalar Multiplication of Unit Ball: $r \cdot B(0, 1) = B(0, r)$ for $r > 0$
Informal description
For any positive real number $r > 0$, the scalar multiplication of the unit open ball centered at the origin in a normed space $E$ by $r$ equals the open ball centered at the origin with radius $r$. That is, $$ r \cdot B(0, 1) = B(0, r), $$ where $B(0, r)$ denotes the open ball of radius $r$ centered at the origin.
Ioo_smul_sphere_zero theorem
{a b r : ℝ} (ha : 0 ≤ a) (hr : 0 < r) : Ioo a b • sphere (0 : E) r = ball 0 (b * r) \ closedBall 0 (a * r)
Full source
lemma Ioo_smul_sphere_zero {a b r : } (ha : 0 ≤ a) (hr : 0 < r) :
    Ioo a b • sphere (0 : E) r = ballball 0 (b * r) \ closedBall 0 (a * r) := by
  have : EqOn (‖·‖) id (Ioo a b) := fun x hx ↦ abs_of_pos (ha.trans_lt hx.1)
  rw [set_smul_sphere_zero (by simp [ha.not_lt]), ← image_image (· * r), this.image_eq, image_id,
    image_mul_right_Ioo _ _ hr]
  ext x; simp [and_comm]
Scalar Multiplication of Open Interval with Sphere Yields Annulus: $(a, b) \cdot S(0, r) = B(0, b r) \setminus \overline{B}(0, a r)$
Informal description
For any real numbers $a, b, r$ with $a \geq 0$ and $r > 0$, the scalar multiplication of the open interval $(a, b)$ with the sphere centered at the origin $0$ of radius $r$ in a normed space $E$ is equal to the difference between the open ball centered at $0$ of radius $b \cdot r$ and the closed ball centered at $0$ of radius $a \cdot r$. In symbols: $$(a, b) \cdot S(0, r) = B(0, b r) \setminus \overline{B}(0, a r),$$ where $S(0, r)$ denotes the sphere of radius $r$ centered at $0$, $B(0, b r)$ denotes the open ball of radius $b r$ centered at $0$, and $\overline{B}(0, a r)$ denotes the closed ball of radius $a r$ centered at $0$.
exists_dist_eq theorem
(x z : E) {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) : ∃ y, dist x y = b * dist x z ∧ dist y z = a * dist x z
Full source
theorem exists_dist_eq (x z : E) {a b : } (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) :
    ∃ y, dist x y = b * dist x z ∧ dist y z = a * dist x z := by
  use a • x + b • z
  nth_rw 1 [← one_smul  x]
  nth_rw 4 [← one_smul  z]
  simp [dist_eq_norm, ← hab, add_smul, ← smul_sub, norm_smul_of_nonneg, ha, hb]
Existence of a Convex Combination Point in Normed Spaces: $\text{dist}(x, y) = b \cdot \text{dist}(x, z)$ and $\text{dist}(y, z) = a \cdot \text{dist}(x, z)$ for $a + b = 1$
Informal description
For any points $x, z$ in a normed space $E$ and real numbers $a, b \geq 0$ such that $a + b = 1$, there exists a point $y \in E$ such that the distance from $x$ to $y$ is $b \cdot \text{dist}(x, z)$ and the distance from $y$ to $z$ is $a \cdot \text{dist}(x, z)$. In symbols: $$\exists y \in E, \quad \text{dist}(x, y) = b \cdot \text{dist}(x, z) \quad \text{and} \quad \text{dist}(y, z) = a \cdot \text{dist}(x, z).$$
exists_dist_le_le theorem
(hδ : 0 ≤ δ) (hε : 0 ≤ ε) (h : dist x z ≤ ε + δ) : ∃ y, dist x y ≤ δ ∧ dist y z ≤ ε
Full source
theorem exists_dist_le_le (hδ : 0 ≤ δ) (hε : 0 ≤ ε) (h : dist x z ≤ ε + δ) :
    ∃ y, dist x y ≤ δ ∧ dist y z ≤ ε := by
  obtain rfl | hε' := hε.eq_or_lt
  · exact ⟨z, by rwa [zero_add] at h, (dist_self _).le⟩
  have hεδ := add_pos_of_pos_of_nonneg hε' hδ
  refine (exists_dist_eq x z (div_nonneg hε <| add_nonneg hε hδ)
    (div_nonneg hδ <| add_nonneg hε hδ) <| by
      rw [← add_div, div_self hεδ.ne']).imp
    fun y hy => ?_
  rw [hy.1, hy.2, div_mul_comm, div_mul_comm ε]
  rw [← div_le_one hεδ] at h
  exact ⟨mul_le_of_le_one_left hδ h, mul_le_of_le_one_left hε h⟩
Existence of Intermediate Point with Bounded Distances: $\text{dist}(x, y) \leq \delta$ and $\text{dist}(y, z) \leq \varepsilon$ when $\text{dist}(x, z) \leq \delta + \varepsilon$
Informal description
For any points $x, z$ in a normed space $E$ and nonnegative real numbers $\delta, \varepsilon \geq 0$ such that $\text{dist}(x, z) \leq \varepsilon + \delta$, there exists a point $y \in E$ satisfying $\text{dist}(x, y) \leq \delta$ and $\text{dist}(y, z) \leq \varepsilon$.
exists_dist_le_lt theorem
(hδ : 0 ≤ δ) (hε : 0 < ε) (h : dist x z < ε + δ) : ∃ y, dist x y ≤ δ ∧ dist y z < ε
Full source
theorem exists_dist_le_lt (hδ : 0 ≤ δ) (hε : 0 < ε) (h : dist x z < ε + δ) :
    ∃ y, dist x y ≤ δ ∧ dist y z < ε := by
  refine (exists_dist_eq x z (div_nonneg hε.le <| add_nonneg hε.le hδ)
    (div_nonneg hδ <| add_nonneg hε.le hδ) <| by
      rw [← add_div, div_self (add_pos_of_pos_of_nonneg hε hδ).ne']).imp
    fun y hy => ?_
  rw [hy.1, hy.2, div_mul_comm, div_mul_comm ε]
  rw [← div_lt_one (add_pos_of_pos_of_nonneg hε hδ)] at h
  exact ⟨mul_le_of_le_one_left hδ h.le, mul_lt_of_lt_one_left hε h⟩
Existence of Intermediate Point with Bounded Distances: $\text{dist}(x, y) \leq \delta$ and $\text{dist}(y, z) < \varepsilon$
Informal description
For any points $x, z$ in a normed space $E$ and nonnegative real numbers $\delta, \varepsilon$ with $\delta \geq 0$ and $\varepsilon > 0$, if the distance between $x$ and $z$ satisfies $\text{dist}(x, z) < \varepsilon + \delta$, then there exists a point $y \in E$ such that $\text{dist}(x, y) \leq \delta$ and $\text{dist}(y, z) < \varepsilon$.
exists_dist_lt_le theorem
(hδ : 0 < δ) (hε : 0 ≤ ε) (h : dist x z < ε + δ) : ∃ y, dist x y < δ ∧ dist y z ≤ ε
Full source
theorem exists_dist_lt_le (hδ : 0 < δ) (hε : 0 ≤ ε) (h : dist x z < ε + δ) :
    ∃ y, dist x y < δ ∧ dist y z ≤ ε := by
  obtain ⟨y, yz, xy⟩ :=
    exists_dist_le_lt hε hδ (show dist z x < δ + ε by simpa only [dist_comm, add_comm] using h)
  exact ⟨y, by simp [dist_comm x y, dist_comm y z, *]⟩
Existence of Intermediate Point with Strict-Upper Bound on First Distance and Upper Bound on Second Distance: $\text{dist}(x, y) < \delta$ and $\text{dist}(y, z) \leq \varepsilon$ when $\text{dist}(x, z) < \delta + \varepsilon$
Informal description
For any points $x, z$ in a normed space $E$ and real numbers $\delta > 0$, $\varepsilon \geq 0$ such that $\text{dist}(x, z) < \varepsilon + \delta$, there exists a point $y \in E$ satisfying $\text{dist}(x, y) < \delta$ and $\text{dist}(y, z) \leq \varepsilon$.
exists_dist_lt_lt theorem
(hδ : 0 < δ) (hε : 0 < ε) (h : dist x z < ε + δ) : ∃ y, dist x y < δ ∧ dist y z < ε
Full source
theorem exists_dist_lt_lt (hδ : 0 < δ) (hε : 0 < ε) (h : dist x z < ε + δ) :
    ∃ y, dist x y < δ ∧ dist y z < ε := by
  refine (exists_dist_eq x z (div_nonneg hε.le <| add_nonneg hε.le hδ.le)
    (div_nonneg hδ.le <| add_nonneg hε.le hδ.le) <| by
      rw [← add_div, div_self (add_pos hε hδ).ne']).imp
    fun y hy => ?_
  rw [hy.1, hy.2, div_mul_comm, div_mul_comm ε]
  rw [← div_lt_one (add_pos hε hδ)] at h
  exact ⟨mul_lt_of_lt_one_left hδ h, mul_lt_of_lt_one_left hε h⟩
Existence of Intermediate Point with Bounded Distances: $\text{dist}(x, y) < \delta$ and $\text{dist}(y, z) < \varepsilon$ when $\text{dist}(x, z) < \delta + \varepsilon$
Informal description
For any points $x, z$ in a metric space and positive real numbers $\delta, \varepsilon > 0$ such that $\text{dist}(x, z) < \varepsilon + \delta$, there exists a point $y$ such that $\text{dist}(x, y) < \delta$ and $\text{dist}(y, z) < \varepsilon$.
disjoint_ball_ball_iff theorem
(hδ : 0 < δ) (hε : 0 < ε) : Disjoint (ball x δ) (ball y ε) ↔ δ + ε ≤ dist x y
Full source
theorem disjoint_ball_ball_iff (hδ : 0 < δ) (hε : 0 < ε) :
    DisjointDisjoint (ball x δ) (ball y ε) ↔ δ + ε ≤ dist x y := by
  refine ⟨fun h => le_of_not_lt fun hxy => ?_, ball_disjoint_ball⟩
  rw [add_comm] at hxy
  obtain ⟨z, hxz, hzy⟩ := exists_dist_lt_lt hδ hε hxy
  rw [dist_comm] at hxz
  exact h.le_bot ⟨hxz, hzy⟩
Disjointness of Open Balls in Metric Spaces: $\text{ball}(x, \delta) \cap \text{ball}(y, \varepsilon) = \emptyset$ if and only if $\delta + \varepsilon \leq \text{dist}(x, y)$
Informal description
For any points $x, y$ in a metric space and positive real numbers $\delta, \varepsilon > 0$, the open balls $\text{ball}(x, \delta)$ and $\text{ball}(y, \varepsilon)$ are disjoint if and only if $\delta + \varepsilon \leq \text{dist}(x, y)$.
disjoint_ball_closedBall_iff theorem
(hδ : 0 < δ) (hε : 0 ≤ ε) : Disjoint (ball x δ) (closedBall y ε) ↔ δ + ε ≤ dist x y
Full source
theorem disjoint_ball_closedBall_iff (hδ : 0 < δ) (hε : 0 ≤ ε) :
    DisjointDisjoint (ball x δ) (closedBall y ε) ↔ δ + ε ≤ dist x y := by
  refine ⟨fun h => le_of_not_lt fun hxy => ?_, ball_disjoint_closedBall⟩
  rw [add_comm] at hxy
  obtain ⟨z, hxz, hzy⟩ := exists_dist_lt_le hδ hε hxy
  rw [dist_comm] at hxz
  exact h.le_bot ⟨hxz, hzy⟩
Disjointness of Open and Closed Balls: $B(x, \delta) \cap \overline{B}(y, \varepsilon) = \emptyset$ iff $\delta + \varepsilon \leq \text{dist}(x, y)$
Informal description
For any points $x, y$ in a metric space and real numbers $\delta > 0$, $\varepsilon \geq 0$, the open ball $B(x, \delta)$ and the closed ball $\overline{B}(y, \varepsilon)$ are disjoint if and only if $\delta + \varepsilon \leq \text{dist}(x, y)$.
disjoint_closedBall_ball_iff theorem
(hδ : 0 ≤ δ) (hε : 0 < ε) : Disjoint (closedBall x δ) (ball y ε) ↔ δ + ε ≤ dist x y
Full source
theorem disjoint_closedBall_ball_iff (hδ : 0 ≤ δ) (hε : 0 < ε) :
    DisjointDisjoint (closedBall x δ) (ball y ε) ↔ δ + ε ≤ dist x y := by
  rw [disjoint_comm, disjoint_ball_closedBall_iff hε hδ, add_comm, dist_comm]
Disjointness of Closed and Open Balls: $\overline{B}(x, \delta) \cap B(y, \varepsilon) = \emptyset$ iff $\delta + \varepsilon \leq \text{dist}(x, y)$
Informal description
For any points $x, y$ in a metric space and real numbers $\delta \geq 0$, $\varepsilon > 0$, the closed ball $\overline{B}(x, \delta)$ and the open ball $B(y, \varepsilon)$ are disjoint if and only if $\delta + \varepsilon \leq \text{dist}(x, y)$.
disjoint_closedBall_closedBall_iff theorem
(hδ : 0 ≤ δ) (hε : 0 ≤ ε) : Disjoint (closedBall x δ) (closedBall y ε) ↔ δ + ε < dist x y
Full source
theorem disjoint_closedBall_closedBall_iff (hδ : 0 ≤ δ) (hε : 0 ≤ ε) :
    DisjointDisjoint (closedBall x δ) (closedBall y ε) ↔ δ + ε < dist x y := by
  refine ⟨fun h => lt_of_not_ge fun hxy => ?_, closedBall_disjoint_closedBall⟩
  rw [add_comm] at hxy
  obtain ⟨z, hxz, hzy⟩ := exists_dist_le_le hδ hε hxy
  rw [dist_comm] at hxz
  exact h.le_bot ⟨hxz, hzy⟩
Disjointness of Closed Balls: $\overline{B}(x, \delta) \cap \overline{B}(y, \varepsilon) = \emptyset$ iff $\delta + \varepsilon < \text{dist}(x, y)$
Informal description
For any points $x, y$ in a normed space $E$ and nonnegative real numbers $\delta, \varepsilon \geq 0$, the closed balls $\overline{B}(x, \delta)$ and $\overline{B}(y, \varepsilon)$ are disjoint if and only if $\delta + \varepsilon < \text{dist}(x, y)$.
infEdist_thickening theorem
(hδ : 0 < δ) (s : Set E) (x : E) : infEdist x (thickening δ s) = infEdist x s - ENNReal.ofReal δ
Full source
@[simp]
theorem infEdist_thickening (hδ : 0 < δ) (s : Set E) (x : E) :
    infEdist x (thickening δ s) = infEdist x s - ENNReal.ofReal δ := by
  obtain hs | hs := lt_or_le (infEdist x s) (ENNReal.ofReal δ)
  · rw [infEdist_zero_of_mem, tsub_eq_zero_of_le hs.le]
    exact hs
  refine (tsub_le_iff_right.2 infEdist_le_infEdist_thickening_add).antisymm' ?_
  refine le_sub_of_add_le_right ofReal_ne_top ?_
  refine le_infEdist.2 fun z hz => le_of_forall_lt' fun r h => ?_
  cases r with
  | top =>
    exact add_lt_top.2 ⟨lt_top_iff_ne_top.2 <| infEdist_ne_top ⟨z, self_subset_thickening hδ _ hz⟩,
      ofReal_lt_top⟩
  | coe r =>
    have hr : 0 < ↑r - δ := by
      refine sub_pos_of_lt ?_
      have := hs.trans_lt ((infEdist_le_edist_of_mem hz).trans_lt h)
      rw [ofReal_eq_coe_nnreal hδ.le] at this
      exact mod_cast this
    rw [edist_lt_coe, ← dist_lt_coe, ← add_sub_cancel δ ↑r] at h
    obtain ⟨y, hxy, hyz⟩ := exists_dist_lt_lt hr hδ h
    refine (ENNReal.add_lt_add_right ofReal_ne_top <|
      infEdist_lt_iff.2 ⟨_, mem_thickening_iff.2 ⟨_, hz, hyz⟩, edist_lt_ofReal.2 hxy⟩).trans_le ?_
    rw [← ofReal_add hr.le hδ.le, sub_add_cancel, ofReal_coe_nnreal]
Infimum Extended Distance to Thickening: $\text{infEdist}(x, \text{thickening}(\delta, s)) = \text{infEdist}(x, s) - \delta$
Informal description
For any positive real number $\delta > 0$, subset $s$ of a normed space $E$, and point $x \in E$, the infimum of the extended distance from $x$ to the $\delta$-thickening of $s$ equals the infimum of the extended distance from $x$ to $s$ minus $\delta$ (where distances are measured in the extended non-negative real numbers).
thickening_thickening theorem
(hε : 0 < ε) (hδ : 0 < δ) (s : Set E) : thickening ε (thickening δ s) = thickening (ε + δ) s
Full source
@[simp]
theorem thickening_thickening (hε : 0 < ε) (hδ : 0 < δ) (s : Set E) :
    thickening ε (thickening δ s) = thickening (ε + δ) s :=
  (thickening_thickening_subset _ _ _).antisymm fun x => by
    simp_rw [mem_thickening_iff]
    rintro ⟨z, hz, hxz⟩
    rw [add_comm] at hxz
    obtain ⟨y, hxy, hyz⟩ := exists_dist_lt_lt hε hδ hxz
    exact ⟨y, ⟨_, hz, hyz⟩, hxy⟩
Composition of Thickenings: $\text{thickening}_\varepsilon \circ \text{thickening}_\delta = \text{thickening}_{\varepsilon + \delta}$
Informal description
For any subset $s$ of a normed space $E$ and positive real numbers $\varepsilon, \delta > 0$, the $\varepsilon$-thickening of the $\delta$-thickening of $s$ is equal to the $(\varepsilon + \delta)$-thickening of $s$, i.e., \[ \text{thickening}_\varepsilon (\text{thickening}_\delta s) = \text{thickening}_{\varepsilon + \delta} s. \]
cthickening_thickening theorem
(hε : 0 ≤ ε) (hδ : 0 < δ) (s : Set E) : cthickening ε (thickening δ s) = cthickening (ε + δ) s
Full source
@[simp]
theorem cthickening_thickening (hε : 0 ≤ ε) (hδ : 0 < δ) (s : Set E) :
    cthickening ε (thickening δ s) = cthickening (ε + δ) s :=
  (cthickening_thickening_subset hε _ _).antisymm fun x => by
    simp_rw [mem_cthickening_iff, ENNReal.ofReal_add hε hδ.le, infEdist_thickening hδ]
    exact tsub_le_iff_right.2
Closed Thickening of Thickening: $\text{cthickening}_\varepsilon \circ \text{thickening}_\delta = \text{cthickening}_{\varepsilon + \delta}$
Informal description
For any subset $s$ of a normed space $E$, non-negative real number $\varepsilon \geq 0$, and positive real number $\delta > 0$, the $\varepsilon$-closed thickening of the $\delta$-thickening of $s$ is equal to the $(\varepsilon + \delta)$-closed thickening of $s$, i.e., \[ \text{cthickening}_\varepsilon (\text{thickening}_\delta s) = \text{cthickening}_{\varepsilon + \delta} s. \]
closure_thickening theorem
(hδ : 0 < δ) (s : Set E) : closure (thickening δ s) = cthickening δ s
Full source
@[simp]
theorem closure_thickening (hδ : 0 < δ) (s : Set E) :
    closure (thickening δ s) = cthickening δ s := by
  rw [← cthickening_zero, cthickening_thickening le_rfl hδ, zero_add]
Closure of Thickening Equals Closed Thickening
Informal description
For any subset $s$ of a normed space $E$ and a positive real number $\delta > 0$, the topological closure of the $\delta$-thickening of $s$ is equal to the $\delta$-closed thickening of $s$, i.e., \[ \overline{\text{thickening}_\delta s} = \text{cthickening}_\delta s. \]
infEdist_cthickening theorem
(δ : ℝ) (s : Set E) (x : E) : infEdist x (cthickening δ s) = infEdist x s - ENNReal.ofReal δ
Full source
@[simp]
theorem infEdist_cthickening (δ : ) (s : Set E) (x : E) :
    infEdist x (cthickening δ s) = infEdist x s - ENNReal.ofReal δ := by
  obtain hδ | hδ := le_or_lt δ 0
  · rw [cthickening_of_nonpos hδ, infEdist_closure, ofReal_of_nonpos hδ, tsub_zero]
  · rw [← closure_thickening hδ, infEdist_closure, infEdist_thickening hδ]
Infimum Extended Distance to Closed Thickening: $\text{infEdist}(x, \text{cthickening}_\delta s) = \text{infEdist}(x, s) - \delta$
Informal description
For any real number $\delta$, subset $s$ of a normed space $E$, and point $x \in E$, the infimum of the extended distance from $x$ to the $\delta$-closed thickening of $s$ is equal to the infimum of the extended distance from $x$ to $s$ minus $\delta$ (where distances are measured in the extended non-negative real numbers), i.e., \[ \text{infEdist}(x, \text{cthickening}_\delta s) = \text{infEdist}(x, s) - \delta. \]
thickening_cthickening theorem
(hε : 0 < ε) (hδ : 0 ≤ δ) (s : Set E) : thickening ε (cthickening δ s) = thickening (ε + δ) s
Full source
@[simp]
theorem thickening_cthickening (hε : 0 < ε) (hδ : 0 ≤ δ) (s : Set E) :
    thickening ε (cthickening δ s) = thickening (ε + δ) s := by
  obtain rfl | hδ := hδ.eq_or_lt
  · rw [cthickening_zero, thickening_closure, add_zero]
  · rw [← closure_thickening hδ, thickening_closure, thickening_thickening hε hδ]
Thickening of Closed Thickening Equals Larger Thickening
Informal description
For any subset $s$ of a normed space $E$, positive real number $\varepsilon > 0$, and non-negative real number $\delta \geq 0$, the $\varepsilon$-thickening of the $\delta$-closed thickening of $s$ is equal to the $(\varepsilon + \delta)$-thickening of $s$, i.e., \[ \text{thickening}_\varepsilon (\text{cthickening}_\delta s) = \text{thickening}_{\varepsilon + \delta} s. \]
cthickening_cthickening theorem
(hε : 0 ≤ ε) (hδ : 0 ≤ δ) (s : Set E) : cthickening ε (cthickening δ s) = cthickening (ε + δ) s
Full source
@[simp]
theorem cthickening_cthickening (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (s : Set E) :
    cthickening ε (cthickening δ s) = cthickening (ε + δ) s :=
  (cthickening_cthickening_subset hε hδ _).antisymm fun x => by
    simp_rw [mem_cthickening_iff, ENNReal.ofReal_add hε hδ, infEdist_cthickening]
    exact tsub_le_iff_right.2
Closed Thickening Composition: $\text{cthickening}_\varepsilon \circ \text{cthickening}_\delta = \text{cthickening}_{\varepsilon + \delta}$
Informal description
For any subset $s$ of a normed space $E$ and non-negative real numbers $\varepsilon, \delta \geq 0$, the $\varepsilon$-closed thickening of the $\delta$-closed thickening of $s$ is equal to the $(\varepsilon + \delta)$-closed thickening of $s$, i.e., \[ \text{cthickening}_\varepsilon (\text{cthickening}_\delta s) = \text{cthickening}_{\varepsilon + \delta} s. \]
thickening_ball theorem
(hε : 0 < ε) (hδ : 0 < δ) (x : E) : thickening ε (ball x δ) = ball x (ε + δ)
Full source
@[simp]
theorem thickening_ball (hε : 0 < ε) (hδ : 0 < δ) (x : E) :
    thickening ε (ball x δ) = ball x (ε + δ) := by
  rw [← thickening_singleton, thickening_thickening hε hδ, thickening_singleton]
Thickening of Open Ball Equals Larger Open Ball
Informal description
For any point $x$ in a normed space $E$ and positive real numbers $\varepsilon, \delta > 0$, the $\varepsilon$-thickening of the open ball of radius $\delta$ centered at $x$ is equal to the open ball of radius $\varepsilon + \delta$ centered at $x$, i.e., \[ \text{thickening}_\varepsilon (B(x, \delta)) = B(x, \varepsilon + \delta). \]
thickening_closedBall theorem
(hε : 0 < ε) (hδ : 0 ≤ δ) (x : E) : thickening ε (closedBall x δ) = ball x (ε + δ)
Full source
@[simp]
theorem thickening_closedBall (hε : 0 < ε) (hδ : 0 ≤ δ) (x : E) :
    thickening ε (closedBall x δ) = ball x (ε + δ) := by
  rw [← cthickening_singleton _ hδ, thickening_cthickening hε hδ, thickening_singleton]
Thickening of Closed Ball Equals Open Ball: $\text{thickening}_\varepsilon(\overline{B}(x, \delta)) = B(x, \varepsilon + \delta)$
Informal description
For any point $x$ in a normed space $E$, positive real number $\varepsilon > 0$, and non-negative real number $\delta \geq 0$, the $\varepsilon$-thickening of the closed ball $\overline{B}(x, \delta)$ is equal to the open ball $B(x, \varepsilon + \delta)$, i.e., \[ \text{thickening}_\varepsilon (\overline{B}(x, \delta)) = B(x, \varepsilon + \delta). \]
cthickening_ball theorem
(hε : 0 ≤ ε) (hδ : 0 < δ) (x : E) : cthickening ε (ball x δ) = closedBall x (ε + δ)
Full source
@[simp]
theorem cthickening_ball (hε : 0 ≤ ε) (hδ : 0 < δ) (x : E) :
    cthickening ε (ball x δ) = closedBall x (ε + δ) := by
  rw [← thickening_singleton, cthickening_thickening hε hδ,
      cthickening_singleton _ (add_nonneg hε hδ.le)]
Closed Thickening of Open Ball Equals Closed Ball: $\text{cthickening}_\varepsilon(B(x, \delta)) = \overline{B}(x, \varepsilon + \delta)$
Informal description
For any point $x$ in a normed space $E$, non-negative real number $\varepsilon \geq 0$, and positive real number $\delta > 0$, the $\varepsilon$-closed thickening of the open ball $B(x, \delta)$ is equal to the closed ball $\overline{B}(x, \varepsilon + \delta)$, i.e., \[ \text{cthickening}_\varepsilon (B(x, \delta)) = \overline{B}(x, \varepsilon + \delta). \]
cthickening_closedBall theorem
(hε : 0 ≤ ε) (hδ : 0 ≤ δ) (x : E) : cthickening ε (closedBall x δ) = closedBall x (ε + δ)
Full source
@[simp]
theorem cthickening_closedBall (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (x : E) :
    cthickening ε (closedBall x δ) = closedBall x (ε + δ) := by
  rw [← cthickening_singleton _ hδ, cthickening_cthickening hε hδ,
      cthickening_singleton _ (add_nonneg hε hδ)]
Closed Thickening of Closed Ball Equals Larger Closed Ball: $\text{cthickening}_\varepsilon(\overline{B}(x, \delta)) = \overline{B}(x, \varepsilon + \delta)$
Informal description
For any point $x$ in a normed space $E$ and non-negative real numbers $\varepsilon, \delta \geq 0$, the $\varepsilon$-closed thickening of the closed ball $\overline{B}(x, \delta)$ is equal to the closed ball $\overline{B}(x, \varepsilon + \delta)$, i.e., \[ \text{cthickening}_\varepsilon (\overline{B}(x, \delta)) = \overline{B}(x, \varepsilon + \delta). \]
ball_add_ball theorem
(hε : 0 < ε) (hδ : 0 < δ) (a b : E) : ball a ε + ball b δ = ball (a + b) (ε + δ)
Full source
theorem ball_add_ball (hε : 0 < ε) (hδ : 0 < δ) (a b : E) :
    ball a ε + ball b δ = ball (a + b) (ε + δ) := by
  rw [ball_add, thickening_ball hε hδ b, Metric.vadd_ball, vadd_eq_add]
Minkowski Sum of Open Balls Equals Larger Open Ball
Informal description
For any points $a, b$ in a normed space $E$ and positive real numbers $\varepsilon, \delta > 0$, the Minkowski sum of the open ball of radius $\varepsilon$ centered at $a$ and the open ball of radius $\delta$ centered at $b$ is equal to the open ball of radius $\varepsilon + \delta$ centered at $a + b$, i.e., \[ B(a, \varepsilon) + B(b, \delta) = B(a + b, \varepsilon + \delta). \]
ball_sub_ball theorem
(hε : 0 < ε) (hδ : 0 < δ) (a b : E) : ball a ε - ball b δ = ball (a - b) (ε + δ)
Full source
theorem ball_sub_ball (hε : 0 < ε) (hδ : 0 < δ) (a b : E) :
    ball a ε - ball b δ = ball (a - b) (ε + δ) := by
  simp_rw [sub_eq_add_neg, neg_ball, ball_add_ball hε hδ]
Minkowski Difference of Open Balls Equals Larger Open Ball
Informal description
For any points $a, b$ in a normed space $E$ and positive real numbers $\varepsilon, \delta > 0$, the Minkowski difference of the open ball of radius $\varepsilon$ centered at $a$ and the open ball of radius $\delta$ centered at $b$ is equal to the open ball of radius $\varepsilon + \delta$ centered at $a - b$, i.e., \[ B(a, \varepsilon) - B(b, \delta) = B(a - b, \varepsilon + \delta). \]
ball_add_closedBall theorem
(hε : 0 < ε) (hδ : 0 ≤ δ) (a b : E) : ball a ε + closedBall b δ = ball (a + b) (ε + δ)
Full source
theorem ball_add_closedBall (hε : 0 < ε) (hδ : 0 ≤ δ) (a b : E) :
    ball a ε + closedBall b δ = ball (a + b) (ε + δ) := by
  rw [ball_add, thickening_closedBall hε hδ b, Metric.vadd_ball, vadd_eq_add]
Minkowski Sum of Open Ball and Closed Ball Equals Larger Open Ball
Informal description
For any points $a, b$ in a normed space $E$, positive real number $\varepsilon > 0$, and non-negative real number $\delta \geq 0$, the Minkowski sum of the open ball $B(a, \varepsilon)$ and the closed ball $\overline{B}(b, \delta)$ is equal to the open ball $B(a + b, \varepsilon + \delta)$, i.e., \[ B(a, \varepsilon) + \overline{B}(b, \delta) = B(a + b, \varepsilon + \delta). \]
ball_sub_closedBall theorem
(hε : 0 < ε) (hδ : 0 ≤ δ) (a b : E) : ball a ε - closedBall b δ = ball (a - b) (ε + δ)
Full source
theorem ball_sub_closedBall (hε : 0 < ε) (hδ : 0 ≤ δ) (a b : E) :
    ball a ε - closedBall b δ = ball (a - b) (ε + δ) := by
  simp_rw [sub_eq_add_neg, neg_closedBall, ball_add_closedBall hε hδ]
Minkowski Difference of Open Ball and Closed Ball Equals Larger Open Ball
Informal description
For any points $a, b$ in a normed space $E$, positive real number $\varepsilon > 0$, and non-negative real number $\delta \geq 0$, the Minkowski difference of the open ball $B(a, \varepsilon)$ and the closed ball $\overline{B}(b, \delta)$ is equal to the open ball $B(a - b, \varepsilon + \delta)$, i.e., \[ B(a, \varepsilon) - \overline{B}(b, \delta) = B(a - b, \varepsilon + \delta). \]
closedBall_add_ball theorem
(hε : 0 ≤ ε) (hδ : 0 < δ) (a b : E) : closedBall a ε + ball b δ = ball (a + b) (ε + δ)
Full source
theorem closedBall_add_ball (hε : 0 ≤ ε) (hδ : 0 < δ) (a b : E) :
    closedBall a ε + ball b δ = ball (a + b) (ε + δ) := by
  rw [add_comm, ball_add_closedBall hδ hε b, add_comm, add_comm δ]
Minkowski Sum of Closed Ball and Open Ball Equals Larger Open Ball
Informal description
For any points $a, b$ in a normed space $E$, non-negative real number $\varepsilon \geq 0$, and positive real number $\delta > 0$, the Minkowski sum of the closed ball $\overline{B}(a, \varepsilon)$ and the open ball $B(b, \delta)$ is equal to the open ball $B(a + b, \varepsilon + \delta)$, i.e., \[ \overline{B}(a, \varepsilon) + B(b, \delta) = B(a + b, \varepsilon + \delta). \]
closedBall_sub_ball theorem
(hε : 0 ≤ ε) (hδ : 0 < δ) (a b : E) : closedBall a ε - ball b δ = ball (a - b) (ε + δ)
Full source
theorem closedBall_sub_ball (hε : 0 ≤ ε) (hδ : 0 < δ) (a b : E) :
    closedBall a ε - ball b δ = ball (a - b) (ε + δ) := by
  simp_rw [sub_eq_add_neg, neg_ball, closedBall_add_ball hε hδ]
Minkowski Difference of Closed Ball and Open Ball Equals Larger Open Ball
Informal description
For any points $a, b$ in a normed space $E$, non-negative real number $\varepsilon \geq 0$, and positive real number $\delta > 0$, the Minkowski difference of the closed ball $\overline{B}(a, \varepsilon)$ and the open ball $B(b, \delta)$ is equal to the open ball $B(a - b, \varepsilon + \delta)$, i.e., \[ \overline{B}(a, \varepsilon) - B(b, \delta) = B(a - b, \varepsilon + \delta). \]
closedBall_add_closedBall theorem
[ProperSpace E] (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (a b : E) : closedBall a ε + closedBall b δ = closedBall (a + b) (ε + δ)
Full source
theorem closedBall_add_closedBall [ProperSpace E] (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (a b : E) :
    closedBall a ε + closedBall b δ = closedBall (a + b) (ε + δ) := by
  rw [(isCompact_closedBall _ _).add_closedBall hδ b, cthickening_closedBall hδ hε a,
    Metric.vadd_closedBall, vadd_eq_add, add_comm, add_comm δ]
Minkowski Sum of Closed Balls in Proper Normed Space
Informal description
In a proper normed space $E$, for any points $a, b \in E$ and non-negative real numbers $\varepsilon, \delta \geq 0$, the Minkowski sum of the closed balls $\overline{B}(a, \varepsilon)$ and $\overline{B}(b, \delta)$ is equal to the closed ball $\overline{B}(a + b, \varepsilon + \delta)$. That is, \[ \overline{B}(a, \varepsilon) + \overline{B}(b, \delta) = \overline{B}(a + b, \varepsilon + \delta). \]
closedBall_sub_closedBall theorem
[ProperSpace E] (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (a b : E) : closedBall a ε - closedBall b δ = closedBall (a - b) (ε + δ)
Full source
theorem closedBall_sub_closedBall [ProperSpace E] (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (a b : E) :
    closedBall a ε - closedBall b δ = closedBall (a - b) (ε + δ) := by
  rw [sub_eq_add_neg, neg_closedBall, closedBall_add_closedBall hε hδ, sub_eq_add_neg]
Minkowski Difference of Closed Balls in Proper Normed Space
Informal description
In a proper normed space $E$, for any points $a, b \in E$ and non-negative real numbers $\varepsilon, \delta \geq 0$, the Minkowski difference of the closed balls $\overline{B}(a, \varepsilon)$ and $\overline{B}(b, \delta)$ is equal to the closed ball $\overline{B}(a - b, \varepsilon + \delta)$. That is, \[ \overline{B}(a, \varepsilon) - \overline{B}(b, \delta) = \overline{B}(a - b, \varepsilon + \delta). \]
smul_closedBall theorem
(c : 𝕜) (x : E) {r : ℝ} (hr : 0 ≤ r) : c • closedBall x r = closedBall (c • x) (‖c‖ * r)
Full source
theorem smul_closedBall (c : 𝕜) (x : E) {r : } (hr : 0 ≤ r) :
    c • closedBall x r = closedBall (c • x) (‖c‖ * r) := by
  rcases eq_or_ne c 0 with (rfl | hc)
  · simp [hr, zero_smul_set, Set.singleton_zero, nonempty_closedBall]
  · exact smul_closedBall' hc x r
Scalar Multiplication of Closed Balls: $c \cdot \overline{B}(x, r) = \overline{B}(c \cdot x, \|c\| \cdot r)$
Informal description
For any scalar $c$ in a normed field $\mathbb{K}$, any point $x$ in a normed space $E$, and any nonnegative radius $r \in \mathbb{R}_{\geq 0}$, the scalar multiplication of the closed ball centered at $x$ with radius $r$ by $c$ equals the closed ball centered at $c \cdot x$ with radius $\|c\| \cdot r$. That is, $$ c \cdot \overline{B}(x, r) = \overline{B}(c \cdot x, \|c\| \cdot r), $$ where $\overline{B}(x, r)$ denotes the closed ball of radius $r$ centered at $x$.
smul_unitClosedBall theorem
(c : 𝕜) : c • closedBall (0 : E) (1 : ℝ) = closedBall (0 : E) ‖c‖
Full source
theorem smul_unitClosedBall (c : 𝕜) : c • closedBall (0 : E) (1 : ) = closedBall (0 : E) ‖c‖ := by
  rw [_root_.smul_closedBall _ _ zero_le_one, smul_zero, mul_one]
Scalar Multiplication of Unit Closed Ball: $c \cdot \overline{B}(0, 1) = \overline{B}(0, \|c\|)$
Informal description
For any scalar $c$ in a normed field $\mathbb{K}$, the scalar multiplication of the closed unit ball centered at the origin in a normed space $E$ by $c$ equals the closed ball centered at the origin with radius $\|c\|$. That is, $$ c \cdot \overline{B}(0, 1) = \overline{B}(0, \|c\|), $$ where $\overline{B}(0, 1)$ denotes the closed unit ball centered at the origin.
smul_unitClosedBall_of_nonneg theorem
{r : ℝ} (hr : 0 ≤ r) : r • closedBall (0 : E) 1 = closedBall (0 : E) r
Full source
/-- In a real normed space, the image of the unit closed ball under multiplication by a nonnegative
number `r` is the closed ball of radius `r` with center at the origin. -/
theorem smul_unitClosedBall_of_nonneg {r : } (hr : 0 ≤ r) :
    r • closedBall (0 : E) 1 = closedBall (0 : E) r := by
  rw [smul_unitClosedBall, Real.norm_of_nonneg hr]
Scalar Multiplication of Unit Closed Ball by Nonnegative Scalar: $r \cdot \overline{B}(0, 1) = \overline{B}(0, r)$ for $r \geq 0$
Informal description
For any nonnegative real number $r \geq 0$, the scalar multiplication of the closed unit ball centered at the origin in a normed space $E$ by $r$ equals the closed ball centered at the origin with radius $r$. That is, $$ r \cdot \overline{B}(0, 1) = \overline{B}(0, r), $$ where $\overline{B}(0, 1)$ denotes the closed unit ball centered at the origin.
NormedSpace.sphere_nonempty theorem
[Nontrivial E] {x : E} {r : ℝ} : (sphere x r).Nonempty ↔ 0 ≤ r
Full source
/-- In a nontrivial real normed space, a sphere is nonempty if and only if its radius is
nonnegative. -/
@[simp]
theorem NormedSpace.sphere_nonempty [Nontrivial E] {x : E} {r : } :
    (sphere x r).Nonempty ↔ 0 ≤ r := by
  obtain ⟨y, hy⟩ := exists_ne x
  refine ⟨fun h => nonempty_closedBall.1 (h.mono sphere_subset_closedBall), fun hr =>
    ⟨r • ‖y - x‖⁻¹ • (y - x) + x, ?_⟩⟩
  have : ‖y - x‖‖y - x‖ ≠ 0 := by simpa [sub_eq_zero]
  simp only [mem_sphere_iff_norm, add_sub_cancel_right, norm_smul, Real.norm_eq_abs, norm_inv,
    norm_norm, ne_eq, norm_eq_zero]
  simp only [abs_norm, ne_eq, norm_eq_zero]
  rw [inv_mul_cancel₀ this, mul_one, abs_eq_self.mpr hr]
Nonemptiness of Sphere in Normed Space: $S(x, r) \neq \emptyset \iff r \geq 0$
Informal description
In a nontrivial real normed space $E$, for any point $x \in E$ and any radius $r \in \mathbb{R}$, the sphere $S(x, r)$ is nonempty if and only if $r \geq 0$.
smul_sphere theorem
[Nontrivial E] (c : 𝕜) (x : E) {r : ℝ} (hr : 0 ≤ r) : c • sphere x r = sphere (c • x) (‖c‖ * r)
Full source
theorem smul_sphere [Nontrivial E] (c : 𝕜) (x : E) {r : } (hr : 0 ≤ r) :
    c • sphere x r = sphere (c • x) (‖c‖ * r) := by
  rcases eq_or_ne c 0 with (rfl | hc)
  · simp [zero_smul_set, Set.singleton_zero, hr]
  · exact smul_sphere' hc x r
Scalar Multiplication of a Sphere: $c \cdot S(x, r) = S(c \cdot x, \|c\| \cdot r)$ for $r \geq 0$
Informal description
Let $E$ be a nontrivial normed space over a normed field $\mathbb{K}$. For any scalar $c \in \mathbb{K}$, any point $x \in E$, and any nonnegative radius $r \geq 0$, the scalar multiplication of the sphere centered at $x$ with radius $r$ by $c$ equals the sphere centered at $c \cdot x$ with radius $\|c\| \cdot r$. That is, $$ c \cdot S(x, r) = S(c \cdot x, \|c\| \cdot r), $$ where $S(x, r)$ denotes the sphere of radius $r$ centered at $x$.
affinity_unitBall theorem
{r : ℝ} (hr : 0 < r) (x : E) : x +ᵥ r • ball (0 : E) 1 = ball x r
Full source
/-- Any ball `Metric.ball x r`, `0 < r` is the image of the unit ball under `fun y ↦ x + r • y`. -/
theorem affinity_unitBall {r : } (hr : 0 < r) (x : E) : x +ᵥ r • ball (0 : E) 1 = ball x r := by
  rw [smul_unitBall_of_pos hr, vadd_ball_zero]
Affine Transformation of Unit Ball: $x + r \cdot B(0, 1) = B(x, r)$ for $r > 0$
Informal description
For any positive real number $r > 0$ and any point $x$ in a normed space $E$, the Minkowski sum of $x$ and the scalar multiple $r \cdot B(0, 1)$ equals the open ball centered at $x$ with radius $r$. That is, $$ x + r \cdot B(0, 1) = B(x, r), $$ where $B(x, r)$ denotes the open ball of radius $r$ centered at $x$.
affinity_unitClosedBall theorem
{r : ℝ} (hr : 0 ≤ r) (x : E) : x +ᵥ r • closedBall (0 : E) 1 = closedBall x r
Full source
/-- Any closed ball `Metric.closedBall x r`, `0 ≤ r` is the image of the unit closed ball under
`fun y ↦ x + r • y`. -/
theorem affinity_unitClosedBall {r : } (hr : 0 ≤ r) (x : E) :
    x +ᵥ r • closedBall (0 : E) 1 = closedBall x r := by
  rw [smul_unitClosedBall, Real.norm_of_nonneg hr, vadd_closedBall_zero]
Affine Transformation of Unit Closed Ball: $x + r \cdot \overline{B}(0, 1) = \overline{B}(x, r)$ for $r \geq 0$
Informal description
For any nonnegative real number $r \geq 0$ and any point $x$ in a normed space $E$, the Minkowski sum of $x$ and the scalar multiple $r \cdot \overline{B}(0, 1)$ equals the closed ball centered at $x$ with radius $r$. That is, $$ x + r \cdot \overline{B}(0, 1) = \overline{B}(x, r), $$ where $\overline{B}(x, r)$ denotes the closed ball of radius $r$ centered at $x$.