Skip to content

Commit d300915

Browse files
committed
refactor: improve API connecting - and 𝕜-linear functionals (#34543)
This PR concerns the extension of `ℝ`-linear (continuous or not) functionals to `𝕜`-linear functionals. This does several things, but I felt it was better to do it all at once, rather than having repeated churn in the same files because the current setup is a mess for numerous reasons. Unfortunately, that means the diff is a bit of a mess; I think the easiest way to review this PR is read the following discussion and then only look at the *new* code (and check that the deprecations exist). I will begin by highlighting the current problems: 1. Naming: the primary declarations `LinearMap.extendTo𝕜'` and `ContinuousLinearMap.extendTo𝕜'` are in the wrong namespaces (`Module.Dual` and `StrongDual`), and contain a variable name `𝕜`. 2. These declarations are primed, and their unprimed counterparts operate directly on `RestrictScalars`. This is nominally (according to the module documentation) for convenience, but it leads to defeq abuse (see #34530) and so should be avoided anyway. That PR removes the only occurrence of the use of the unprimed declarations in Mathlib. 3. The declaration `ContinuousLinearMap.extendTo𝕜'` has type class assumptions (normed ones) that are too strong, thereby making it unusable for non-normed spaces (e.g., when one wants to consider continuous linear functionals on the weak dual of a Banach space). 4. Point (3) led to the creation of `RCLike.extendTo𝕜'ₗ` which is just `ContinuousLinearMap.extendTo𝕜'` except reproven with weaker type class assumptions and bundled into a linear map. 5. There are missing `simp` lemmas, namely, ones concerning the imaginary part of the extension applied to a vector. 6. We're missing appropriately bundled versions, with `RCLike.extendTo𝕜'ₗ` being the only bundling currently. In this PR: we fix the above by doing the following: 1. Renaming `LinearMap.extendTo𝕜'` → `Module.Dual.extendRCLike` and `ContinuousLinearMap.extendTo𝕜'` → `StrongDual.extendRCLike`. 2. Removing the unprimed counterparts that operate on `RestrictScalars` 3. Weakening the type class assumptions on the newly renamed `StrongDual.extendRCLike` 4. Move `RCLike.extendTo𝕜'ₗ` out of its current location (`Analysis/LocallyConvex/Separation`) and next to `StrongDual.extendRCLike`; use the newly generalized `StrongDual.extendRCLike` to define it; rename it to `StrongDual.extendRCLikeₗ`; upgrade it from a linear map to a linear equivalence. 5. Add the missing simp lemmas for imaginary parts. 6. Add other appropriate bundlings, namely `Module.Dual.extendRCLikeₗ : Dual E ℝ ≃ₗ[ℝ] Dual E 𝕜`, and, in the context of normed spaces `StrongDual.extendRCLikeₗᵢ : StrongDual E ℝ ≃ₗᵢ[ℝ] StrongDual E 𝕜`.
1 parent f618ef9 commit d300915

File tree

4 files changed

+125
-115
lines changed

4 files changed

+125
-115
lines changed

Mathlib/Analysis/LocallyConvex/Separation.lean

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -210,51 +210,30 @@ end
210210
namespace RCLike
211211

212212
variable [RCLike 𝕜] [Module 𝕜 E] [IsScalarTower ℝ 𝕜 E]
213-
214-
/-- Real linear extension of continuous extension of `LinearMap.extendTo𝕜'` -/
215-
noncomputable def extendTo𝕜'ₗ [ContinuousConstSMul 𝕜 E] : StrongDual ℝ E →ₗ[ℝ] StrongDual 𝕜 E :=
216-
letI to𝕜 (fr : StrongDual ℝ E) : StrongDual 𝕜 E :=
217-
{ toLinearMap := LinearMap.extendTo𝕜' fr
218-
cont := show Continuous fun x ↦ (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) by fun_prop }
219-
have h fr x : to𝕜 fr x = ((fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜)) := rfl
220-
{ toFun := to𝕜
221-
map_add' := by intros; ext; simp [h]; ring
222-
map_smul' := by intros; ext; simp [h, real_smul_eq_coe_mul]; ring }
223-
224-
@[simp]
225-
lemma re_extendTo𝕜'ₗ [ContinuousConstSMul 𝕜 E] (g : StrongDual ℝ E) (x : E) :
226-
re ((extendTo𝕜'ₗ g) x : 𝕜) = g x := by
227-
have h g (x : E) : extendTo𝕜'ₗ g x = ((g x : 𝕜) - (I : 𝕜) * (g ((I : 𝕜) • x) : 𝕜)) := rfl
228-
simp only [h, map_sub, ofReal_re, mul_re, I_re, zero_mul, ofReal_im, mul_zero,
229-
sub_self, sub_zero]
230-
231213
variable [IsTopologicalAddGroup E] [ContinuousSMul 𝕜 E]
232214

233215
theorem separate_convex_open_set {s : Set E}
234216
(hs₀ : (0 : E) ∈ s) (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) {x₀ : E} (hx₀ : x₀ ∉ s) :
235217
∃ f : StrongDual 𝕜 E, re (f x₀) = 1 ∧ ∀ x ∈ s, re (f x) < 1 := by
236218
have := IsScalarTower.continuousSMul (M := ℝ) (α := E) 𝕜
237219
obtain ⟨g, hg⟩ := _root_.separate_convex_open_set hs₀ hs₁ hs₂ hx₀
238-
use extendTo𝕜'ₗ g
239-
simp only [re_extendTo𝕜'ₗ]
240-
exact hg
220+
use g.extendRCLikeₗ
221+
simpa [g.extendRCLikeₗ_apply]
241222

242223
theorem geometric_hahn_banach_open (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) (ht : Convex ℝ t)
243224
(disj : Disjoint s t) : ∃ (f : StrongDual 𝕜 E) (u : ℝ), (∀ a ∈ s, re (f a) < u) ∧
244225
∀ b ∈ t, u ≤ re (f b) := by
245226
have := IsScalarTower.continuousSMul (M := ℝ) (α := E) 𝕜
246227
obtain ⟨f, u, h⟩ := _root_.geometric_hahn_banach_open hs₁ hs₂ ht disj
247-
use extendTo𝕜'ₗ f
248-
simp only [re_extendTo𝕜'ₗ]
249-
exact Exists.intro u h
228+
use f.extendRCLikeₗ
229+
simpa [f.extendRCLikeₗ_apply] using Exists.intro u h
250230

251231
theorem geometric_hahn_banach_open_point (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) (disj : x ∉ s) :
252232
∃ f : StrongDual 𝕜 E, ∀ a ∈ s, re (f a) < re (f x) := by
253233
have := IsScalarTower.continuousSMul (M := ℝ) (α := E) 𝕜
254234
obtain ⟨f, h⟩ := _root_.geometric_hahn_banach_open_point hs₁ hs₂ disj
255-
use extendTo𝕜'ₗ f
256-
simp only [re_extendTo𝕜'ₗ]
257-
exact fun a a_1 ↦ h a a_1
235+
use f.extendRCLikeₗ
236+
simpa [f.extendRCLikeₗ_apply]
258237

259238
theorem geometric_hahn_banach_point_open (ht₁ : Convex ℝ t) (ht₂ : IsOpen t) (disj : x ∉ t) :
260239
∃ f : StrongDual 𝕜 E, ∀ b ∈ t, re (f x) < re (f b) :=
@@ -266,9 +245,8 @@ theorem geometric_hahn_banach_open_open (hs₁ : Convex ℝ s) (hs₂ : IsOpen s
266245
∃ (f : StrongDual 𝕜 E) (u : ℝ), (∀ a ∈ s, re (f a) < u) ∧ ∀ b ∈ t, u < re (f b) := by
267246
have := IsScalarTower.continuousSMul (M := ℝ) (α := E) 𝕜
268247
obtain ⟨f, u, h⟩ := _root_.geometric_hahn_banach_open_open hs₁ hs₂ ht₁ ht₃ disj
269-
use extendTo𝕜'ₗ f
270-
simp only [re_extendTo𝕜'ₗ]
271-
exact Exists.intro u h
248+
use f.extendRCLikeₗ
249+
simpa [f.extendRCLikeₗ_apply] using Exists.intro u h
272250

273251
variable [LocallyConvexSpace ℝ E]
274252

@@ -277,9 +255,8 @@ theorem geometric_hahn_banach_compact_closed (hs₁ : Convex ℝ s) (hs₂ : IsC
277255
∃ (f : StrongDual 𝕜 E) (u v : ℝ), (∀ a ∈ s, re (f a) < u) ∧ u < v ∧ ∀ b ∈ t, v < re (f b) := by
278256
have := IsScalarTower.continuousSMul (M := ℝ) (α := E) 𝕜
279257
obtain ⟨g, u, v, h1⟩ := _root_.geometric_hahn_banach_compact_closed hs₁ hs₂ ht₁ ht₂ disj
280-
use extendTo𝕜'ₗ g
281-
simp only [re_extendTo𝕜'ₗ, exists_and_left]
282-
exact ⟨u, h1.1, v, h1.2
258+
use g.extendRCLikeₗ
259+
simpa [g.extendRCLikeₗ_apply, exists_and_left] using ⟨u, h1.1, v, h1.2
283260

284261
theorem geometric_hahn_banach_closed_compact (hs₁ : Convex ℝ s) (hs₂ : IsClosed s)
285262
(ht₁ : Convex ℝ t) (ht₂ : IsCompact t) (disj : Disjoint s t) :

Mathlib/Analysis/Normed/Module/HahnBanach.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,21 @@ theorem exists_extension_norm_eq (p : Subspace 𝕜 E) (f : StrongDual 𝕜 p) :
8787
obtain ⟨g, ⟨(hextends : ∀ x : p, g x = fr x), hnormeq⟩⟩ :=
8888
Real.exists_extension_norm_eq (p.restrictScalars ℝ) fr
8989
-- Now `g` can be extended to the `StrongDual 𝕜 E` we need.
90-
refine ⟨g.extendTo𝕜', ?_⟩
90+
refine ⟨g.extendRCLike, ?_⟩
9191
-- It is an extension of `f`.
92-
have h (x : p) : g.extendTo𝕜' x = f x := by
93-
rw [ContinuousLinearMap.extendTo𝕜'_apply, ← Submodule.coe_smul,
92+
have h (x : p) : g.extendRCLike x = f x := by
93+
rw [g.extendRCLike_apply, ← Submodule.coe_smul,
9494
hextends, hextends]
9595
simp [fr, RCLike.algebraMap_eq_ofReal, mul_comm I, RCLike.re_add_im]
9696
-- And we derive the equality of the norms by bounding on both sides.
9797
refine ⟨h, le_antisymm ?_ ?_⟩
9898
· calc
99-
‖g.extendTo𝕜'‖ = ‖g‖ := g.norm_extendTo𝕜'
99+
‖g.extendRCLike‖ = ‖g‖ := g.norm_extendRCLike
100100
_ = ‖fr‖ := hnormeq
101101
_ ≤ ‖reCLM‖ * ‖f‖ := ContinuousLinearMap.opNorm_comp_le _ _
102102
_ = ‖f‖ := by rw [reCLM_norm, one_mul]
103-
· exact f.opNorm_le_bound (g.extendTo𝕜' (𝕜 := 𝕜)).opNorm_nonneg
104-
fun x ↦ h x ▸ (g.extendTo𝕜' (𝕜 := 𝕜) |>.le_opNorm x)
103+
· exact f.opNorm_le_bound (g.extendRCLike (𝕜 := 𝕜)).opNorm_nonneg
104+
fun x ↦ h x ▸ (g.extendRCLike (𝕜 := 𝕜) |>.le_opNorm x)
105105

106106
open Module
107107

Mathlib/Analysis/Normed/Module/RCLike/Extend.lean

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,56 @@ public import Mathlib.Analysis.Normed.Operator.Basic
1111
/-!
1212
# Norm properties of the extension of continuous `ℝ`-linear functionals to `𝕜`-linear functionals
1313
14-
This file shows that `ContinuousLinearMap.extendTo𝕜` preserves the norm of the functional.
14+
This file shows that `StrongDual.extendRCLike` preserves the norm of the functional.
1515
-/
1616

1717
public section
1818

19-
open RCLike
19+
open RCLike ContinuousLinearMap
2020
open scoped ComplexConjugate
2121

22-
namespace ContinuousLinearMap
23-
24-
variable {𝕜 F : Type*} [RCLike 𝕜] [SeminormedAddCommGroup F] [NormedSpace 𝕜 F]
22+
namespace StrongDual
2523

26-
section ScalarTower
2724

25+
variable {𝕜 F : Type*} [RCLike 𝕜] [SeminormedAddCommGroup F] [NormedSpace 𝕜 F]
2826
variable [NormedSpace ℝ F] [IsScalarTower ℝ 𝕜 F]
2927

3028
/-- The norm of the extension is bounded by `‖fr‖`. -/
31-
theorem norm_extendTo𝕜'_bound (fr : StrongDual ℝ F) (x : F) :
32-
‖(fr.extendTo𝕜' x : 𝕜)‖ ≤ ‖fr‖ * ‖x‖ := by
33-
set lm : F →L[𝕜] 𝕜 := fr.extendTo𝕜'
29+
theorem norm_extendRCLike_bound (fr : StrongDual ℝ F) (x : F) :
30+
‖(fr.extendRCLike x : 𝕜)‖ ≤ ‖fr‖ * ‖x‖ := by
31+
set lm : StrongDual 𝕜 F := fr.extendRCLike
3432
by_cases h : lm x = 0
3533
· rw [h, norm_zero]
3634
positivity
3735
rw [← mul_le_mul_iff_right₀ (norm_pos_iff.2 h), ← sq]
3836
calc
39-
‖lm x‖ ^ 2 = fr (conj (lm x : 𝕜) • x) := fr.toLinearMap.norm_extendTo𝕜'_apply_sq x
37+
‖lm x‖ ^ 2 = fr (conj (lm x : 𝕜) • x) := Module.Dual.norm_extendRCLike_apply_sq fr.toLinearMap x
4038
_ ≤ ‖fr (conj (lm x : 𝕜) • x)‖ := le_abs_self _
4139
_ ≤ ‖fr‖ * ‖conj (lm x : 𝕜) • x‖ := le_opNorm _ _
4240
_ = ‖(lm x : 𝕜)‖ * (‖fr‖ * ‖x‖) := by rw [norm_smul, norm_conj, mul_left_comm]
4341

4442
@[simp]
45-
theorem norm_extendTo𝕜' (fr : StrongDual ℝ F) : ‖(fr.extendTo𝕜' : StrongDual 𝕜 F)‖ = ‖fr‖ :=
46-
le_antisymm (ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) fr.norm_extendTo𝕜'_bound) <|
43+
theorem norm_extendRCLike (fr : StrongDual ℝ F) : ‖(fr.extendRCLike : StrongDual 𝕜 F)‖ = ‖fr‖ :=
44+
le_antisymm (ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) fr.norm_extendRCLike_bound) <|
4745
opNorm_le_bound _ (norm_nonneg _) fun x =>
4846
calc
49-
‖fr x‖ = ‖re (fr.extendTo𝕜' x : 𝕜)‖ := congr_arg norm (fr.extendTo𝕜'_apply_re x).symm
50-
_ ≤ ‖(fr.extendTo𝕜' x : 𝕜)‖ := abs_re_le_norm _
51-
_ ≤ ‖(fr.extendTo𝕜' : StrongDual 𝕜 F)‖ * ‖x‖ := le_opNorm _ _
47+
‖fr x‖ = ‖re (fr.extendRCLike x : 𝕜)‖ := by simp
48+
_ ≤ ‖(fr.extendRCLike x : 𝕜)‖ := abs_re_le_norm _
49+
_ ≤ ‖(fr.extendRCLike : StrongDual 𝕜 F)‖ * ‖x‖ := le_opNorm _ _
5250

53-
end ScalarTower
51+
/-- `StrongDual.extendRCLike` bundled into a linear isometry equivalence. -/
52+
@[expose, simps! -isSimp apply symm_apply]
53+
noncomputable def extendRCLikeₗᵢ : StrongDual ℝ F ≃ₗᵢ[ℝ] StrongDual 𝕜 F where
54+
toLinearEquiv := StrongDual.extendRCLikeₗ
55+
norm_map' := norm_extendRCLike
5456

55-
set_option backward.isDefEq.respectTransparency false in
56-
@[simp]
57-
theorem norm_extendTo𝕜 (fr : StrongDual ℝ (RestrictScalars ℝ 𝕜 F)) :
58-
‖fr.extendTo𝕜‖ = ‖fr‖ :=
59-
fr.norm_extendTo𝕜'
57+
end StrongDual
58+
59+
namespace ContinuousLinearMap
60+
open StrongDual
61+
62+
@[deprecated (since := "2026-02-24")] alias norm_extendTo𝕜'_bound := norm_extendRCLike_bound
63+
@[deprecated (since := "2026-02-24")] alias norm_extendTo𝕜' := norm_extendRCLike
64+
@[deprecated (since := "2026-02-24")] alias norm_extendTo𝕜 := norm_extendRCLike
6065

6166
end ContinuousLinearMap

Mathlib/Analysis/RCLike/Extend.lean

Lines changed: 83 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,25 @@ elementary properties, like locally convex spaces.
2626
2727
## Main definitions
2828
29-
* `LinearMap.extendTo𝕜`
30-
* `ContinuousLinearMap.extendTo𝕜`
31-
32-
## Implementation details
33-
34-
For convenience, the main definitions above operate in terms of `RestrictScalars ℝ 𝕜 F`.
35-
Alternate forms which operate on `[IsScalarTower ℝ 𝕜 F]` instead are provided with a primed name.
29+
* `LinearMap.extendRCLike`
30+
* `ContinuousLinearMap.extendRCLike`
3631
3732
-/
3833

3934
@[expose] public section
4035

41-
4236
open RCLike
4337

4438
open ComplexConjugate
4539

4640
variable {𝕜 : Type*} [RCLike 𝕜] {F : Type*}
47-
namespace LinearMap
48-
49-
open Module
50-
51-
section ScalarTower
41+
namespace Module.Dual
5242

5343
variable [AddCommGroup F] [Module ℝ F] [Module 𝕜 F] [IsScalarTower ℝ 𝕜 F]
5444

5545
/-- Extend `fr : Dual ℝ F` to `Dual 𝕜 F` in a way that will also be continuous and have its norm
5646
(as a continuous linear map) equal to `‖fr‖` when `fr` is itself continuous on a normed space. -/
57-
noncomputable def extendTo𝕜' (fr : Dual ℝ F) : Dual 𝕜 F :=
47+
noncomputable def extendRCLike (fr : Dual ℝ F) : Dual 𝕜 F :=
5848
letI fc : F → 𝕜 := fun x => (fr x : 𝕜) - (I : 𝕜) * fr ((I : 𝕜) • x)
5949
have add (x y) : fc (x + y) = fc x + fc y := by
6050
simp only [fc, smul_add, map_add, mul_add]
@@ -73,69 +63,107 @@ noncomputable def extendTo𝕜' (fr : Dual ℝ F) : Dual 𝕜 F :=
7363
map_add' := add
7464
map_smul' := smul_𝕜 }
7565

76-
theorem extendTo𝕜'_apply (fr : Dual ℝ F) (x : F) :
77-
fr.extendTo𝕜' x = (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) := rfl
66+
theorem extendRCLike_apply (fr : Dual ℝ F) (x : F) :
67+
fr.extendRCLike x = (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) := rfl
7868

7969
@[simp]
80-
theorem extendTo𝕜'_apply_re (fr : Dual ℝ F) (x : F) : re (fr.extendTo𝕜' x : 𝕜) = fr x := by
81-
simp only [extendTo𝕜'_apply, map_sub, zero_mul, mul_zero, sub_zero, rclike_simps]
70+
theorem re_extendRCLike_apply (fr : Dual ℝ F) (x : F) : re (fr.extendRCLike x : 𝕜) = fr x := by
71+
simp only [extendRCLike_apply, map_sub, zero_mul, mul_zero, sub_zero, rclike_simps]
8272

83-
theorem norm_extendTo𝕜'_apply_sq (fr : Dual ℝ F) (x : F) :
84-
‖(fr.extendTo𝕜' x : 𝕜)‖ ^ 2 = fr (conj (fr.extendTo𝕜' x : 𝕜) • x) := calc
85-
‖(fr.extendTo𝕜' x : 𝕜)‖ ^ 2 = re (conj (fr.extendTo𝕜' x) * fr.extendTo𝕜' x : 𝕜) := by
73+
@[simp]
74+
lemma im_extendRCLike_apply (g : Dual ℝ F) (x : F) :
75+
im ((extendRCLike g) x : 𝕜) = - g ((I : 𝕜) • x) := by
76+
obtain (h | h) := RCLike.I_eq_zero_or_im_I_eq_one (K := 𝕜)
77+
all_goals simp [h, extendRCLike_apply]
78+
79+
theorem norm_extendRCLike_apply_sq (fr : Dual ℝ F) (x : F) :
80+
‖(fr.extendRCLike x : 𝕜)‖ ^ 2 = fr (conj (fr.extendRCLike x : 𝕜) • x) := calc
81+
‖(fr.extendRCLike x : 𝕜)‖ ^ 2 = re (conj (fr.extendRCLike x) * fr.extendRCLike x : 𝕜) := by
8682
rw [RCLike.conj_mul, ← ofReal_pow, ofReal_re]
87-
_ = fr (conj (fr.extendTo𝕜' x : 𝕜) • x) := by
88-
rw [← smul_eq_mul, ← map_smul, extendTo𝕜'_apply_re]
83+
_ = fr (conj (fr.extendRCLike x : 𝕜) • x) := by
84+
rw [← smul_eq_mul, ← map_smul, re_extendRCLike_apply]
8985

90-
end ScalarTower
86+
/-- The extension `Module.Dual.extendRCLike` as a linear equivalence between the algebraic duals. -/
87+
@[simps -isSimp apply symm_apply]
88+
noncomputable def extendRCLikeₗ : Dual ℝ F ≃ₗ[ℝ] Dual 𝕜 F where
89+
toFun := extendRCLike (𝕜 := 𝕜)
90+
invFun f := RCLike.reLm.comp (f.restrictScalars ℝ)
91+
left_inv f := by ext; simp
92+
right_inv f := by ext; apply RCLike.ext <;> simp
93+
map_add' := by intros; ext; simp [extendRCLike_apply]; ring
94+
map_smul' := by intros; ext; simp [extendRCLike_apply, real_smul_eq_coe_mul]; ring
9195

92-
section RestrictScalars
96+
end Module.Dual
9397

94-
variable [SeminormedAddCommGroup F] [NormedSpace 𝕜 F]
98+
namespace StrongDual
9599

96-
instance : NormedSpace 𝕜 (RestrictScalars ℝ 𝕜 F) :=
97-
inferInstanceAs (NormedSpace 𝕜 F)
100+
variable [TopologicalSpace F] [AddCommGroup F] [Module 𝕜 F] [ContinuousConstSMul 𝕜 F]
101+
variable [Module ℝ F] [IsScalarTower ℝ 𝕜 F]
98102

99-
/-- Extend `fr : Dual ℝ (RestrictScalars ℝ 𝕜 F)` to `Dual 𝕜 F`. -/
100-
noncomputable def extendTo𝕜 (fr : Dual ℝ (RestrictScalars ℝ 𝕜 F)) : Dual 𝕜 F :=
101-
fr.extendTo𝕜'
103+
/-- Extend `fr : StrongDual ℝ F` to `StrongDual 𝕜 F`.
102104
103-
theorem extendTo𝕜_apply (fr : RestrictScalars ℝ 𝕜 F →ₗ[ℝ] ℝ) (x : F) :
104-
fr.extendTo𝕜 x = (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) := rfl
105+
It would be possible to use `LinearMap.mkContinuous` here, but we would need to know that the
106+
continuity of `fr` implies it has bounded norm and we want to avoid that dependency here.
105107
106-
end RestrictScalars
108+
Norm properties of this extension can be found in
109+
`Mathlib/Analysis/Normed/Module/RCLike/Extend.lean`. -/
110+
noncomputable def extendRCLike (fr : StrongDual ℝ F) : StrongDual 𝕜 F where
111+
__ := Module.Dual.extendRCLike fr.toLinearMap
112+
cont := show Continuous fun x ↦ (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) by fun_prop
107113

108-
end LinearMap
114+
theorem extendRCLike_apply (fr : StrongDual ℝ F) (x : F) :
115+
fr.extendRCLike x = (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) := rfl
109116

110-
namespace ContinuousLinearMap
117+
@[simp]
118+
lemma re_extendRCLike_apply (g : StrongDual ℝ F) (x : F) :
119+
re ((extendRCLike g) x : 𝕜) = g x := by
120+
simp [extendRCLike_apply]
111121

112-
variable [SeminormedAddCommGroup F] [NormedSpace 𝕜 F]
122+
@[deprecated (since := "2026-02-24")] alias _root_.RCLike.re_extendTo𝕜ₗ := re_extendRCLike_apply
113123

114-
section ScalarTower
124+
@[simp]
125+
lemma im_extendRCLike_apply (g : StrongDual ℝ F) (x : F) :
126+
im ((extendRCLike g) x : 𝕜) = - g ((I : 𝕜) • x) := by
127+
obtain (h | h) := RCLike.I_eq_zero_or_im_I_eq_one (K := 𝕜)
128+
all_goals simp [h, extendRCLike_apply]
115129

116-
variable [NormedSpace ℝ F] [IsScalarTower ℝ 𝕜 F]
130+
/-- The extension `StrongDual.extendRCLike` as a linear equivalence between the algebraic duals.
117131
118-
/-- Extend `fr : StrongDual ℝ F` to `StrongDual 𝕜 F`.
132+
When `F` is a normed space, this can be upgraded to an *isometric* linear equivalence, see
133+
`StrondDual.extendRCLikeₗᵢ`. -/
134+
@[simps -isSimp apply symm_apply]
135+
noncomputable def extendRCLikeₗ : StrongDual ℝ F ≃ₗ[ℝ] StrongDual 𝕜 F where
136+
toFun := StrongDual.extendRCLike (𝕜 := 𝕜)
137+
invFun f := RCLike.reCLM.comp (f.restrictScalars ℝ)
138+
left_inv f := by ext; simp
139+
right_inv f := by ext; apply RCLike.ext <;> simp [extendRCLike_apply]
140+
map_add' := by intros; ext; simp [extendRCLike_apply]; ring
141+
map_smul' := by intros; ext; simp [extendRCLike_apply, real_smul_eq_coe_mul]; ring
119142

120-
It would be possible to use `LinearMap.mkContinuous` here, but we would need to know that the
121-
continuity of `fr` implies it has bounded norm and we want to avoid that dependency here.
143+
@[deprecated (since := "2026-02-24")] alias _root_.RCLike.extendTo𝕜ₗ := extendRCLikeₗ
122144

123-
Norm properties of this extension can be found in
124-
`Mathlib/Analysis/Normed/Module/RCLike/Extend.lean`. -/
125-
noncomputable def extendTo𝕜' (fr : StrongDual ℝ F) : StrongDual 𝕜 F where
126-
__ := fr.toLinearMap.extendTo𝕜'
127-
cont := show Continuous fun x ↦ (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) by fun_prop
145+
end StrongDual
146+
147+
namespace LinearMap
148+
149+
open Module.Dual
128150

129-
theorem extendTo𝕜'_apply (fr : StrongDual ℝ F) (x : F) :
130-
fr.extendTo𝕜' x = (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) := rfl
151+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜' := extendRCLike
152+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜'_apply := extendRCLike_apply
153+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜'_apply_re := re_extendRCLike_apply
154+
@[deprecated (since := "2026-02-24")] alias norm_extendTo𝕜'_apply_sq := norm_extendRCLike_apply_sq
155+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜 := extendRCLike
156+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜_apply := extendRCLike_apply
131157

132-
end ScalarTower
158+
end LinearMap
159+
160+
namespace ContinuousLinearMap
133161

134-
/-- Extend `fr : StrongDual ℝ (RestrictScalars ℝ 𝕜 F)` to `StrongDual 𝕜 F`. -/
135-
noncomputable def extendTo𝕜 (fr : StrongDual ℝ (RestrictScalars ℝ 𝕜 F)) :
136-
StrongDual 𝕜 F := fr.extendTo𝕜'
162+
open StrongDual
137163

138-
theorem extendTo𝕜_apply (fr : StrongDual ℝ (RestrictScalars ℝ 𝕜 F)) (x : F) :
139-
fr.extendTo𝕜 x = (fr x : 𝕜) - (I : 𝕜) * (fr ((I : 𝕜) • x) : 𝕜) := rfl
164+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜' := extendRCLike
165+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜'_apply := extendRCLike_apply
166+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜 := extendRCLike
167+
@[deprecated (since := "2026-02-24")] alias extendTo𝕜_apply := extendRCLike_apply
140168

141169
end ContinuousLinearMap

0 commit comments

Comments
 (0)