Skip to content

Commit 5fb8ff5

Browse files
committed
feat(Geometry/Euclidean/Sphere/Basic): two small lemmas (#22472)
Add the following straightforward lemmas about spheres: ```lean @[simp] lemma Sphere.center_mem_iff {s : Sphere P} : s.center ∈ s ↔ s.radius = 0 := by ``` ```lean lemma Sphere.nonempty_iff [Nontrivial V] {s : Sphere P} : (s : Set P).Nonempty ↔ 0 ≤ s.radius := by ```
1 parent 2d1e2d7 commit 5fb8ff5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Mathlib/Geometry/Euclidean/Sphere/Basic.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ theorem dist_center_eq_dist_center_of_mem_sphere' {p₁ p₂ : P} {s : Sphere P}
134134
lemma Sphere.radius_nonneg_of_mem {s : Sphere P} {p : P} (h : p ∈ s) : 0 ≤ s.radius :=
135135
Metric.nonneg_of_mem_sphere h
136136

137+
@[simp] lemma Sphere.center_mem_iff {s : Sphere P} : s.center ∈ s ↔ s.radius = 0 := by
138+
simp [mem_sphere, eq_comm]
139+
137140
/-- A set of points is cospherical if they are equidistant from some
138141
point. In two dimensions, this is the same thing as being
139142
concyclic. -/
@@ -180,6 +183,12 @@ section NormedSpace
180183

181184
variable [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P]
182185

186+
lemma Sphere.nonempty_iff [Nontrivial V] {s : Sphere P} : (s : Set P).Nonempty ↔ 0 ≤ s.radius := by
187+
refine ⟨fun ⟨p, hp⟩ ↦ radius_nonneg_of_mem hp, fun h ↦ ?_⟩
188+
obtain ⟨v, hv⟩ := (NormedSpace.sphere_nonempty (x := (0 : V)) (r := s.radius)).2 h
189+
refine ⟨v +ᵥ s.center, ?_⟩
190+
simpa [mem_sphere] using hv
191+
183192
include V in
184193
/-- Two points are cospherical. -/
185194
theorem cospherical_pair (p₁ p₂ : P) : Cospherical ({p₁, p₂} : Set P) :=

0 commit comments

Comments
 (0)