Skip to content

Commit 55b9074

Browse files
committed
chore(InnerProductSpace): follow the naming convention (#24250)
A lot of mentions to `re` were ommitted, but not all, which makes it extra confusing.
1 parent f685e3a commit 55b9074

File tree

18 files changed

+98
-86
lines changed

18 files changed

+98
-86
lines changed

β€ŽMathlib/Analysis/CStarAlgebra/Module/Constructions.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ instance instCStarModuleComplex : CStarModule β„‚ E where
344344
inner_smul_right_complex := by simp [inner_smul_right, smul_eq_mul]
345345
star_inner _ _ := by simp
346346
norm_eq_sqrt_norm_inner_self {x} := by
347-
simpa only [← inner_self_re_eq_norm] using norm_eq_sqrt_inner x
347+
simpa only [← inner_self_re_eq_norm] using norm_eq_sqrt_re_inner x
348348

349349
-- Ensures that the two ways to obtain `CStarModule ℂᡐᡒᡖ β„‚` are definitionally equal.
350350
example : instCStarModule (A := β„‚) = instCStarModuleComplex := by with_reducible_and_instances rfl

β€ŽMathlib/Analysis/Fourier/AddCircle.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ theorem tsum_sq_fourierCoeff (f : Lp β„‚ 2 <| @haarAddCircle T hT) :
393393
have Hβ‚‚ : β€–fourierBasis.repr fβ€– ^ 2 = β€–fβ€– ^ 2 := by simp
394394
have H₃ := congr_arg RCLike.re (@L2.inner_def (AddCircle T) β„‚ β„‚ _ _ _ _ _ f f)
395395
rw [← integral_re] at H₃
396-
Β· simp only [← norm_sq_eq_inner] at H₃
396+
Β· simp only [← norm_sq_eq_re_inner] at H₃
397397
rw [← H₁, Hβ‚‚, H₃]
398398
Β· exact L2.integrable_inner f f
399399

β€ŽMathlib/Analysis/InnerProductSpace/Basic.lean

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
4646

4747
local postfix:90 "†" => starRingEnd _
4848

49-
export InnerProductSpace (norm_sq_eq_inner)
49+
export InnerProductSpace (norm_sq_eq_re_inner)
5050

5151
@[simp]
5252
theorem inner_conj_symm (x y : E) : βŸͺy, xβŸ«β€  = βŸͺx, y⟫ :=
53-
InnerProductSpace.conj_symm _ _
53+
InnerProductSpace.conj_inner_symm _ _
5454

5555
theorem real_inner_comm (x y : F) : βŸͺy, x⟫_ℝ = βŸͺx, y⟫_ℝ :=
5656
@inner_conj_symm ℝ _ _ _ _ x y
@@ -176,7 +176,7 @@ theorem inner_re_zero_right (x : E) : re βŸͺx, 0⟫ = 0 := by
176176
simp only [inner_zero_right, AddMonoidHom.map_zero]
177177

178178
theorem inner_self_nonneg {x : E} : 0 ≀ re βŸͺx, x⟫ :=
179-
PreInnerProductSpace.toCore.nonneg_re x
179+
PreInnerProductSpace.toCore.re_inner_nonneg x
180180

181181
theorem real_inner_self_nonneg {x : F} : 0 ≀ βŸͺx, x⟫_ℝ :=
182182
@inner_self_nonneg ℝ F _ _ _ x
@@ -186,7 +186,7 @@ theorem inner_self_ofReal_re (x : E) : (re βŸͺx, x⟫ : π•œ) = βŸͺx, x⟫ :=
186186
((RCLike.is_real_TFAE (βŸͺx, x⟫ : π•œ)).out 2 3).2 (inner_self_im (π•œ := π•œ) x)
187187

188188
theorem inner_self_eq_norm_sq_to_K (x : E) : βŸͺx, x⟫ = (β€–xβ€– : π•œ) ^ 2 := by
189-
rw [← inner_self_ofReal_re, ← norm_sq_eq_inner, ofReal_pow]
189+
rw [← inner_self_ofReal_re, ← norm_sq_eq_re_inner, ofReal_pow]
190190

191191
theorem inner_self_re_eq_norm (x : E) : re βŸͺx, x⟫ = β€–βŸͺx, xβŸ«β€– := by
192192
conv_rhs => rw [← inner_self_ofReal_re]
@@ -274,7 +274,7 @@ variable [NormedAddCommGroup F] [InnerProductSpace ℝ F]
274274

275275
local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
276276

277-
export InnerProductSpace (norm_sq_eq_inner)
277+
export InnerProductSpace (norm_sq_eq_re_inner)
278278

279279
@[simp]
280280
theorem inner_self_eq_zero {x : E} : βŸͺx, x⟫ = 0 ↔ x = 0 := by
@@ -294,18 +294,21 @@ theorem ext_inner_right {x y : E} (h : βˆ€ v, βŸͺx, v⟫ = βŸͺy, v⟫) : x = y :
294294
variable {π•œ}
295295

296296
@[simp]
297-
theorem inner_self_nonpos {x : E} : re βŸͺx, x⟫ ≀ 0 ↔ x = 0 := by
298-
rw [← norm_sq_eq_inner, (sq_nonneg _).le_iff_eq, sq_eq_zero_iff, norm_eq_zero]
297+
theorem re_inner_self_nonpos {x : E} : re βŸͺx, x⟫ ≀ 0 ↔ x = 0 := by
298+
rw [← norm_sq_eq_re_inner, (sq_nonneg _).le_iff_eq, sq_eq_zero_iff, norm_eq_zero]
299299

300300
@[simp]
301-
theorem inner_self_pos {x : E} : 0 < re βŸͺx, x⟫ ↔ x β‰  0 := by
302-
simpa [-inner_self_nonpos] using inner_self_nonpos (π•œ := π•œ) (x := x).not
301+
lemma re_inner_self_pos {x : E} : 0 < re βŸͺx, x⟫ ↔ x β‰  0 := by
302+
simpa [-re_inner_self_nonpos] using re_inner_self_nonpos (π•œ := π•œ) (x := x).not
303+
304+
@[deprecated (since := "2025-04-22")] alias inner_self_nonpos := re_inner_self_nonpos
305+
@[deprecated (since := "2025-04-22")] alias inner_self_pos := re_inner_self_pos
303306

304307
open scoped InnerProductSpace in
305-
theorem real_inner_self_nonpos {x : F} : βŸͺx, x⟫_ℝ ≀ 0 ↔ x = 0 := inner_self_nonpos (π•œ := ℝ)
308+
theorem real_inner_self_nonpos {x : F} : βŸͺx, x⟫_ℝ ≀ 0 ↔ x = 0 := re_inner_self_nonpos (π•œ := ℝ)
306309

307310
open scoped InnerProductSpace in
308-
theorem real_inner_self_pos {x : F} : 0 < βŸͺx, x⟫_ℝ ↔ x β‰  0 := inner_self_pos (π•œ := ℝ)
311+
theorem real_inner_self_pos {x : F} : 0 < βŸͺx, x⟫_ℝ ↔ x β‰  0 := re_inner_self_pos (π•œ := ℝ)
309312

310313
/-- A family of vectors is linearly independent if they are nonzero
311314
and orthogonal. -/
@@ -336,16 +339,18 @@ local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
336339

337340
local notation "IK" => @RCLike.I π•œ _
338341

339-
theorem norm_eq_sqrt_inner (x : E) : β€–xβ€– = √(re βŸͺx, x⟫) :=
342+
theorem norm_eq_sqrt_re_inner (x : E) : β€–xβ€– = √(re βŸͺx, x⟫) :=
340343
calc
341344
β€–xβ€– = √(β€–xβ€– ^ 2) := (sqrt_sq (norm_nonneg _)).symm
342-
_ = √(re βŸͺx, x⟫) := congr_arg _ (norm_sq_eq_inner _)
345+
_ = √(re βŸͺx, x⟫) := congr_arg _ (norm_sq_eq_re_inner _)
346+
347+
@[deprecated (since := "2025-04-22")] alias norm_eq_sqrt_inner := norm_eq_sqrt_re_inner
343348

344349
theorem norm_eq_sqrt_real_inner (x : F) : β€–xβ€– = √βŸͺx, x⟫_ℝ :=
345-
@norm_eq_sqrt_inner ℝ _ _ _ _ x
350+
@norm_eq_sqrt_re_inner ℝ _ _ _ _ x
346351

347352
theorem inner_self_eq_norm_mul_norm (x : E) : re βŸͺx, x⟫ = β€–xβ€– * β€–xβ€– := by
348-
rw [@norm_eq_sqrt_inner π•œ, ← sqrt_mul inner_self_nonneg (re βŸͺx, x⟫),
353+
rw [@norm_eq_sqrt_re_inner π•œ, ← sqrt_mul inner_self_nonneg (re βŸͺx, x⟫),
349354
sqrt_mul_self inner_self_nonneg]
350355

351356
theorem inner_self_eq_norm_sq (x : E) : re βŸͺx, x⟫ = β€–xβ€– ^ 2 := by
@@ -413,7 +418,7 @@ theorem norm_sub_mul_self_real (x y : F) :
413418

414419
/-- Cauchy–Schwarz inequality with norm -/
415420
theorem norm_inner_le_norm (x y : E) : β€–βŸͺx, yβŸ«β€– ≀ β€–xβ€– * β€–yβ€– := by
416-
rw [norm_eq_sqrt_inner (π•œ := π•œ) x, norm_eq_sqrt_inner (π•œ := π•œ) y]
421+
rw [norm_eq_sqrt_re_inner (π•œ := π•œ) x, norm_eq_sqrt_re_inner (π•œ := π•œ) y]
417422
letI : PreInnerProductSpace.Core π•œ E := PreInnerProductSpace.toCore
418423
exact InnerProductSpace.Core.norm_inner_le_norm x y
419424

@@ -666,7 +671,7 @@ theorem norm_inner_eq_norm_tfae (x y : E) :
666671
have : β€–xβ€– ^ 2 β‰  0 := pow_ne_zero _ (norm_ne_zero_iff.2 hxβ‚€)
667672
rw [← sq_eq_sqβ‚€, mul_pow, ← mul_right_inj' this, eq_comm, ← sub_eq_zero, ← mul_sub] at h <;>
668673
try positivity
669-
simp only [@norm_sq_eq_inner π•œ] at h
674+
simp only [@norm_sq_eq_re_inner π•œ] at h
670675
letI : InnerProductSpace.Core π•œ E := InnerProductSpace.toCore
671676
erw [← InnerProductSpace.Core.cauchy_schwarz_aux (π•œ := π•œ) (F := E)] at h
672677
rw [InnerProductSpace.Core.normSq_eq_zero, sub_eq_zero] at h
@@ -789,10 +794,10 @@ theorem inner_lt_one_iff_real_of_norm_one {x y : F} (hx : β€–xβ€– = 1) (hy : β€–
789794
/-- The sphere of radius `r = β€–yβ€–` is tangent to the plane `βŸͺx, y⟫ = β€–yβ€– ^ 2` at `x = y`. -/
790795
theorem eq_of_norm_le_re_inner_eq_norm_sq {x y : E} (hle : β€–xβ€– ≀ β€–yβ€–) (h : re βŸͺx, y⟫ = β€–yβ€– ^ 2) :
791796
x = y := by
792-
suffices H : re βŸͺx - y, x - y⟫ ≀ 0 by rwa [inner_self_nonpos, sub_eq_zero] at H
797+
suffices H : re βŸͺx - y, x - y⟫ ≀ 0 by rwa [re_inner_self_nonpos, sub_eq_zero] at H
793798
have H₁ : β€–xβ€– ^ 2 ≀ β€–yβ€– ^ 2 := by gcongr
794799
have Hβ‚‚ : re βŸͺy, x⟫ = β€–yβ€– ^ 2 := by rwa [← inner_conj_symm, conj_re]
795-
simpa [inner_sub_left, inner_sub_right, ← norm_sq_eq_inner, h, Hβ‚‚] using H₁
800+
simpa [inner_sub_left, inner_sub_right, ← norm_sq_eq_re_inner, h, Hβ‚‚] using H₁
796801

797802
end Norm
798803

@@ -803,8 +808,8 @@ local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
803808
/-- A field `π•œ` satisfying `RCLike` is itself a `π•œ`-inner product space. -/
804809
instance RCLike.innerProductSpace : InnerProductSpace π•œ π•œ where
805810
inner x y := y * conj x
806-
norm_sq_eq_inner x := by simp only [inner, mul_conj, ← ofReal_pow, ofReal_re]
807-
conj_symm x y := by simp only [mul_comm, map_mul, starRingEnd_self_apply]
811+
norm_sq_eq_re_inner x := by simp only [inner, mul_conj, ← ofReal_pow, ofReal_re]
812+
conj_inner_symm x y := by simp only [mul_comm, map_mul, starRingEnd_self_apply]
808813
add_left x y z := by simp only [mul_add, map_add]
809814
smul_left x y z := by simp only [mul_comm (conj z), mul_assoc, smul_eq_mul, map_mul]
810815

@@ -845,8 +850,8 @@ abbrev InnerProductSpace.rclikeToReal : InnerProductSpace ℝ E :=
845850
{ Inner.rclikeToReal π•œ E,
846851
NormedSpace.restrictScalars ℝ π•œ
847852
E with
848-
norm_sq_eq_inner := norm_sq_eq_inner
849-
conj_symm := fun _ _ => inner_re_symm _ _
853+
norm_sq_eq_re_inner := norm_sq_eq_re_inner
854+
conj_inner_symm := fun _ _ => inner_re_symm _ _
850855
add_left := fun x y z => by
851856
change re βŸͺx + y, z⟫ = re βŸͺx, z⟫ + re βŸͺy, z⟫
852857
simp only [inner_add_left, map_add]
@@ -882,8 +887,8 @@ end RCLikeToReal
882887
/-- An `RCLike` field is a real inner product space. -/
883888
noncomputable instance RCLike.toInnerProductSpaceReal : InnerProductSpace ℝ π•œ where
884889
__ := Inner.rclikeToReal π•œ π•œ
885-
norm_sq_eq_inner := norm_sq_eq_inner
886-
conj_symm x y := inner_re_symm ..
890+
norm_sq_eq_re_inner := norm_sq_eq_re_inner
891+
conj_inner_symm x y := inner_re_symm ..
887892
add_left x y z :=
888893
show re (_ * _) = re (_ * _) + re (_ * _) by simp only [map_add, mul_re, conj_re, conj_im]; ring
889894
smul_left x y r :=

β€ŽMathlib/Analysis/InnerProductSpace/Completion.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ theorem inner_mk_mk (x y : E) :
3838
inner (mk x) (mk y) = (inner x y : π•œ) := rfl
3939

4040
instance : InnerProductSpace π•œ (SeparationQuotient E) where
41-
norm_sq_eq_inner := Quotient.ind norm_sq_eq_inner
42-
conj_symm := Quotient.indβ‚‚ inner_conj_symm
41+
norm_sq_eq_re_inner := Quotient.ind norm_sq_eq_re_inner
42+
conj_inner_symm := Quotient.indβ‚‚ inner_conj_symm
4343
add_left := Quotient.ind fun x => Quotient.indβ‚‚ <| inner_add_left x
4444
smul_left := Quotient.indβ‚‚ inner_smul_left
4545

@@ -90,10 +90,10 @@ protected theorem Continuous.inner {Ξ± : Type*} [TopologicalSpace Ξ±] {f g : Ξ±
9090
UniformSpace.Completion.continuous_inner.comp (hf.prodMk hg :)
9191

9292
instance innerProductSpace : InnerProductSpace π•œ (Completion E) where
93-
norm_sq_eq_inner x :=
93+
norm_sq_eq_re_inner x :=
9494
Completion.induction_on x (isClosed_eq (by fun_prop) (by fun_prop))
9595
fun a => by simp only [norm_coe, inner_coe, inner_self_eq_norm_sq]
96-
conj_symm x y :=
96+
conj_inner_symm x y :=
9797
Completion.induction_onβ‚‚ x y
9898
(isClosed_eq (continuous_conj.comp (by fun_prop)) (by fun_prop))
9999
fun a b => by simp only [inner_coe, inner_conj_symm]

β€ŽMathlib/Analysis/InnerProductSpace/Defs.lean

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ To construct a seminorm from an inner product, see `PreInnerProductSpace.ofCore`
101101
class InnerProductSpace (π•œ : Type*) (E : Type*) [RCLike π•œ] [SeminormedAddCommGroup E] extends
102102
NormedSpace π•œ E, Inner π•œ E where
103103
/-- The inner product induces the norm. -/
104-
norm_sq_eq_inner : βˆ€ x : E, β€–xβ€– ^ 2 = re (inner x x)
104+
norm_sq_eq_re_inner : βˆ€ x : E, β€–xβ€– ^ 2 = re (inner x x)
105105
/-- The inner product is *hermitian*, taking the `conj` swaps the arguments. -/
106-
conj_symm : βˆ€ x y, conj (inner y x) = inner x y
106+
conj_inner_symm : βˆ€ x y, conj (inner y x) = inner x y
107107
/-- The inner product is additive in the first coordinate. -/
108108
add_left : βˆ€ x y z, inner (x + y) z = inner x z + inner y z
109109
/-- The inner product is conjugate linear in the first coordinate. -/
@@ -131,13 +131,19 @@ instance defined on it, otherwise this will create a second non-defeq norm insta
131131
structure PreInnerProductSpace.Core (π•œ : Type*) (F : Type*) [RCLike π•œ] [AddCommGroup F]
132132
[Module π•œ F] extends Inner π•œ F where
133133
/-- The inner product is *hermitian*, taking the `conj` swaps the arguments. -/
134-
conj_symm : βˆ€ x y, conj (inner y x) = inner x y
134+
conj_inner_symm x y : conj (inner y x) = inner x y
135135
/-- The inner product is positive (semi)definite. -/
136-
nonneg_re : βˆ€ x, 0 ≀ re (inner x x)
136+
re_inner_nonneg x : 0 ≀ re (inner x x)
137137
/-- The inner product is additive in the first coordinate. -/
138-
add_left : βˆ€ x y z, inner (x + y) z = inner x z + inner y z
138+
add_left x y z : inner (x + y) z = inner x z + inner y z
139139
/-- The inner product is conjugate linear in the first coordinate. -/
140-
smul_left : βˆ€ x y r, inner (r β€’ x) y = conj r * inner x y
140+
smul_left x y r : inner (r β€’ x) y = conj r * inner x y
141+
142+
@[deprecated (since := "2025-04-22")]
143+
alias PreInnerProductSpace.Core.conj_symm := PreInnerProductSpace.Core.conj_inner_symm
144+
145+
@[deprecated (since := "2025-04-22")]
146+
alias PreInnerProductSpace.Core.inner_nonneg := PreInnerProductSpace.Core.re_inner_nonneg
141147

142148
attribute [class] PreInnerProductSpace.Core
143149

@@ -156,21 +162,19 @@ attribute [class] InnerProductSpace.Core
156162
instance (π•œ : Type*) (F : Type*) [RCLike π•œ] [AddCommGroup F]
157163
[Module π•œ F] [cd : InnerProductSpace.Core π•œ F] : PreInnerProductSpace.Core π•œ F where
158164
inner := cd.inner
159-
conj_symm := cd.conj_symm
160-
nonneg_re := cd.nonneg_re
165+
conj_inner_symm := cd.conj_inner_symm
166+
re_inner_nonneg := cd.re_inner_nonneg
161167
add_left := cd.add_left
162168
smul_left := cd.smul_left
163169

164-
/-- Define `PreInnerProductSpace.Core` from `PreInnerProductSpace`. Defined to reuse lemmas about
170+
/-- Define `PreInnerProductSpace.Core` from `InnerProductSpace`. Defined to reuse lemmas about
165171
`PreInnerProductSpace.Core` for `PreInnerProductSpace`s. Note that the `Seminorm` instance provided
166172
by `PreInnerProductSpace.Core.norm` is propositionally but not definitionally equal to the original
167173
norm. -/
168174
def PreInnerProductSpace.toCore [SeminormedAddCommGroup E] [c : InnerProductSpace π•œ E] :
169-
PreInnerProductSpace.Core π•œ E :=
170-
{ c with
171-
nonneg_re := fun x => by
172-
rw [← InnerProductSpace.norm_sq_eq_inner]
173-
apply sq_nonneg }
175+
PreInnerProductSpace.Core π•œ E where
176+
__ := c
177+
re_inner_nonneg x := by rw [← InnerProductSpace.norm_sq_eq_re_inner]; apply sq_nonneg
174178

175179
/-- Define `InnerProductSpace.Core` from `InnerProductSpace`. Defined to reuse lemmas about
176180
`InnerProductSpace.Core` for `InnerProductSpace`s. Note that the `Norm` instance provided by
@@ -179,12 +183,12 @@ norm. -/
179183
def InnerProductSpace.toCore [NormedAddCommGroup E] [c : InnerProductSpace π•œ E] :
180184
InnerProductSpace.Core π•œ E :=
181185
{ c with
182-
nonneg_re := fun x => by
183-
rw [← InnerProductSpace.norm_sq_eq_inner]
186+
re_inner_nonneg := fun x => by
187+
rw [← InnerProductSpace.norm_sq_eq_re_inner]
184188
apply sq_nonneg
185189
definite := fun x hx =>
186190
norm_eq_zero.1 <| pow_eq_zero (n := 2) <| by
187-
rw [InnerProductSpace.norm_sq_eq_inner (π•œ := π•œ) x, hx, map_zero] }
191+
rw [InnerProductSpace.norm_sq_eq_re_inner (π•œ := π•œ) x, hx, map_zero] }
188192

189193
namespace InnerProductSpace.Core
190194

@@ -222,10 +226,10 @@ def normSq (x : F) :=
222226
local notation "normSqF" => @normSq π•œ F _ _ _ _
223227

224228
theorem inner_conj_symm (x y : F) : βŸͺy, xβŸ«β€  = βŸͺx, y⟫ :=
225-
c.conj_symm x y
229+
c.conj_inner_symm x y
226230

227231
theorem inner_self_nonneg {x : F} : 0 ≀ re βŸͺx, x⟫ :=
228-
c.nonneg_re _
232+
c.re_inner_nonneg _
229233

230234
theorem inner_self_im (x : F) : im βŸͺx, x⟫ = 0 := by
231235
rw [← @ofReal_inj π•œ, im_eq_conj_sub]
@@ -376,10 +380,12 @@ def toNorm : Norm F where norm x := √(re βŸͺx, x⟫)
376380

377381
attribute [local instance] toNorm
378382

379-
theorem norm_eq_sqrt_inner (x : F) : β€–xβ€– = √(re βŸͺx, x⟫) := rfl
383+
theorem norm_eq_sqrt_re_inner (x : F) : β€–xβ€– = √(re βŸͺx, x⟫) := rfl
384+
385+
@[deprecated (since := "2025-04-22")] alias norm_eq_sqrt_inner := norm_eq_sqrt_re_inner
380386

381387
theorem inner_self_eq_norm_mul_norm (x : F) : re βŸͺx, x⟫ = β€–xβ€– * β€–xβ€– := by
382-
rw [norm_eq_sqrt_inner, ← sqrt_mul inner_self_nonneg (re βŸͺx, x⟫), sqrt_mul_self inner_self_nonneg]
388+
rw [norm_eq_sqrt_re_inner, ← sqrt_mul inner_self_nonneg, sqrt_mul_self inner_self_nonneg]
383389

384390
theorem sqrt_normSq_eq_norm (x : F) : √(normSqF x) = β€–xβ€– := rfl
385391

@@ -413,7 +419,7 @@ attribute [local instance] toSeminormedAddCommGroup
413419
`PreInnerProductSpace.Core` structure -/
414420
def toSeminormedSpace : NormedSpace π•œ F where
415421
norm_smul_le r x := by
416-
rw [norm_eq_sqrt_inner, inner_smul_left, inner_smul_right, ← mul_assoc]
422+
rw [norm_eq_sqrt_re_inner, inner_smul_left, inner_smul_right, ← mul_assoc]
417423
rw [RCLike.conj_mul, ← ofReal_pow, re_ofReal_mul, sqrt_mul, ← ofReal_normSq_eq_inner_self,
418424
ofReal_re]
419425
Β· simp [sqrt_normSq_eq_norm, RCLike.sqrt_normSq_eq_norm]
@@ -477,7 +483,7 @@ attribute [local instance] toNormedAddCommGroup
477483
/-- Normed space structure constructed from an `InnerProductSpace.Core` structure -/
478484
def toNormedSpace : NormedSpace π•œ F where
479485
norm_smul_le r x := by
480-
rw [norm_eq_sqrt_inner, inner_smul_left, inner_smul_right, ← mul_assoc]
486+
rw [norm_eq_sqrt_re_inner, inner_smul_left, inner_smul_right, ← mul_assoc]
481487
rw [RCLike.conj_mul, ← ofReal_pow, re_ofReal_mul, sqrt_mul, ← ofReal_normSq_eq_inner_self,
482488
ofReal_re]
483489
Β· simp [sqrt_normSq_eq_norm, RCLike.sqrt_normSq_eq_norm]
@@ -498,7 +504,7 @@ def InnerProductSpace.ofCore [AddCommGroup F] [Module π•œ F] (cd : InnerProduct
498504
InnerProductSpace π•œ F :=
499505
letI : NormedSpace π•œ F := @InnerProductSpace.Core.toNormedSpace π•œ F _ _ _ cd
500506
{ cd with
501-
norm_sq_eq_inner := fun x => by
507+
norm_sq_eq_re_inner := fun x => by
502508
have h₁ : β€–xβ€– ^ 2 = √(re (cd.inner x x)) ^ 2 := rfl
503509
have hβ‚‚ : 0 ≀ re (cd.inner x x) := InnerProductSpace.Core.inner_self_nonneg
504510
simp [h₁, sq_sqrt, hβ‚‚] }

β€ŽMathlib/Analysis/InnerProductSpace/LinearMap.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ theorem LinearIsometryEquiv.inner_map_eq_flip (f : E ≃ₗᡒ[π•œ] E') (x : E)
122122

123123
/-- A linear map that preserves the inner product is a linear isometry. -/
124124
def LinearMap.isometryOfInner (f : E β†’β‚—[π•œ] E') (h : βˆ€ x y, βŸͺf x, f y⟫ = βŸͺx, y⟫) : E β†’β‚—α΅’[π•œ] E' :=
125-
⟨f, fun x => by simp only [@norm_eq_sqrt_inner π•œ, h]⟩
125+
⟨f, fun x => by simp only [@norm_eq_sqrt_re_inner π•œ, h]⟩
126126

127127
@[simp]
128128
theorem LinearMap.coe_isometryOfInner (f : E β†’β‚—[π•œ] E') (h) : ⇑(f.isometryOfInner h) = f :=

β€ŽMathlib/Analysis/InnerProductSpace/MeanErgodic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ theorem ContinuousLinearMap.tendsto_birkhoffAverage_orthogonalProjection (f : E
100100
Β· simpa using f.le_of_opNorm_le hf x
101101
Β· have : βˆ€ y, βŸͺf y, x⟫ = βŸͺy, x⟫ := by
102102
simpa [Submodule.mem_orthogonal, inner_sub_left, sub_eq_zero] using hx
103-
simp [this, ← norm_sq_eq_inner]
103+
simp [this, ← norm_sq_eq_re_inner]

β€ŽMathlib/Analysis/InnerProductSpace/OfNorm.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ noncomputable def InnerProductSpace.ofNorm
229229
InnerProductSpace π•œ E :=
230230
haveI : InnerProductSpaceable E := ⟨h⟩
231231
{ inner := inner_ π•œ
232-
norm_sq_eq_inner := inner_.norm_sq
233-
conj_symm := inner_.conj_symm
232+
norm_sq_eq_re_inner := inner_.norm_sq
233+
conj_inner_symm := inner_.conj_symm
234234
add_left := InnerProductSpaceable.add_left
235235
smul_left := fun _ _ _ => innerProp _ _ _ }
236236

@@ -243,8 +243,8 @@ parallelogram identity can be given a compatible inner product. Do
243243
`InnerProductSpace π•œ E`. -/
244244
theorem nonempty_innerProductSpace : Nonempty (InnerProductSpace π•œ E) :=
245245
⟨{ inner := inner_ π•œ
246-
norm_sq_eq_inner := inner_.norm_sq
247-
conj_symm := inner_.conj_symm
246+
norm_sq_eq_re_inner := inner_.norm_sq
247+
conj_inner_symm := inner_.conj_symm
248248
add_left := add_left
249249
smul_left := fun _ _ _ => innerProp _ _ _ }⟩
250250

β€ŽMathlib/Analysis/InnerProductSpace/Orthonormal.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ theorem orthonormal_iff_ite [DecidableEq ΞΉ] {v : ΞΉ β†’ E} :
7676
Β· intro h
7777
constructor
7878
Β· intro i
79-
have h' : β€–v iβ€– ^ 2 = 1 ^ 2 := by simp [@norm_sq_eq_inner π•œ, h i i]
79+
have h' : β€–v iβ€– ^ 2 = 1 ^ 2 := by simp [@norm_sq_eq_re_inner π•œ, h i i]
8080
have h₁ : 0 ≀ β€–v iβ€– := norm_nonneg _
8181
have hβ‚‚ : (0 : ℝ) ≀ 1 := zero_le_one
8282
rwa [sq_eq_sqβ‚€ h₁ hβ‚‚] at h'
@@ -434,7 +434,7 @@ theorem Orthonormal.sum_inner_products_le {s : Finset ΞΉ} (hv : Orthonormal π•œ
434434
rw [← sub_nonneg, ← hbf]
435435
simp only [norm_nonneg, pow_nonneg]
436436
rw [@norm_sub_sq π•œ, sub_add]
437-
simp only [@InnerProductSpace.norm_sq_eq_inner π•œ E, inner_sum, sum_inner]
437+
simp only [@InnerProductSpace.norm_sq_eq_re_inner π•œ E, inner_sum, sum_inner]
438438
simp only [inner_smul_right, two_mul, inner_smul_left, inner_conj_symm, ← mul_assoc, hβ‚‚,
439439
add_sub_cancel_right, sub_right_inj]
440440
simp only [map_sum, ← inner_conj_symm x, ← h₃]

0 commit comments

Comments
Β (0)