/- Copyright (c) 2026 Yongxi Lin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yongxi Lin -/ module public import Mathlib.Analysis.Convex.Cone.Extension public import Mathlib.Analysis.LocallyConvex.AbsConvexOpen public import Mathlib.Analysis.LocallyConvex.WeakDual public import Mathlib.Analysis.Normed.Module.RCLike.Extend public import Mathlib.Topology.Algebra.Module.FiniteDimension /-! # Hahn-Banach theorem for polynormable spaces In this file, we prove the analytic Hahn-Banach theorem for polynormable spaces over a field satisfying `IsRCLikeNormedField`. For any continuous linear functional on a subspace, we can extend it to the entire space. Note that we cannot use `LocallyConvexSpace` because an `IsRCLikeNormedField` has no order structure. We prove * `Module.Dual.exists_continuous_extension_of_le_seminorm`: Hahn-Banach theorem for linear functionals dominated by a continuous seminorm on polynormable spaces over a field satisfying `IsRCLikeNormedField`. * `StrongDual.exists_extension`: Hahn-Banach theorem for continuous linear functionals on polynormable spaces over fields satisfying `IsRCLikeNormedField`. -/ public section open Module Topology RCLike open scoped ComplexConjugate variable {π•œ E : Type*} [AddCommGroup E] theorem Module.Dual.exists_extension_of_le_seminorm_real [Module ℝ E] (S : Subspace ℝ E) (f : Dual ℝ S) {p : Seminorm ℝ E} (hp : βˆ€ x, f x ≀ p x) : βˆƒ g : Dual ℝ E, (βˆ€ x : S, g x = f x) ∧ βˆ€ x, |g x| ≀ p x := by obtain ⟨g, hg, hl⟩ := by refine exists_extension_of_le_sublinear ⟨S, f⟩ p (fun _ hc _ => ?_) ?_ hp Β· simp [map_smul_eq_mul, abs_of_nonneg hc.le] Β· exact fun x y => map_add_le_add p x y exact ⟨g, hg, p.abs_le_of_le hl⟩ variable [NormedField π•œ] [IsRCLikeNormedField π•œ] theorem Module.Dual.exists_extension_of_le_seminorm [Module π•œ E] (S : Submodule π•œ E) (f : Dual π•œ S) {p : Seminorm π•œ E} (hp : βˆ€ x, β€–f xβ€– ≀ p x) : βˆƒ g : Dual π•œ E, (βˆ€ x : S, g x = f x) ∧ βˆ€ x, β€–g xβ€– ≀ p x := by letI : RCLike π•œ := IsRCLikeNormedField.rclike π•œ letI : Module ℝ E := .restrictScalars ℝ π•œ E letI : IsScalarTower ℝ π•œ E := .restrictScalars _ _ _ let fr : Dual ℝ S := reLm.comp (f.restrictScalars ℝ) obtain ⟨g, (hg : βˆ€ x : S, g x = fr x), hgp⟩ := fr.exists_extension_of_le_seminorm_real (S.restrictScalars ℝ) (p := p.restrictScalars ℝ) fun x ↦ (re_le_norm (f x)).trans (hp x) refine ⟨g.extendRCLike, fun x ↦ ?_, fun x ↦ ?_⟩ Β· rw [g.extendRCLike_apply, ← Submodule.coe_smul, hg, hg] simp [fr, mul_comm I] Β· apply norm_extendRCLike_le_seminorm exact hgp variable [TopologicalSpace E] /-- **Hahn-Banach theorem** for linear functionals dominated by a continuous seminorm on polynormable spaces over `ℝ`. -/ theorem Module.Dual.exists_continuous_extension_of_le_seminorm_real [IsTopologicalAddGroup E] [Module ℝ E] [ContinuousSMul ℝ E] [PolynormableSpace ℝ E] (S : Subspace ℝ E) (f : Dual ℝ S) {p : Seminorm ℝ E} (hp_cont : Continuous p) (hp : βˆ€ x, f x ≀ p x) : βˆƒ g : StrongDual ℝ E, (βˆ€ x : S, g x = f x) ∧ βˆ€ x, |g x| ≀ p x := by obtain ⟨g, hg, hl⟩ := f.exists_extension_of_le_seminorm_real S hp exact ⟨⟨g, (PolynormableSpace.withSeminorms ℝ E).continuous_real_rng g ⟨{⟨p, hp_cont⟩}, 1, fun x ↦ by simpa using (le_abs_self _).trans (hl x)⟩⟩, hg, hl⟩ variable [Module π•œ E] [PolynormableSpace π•œ E] /-- **Hahn-Banach theorem** for linear functionals dominated by a continuous seminorm on polynormable spaces over fields satisfying `IsRCLikeNormedField`. -/ theorem Module.Dual.exists_continuous_extension_of_le_seminorm (S : Submodule π•œ E) (f : Dual π•œ S) {p : Seminorm π•œ E} (hp_cont : Continuous p) (hp : βˆ€ x, β€–f xβ€– ≀ p x) : βˆƒ g : StrongDual π•œ E, (βˆ€ x : S, g x = f x) ∧ βˆ€ x, β€–g xβ€– ≀ p x := by obtain ⟨g, hg, hle⟩ := Dual.exists_extension_of_le_seminorm S f hp refine ⟨⟨g, (PolynormableSpace.withSeminorms π•œ E).continuous_normedSpace_rng π•œ g ?_⟩, hg, hle⟩ exact ⟨{⟨p, hp_cont⟩}, 1, by simpa⟩ /-- **Hahn-Banach theorem** for continuous linear functionals on polynormable spaces over a field satisfying `IsRCLikeNormedField`. -/ theorem StrongDual.exists_extension {π•œ} [NontriviallyNormedField π•œ] [IsRCLikeNormedField π•œ] [Module π•œ E] [PolynormableSpace π•œ E] (S : Submodule π•œ E) (f : StrongDual π•œ S) : βˆƒ g : StrongDual π•œ E, βˆ€ x : S, g x = f x := by obtain ⟨q, hq_cont, hq⟩ := Seminorm.exists_le_comp_of_isInducing (f := S.subtype) (p := f.toSeminorm) f.continuous.norm IsInducing.subtypeVal obtain ⟨g, hg, _⟩ := Dual.exists_continuous_extension_of_le_seminorm S f.toLinearMap hq_cont hq exact ⟨g, hg⟩ variable {F : Type*} [AddCommGroup F] [TopologicalSpace F] [IsTopologicalAddGroup F] [Module π•œ F] [ContinuousSMul π•œ F] [T2Space F] /-- Corollary of the polynormable **Hahn-Banach theorem**: if `f : S β†’ F` is a continuous linear map with finite-dimensional range, then `f` extends to a continuous linear map on the whole space. -/ lemma ContinuousLinearMap.exist_extension_of_finiteDimensional_range {S : Submodule π•œ E} (f : S β†’L[π•œ] F) [FiniteDimensional π•œ f.range] : βˆƒ g : E β†’L[π•œ] F, f = g.comp S.subtypeL := by letI : RCLike π•œ := IsRCLikeNormedField.rclike π•œ let b := Module.finBasis π•œ f.range let e := b.equivFunL let fi := fun i ↦ (LinearMap.toContinuousLinearMap (b.coord i)).comp (f.codRestrict _ <| LinearMap.mem_range_self _) choose gi hgf using fun i ↦ StrongDual.exists_extension S (fi i) use f.range.subtypeL.comp <| e.symm.toContinuousLinearMap.comp (.pi gi) ext x simp [fi, e, hgf] /-- A finite-dimensional submodule of a polynormable space over a field satisfying `IsRCLikeNormedField` is `Submodule.ClosedComplemented`. -/ lemma Submodule.ClosedComplemented.of_finiteDimensional [PolynormableSpace π•œ F] (S : Submodule π•œ F) [FiniteDimensional π•œ S] : S.ClosedComplemented := by let ⟨g, hg⟩ := (ContinuousLinearMap.id π•œ S).exist_extension_of_finiteDimensional_range exact ⟨g, DFunLike.congr_fun hg.symm⟩