Skip to content

Commit 8ea45f6

Browse files
committed
chore(Geometry/Euclidean/Angle/Sphere): simplify using ne_center_of_mem_of_mem_of_ne
1 parent 4b96619 commit 8ea45f6

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

Mathlib/Geometry/Euclidean/Angle/Sphere.lean

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,8 @@ angle version, provided twice the angle at the circumference is at most `π`. -/
184184
theorem angle_center_eq_two_mul_angle_of_two_mul_angle_le_pi {s : Sphere P} {p₁ p₂ p₃ : P}
185185
(hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₂p₁ : p₂ ≠ p₁) (hp₂p₃ : p₂ ≠ p₃)
186186
(h : 2 * ∠ p₁ p₂ p₃ ≤ π) : ∠ p₁ s.center p₃ = 2 * ∠ p₁ p₂ p₃ := by
187-
have hp₁c : p₁ ≠ s.center := by
188-
rintro rfl
189-
rw [center_mem_iff] at hp₁
190-
exact hp₂p₁ (dist_eq_zero.mp (by rw [mem_sphere.mp hp₂, hp₁]))
191-
have hp₃c : p₃ ≠ s.center := by
192-
rintro rfl
193-
rw [center_mem_iff] at hp₃
194-
exact hp₂p₃ (dist_eq_zero.mp (by rw [mem_sphere.mp hp₂, hp₃]))
187+
have hp₁c : p₁ ≠ s.center := ne_center_of_mem_of_mem_of_ne hp₁ hp₂ hp₂p₁.symm
188+
have hp₃c : p₃ ≠ s.center := ne_center_of_mem_of_mem_of_ne hp₃ hp₂ hp₂p₃.symm
195189
refine Real.injOn_cos ⟨angle_nonneg p₁ s.center p₃, angle_le_pi p₁ s.center p₃⟩
196190
⟨mul_nonneg zero_le_two (angle_nonneg p₁ p₂ p₃), h⟩ ?_
197191
rw [← cos_oangle_eq_cos_angle hp₁c hp₃c,
@@ -205,12 +199,8 @@ theorem angle_center_eq_two_pi_sub_two_mul_angle_of_pi_le_two_mul_angle {s : Sph
205199
{p₁ p₂ p₃ : P} (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₂p₁ : p₂ ≠ p₁)
206200
(hp₂p₃ : p₂ ≠ p₃) (h : π ≤ 2 * ∠ p₁ p₂ p₃) :
207201
∠ p₁ s.center p₃ = 2 * π - 2 * ∠ p₁ p₂ p₃ := by
208-
have hp₁c : p₁ ≠ s.center := by
209-
rintro rfl; rw [center_mem_iff] at hp₁
210-
exact hp₂p₁ (dist_eq_zero.mp (by rw [mem_sphere.mp hp₂, hp₁]))
211-
have hp₃c : p₃ ≠ s.center := by
212-
rintro rfl; rw [center_mem_iff] at hp₃
213-
exact hp₂p₃ (dist_eq_zero.mp (by rw [mem_sphere.mp hp₂, hp₃]))
202+
have hp₁c : p₁ ≠ s.center := ne_center_of_mem_of_mem_of_ne hp₁ hp₂ hp₂p₁.symm
203+
have hp₃c : p₃ ≠ s.center := ne_center_of_mem_of_mem_of_ne hp₃ hp₂ hp₂p₃.symm
214204
refine Real.injOn_cos ⟨angle_nonneg p₁ s.center p₃, angle_le_pi p₁ s.center p₃⟩
215205
by linarith [angle_le_pi p₁ p₂ p₃], by linarith⟩ ?_
216206
rw [show (2 : ℝ) * π - 2 * ∠ p₁ p₂ p₃ = -(2 * ∠ p₁ p₂ p₃) + 2 * π by ring,

0 commit comments

Comments
 (0)