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

Commit a378650

Browse files
committed
chore(analysis/inner_product_space/basic): add inner_self_ne_zero (#18587)
This result is trivial, but it's presence is consistent with how we have both `norm_ne_zero` and `norm_ne_zero_iff`.
1 parent 83f81ae commit a378650

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/analysis/inner_product_space/basic.lean

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ by rw [←inner_conj_symm, inner_zero_left]; simp only [ring_hom.map_zero]
209209
lemma inner_self_eq_zero {x : F} : ⟪x, x⟫ = 0 ↔ x = 0 :=
210210
iff.intro (c.definite _) (by { rintro rfl, exact inner_zero_left _ })
211211

212+
lemma inner_self_ne_zero {x : F} : ⟪x, x⟫ ≠ 0 ↔ x ≠ 0 :=
213+
inner_self_eq_zero.not
214+
212215
lemma inner_self_re_to_K (x : F) : (re ⟪x, x⟫ : 𝕜) = ⟪x, x⟫ :=
213216
by norm_num [ext_iff, inner_self_nonneg_im]
214217

@@ -248,7 +251,7 @@ begin
248251
by_cases hy : y = 0,
249252
{ rw [hy], simp only [is_R_or_C.abs_zero, inner_zero_left, mul_zero, add_monoid_hom.map_zero] },
250253
{ change y ≠ 0 at hy,
251-
have hy' : ⟪y, y⟫ ≠ 0 := λ h, by rw [inner_self_eq_zero] at h; exact hy h,
254+
have hy' : ⟪y, y⟫ ≠ 0 := inner_self_ne_zero.mpr hy,
252255
set T := ⟪y, x⟫ / ⟪y, y⟫ with hT,
253256
have h₁ : re ⟪y, x⟫ = re ⟪x, y⟫ := inner_re_symm _ _,
254257
have h₂ : im ⟪y, x⟫ = -im ⟪x, y⟫ := inner_im_symm _ _,
@@ -510,6 +513,9 @@ begin
510513
exact inner_zero_left _ }
511514
end
512515

516+
lemma inner_self_ne_zero {x : E} : ⟪x, x⟫ ≠ 0 ↔ x ≠ 0 :=
517+
inner_self_eq_zero.not
518+
513519
@[simp] lemma inner_self_nonpos {x : E} : re ⟪x, x⟫ ≤ 0 ↔ x = 0 :=
514520
begin
515521
split,

src/analysis/inner_product_space/dual.lean

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,7 @@ begin
131131
... = (ℓ x) * ⟪z, z⟫ / ⟪z, z⟫
132132
: by rw [h₂]
133133
... = ℓ x
134-
: begin
135-
have : ⟪z, z⟫ ≠ 0,
136-
{ change z = 0 → false at z_ne_0,
137-
rwa ←inner_self_eq_zero at z_ne_0 },
138-
field_simp [this]
139-
end,
134+
: by field_simp [inner_self_ne_zero.2 z_ne_0],
140135
exact h₄ }
141136
end
142137

src/analysis/inner_product_space/gram_schmidt_ortho.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ begin
9696
{ by_cases h : gram_schmidt 𝕜 f a = 0,
9797
{ simp only [h, inner_zero_left, zero_div, zero_mul, sub_zero], },
9898
{ rw [← inner_self_eq_norm_sq_to_K, div_mul_cancel, sub_self],
99-
rwa [ne.def, inner_self_eq_zero], }, },
99+
rwa [inner_self_ne_zero], }, },
100100
simp_intros i hi hia only [finset.mem_range],
101101
simp only [mul_eq_zero, div_eq_zero_iff, inner_self_eq_zero],
102102
right,

src/geometry/euclidean/angle/unoriented/basic.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ end
112112
@[simp] lemma angle_self {x : V} (hx : x ≠ 0) : angle x x = 0 :=
113113
begin
114114
unfold angle,
115-
rw [←real_inner_self_eq_norm_mul_norm, div_self (λ h, hx (inner_self_eq_zero.1 h)),
116-
real.arccos_one]
115+
rw [←real_inner_self_eq_norm_mul_norm, div_self (inner_self_ne_zero.2 hx), real.arccos_one]
117116
end
118117

119118
/-- The angle between a nonzero vector and its negation. -/

src/geometry/euclidean/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ by rw [←neg_one_smul ℝ v, s.second_inter_smul p v (by norm_num : (-1 : ℝ)
10461046
s.second_inter (s.second_inter p v) v = p :=
10471047
begin
10481048
by_cases hv : v = 0, { simp [hv] },
1049-
have hv' : ⟪v, v⟫ ≠ 0 := inner_self_eq_zero.not.2 hv,
1049+
have hv' : ⟪v, v⟫ ≠ 0 := inner_self_ne_zero.2 hv,
10501050
simp only [sphere.second_inter, vadd_vsub_assoc, vadd_vadd, inner_add_right, inner_smul_right,
10511051
div_mul_cancel _ hv'],
10521052
rw [←@vsub_eq_zero_iff_eq V, vadd_vsub, ←add_smul, ←add_div],

0 commit comments

Comments
 (0)