Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit be3b175

Browse files
committed
feat(analysis/normed_space/real_inner_product): inner_add_sub_eq_zero_iff (#4004)
Add a lemma that the sum and difference of two vectors are orthogonal if and only if they have the same norm. (This can be interpreted geometrically as saying e.g. that a median of a triangle from a vertex is orthogonal to the opposite edge if and only if the triangle is isosceles at that vertex.)
1 parent d0a8cc4 commit be3b175

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/analysis/normed_space/real_inner_product.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,15 @@ lemma norm_sub_square_eq_norm_square_add_norm_square {x y : α} (h : inner x y =
442442
∥x - y∥ * ∥x - y∥ = ∥x∥ * ∥x∥ + ∥y∥ * ∥y∥ :=
443443
(norm_sub_square_eq_norm_square_add_norm_square_iff_inner_eq_zero x y).2 h
444444

445+
/-- The sum and difference of two vectors are orthogonal if and only
446+
if they have the same norm. -/
447+
lemma inner_add_sub_eq_zero_iff (x y : α) : inner (x + y) (x - y) = 0 ↔ ∥x∥ = ∥y∥ :=
448+
begin
449+
conv_rhs { rw ←mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _) },
450+
simp [←inner_self_eq_norm_square, inner_add_left, inner_sub_right, inner_comm y x,
451+
sub_eq_zero, add_comm (inner x y)]
452+
end
453+
445454
/-- The inner product of two vectors, divided by the product of their
446455
norms, has absolute value at most 1. -/
447456
lemma abs_inner_div_norm_mul_norm_le_one (x y : α) : abs (inner x y / (∥x∥ * ∥y∥)) ≤ 1 :=

0 commit comments

Comments
 (0)