Skip to content

Commit a36c84a

Browse files
committed
chore: deprecate duplicate declaration for the scalar product as a sesquilinear form (leanprover-community#33316)
Zulip discussion at [#mathlib4 > Duplication @ 💬](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Duplication/near/565217359)
1 parent a30c9c0 commit a36c84a

9 files changed

Lines changed: 54 additions & 57 deletions

File tree

Mathlib/Analysis/Fourier/RiemannLebesgueLemma.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ theorem tendsto_integral_exp_inner_smul_cocompact :
199199
simp_rw [← integral_sub ((Real.fourierIntegral_convergent_iff w).2 hfi)
200200
((Real.fourierIntegral_convergent_iff w).2 (hg_cont.integrable_of_hasCompactSupport hg_supp)),
201201
← smul_sub, ← Pi.sub_apply]
202-
exact VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 _ bilinFormOfRealInner (f - g) w
202+
exact VectorFourier.norm_fourierIntegral_le_integral_norm 𝐞 _ (innerₗ V) (f - g) w
203203
replace := add_lt_add_of_le_of_lt this hI
204204
rw [add_halves] at this
205205
refine ((le_of_eq ?_).trans (norm_add_le _ _)).trans_lt this

Mathlib/Analysis/InnerProductSpace/Adjoint.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ instance : CStarRing (E →L[𝕜] E) where
246246
norm_mul_self_le x := le_of_eq <| Eq.symm <| norm_adjoint_comp_self x
247247

248248
theorem isAdjointPair_inner (A : E →L[𝕜] F) :
249-
LinearMap.IsAdjointPair (sesqFormOfInner : E →ₗ[𝕜] E →ₗ⋆[𝕜] 𝕜)
250-
(sesqFormOfInner : F →ₗ[𝕜] F →ₗ⋆[𝕜] 𝕜) A (A†) := by
249+
LinearMap.IsAdjointPair (LinearMap.flip (innerₛₗ 𝕜 (E := E)))
250+
(innerₛₗ 𝕜 (E := F)).flip A (A†) := by
251251
intro x y
252-
simp only [sesqFormOfInner_apply_apply, adjoint_inner_left]
252+
simp [adjoint_inner_left]
253253

254254
theorem adjoint_innerSL_apply (x : E) :
255255
adjoint (innerSL 𝕜 x) = toSpanSingleton 𝕜 x :=
@@ -574,10 +574,10 @@ theorem isSymmetric_iff_isSelfAdjoint (A : E →ₗ[𝕜] E) : IsSymmetric A ↔
574574
exact eq_comm
575575

576576
theorem isAdjointPair_inner (A : E →ₗ[𝕜] F) :
577-
IsAdjointPair (sesqFormOfInner : E →ₗ[𝕜] E →ₗ⋆[𝕜] 𝕜) (sesqFormOfInner : F →ₗ[𝕜] F →ₗ⋆[𝕜] 𝕜) A
578-
A.adjoint := by
577+
IsAdjointPair (innerₛₗ 𝕜 (E := E)).flip
578+
(innerₛₗ 𝕜 (E := F)).flip A A.adjoint := by
579579
intro x y
580-
simp only [sesqFormOfInner_apply_apply, adjoint_inner_left]
580+
simp [adjoint_inner_left]
581581

582582
/-- The Gram operator T†T is symmetric. -/
583583
theorem isSymmetric_adjoint_mul_self (T : E →ₗ[𝕜] E) : IsSymmetric (T.adjoint * T) := by

Mathlib/Analysis/InnerProductSpace/Basic.lean

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,30 +120,50 @@ theorem real_inner_smul_right (x y : F) (r : ℝ) : ⟪x, r • y⟫_ℝ = r *
120120
theorem inner_smul_real_right (x y : E) (r : ℝ) : ⟪x, (r : 𝕜) • y⟫ = r • ⟪x, y⟫ := by
121121
rw [inner_smul_right, Algebra.smul_def]
122122

123-
/-- The inner product as a sesquilinear form.
123+
124+
variable (𝕜)
125+
126+
/-- The inner product as a sesquilinear map.
124127
125128
Note that in the case `𝕜 = ℝ` this is a bilinear form. -/
126-
@[simps!]
127-
def sesqFormOfInner : E →ₗ[𝕜] E →ₗ⋆[𝕜] 𝕜 :=
128-
LinearMap.mk₂'ₛₗ (RingHom.id 𝕜) (starRingEnd _) (fun x y => ⟪y, x⟫)
129-
(fun _x _y _z => inner_add_right _ _ _) (fun _r _x _y => inner_smul_right _ _ _)
130-
(fun _x _y _z => inner_add_left _ _ _) fun _r _x _y => inner_smul_left _ _ _
129+
def innerₛₗ : E →ₗ⋆[𝕜] E →ₗ[𝕜] 𝕜 :=
130+
LinearMap.mk₂'ₛₗ _ _ (fun v w => ⟪v, w⟫) inner_add_left (fun _ _ _ => inner_smul_left _ _ _)
131+
inner_add_right fun _ _ _ => inner_smul_right _ _ _
132+
133+
@[simp]
134+
theorem coe_innerₛₗ_apply (v : E) : ⇑(innerₛₗ 𝕜 v) = fun w => ⟪v, w⟫ :=
135+
rfl
136+
137+
@[simp]
138+
theorem innerₛₗ_apply_apply (v w : E) : innerₛₗ 𝕜 v w = ⟪v, w⟫ :=
139+
rfl
140+
141+
variable (F)
142+
/-- The inner product as a bilinear map in the real case. -/
143+
def innerₗ : F →ₗ[ℝ] F →ₗ[ℝ] ℝ := innerₛₗ ℝ
144+
145+
@[simp] lemma flip_innerₗ : (innerₗ F).flip = innerₗ F := by
146+
ext v w
147+
exact real_inner_comm v w
131148

132-
/-- The real inner product as a bilinear form.
149+
variable {F}
150+
151+
@[simp] lemma innerₗ_apply_apply (v w : F) : innerₗ F v w = ⟪v, w⟫_ℝ := rfl
152+
153+
variable {𝕜}
133154

134-
Note that unlike `sesqFormOfInner`, this does not reverse the order of the arguments. -/
135-
@[simps!]
136-
def bilinFormOfRealInner : BilinForm ℝ F := sesqFormOfInner.flip
155+
@[deprecated (since := "2025-12-26")] alias sesqFormOfInner := innerₛₗ
156+
@[deprecated (since := "2025-12-26")] alias bilinFormOfRealInner := innerₗ
137157

138158
/-- An inner product with a sum on the left. -/
139159
theorem sum_inner {ι : Type*} (s : Finset ι) (f : ι → E) (x : E) :
140160
⟪∑ i ∈ s, f i, x⟫ = ∑ i ∈ s, ⟪f i, x⟫ :=
141-
map_sum (sesqFormOfInner (𝕜 := 𝕜) (E := E) x) _ _
161+
map_sum ((innerₛₗ 𝕜).flip x) _ _
142162

143163
/-- An inner product with a sum on the right. -/
144164
theorem inner_sum {ι : Type*} (s : Finset ι) (f : ι → E) (x : E) :
145165
⟪x, ∑ i ∈ s, f i⟫ = ∑ i ∈ s, ⟪x, f i⟫ :=
146-
map_sum (LinearMap.flip sesqFormOfInner x) _ _
166+
map_sum (innerₛₗ 𝕜 x) _ _
147167

148168
/-- An inner product with a sum on the left, `Finsupp` version. -/
149169
protected theorem Finsupp.sum_inner {ι : Type*} (l : ι →₀ 𝕜) (v : ι → E) (x : E) :

Mathlib/Analysis/InnerProductSpace/CanonicalTensor.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ variable (E : Type*) [NormedAddCommGroup E] [InnerProductSpace ℝ E]
3232

3333
/-- The canonical contravariant tensor corresponding to the inner product -/
3434
noncomputable def InnerProductSpace.canonicalContravariantTensor :
35-
E ⊗[ℝ] E →ₗ[ℝ] ℝ := lift bilinFormOfRealInner
35+
E ⊗[ℝ] E →ₗ[ℝ] ℝ := lift (innerₗ E)
3636

3737
/--
3838
The canonical covariant tensor corresponding to `InnerProductSpace.canonicalContravariantTensor`

Mathlib/Analysis/InnerProductSpace/LinearMap.lean

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ This file studies linear maps on inner product spaces.
1414
1515
## Main results
1616
17-
- We define `innerSL` as the inner product bundled as a continuous sesquilinear map, and
18-
`innerₛₗ` for the non-continuous version.
17+
- We define `innerSL` as the inner product bundled as a continuous sesquilinear map
1918
- We prove a general polarization identity for linear maps (`inner_map_polarization`)
2019
- We show that a linear map preserving the inner product is an isometry
2120
(`LinearMap.isometryOfInner`) and conversely an isometry preserves the inner product
@@ -159,31 +158,6 @@ end
159158

160159
variable (𝕜)
161160

162-
/-- The inner product as a sesquilinear map. -/
163-
def innerₛₗ : E →ₗ⋆[𝕜] E →ₗ[𝕜] 𝕜 :=
164-
LinearMap.mk₂'ₛₗ _ _ (fun v w => ⟪v, w⟫) inner_add_left (fun _ _ _ => inner_smul_left _ _ _)
165-
inner_add_right fun _ _ _ => inner_smul_right _ _ _
166-
167-
@[simp]
168-
theorem coe_innerₛₗ_apply (v : E) : ⇑(innerₛₗ 𝕜 v) = fun w => ⟪v, w⟫ :=
169-
rfl
170-
171-
@[simp]
172-
theorem innerₛₗ_apply_apply (v w : E) : innerₛₗ 𝕜 v w = ⟪v, w⟫ :=
173-
rfl
174-
175-
variable (F)
176-
/-- The inner product as a bilinear map in the real case. -/
177-
def innerₗ : F →ₗ[ℝ] F →ₗ[ℝ] ℝ := innerₛₗ ℝ
178-
179-
@[simp] lemma flip_innerₗ : (innerₗ F).flip = innerₗ F := by
180-
ext v w
181-
exact real_inner_comm v w
182-
183-
variable {F}
184-
185-
@[simp] lemma innerₗ_apply_apply (v w : F) : innerₗ F v w = ⟪v, w⟫_ℝ := rfl
186-
187161
/-- The inner product as a continuous sesquilinear map. Note that `toDualMap` (resp. `toDual`)
188162
in `InnerProductSpace.Dual` is a version of this given as a linear isometry (resp. linear
189163
isometric equivalence). -/

Mathlib/Analysis/InnerProductSpace/Orthogonal.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,13 @@ theorem orthogonalFamily_self :
203203
end Submodule
204204

205205
@[simp]
206-
theorem bilinFormOfRealInner_orthogonal {E} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
207-
(K : Submodule ℝ E) : K.orthogonalBilin bilinFormOfRealInner = Kᗮ :=
206+
theorem orthogonalBilin_innerₗ {E} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
207+
(K : Submodule ℝ E) : K.orthogonalBilin (innerₗ E) = Kᗮ :=
208208
rfl
209209

210+
@[deprecated (since := "2025-12-26")]
211+
alias bilinFormOfRealInner_orthogonal := orthogonalBilin_innerₗ
212+
210213
/-!
211214
### Orthogonality of submodules
212215

Mathlib/Analysis/InnerProductSpace/Symmetric.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ section Real
6363
/-- An operator `T` on an inner product space is symmetric if and only if it is
6464
`LinearMap.IsSelfAdjoint` with respect to the sesquilinear form given by the inner product. -/
6565
theorem isSymmetric_iff_sesqForm (T : E →ₗ[𝕜] E) :
66-
T.IsSymmetric ↔ LinearMap.IsSelfAdjoint (R := 𝕜) (M := E) sesqFormOfInner T :=
66+
T.IsSymmetric ↔ LinearMap.IsSelfAdjoint (R := 𝕜) (M := E) (LinearMap.flip (innerₛₗ 𝕜)) T :=
6767
fun h x y => (h y x).symm, fun h x y => (h y x).symm⟩
6868

6969
end Real

Mathlib/MeasureTheory/Measure/CharacteristicFunction.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ variable {E F : Type*} [SeminormedAddCommGroup E] [InnerProductSpace ℝ E]
6666
/-- The bounded continuous map `x ↦ exp(⟪x, t⟫ * I)`. -/
6767
noncomputable
6868
def innerProbChar (t : E) : E →ᵇ ℂ :=
69-
char continuous_probChar (L := bilinFormOfRealInner) continuous_inner t
69+
char continuous_probChar (L := innerₗ E) continuous_inner t
7070

7171
lemma innerProbChar_apply (t x : E) : innerProbChar t x = exp (⟪x, t⟫ * I) := rfl
7272

@@ -155,15 +155,15 @@ lemma charFun_eq_integral_probChar (t : E) : charFun μ t = ∫ x, (probChar ⟪
155155

156156
/-- `charFun` is a Fourier integral for the inner product and the character `probChar`. -/
157157
lemma charFun_eq_fourierIntegral (t : E) :
158-
charFun μ t = VectorFourier.fourierIntegral probChar μ bilinFormOfRealInner 1 (-t) := by
158+
charFun μ t = VectorFourier.fourierIntegral probChar μ (innerₗ E) 1 (-t) := by
159159
simp [charFun_apply, VectorFourier.fourierIntegral_probChar]
160160

161161
/-- `charFun` is a Fourier integral for the inner product and the character `fourierChar`. -/
162162
lemma charFun_eq_fourierIntegral' (t : E) :
163163
charFun μ t
164-
= VectorFourier.fourierIntegral fourierChar μ bilinFormOfRealInner 1 (-(2 * π)⁻¹ • t) := by
164+
= VectorFourier.fourierIntegral fourierChar μ (innerₗ E) 1 (-(2 * π)⁻¹ • t) := by
165165
simp only [charFun_apply, VectorFourier.fourierIntegral, neg_smul,
166-
bilinFormOfRealInner_apply_apply, inner_neg_right, inner_smul_right, neg_neg,
166+
innerₗ_apply_apply, inner_neg_right, inner_smul_right, neg_neg,
167167
fourierChar_apply', Pi.ofNat_apply, Circle.smul_def, Circle.coe_exp, ofReal_mul, ofReal_ofNat,
168168
ofReal_inv, smul_eq_mul, mul_one]
169169
congr with x
@@ -238,7 +238,7 @@ theorem Measure.ext_of_charFun [CompleteSpace E]
238238
[IsFiniteMeasure μ] [IsFiniteMeasure ν] (h : charFun μ = charFun ν) :
239239
μ = ν := by
240240
simp_rw [funext_iff, charFun_eq_integral_innerProbChar] at h
241-
refine ext_of_integral_char_eq continuous_probChar probChar_ne_one (L := bilinFormOfRealInner)
241+
refine ext_of_integral_char_eq continuous_probChar probChar_ne_one (L := innerₗ E)
242242
?_ ?_ h
243243
· exact fun v hv ↦ DFunLike.ne_iff.mpr ⟨v, inner_self_ne_zero.mpr hv⟩
244244
· exact continuous_inner

Mathlib/Probability/Moments/ComplexMGF.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,14 @@ theorem _root_.MeasureTheory.Measure.ext_of_complexMGF_eq [IsFiniteMeasure μ]
320320
[IsFiniteMeasure μ'] (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ')
321321
(h : complexMGF X μ = complexMGF Y μ') :
322322
μ.map X = μ'.map Y := by
323-
have inner_ne_zero (x : ℝ) (h : x ≠ 0) : bilinFormOfRealInner x ≠ 0 :=
323+
have inner_ne_zero (x : ℝ) (h : x ≠ 0) : innerₗ ℝ x ≠ 0 :=
324324
DFunLike.ne_iff.mpr ⟨x, inner_self_ne_zero.mpr h⟩
325325
apply MeasureTheory.ext_of_integral_char_eq continuous_probChar probChar_ne_one inner_ne_zero
326326
continuous_inner (fun w ↦ ?_)
327327
rw [funext_iff] at h
328328
specialize h (Multiplicative.toAdd w * I)
329329
simp_rw [complexMGF, mul_assoc, mul_comm I, ← mul_assoc] at h
330-
simp only [BoundedContinuousFunction.char_apply, bilinFormOfRealInner_apply_apply,
330+
simp only [BoundedContinuousFunction.char_apply, innerₗ_apply_apply,
331331
RCLike.inner_apply, conj_trivial, probChar_apply, ofReal_mul]
332332
rwa [integral_map hX (by fun_prop), integral_map hY (by fun_prop)]
333333

0 commit comments

Comments
 (0)