@@ -3,6 +3,7 @@ Copyright (c) 2025 Joseph Myers. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE. 
44Authors: Joseph Myers 
55-/ 
6+ import  Mathlib.Geometry.Euclidean.Angle.Unoriented.Projection
67import  Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle
78import  Mathlib.Geometry.Euclidean.Projection
89
@@ -41,15 +42,12 @@ private lemma dist_orthogonalProjection_eq_iff_angle_eq_aux₁ {p p' : P}
4142    · subst hpp'
4243      exact hp'.2 
4344    · by_contra hn
44-       rw [angle_self_of_ne hpp', angle_comm, angle_eq_arcsin_of_angle_eq_pi_div_two,
45+       rw [angle_self_of_ne hpp', angle_comm,
46+         angle_eq_arcsin_of_angle_eq_pi_div_two (angle_self_orthogonalProjection p hp'.2 ),
4547        Real.zero_eq_arcsin_iff, div_eq_zero_iff] at h
4648      · simp only [dist_eq_zero, hpp', or_false] at h
4749        rw [eq_comm] at h
4850        simp [orthogonalProjection_eq_self_iff, hn] at h
49-       · rw [angle, ← InnerProductGeometry.inner_eq_zero_iff_angle_eq_pi_div_two]
50-         exact Submodule.inner_left_of_mem_orthogonal (K := s₂.direction)
51-           (AffineSubspace.vsub_mem_direction hp'.2  (orthogonalProjection_mem _))
52-           (vsub_orthogonalProjection_mem_direction_orthogonal _ _)
5351      · exact .inl (Ne.symm (orthogonalProjection_eq_self_iff.symm.not.1  hn))
5452
5553/-- Auxiliary lemma for the degenerate case of `dist_orthogonalProjection_eq_iff_angle_eq` where 
@@ -86,10 +84,10 @@ lemma dist_orthogonalProjection_eq_iff_angle_eq {p p' : P} {s₁ s₂ : AffineSu
8684  · exact dist_orthogonalProjection_eq_iff_angle_eq_aux hp' h'
8785  rw [not_or] at h'
8886  rw [angle_comm,
89-     angle_eq_arcsin_of_angle_eq_pi_div_two ?_ 
87+     angle_eq_arcsin_of_angle_eq_pi_div_two (angle_self_orthogonalProjection p hp'. 1 ) 
9088      (.inl (Ne.symm (orthogonalProjection_eq_self_iff.symm.not.1  h'.1 ))),
9189    angle_comm,
92-     angle_eq_arcsin_of_angle_eq_pi_div_two ?_ 
90+     angle_eq_arcsin_of_angle_eq_pi_div_two (angle_self_orthogonalProjection p hp'. 2 ) 
9391      (.inl (Ne.symm (orthogonalProjection_eq_self_iff.symm.not.1  h'.2 )))]
9492  · refine ⟨fun  h ↦ ?_, fun  h ↦ ?_⟩
9593    · rw [h]
@@ -105,13 +103,5 @@ lemma dist_orthogonalProjection_eq_iff_angle_eq {p p' : P} {s₁ s₂ : AffineSu
105103        exact Metric.infDist_le_dist_of_mem (SetLike.mem_coe.1  hp'.1 )
106104      · rw [dist_orthogonalProjection_eq_infDist]
107105        exact Metric.infDist_le_dist_of_mem (SetLike.mem_coe.1  hp'.2 )
108-   · rw [angle, ← InnerProductGeometry.inner_eq_zero_iff_angle_eq_pi_div_two]
109-     exact Submodule.inner_left_of_mem_orthogonal (K := s₂.direction)
110-       (AffineSubspace.vsub_mem_direction hp'.2  (orthogonalProjection_mem _))
111-       (vsub_orthogonalProjection_mem_direction_orthogonal _ _)
112-   · rw [angle, ← InnerProductGeometry.inner_eq_zero_iff_angle_eq_pi_div_two]
113-     exact Submodule.inner_left_of_mem_orthogonal (K := s₁.direction)
114-       (AffineSubspace.vsub_mem_direction hp'.1  (orthogonalProjection_mem _))
115-       (vsub_orthogonalProjection_mem_direction_orthogonal _ _)
116106
117107end  EuclideanGeometry
0 commit comments