@@ -6,7 +6,6 @@ Authors: Zhouhang Zhou, Sébastien Gouëzel, Frédéric Dupuis
6
6
7
7
import linear_algebra.bilinear_form
8
8
import linear_algebra.sesquilinear_form
9
- import analysis.special_functions.pow
10
9
import topology.metric_space.pi_Lp
11
10
import data.complex.is_R_or_C
12
11
725
724
lemma abs_real_inner_le_norm (x y : F) : absR ⟪x, y⟫_ℝ ≤ ∥x∥ * ∥y∥ :=
726
725
by { have h := @abs_inner_le_norm ℝ F _ _ x y, simpa using h }
727
726
727
+ /-- Cauchy–Schwarz inequality with norm -/
728
+ lemma real_inner_le_norm (x y : F) : ⟪x, y⟫_ℝ ≤ ∥x∥ * ∥y∥ :=
729
+ le_trans (le_abs_self _) (abs_real_inner_le_norm _ _)
730
+
728
731
include 𝕜
729
732
lemma parallelogram_law_with_norm {x y : E} :
730
733
∥x + y∥ * ∥x + y∥ + ∥x - y∥ * ∥x - y∥ = 2 * (∥x∥ * ∥x∥ + ∥y∥ * ∥y∥) :=
938
941
/--
939
942
If the inner product of two vectors is equal to the product of their norms, then the two vectors
940
943
are multiples of each other. One form of the equality case for Cauchy-Schwarz.
941
- -/
944
+ Compare `inner_eq_norm_mul_iff`, which takes the stronger hypothesis `⟪x, y⟫ = ∥x∥ * ∥y∥`. -/
942
945
lemma abs_inner_eq_norm_iff (x y : E) (hx0 : x ≠ 0 ) (hy0 : y ≠ 0 ):
943
946
abs ⟪x, y⟫ = ∥x∥ * ∥y∥ ↔ ∃ (r : 𝕜), r ≠ 0 ∧ y = r • x :=
944
947
begin
@@ -1010,6 +1013,63 @@ begin
1010
1013
exact real_inner_div_norm_mul_norm_eq_neg_one_of_ne_zero_of_neg_mul hx hr }
1011
1014
end
1012
1015
1016
+ /-- If the inner product of two vectors is equal to the product of their norms (i.e.,
1017
+ `⟪x, y⟫ = ∥x∥ * ∥y∥`), then the two vectors are nonnegative real multiples of each other. One form
1018
+ of the equality case for Cauchy-Schwarz.
1019
+ Compare `abs_inner_eq_norm_iff`, which takes the weaker hypothesis `abs ⟪x, y⟫ = ∥x∥ * ∥y∥`. -/
1020
+ lemma inner_eq_norm_mul_iff {x y : E} :
1021
+ ⟪x, y⟫ = (∥x∥ : 𝕜) * ∥y∥ ↔ (∥y∥ : 𝕜) • x = (∥x∥ : 𝕜) • y :=
1022
+ begin
1023
+ by_cases h : (x = 0 ∨ y = 0 ), -- WLOG `x` and `y` are nonzero
1024
+ { cases h; simp [h] },
1025
+ calc ⟪x, y⟫ = (∥x∥ : 𝕜) * ∥y∥ ↔ ∥x∥ * ∥y∥ = re ⟪x, y⟫ :
1026
+ begin
1027
+ norm_cast,
1028
+ split,
1029
+ { intros h',
1030
+ simp [h'] },
1031
+ { have cauchy_schwarz := abs_inner_le_norm x y,
1032
+ intros h',
1033
+ rw h' at ⊢ cauchy_schwarz,
1034
+ rwa re_eq_self_of_le }
1035
+ end
1036
+ ... ↔ 2 * ∥x∥ * ∥y∥ * (∥x∥ * ∥y∥ - re ⟪x, y⟫) = 0 :
1037
+ by simp [h, show (2 :ℝ) ≠ 0 , by norm_num, sub_eq_zero]
1038
+ ... ↔ ∥(∥y∥:𝕜) • x - (∥x∥:𝕜) • y∥ * ∥(∥y∥:𝕜) • x - (∥x∥:𝕜) • y∥ = 0 :
1039
+ begin
1040
+ simp only [norm_sub_mul_self, inner_smul_left, inner_smul_right, norm_smul, conj_of_real,
1041
+ is_R_or_C.norm_eq_abs, abs_of_real, of_real_im, of_real_re, mul_re, abs_norm_eq_norm],
1042
+ refine eq.congr _ rfl,
1043
+ ring
1044
+ end
1045
+ ... ↔ (∥y∥ : 𝕜) • x = (∥x∥ : 𝕜) • y : by simp [norm_sub_eq_zero_iff]
1046
+ end
1047
+
1048
+ /-- If the inner product of two vectors is equal to the product of their norms (i.e.,
1049
+ `⟪x, y⟫ = ∥x∥ * ∥y∥`), then the two vectors are nonnegative real multiples of each other. One form
1050
+ of the equality case for Cauchy-Schwarz.
1051
+ Compare `abs_inner_eq_norm_iff`, which takes the weaker hypothesis `abs ⟪x, y⟫ = ∥x∥ * ∥y∥`. -/
1052
+ lemma inner_eq_norm_mul_iff_real {x y : F} : ⟪x, y⟫_ℝ = ∥x∥ * ∥y∥ ↔ ∥y∥ • x = ∥x∥ • y :=
1053
+ inner_eq_norm_mul_iff
1054
+
1055
+ /-- If the inner product of two unit vectors is `1`, then the two vectors are equal. One form of
1056
+ the equality case for Cauchy-Schwarz. -/
1057
+ lemma inner_eq_norm_mul_iff_of_norm_one {x y : E} (hx : ∥x∥ = 1 ) (hy : ∥y∥ = 1 ) :
1058
+ ⟪x, y⟫ = 1 ↔ x = y :=
1059
+ by { convert inner_eq_norm_mul_iff using 2 ; simp [hx, hy] }
1060
+
1061
+ lemma inner_lt_norm_mul_iff_real {x y : F} :
1062
+ ⟪x, y⟫_ℝ < ∥x∥ * ∥y∥ ↔ ∥y∥ • x ≠ ∥x∥ • y :=
1063
+ calc ⟪x, y⟫_ℝ < ∥x∥ * ∥y∥
1064
+ ↔ ⟪x, y⟫_ℝ ≠ ∥x∥ * ∥y∥ : ⟨ne_of_lt, lt_of_le_of_ne (real_inner_le_norm _ _)⟩
1065
+ ... ↔ ∥y∥ • x ≠ ∥x∥ • y : not_congr inner_eq_norm_mul_iff_real
1066
+
1067
+ /-- If the inner product of two unit vectors is strictly less than `1`, then the two vectors are
1068
+ distinct. One form of the equality case for Cauchy-Schwarz. -/
1069
+ lemma inner_lt_one_iff_real_of_norm_one {x y : F} (hx : ∥x∥ = 1 ) (hy : ∥y∥ = 1 ) :
1070
+ ⟪x, y⟫_ℝ < 1 ↔ x ≠ y :=
1071
+ by { convert inner_lt_norm_mul_iff_real; simp [hx, hy] }
1072
+
1013
1073
/-- The inner product of two weighted sums, where the weights in each
1014
1074
sum add to 0, in terms of the norms of pairwise differences. -/
1015
1075
lemma inner_sum_smul_sum_smul_of_sum_eq_zero {ι₁ : Type *} {s₁ : finset ι₁} {w₁ : ι₁ → ℝ}
0 commit comments