Commit 2026-02-25 03:11 d300915b
View on Github →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:
- Naming: the primary declarations
LinearMap.extendTo𝕜'andContinuousLinearMap.extendTo𝕜'are in the wrong namespaces (Module.DualandStrongDual), and contain a variable name𝕜. - 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. - 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). - Point (3) led to the creation of
RCLike.extendTo𝕜'ₗwhich is justContinuousLinearMap.extendTo𝕜'except reproven with weaker type class assumptions and bundled into a linear map. - There are missing
simplemmas, namely, ones concerning the imaginary part of the extension applied to a vector. - 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: - Renaming
LinearMap.extendTo𝕜'→Module.Dual.extendRCLikeandContinuousLinearMap.extendTo𝕜'→StrongDual.extendRCLike. - Removing the unprimed counterparts that operate on
RestrictScalars - Weakening the type class assumptions on the newly renamed
StrongDual.extendRCLike - Move
RCLike.extendTo𝕜'ₗout of its current location (Analysis/LocallyConvex/Separation) and next toStrongDual.extendRCLike; use the newly generalizedStrongDual.extendRCLiketo define it; rename it toStrongDual.extendRCLikeₗ; upgrade it from a linear map to a linear equivalence. - Add the missing simp lemmas for imaginary parts.
- Add other appropriate bundlings, namely
Module.Dual.extendRCLikeₗ : Dual E ℝ ≃ₗ[ℝ] Dual E 𝕜, and, in the context of normed spacesStrongDual.extendRCLikeₗᵢ : StrongDual E ℝ ≃ₗᵢ[ℝ] StrongDual E 𝕜.