Skip to content

Commit

Permalink
feat(Topology/Algebra): generalize CompleteSpace instances (#17244)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Oct 27, 2024
1 parent feac7b3 commit c57a78f
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 18 deletions.
17 changes: 16 additions & 1 deletion Mathlib/Topology/Algebra/Module/Alternating/Topology.lean
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,28 @@ instance instUniformContinuousConstSMul {M : Type*}
UniformContinuousConstSMul M (E [β‹€^ΞΉ]β†’L[π•œ] F) :=
isUniformEmbedding_toContinuousMultilinearMap.uniformContinuousConstSMul fun _ _ ↦ rfl

theorem isUniformInducing_postcomp {G : Type*} [AddCommGroup G] [UniformSpace G] [UniformAddGroup G]
[Module π•œ G] (g : F β†’L[π•œ] G) (hg : IsUniformInducing g) :
IsUniformInducing (g.compContinuousAlternatingMap : (E [β‹€^ΞΉ]β†’L[π•œ] F) β†’ (E [β‹€^ΞΉ]β†’L[π•œ] G)) := by
rw [← isUniformEmbedding_toContinuousMultilinearMap.1.of_comp_iff]
exact (ContinuousMultilinearMap.isUniformInducing_postcomp g hg).comp
isUniformEmbedding_toContinuousMultilinearMap.1

section CompleteSpace

variable [ContinuousSMul π•œ E] [ContinuousConstSMul π•œ F] [CompleteSpace F] [T2Space F]
variable [ContinuousSMul π•œ E] [ContinuousConstSMul π•œ F] [CompleteSpace F]

open UniformOnFun in
theorem completeSpace (h : RestrictGenTopology {s : Set (ΞΉ β†’ E) | IsVonNBounded π•œ s}) :
CompleteSpace (E [β‹€^ΞΉ]β†’L[π•œ] F) := by
wlog hF : T2Space F generalizing F
Β· rw [(isUniformInducing_postcomp (SeparationQuotient.mkCLM _ _)
SeparationQuotient.isUniformInducing_mk).completeSpace_congr]
Β· exact this inferInstance
Β· intro f
use (SeparationQuotient.outCLM _ _).compContinuousAlternatingMap f
ext
simp
have := ContinuousMultilinearMap.completeSpace (F := F) h
rw [completeSpace_iff_isComplete_range
isUniformEmbedding_toContinuousMultilinearMap.isUniformInducing]
Expand Down
10 changes: 10 additions & 0 deletions Mathlib/Topology/Algebra/Module/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,16 @@ theorem coe_copy (f : M₁ β†’SL[σ₁₂] Mβ‚‚) (f' : M₁ β†’ Mβ‚‚) (h : f' =
theorem copy_eq (f : M₁ β†’SL[σ₁₂] Mβ‚‚) (f' : M₁ β†’ Mβ‚‚) (h : f' = ⇑f) : f.copy f' h = f :=
DFunLike.ext' h

theorem range_coeFn_eq :
Set.range ((⇑) : (M₁ β†’SL[σ₁₂] Mβ‚‚) β†’ (M₁ β†’ Mβ‚‚)) =
{f | Continuous f} ∩ Set.range ((⇑) : (M₁ β†’β‚›β‚—[σ₁₂] Mβ‚‚) β†’ (M₁ β†’ Mβ‚‚)) := by
ext f
constructor
· rintro ⟨f, rfl⟩
exact ⟨f.continuous, f, rfl⟩
· rintro ⟨hfc, f, rfl⟩
exact ⟨⟨f, hfc⟩, rfl⟩

-- make some straightforward lemmas available to `simp`.
protected theorem map_zero (f : M₁ β†’SL[σ₁₂] Mβ‚‚) : f (0 : M₁) = 0 :=
map_zero f
Expand Down
34 changes: 27 additions & 7 deletions Mathlib/Topology/Algebra/Module/Multilinear/Topology.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Authors: Yury Kudryashov
-/
import Mathlib.Topology.Algebra.Module.Multilinear.Bounded
import Mathlib.Topology.Algebra.Module.UniformConvergence
import Mathlib.Topology.Algebra.SeparationQuotient.Section
import Mathlib.Topology.Hom.ContinuousEvalConst

/-!
Expand Down Expand Up @@ -66,15 +67,20 @@ section UniformAddGroup

variable [UniformSpace F] [UniformAddGroup F]

lemma isUniformInducing_toUniformOnFun :
IsUniformInducing (toUniformOnFun :
ContinuousMultilinearMap π•œ E F β†’ ((Ξ  i, E i) β†’α΅€[{s | IsVonNBounded π•œ s}] F)) := ⟨rfl⟩

lemma isUniformEmbedding_toUniformOnFun :
IsUniformEmbedding (toUniformOnFun : ContinuousMultilinearMap π•œ E F β†’ _) where
inj := DFunLike.coe_injective
comap_uniformity := rfl
IsUniformEmbedding (toUniformOnFun : ContinuousMultilinearMap π•œ E F β†’ _) :=
⟨isUniformInducing_toUniformOnFun, DFunLike.coe_injective⟩

@[deprecated (since := "2024-10-01")]
alias uniformEmbedding_toUniformOnFun := isUniformEmbedding_toUniformOnFun

lemma embedding_toUniformOnFun : Embedding (toUniformOnFun : ContinuousMultilinearMap π•œ E F β†’ _) :=
lemma embedding_toUniformOnFun :
Embedding (toUniformOnFun : ContinuousMultilinearMap π•œ E F β†’
((Ξ  i, E i) β†’α΅€[{s | IsVonNBounded π•œ s}] F)) :=
isUniformEmbedding_toUniformOnFun.embedding

theorem uniformContinuous_coe_fun [βˆ€ i, ContinuousSMul π•œ (E i)] :
Expand All @@ -97,19 +103,33 @@ instance instUniformContinuousConstSMul {M : Type*}
haveI := uniformContinuousConstSMul_of_continuousConstSMul M F
isUniformEmbedding_toUniformOnFun.uniformContinuousConstSMul fun _ _ ↦ rfl

theorem isUniformInducing_postcomp
{G : Type*} [AddCommGroup G] [UniformSpace G] [UniformAddGroup G] [Module π•œ G]
(g : F β†’L[π•œ] G) (hg : IsUniformInducing g) :
IsUniformInducing (g.compContinuousMultilinearMap :
ContinuousMultilinearMap π•œ E F β†’ ContinuousMultilinearMap π•œ E G) := by
rw [← isUniformInducing_toUniformOnFun.of_comp_iff]
exact (UniformOnFun.postcomp_isUniformInducing hg).comp isUniformInducing_toUniformOnFun

section CompleteSpace

variable [βˆ€ i, ContinuousSMul π•œ (E i)] [ContinuousConstSMul π•œ F] [CompleteSpace F] [T2Space F]
variable [βˆ€ i, ContinuousSMul π•œ (E i)] [ContinuousConstSMul π•œ F] [CompleteSpace F]

open UniformOnFun in
theorem completeSpace (h : RestrictGenTopology {s : Set (Ξ  i, E i) | IsVonNBounded π•œ s}) :
CompleteSpace (ContinuousMultilinearMap π•œ E F) := by
classical
wlog hF : T2Space F generalizing F
Β· rw [(isUniformInducing_postcomp (SeparationQuotient.mkCLM _ _)
SeparationQuotient.isUniformInducing_mk).completeSpace_congr]
Β· exact this inferInstance
Β· intro f
use (SeparationQuotient.outCLM _ _).compContinuousMultilinearMap f
simp [DFunLike.ext_iff]
have H : βˆ€ {m : Ξ  i, E i},
Continuous fun f : (Ξ  i, E i) β†’α΅€[{s | IsVonNBounded π•œ s}] F ↦ toFun _ f m :=
(uniformContinuous_eval (isVonNBounded_covers) _).continuous
rw [completeSpace_iff_isComplete_range isUniformEmbedding_toUniformOnFun.isUniformInducing,
range_toUniformOnFun]
rw [completeSpace_iff_isComplete_range isUniformInducing_toUniformOnFun, range_toUniformOnFun]
simp only [setOf_and, setOf_forall]
apply_rules [IsClosed.isComplete, IsClosed.inter]
Β· exact UniformOnFun.isClosed_setOf_continuous h
Expand Down
59 changes: 49 additions & 10 deletions Mathlib/Topology/Algebra/Module/StrongTopology.lean
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/-
Copyright (c) 2022 Anatole Dedecker. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anatole Dedecker
Authors: Anatole Dedecker, Yury Kudryashov
-/
import Mathlib.Topology.Algebra.Module.UniformConvergence
import Mathlib.Topology.Algebra.SeparationQuotient.Section
import Mathlib.Topology.Hom.ContinuousEvalConst

/-!
Expand Down Expand Up @@ -55,7 +56,6 @@ sets).
uniform convergence, bounded convergence
-/


open scoped Topology UniformConvergence Uniformity
open Filter Set Function Bornology

Expand All @@ -75,17 +75,16 @@ uniform convergence on the elements of `𝔖`".
If the continuous linear image of any element of `𝔖` is bounded, this makes `E β†’SL[Οƒ] F` a
topological vector space. -/
@[nolint unusedArguments]
def UniformConvergenceCLM [TopologicalSpace F] [TopologicalAddGroup F] (_ : Set (Set E)) :=
E β†’SL[Οƒ] F
def UniformConvergenceCLM [TopologicalSpace F] (_ : Set (Set E)) := E β†’SL[Οƒ] F

namespace UniformConvergenceCLM

instance instFunLike [TopologicalSpace F] [TopologicalAddGroup F]
(𝔖 : Set (Set E)) : FunLike (UniformConvergenceCLM Οƒ F 𝔖) E F :=
instance instFunLike [TopologicalSpace F] (𝔖 : Set (Set E)) :
FunLike (UniformConvergenceCLM Οƒ F 𝔖) E F :=
ContinuousLinearMap.funLike

instance instContinuousSemilinearMapClass [TopologicalSpace F] [TopologicalAddGroup F]
(𝔖 : Set (Set E)) : ContinuousSemilinearMapClass (UniformConvergenceCLM Οƒ F 𝔖) Οƒ E F :=
instance instContinuousSemilinearMapClass [TopologicalSpace F] (𝔖 : Set (Set E)) :
ContinuousSemilinearMapClass (UniformConvergenceCLM Οƒ F 𝔖) Οƒ E F :=
ContinuousLinearMap.continuousSemilinearMapClass

instance instTopologicalSpace [TopologicalSpace F] [TopologicalAddGroup F] (𝔖 : Set (Set E)) :
Expand Down Expand Up @@ -120,9 +119,13 @@ theorem uniformity_toTopologicalSpace_eq [UniformSpace F] [UniformAddGroup F] (
UniformConvergenceCLM.instTopologicalSpace Οƒ F 𝔖 :=
rfl

theorem isUniformInducing_coeFn [UniformSpace F] [UniformAddGroup F] (𝔖 : Set (Set E)) :
IsUniformInducing (Ξ± := UniformConvergenceCLM Οƒ F 𝔖) (UniformOnFun.ofFun 𝔖 ∘ DFunLike.coe) :=
⟨rfl⟩

theorem isUniformEmbedding_coeFn [UniformSpace F] [UniformAddGroup F] (𝔖 : Set (Set E)) :
IsUniformEmbedding (Ξ± := UniformConvergenceCLM Οƒ F 𝔖) (UniformOnFun.ofFun 𝔖 ∘ DFunLike.coe) :=
⟨⟨rfl⟩, DFunLike.coe_injective⟩
⟨isUniformInducing_coeFn .., DFunLike.coe_injective⟩

@[deprecated (since := "2024-10-01")]
alias uniformEmbedding_coeFn := isUniformEmbedding_coeFn
Expand Down Expand Up @@ -262,7 +265,7 @@ instance instUniformContinuousConstSMul (M : Type*)
[Monoid M] [DistribMulAction M F] [SMulCommClass π•œβ‚‚ M F]
[UniformSpace F] [UniformAddGroup F] [UniformContinuousConstSMul M F] (𝔖 : Set (Set E)) :
UniformContinuousConstSMul M (UniformConvergenceCLM Οƒ F 𝔖) :=
(isUniformEmbedding_coeFn Οƒ F 𝔖).isUniformInducing.uniformContinuousConstSMul fun _ _ ↦ by rfl
(isUniformInducing_coeFn Οƒ F 𝔖).uniformContinuousConstSMul fun _ _ ↦ by rfl

instance instContinuousConstSMul (M : Type*)
[Monoid M] [DistribMulAction M F] [SMulCommClass π•œβ‚‚ M F]
Expand All @@ -280,6 +283,32 @@ theorem tendsto_iff_tendstoUniformlyOn {ΞΉ : Type*} {p : Filter ΞΉ} [UniformSpac
rw [(embedding_coeFn Οƒ F 𝔖).tendsto_nhds_iff, UniformOnFun.tendsto_iff_tendstoUniformlyOn]
rfl

variable {F} in
theorem isUniformInducing_postcomp
{G : Type*} [AddCommGroup G] [UniformSpace G] [UniformAddGroup G]
{π•œβ‚ƒ : Type*} [NormedField π•œβ‚ƒ] [Module π•œβ‚ƒ G]
{Ο„ : π•œβ‚‚ β†’+* π•œβ‚ƒ} {ρ : π•œβ‚ β†’+* π•œβ‚ƒ} [RingHomCompTriple Οƒ Ο„ ρ] [UniformSpace F] [UniformAddGroup F]
(g : F β†’SL[Ο„] G) (hg : IsUniformInducing g) (𝔖 : Set (Set E)) :
IsUniformInducing (Ξ± := UniformConvergenceCLM Οƒ F 𝔖) (Ξ² := UniformConvergenceCLM ρ G 𝔖)
g.comp := by
rw [← (isUniformInducing_coeFn _ _ _).of_comp_iff]
exact (UniformOnFun.postcomp_isUniformInducing hg).comp (isUniformInducing_coeFn _ _ _)

theorem completeSpace [UniformSpace F] [UniformAddGroup F] [ContinuousSMul π•œβ‚‚ F] [CompleteSpace F]
{𝔖 : Set (Set E)} (h𝔖 : RestrictGenTopology 𝔖) (h𝔖U : ⋃₀ 𝔖 = univ) :
CompleteSpace (UniformConvergenceCLM Οƒ F 𝔖) := by
wlog hF : T2Space F generalizing F
Β· rw [(isUniformInducing_postcomp Οƒ (SeparationQuotient.mkCLM π•œβ‚‚ F)
SeparationQuotient.isUniformInducing_mk _).completeSpace_congr]
exacts [this _ inferInstance, SeparationQuotient.postcomp_mkCLM_surjective F Οƒ E]
rw [completeSpace_iff_isComplete_range (isUniformInducing_coeFn _ _ _)]
apply IsClosed.isComplete
have H₁ : IsClosed {f : E β†’α΅€[𝔖] F | Continuous ((UniformOnFun.toFun 𝔖) f)} :=
UniformOnFun.isClosed_setOf_continuous h𝔖
convert H₁.inter <| (LinearMap.isClosed_range_coe E F Οƒ).preimage
(UniformOnFun.uniformContinuous_toFun h𝔖U).continuous
exact ContinuousLinearMap.range_coeFn_eq

variable {𝔖₁ 𝔖₂ : Set (Set E)}

theorem uniformSpace_mono [UniformSpace F] [UniformAddGroup F] (h : 𝔖₂ βŠ† 𝔖₁) :
Expand Down Expand Up @@ -415,6 +444,16 @@ theorem isVonNBounded_iff {R : Type*} [NormedDivisionRing R]
βˆ€ s, IsVonNBounded π•œβ‚ s β†’ IsVonNBounded R (Set.image2 (fun f x ↦ f x) S s) :=
UniformConvergenceCLM.isVonNBounded_iff

theorem completeSpace [UniformSpace F] [UniformAddGroup F] [ContinuousSMul π•œβ‚‚ F] [CompleteSpace F]
[ContinuousSMul π•œβ‚ E] (h : RestrictGenTopology {s : Set E | IsVonNBounded π•œβ‚ s}) :
CompleteSpace (E β†’SL[Οƒ] F) :=
UniformConvergenceCLM.completeSpace _ _ h isVonNBounded_covers

instance instCompleteSpace [TopologicalAddGroup E] [ContinuousSMul π•œβ‚ E] [SequentialSpace E]
[UniformSpace F] [UniformAddGroup F] [ContinuousSMul π•œβ‚‚ F] [CompleteSpace F] :
CompleteSpace (E β†’SL[Οƒ] F) :=
completeSpace <| .of_seq fun _ _ h ↦ (h.isVonNBounded_range π•œβ‚).insert _

variable (G) [TopologicalSpace F] [TopologicalSpace G]

/-- Pre-composition by a *fixed* continuous linear map as a continuous linear map.
Expand Down

0 comments on commit c57a78f

Please sign in to comment.