Skip to content

Commit ad58550

Browse files
committed
chore: golf NormedSpace.sphere_nonempty (#27910)
This result has nothing to do with pointwise operators on sets, and in finding the right file I also found a lemma which golfs it. The motivation here was wanting this lemma in the file about operator norms.
1 parent c2f6df0 commit ad58550

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

Mathlib/Analysis/NormedSpace/Pointwise.lean

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -379,18 +379,6 @@ theorem smul_unitClosedBall_of_nonneg {r : ℝ} (hr : 0 ≤ r) :
379379
@[deprecated (since := "2024-12-01")]
380380
alias smul_closedUnitBall_of_nonneg := smul_unitClosedBall_of_nonneg
381381

382-
/-- In a nontrivial real normed space, a sphere is nonempty if and only if its radius is
383-
nonnegative. -/
384-
@[simp]
385-
theorem NormedSpace.sphere_nonempty [Nontrivial E] {x : E} {r : ℝ} :
386-
(sphere x r).Nonempty ↔ 0 ≤ r := by
387-
obtain ⟨y, hy⟩ := exists_ne x
388-
refine ⟨fun h => nonempty_closedBall.1 (h.mono sphere_subset_closedBall), fun hr =>
389-
⟨r • ‖y - x‖⁻¹ • (y - x) + x, ?_⟩⟩
390-
have : ‖y - x‖ ≠ 0 := by simpa [sub_eq_zero]
391-
simp only [mem_sphere_iff_norm, add_sub_cancel_right, norm_smul, Real.norm_eq_abs, norm_inv]
392-
simp only [abs_norm]
393-
rw [inv_mul_cancel₀ this, mul_one, abs_eq_self.mpr hr]
394382

395383
theorem smul_sphere [Nontrivial E] (c : 𝕜) (x : E) {r : ℝ} (hr : 0 ≤ r) :
396384
c • sphere x r = sphere (c • x) (‖c‖ * r) := by

Mathlib/Analysis/NormedSpace/RCLike.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Kalle Kytölä
55
-/
66
import Mathlib.Analysis.RCLike.Basic
7+
import Mathlib.Analysis.NormedSpace.Real
78
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
8-
import Mathlib.Analysis.NormedSpace.Pointwise
99

1010
/-!
1111
# Normed spaces over R or C

Mathlib/Analysis/NormedSpace/Real.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ theorem nnnorm_surjective : Surjective (nnnorm : E → ℝ≥0) := fun c =>
130130
theorem range_nnnorm : range (nnnorm : E → ℝ≥0) = univ :=
131131
(nnnorm_surjective E).range_eq
132132

133+
variable {E} in
134+
/-- In a nontrivial real normed space, a sphere is nonempty if and only if its radius is
135+
nonnegative. -/
136+
@[simp]
137+
theorem NormedSpace.sphere_nonempty {x : E} {r : ℝ} : (sphere x r).Nonempty ↔ 0 ≤ r := by
138+
refine ⟨fun h => nonempty_closedBall.1 (h.mono sphere_subset_closedBall), fun hr => ?_⟩
139+
obtain ⟨y, hy⟩ := exists_norm_eq E hr
140+
exact ⟨x + y, by simpa using hy⟩
141+
133142
end Surj
134143

135144
theorem interior_closedBall' (x : E) (r : ℝ) : interior (closedBall x r) = ball x r := by

0 commit comments

Comments
 (0)