Skip to content

Commit 04b2e5d

Browse files
committed
feat(Geometry/Euclidean/Sphere/SecondInter): add secondInter difference lemmas (#42308)
This PR adds formulas for the difference and distance between the values of `Sphere.secondInter` associated with two sphere centers and a common base point and direction. The general statements do not require the direction to have norm one. Convenient unit-direction corollaries are provided as well: - `Sphere.secondInter_vsub_secondInter` - `Sphere.secondInter_vsub_secondInter_of_norm_eq_one` - `Sphere.dist_secondInter_secondInter` - `Sphere.dist_secondInter_secondInter_of_norm_eq_one` The results describe how the second intersection changes when the sphere center is changed, and provide both vector-valued and distance formulations. Co-authored-by: Scarlett-le <735979178@qq.com>
1 parent 8118e15 commit 04b2e5d

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,37 @@ theorem Sphere.secondInter_secondInter (s : Sphere P) (p : P) (v : V) :
144144
convert! zero_div (G₀ := ℝ) _
145145
ring
146146

147+
/-- The difference between the second intersections of two spheres along a common
148+
direction `v` is `(2 * ⟪v, s₁.center -ᵥ s₂.center⟫ / ⟪v, v⟫) • v`. -/
149+
theorem Sphere.secondInter_vsub_secondInter (s₁ s₂ : Sphere P) (p : P) (v : V) :
150+
s₁.secondInter p v -ᵥ s₂.secondInter p v = (2 * ⟪v, s₁.center -ᵥ s₂.center⟫ / ⟪v, v⟫) • v := by
151+
rw [Sphere.secondInter, Sphere.secondInter, vadd_vsub_vadd_cancel_right, ← sub_smul,
152+
← vsub_sub_vsub_cancel_left s₁.center s₂.center p, inner_sub_right]
153+
grind
154+
155+
/-- The difference between the second intersections of two spheres along a common
156+
unit direction `v` is `(2 * ⟪v, s₁.center -ᵥ s₂.center⟫) • v`. -/
157+
theorem Sphere.secondInter_vsub_secondInter_of_norm_eq_one (s₁ s₂ : Sphere P) (p : P) {v : V}
158+
(hv : ‖v‖ = 1) :
159+
s₁.secondInter p v -ᵥ s₂.secondInter p v = (2 * ⟪v, s₁.center -ᵥ s₂.center⟫) • v := by
160+
simp [hv, secondInter_vsub_secondInter]
161+
162+
/-- The distance between the second intersections of two spheres along a common
163+
direction `v` is `2 * |⟪v, s₁.center -ᵥ s₂.center⟫| / ‖v‖`. -/
164+
theorem Sphere.dist_secondInter_secondInter (s₁ s₂ : Sphere P) (p : P) (v : V) :
165+
dist (s₁.secondInter p v) (s₂.secondInter p v) = 2 * |⟪v, s₁.center -ᵥ s₂.center⟫| / ‖v‖ := by
166+
rcases eq_or_ne v 0 with rfl | hv
167+
· simp
168+
simp [dist_eq_norm_vsub, secondInter_vsub_secondInter, norm_smul]
169+
grind
170+
171+
/-- The distance between the second intersections of two spheres along a common
172+
unit direction `v` is `2 * |⟪v, s₁.center -ᵥ s₂.center⟫|`. -/
173+
theorem Sphere.dist_secondInter_secondInter_of_norm_eq_one (s₁ s₂ : Sphere P) (p : P) {v : V}
174+
(hv : ‖v‖ = 1) :
175+
dist (s₁.secondInter p v) (s₂.secondInter p v) = 2 * |⟪v, s₁.center -ᵥ s₂.center⟫| := by
176+
rw [dist_secondInter_secondInter, hv, div_one]
177+
147178
/-- If the vector passed to `secondInter` is given by a subtraction involving the point in
148179
`secondInter`, the result of `secondInter` may be expressed using `lineMap`. -/
149180
theorem Sphere.secondInter_eq_lineMap (s : Sphere P) (p p' : P) :

0 commit comments

Comments
 (0)