English
If ∠ p1 p2 p3 = π/2, then dist(p3,p2) / cos(∠ p2 p3 p1) = dist(p1,p3).
Русский
Если ∠ p1 p2 p3 = π/2, то dist(p3,p2) / cos(∠ p2 p3 p1) = dist(p1,p3).
LaTeX
$$$ \dfrac{\operatorname{dist}(p_3,p_2)}{\cos(\angle p_2 p_3 p_1)} = \operatorname{dist}(p_1,p_3) $$$
Lean4
/-- A side of a right-angled triangle divided by the cosine of the adjacent angle equals the
hypotenuse. -/
theorem dist_div_cos_angle_of_angle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∠ p₁ p₂ p₃ = π / 2) (h0 : p₁ = p₂ ∨ p₃ ≠ p₂) :
dist p₃ p₂ / Real.cos (∠ p₂ p₃ p₁) = dist p₁ p₃ :=
by
rw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ← inner_neg_left,
neg_vsub_eq_vsub_rev] at h
rw [ne_comm, ← @vsub_ne_zero V, ← @vsub_eq_zero_iff_eq V, or_comm] at h0
rw [angle, dist_eq_norm_vsub' V p₃ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃, add_comm,
norm_div_cos_angle_add_of_inner_eq_zero h h0]