Skip to content

Commit 158514f

Browse files
committed
feat(UniformSpace/CompactConvergence): prove metrizability (#10942)
1 parent cb921c1 commit 158514f

File tree

8 files changed

+134
-15
lines changed

8 files changed

+134
-15
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3927,6 +3927,7 @@ import Mathlib.Topology.MetricSpace.ShrinkingLemma
39273927
import Mathlib.Topology.MetricSpace.ThickenedIndicator
39283928
import Mathlib.Topology.MetricSpace.Thickening
39293929
import Mathlib.Topology.Metrizable.Basic
3930+
import Mathlib.Topology.Metrizable.ContinuousMap
39303931
import Mathlib.Topology.Metrizable.Uniformity
39313932
import Mathlib.Topology.Metrizable.Urysohn
39323933
import Mathlib.Topology.NhdsSet

Mathlib/MeasureTheory/Constructions/Polish.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -946,11 +946,8 @@ theorem measurableSet_exists_tendsto [TopologicalSpace γ] [PolishSpace γ] [Mea
946946
rcases l.exists_antitone_basis with ⟨u, hu⟩
947947
simp_rw [← cauchy_map_iff_exists_tendsto]
948948
change MeasurableSet { x | _ ∧ _ }
949-
have :
950-
∀ x,
951-
(map (fun i => f i x) l ×ˢ map (fun i => f i x) l).HasAntitoneBasis fun n =>
952-
((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n) :=
953-
fun x => hu.map.prod hu.map
949+
have : ∀ x, (map (f · x) l ×ˢ map (f · x) l).HasAntitoneBasis fun n =>
950+
((f · x) '' u n) ×ˢ ((f · x) '' u n) := fun x => (hu.map _).prod (hu.map _)
954951
simp_rw [and_iff_right (hl.map _),
955952
Filter.HasBasis.le_basis_iff (this _).toHasBasis Metric.uniformity_basis_dist_inv_nat_succ,
956953
Set.setOf_forall]

Mathlib/Order/Filter/Bases.lean

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -850,11 +850,15 @@ structure HasAntitoneBasis (l : Filter α) (s : ι'' → Set α)
850850
protected antitone : Antitone s
851851
#align filter.has_antitone_basis Filter.HasAntitoneBasis
852852

853-
theorem HasAntitoneBasis.map {l : Filter α} {s : ι'' → Set α} {m : α → β}
854-
(hf : HasAntitoneBasis l s) : HasAntitoneBasis (map m l) fun n => m '' s n :=
853+
protected theorem HasAntitoneBasis.map {l : Filter α} {s : ι'' → Set α}
854+
(hf : HasAntitoneBasis l s) (m : α → β) : HasAntitoneBasis (map m l) (m '' s ·) :=
855855
⟨HasBasis.map _ hf.toHasBasis, fun _ _ h => image_subset _ <| hf.2 h⟩
856856
#align filter.has_antitone_basis.map Filter.HasAntitoneBasis.map
857857

858+
protected theorem HasAntitoneBasis.comap {l : Filter α} {s : ι'' → Set α}
859+
(hf : HasAntitoneBasis l s) (m : β → α) : HasAntitoneBasis (comap m l) (m ⁻¹' s ·) :=
860+
⟨hf.1.comap _, fun _ _ h ↦ preimage_mono (hf.2 h)⟩
861+
858862
lemma HasAntitoneBasis.iInf_principal {ι : Type*} [Preorder ι] [Nonempty ι] [IsDirected ι (· ≤ ·)]
859863
{s : ι → Set α} (hs : Antitone s) : (⨅ i, 𝓟 (s i)).HasAntitoneBasis s :=
860864
⟨hasBasis_iInf_principal hs.directed_ge, hs⟩
@@ -1026,6 +1030,10 @@ theorem HasCountableBasis.isCountablyGenerated {f : Filter α} {p : ι → Prop}
10261030
⟨⟨{ t | ∃ i, p i ∧ s i = t }, h.countable.image s, h.toHasBasis.eq_generate⟩⟩
10271031
#align filter.has_countable_basis.is_countably_generated Filter.HasCountableBasis.isCountablyGenerated
10281032

1033+
theorem HasBasis.isCountablyGenerated [Countable ι] {f : Filter α} {p : ι → Prop} {s : ι → Set α}
1034+
(h : f.HasBasis p s) : f.IsCountablyGenerated :=
1035+
HasCountableBasis.isCountablyGenerated ⟨h, to_countable _⟩
1036+
10291037
theorem antitone_seq_of_seq (s : ℕ → Set α) :
10301038
∃ t : ℕ → Set α, Antitone t ∧ ⨅ i, 𝓟 (s i) = ⨅ i, 𝓟 (t i) := by
10311039
use fun n => ⋂ m ≤ n, s m; constructor
@@ -1128,21 +1136,20 @@ instance Inf.isCountablyGenerated (f g : Filter α) [IsCountablyGenerated f]
11281136
instance map.isCountablyGenerated (l : Filter α) [l.IsCountablyGenerated] (f : α → β) :
11291137
(map f l).IsCountablyGenerated :=
11301138
let ⟨_x, hxl⟩ := l.exists_antitone_basis
1131-
HasCountableBasis.isCountablyGenerated ⟨hxl.map.1, to_countable _⟩
1139+
(hxl.map _).isCountablyGenerated
11321140
#align filter.map.is_countably_generated Filter.map.isCountablyGenerated
11331141

11341142
instance comap.isCountablyGenerated (l : Filter β) [l.IsCountablyGenerated] (f : α → β) :
11351143
(comap f l).IsCountablyGenerated :=
11361144
let ⟨_x, hxl⟩ := l.exists_antitone_basis
1137-
HasCountableBasis.isCountablyGenerated ⟨hxl.1.comap _, to_countable _⟩
1145+
(hxl.comap _).isCountablyGenerated
11381146
#align filter.comap.is_countably_generated Filter.comap.isCountablyGenerated
11391147

11401148
instance Sup.isCountablyGenerated (f g : Filter α) [IsCountablyGenerated f]
11411149
[IsCountablyGenerated g] : IsCountablyGenerated (f ⊔ g) := by
11421150
rcases f.exists_antitone_basis with ⟨s, hs⟩
11431151
rcases g.exists_antitone_basis with ⟨t, ht⟩
1144-
exact
1145-
HasCountableBasis.isCountablyGenerated ⟨hs.1.sup ht.1, Set.to_countable _⟩
1152+
exact HasCountableBasis.isCountablyGenerated ⟨hs.1.sup ht.1, Set.to_countable _⟩
11461153
#align filter.sup.is_countably_generated Filter.Sup.isCountablyGenerated
11471154

11481155
instance prod.isCountablyGenerated (la : Filter α) (lb : Filter β) [IsCountablyGenerated la]
@@ -1157,7 +1164,7 @@ instance coprod.isCountablyGenerated (la : Filter α) (lb : Filter β) [IsCounta
11571164

11581165
end IsCountablyGenerated
11591166

1160-
theorem isCountablyGenerated_seq [Countable β] (x : β → Set α) :
1167+
theorem isCountablyGenerated_seq [Countable ι'] (x : ι' → Set α) :
11611168
IsCountablyGenerated (⨅ i, 𝓟 (x i)) := by
11621169
use range x, countable_range x
11631170
rw [generate_eq_biInf, iInf_range]

Mathlib/Topology/Algebra/UniformGroup.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ instance QuotientGroup.completeSpace' (G : Type u) [Group G] [TopologicalSpace G
922922
letI : UniformSpace G := TopologicalGroup.toUniformSpace G
923923
haveI : (𝓤 (G ⧸ N)).IsCountablyGenerated := comap.isCountablyGenerated _ _
924924
obtain ⟨u, hu, u_mul⟩ := TopologicalGroup.exists_antitone_basis_nhds_one G
925-
obtain ⟨hv, v_anti⟩ := @HasAntitoneBasis.map _ _ _ _ _ _ ((↑) : G → G ⧸ N) hu
925+
obtain ⟨hv, v_anti⟩ := hu.map ((↑) : G → G ⧸ N)
926926
rw [← QuotientGroup.nhds_eq N 1, QuotientGroup.mk_one] at hv
927927
refine' UniformSpace.complete_of_cauchySeq_tendsto fun x hx => _
928928
/- Given `n : ℕ`, for sufficiently large `a b : ℕ`, given any lift of `x b`, we can find a lift

Mathlib/Topology/Compactness/SigmaCompact.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,15 @@ theorem exists_mem (x : X) : ∃ n, x ∈ K n :=
378378
iUnion_eq_univ_iff.1 K.iUnion_eq x
379379
#align compact_exhaustion.exists_mem CompactExhaustion.exists_mem
380380

381+
/-- A compact exhaustion eventually covers any compact set. -/
382+
theorem exists_superset_of_isCompact {s : Set X} (hs : IsCompact s) : ∃ n, s ⊆ K n := by
383+
suffices ∃ n, s ⊆ interior (K n) from this.imp fun _ ↦ (Subset.trans · interior_subset)
384+
refine hs.elim_directed_cover (interior ∘ K) (fun _ ↦ isOpen_interior) ?_ ?_
385+
· intro x _
386+
rcases K.exists_mem x with ⟨k, hk⟩
387+
exact mem_iUnion.2 ⟨k + 1, K.subset_interior_succ _ hk⟩
388+
· exact Monotone.directed_le fun _ _ h ↦ interior_mono <| K.subset h
389+
381390
/-- The minimal `n` such that `x ∈ K n`. -/
382391
protected noncomputable def find (x : X) : ℕ :=
383392
Nat.find (K.exists_mem x)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/-
2+
Copyright (c) 2024 Yury Kudryashov. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Yury Kudryashov
5+
-/
6+
import Mathlib.Topology.Metrizable.Uniformity
7+
import Mathlib.Topology.UniformSpace.CompactConvergence
8+
9+
/-!
10+
# Metrizability of `C(X, Y)`
11+
12+
If `X` is a weakly locally compact σ-compact space and `Y` is a (pseudo)metrizable space,
13+
then `C(X, Y)` is a (pseudo)metrizable space.
14+
-/
15+
16+
open TopologicalSpace
17+
18+
namespace ContinuousMap
19+
20+
variable {X Y : Type*}
21+
[TopologicalSpace X] [WeaklyLocallyCompactSpace X] [SigmaCompactSpace X]
22+
[TopologicalSpace Y]
23+
24+
instance [PseudoMetrizableSpace Y] : PseudoMetrizableSpace C(X, Y) :=
25+
let _ := pseudoMetrizableSpacePseudoMetric Y
26+
inferInstance
27+
28+
instance [MetrizableSpace Y] : MetrizableSpace C(X, Y) :=
29+
let _ := metrizableSpaceMetric Y
30+
UniformSpace.metrizableSpace
31+
32+
end ContinuousMap

Mathlib/Topology/UniformSpace/CompactConvergence.lean

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ so that the resulting instance uses the compact-open topology.
7979
8080
## TODO
8181
82-
* When `α` is compact and `β` is a metric space,
83-
the compact-convergence topology (and thus also the compact-open topology) is metrisable.
8482
* Results about uniformly continuous functions `γ → C(α, β)`
8583
and uniform limits of sequences `ι → γ → C(α, β)`.
8684
-/
@@ -223,6 +221,34 @@ theorem mem_compactConvergence_entourage_iff (X : Set (C(α, β) × C(α, β)))
223221
simp [hasBasis_compactConvergenceUniformity.mem_iff, and_assoc]
224222
#align continuous_map.mem_compact_convergence_entourage_iff ContinuousMap.mem_compactConvergence_entourage_iff
225223

224+
/-- If `K` is a compact exhaustion of `α`
225+
and `V i` bounded by `p i` is a basis of entourages of `β`,
226+
then `fun (n, i) ↦ {(f, g) | ∀ x ∈ K n, (f x, g x) ∈ V i}` bounded by `p i`
227+
is a basis of entourages of `C(α, β)`. -/
228+
theorem _root_.CompactExhaustion.hasBasis_compactConvergenceUniformity {ι : Type*}
229+
{p : ι → Prop} {V : ι → Set (β × β)} (K : CompactExhaustion α) (hb : (𝓤 β).HasBasis p V) :
230+
HasBasis (𝓤 C(α, β)) (fun i : ℕ × ι ↦ p i.2) fun i ↦
231+
{fg | ∀ x ∈ K i.1, (fg.1 x, fg.2 x) ∈ V i.2} :=
232+
(UniformOnFun.hasBasis_uniformity_of_covering_of_basis {K | IsCompact K} K.isCompact
233+
(Monotone.directed_le K.subset) (fun _ ↦ K.exists_superset_of_isCompact) hb).comap _
234+
235+
theorem _root_.CompactExhaustion.hasAntitoneBasis_compactConvergenceUniformity
236+
{V : ℕ → Set (β × β)} (K : CompactExhaustion α) (hb : (𝓤 β).HasAntitoneBasis V) :
237+
HasAntitoneBasis (𝓤 C(α, β)) fun n ↦ {fg | ∀ x ∈ K n, (fg.1 x, fg.2 x) ∈ V n} :=
238+
(UniformOnFun.hasAntitoneBasis_uniformity {K | IsCompact K} K.isCompact
239+
K.subset (fun _ ↦ K.exists_superset_of_isCompact) hb).comap _
240+
241+
/-- If `α` is a weakly locally compact σ-compact space
242+
(e.g., a proper pseudometric space or a compact spaces)
243+
and the uniformity on `β` is pseudometrizable,
244+
then the uniformity on `C(α, β)` is pseudometrizable too.
245+
-/
246+
instance [WeaklyLocallyCompactSpace α] [SigmaCompactSpace α] [IsCountablyGenerated (𝓤 β)] :
247+
IsCountablyGenerated (𝓤 (C(α, β))) :=
248+
let ⟨_V, hV⟩ := exists_antitone_basis (𝓤 β)
249+
((CompactExhaustion.choice α).hasAntitoneBasis_compactConvergenceUniformity
250+
hV).isCountablyGenerated
251+
226252
variable {ι : Type u₃} {p : Filter ι} {F : ι → C(α, β)} {f}
227253

228254
/-- Locally uniform convergence implies convergence in the compact-open topology. -/

Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,53 @@ protected theorem hasBasis_uniformity (h : 𝔖.Nonempty) (h' : DirectedOn (·
657657
UniformOnFun.hasBasis_uniformity_of_basis α β 𝔖 h h' (𝓤 β).basis_sets
658658
#align uniform_on_fun.has_basis_uniformity UniformOnFun.hasBasis_uniformity
659659

660+
variable {α β}
661+
662+
/-- Let `t i` be a nonempty directed subfamily of `𝔖`
663+
such that every `s ∈ 𝔖` is included in some `t i`.
664+
Let `V` bounded by `p` be a basis of entourages of `β`.
665+
666+
Then `UniformOnFun.gen 𝔖 (t i) (V j)` bounded by `p j` is a basis of entourages of `α →ᵤ[𝔖] β`. -/
667+
protected theorem hasBasis_uniformity_of_covering_of_basis {ι ι' : Type*} [Nonempty ι]
668+
{t : ι → Set α} {p : ι' → Prop} {V : ι' → Set (β × β)} (ht : ∀ i, t i ∈ 𝔖)
669+
(hdir : Directed (· ⊆ ·) t) (hex : ∀ s ∈ 𝔖, ∃ i, s ⊆ t i) (hb : HasBasis (𝓤 β) p V) :
670+
(𝓤 (α →ᵤ[𝔖] β)).HasBasis (fun i : ι × ι' ↦ p i.2) fun i ↦
671+
UniformOnFun.gen 𝔖 (t i.1) (V i.2) := by
672+
have hne : 𝔖.Nonempty := (range_nonempty t).mono (range_subset_iff.2 ht)
673+
have hd : DirectedOn (· ⊆ ·) 𝔖 := fun s₁ hs₁ s₂ hs₂ ↦ by
674+
rcases hex s₁ hs₁, hex s₂ hs₂ with ⟨⟨i₁, his₁⟩, i₂, his₂⟩
675+
rcases hdir i₁ i₂ with ⟨i, hi₁, hi₂⟩
676+
exact ⟨t i, ht _, his₁.trans hi₁, his₂.trans hi₂⟩
677+
refine (UniformOnFun.hasBasis_uniformity_of_basis α β 𝔖 hne hd hb).to_hasBasis
678+
(fun ⟨s, i'⟩ ⟨hs, hi'⟩ ↦ ?_) fun ⟨i, i'⟩ hi' ↦ ⟨(t i, i'), ⟨ht i, hi'⟩, Subset.rfl⟩
679+
rcases hex s hs with ⟨i, hi⟩
680+
exact ⟨(i, i'), hi', UniformOnFun.gen_mono hi Subset.rfl⟩
681+
682+
/-- If `t n` is a monotone sequence of sets in `𝔖`
683+
such that each `s ∈ 𝔖` is included in some `t n`
684+
and `V n` is an antitone basis of entourages of `β`,
685+
then `UniformOnFun.gen 𝔖 (t n) (V n)` is an antitone basis of entourages of `α →ᵤ[𝔖] β`. -/
686+
protected theorem hasAntitoneBasis_uniformity {ι : Type*} [Preorder ι] [IsDirected ι (· ≤ ·)]
687+
{t : ι → Set α} {V : ι → Set (β × β)}
688+
(ht : ∀ n, t n ∈ 𝔖) (hmono : Monotone t) (hex : ∀ s ∈ 𝔖, ∃ n, s ⊆ t n)
689+
(hb : HasAntitoneBasis (𝓤 β) V) :
690+
(𝓤 (α →ᵤ[𝔖] β)).HasAntitoneBasis fun n ↦ UniformOnFun.gen 𝔖 (t n) (V n) := by
691+
have := hb.nonempty
692+
refine ⟨(UniformOnFun.hasBasis_uniformity_of_covering_of_basis 𝔖
693+
ht hmono.directed_le hex hb.1).to_hasBasis ?_ fun i _ ↦ ⟨(i, i), trivial, Subset.rfl⟩, ?_⟩
694+
· rintro ⟨k, l⟩ -
695+
rcases directed_of (· ≤ ·) k l with ⟨n, hkn, hln⟩
696+
exact ⟨n, trivial, UniformOnFun.gen_mono (hmono hkn) (hb.2 <| hln)⟩
697+
· exact fun k l h ↦ UniformOnFun.gen_mono (hmono h) (hb.2 h)
698+
699+
protected theorem isCountablyGenerated_uniformity [IsCountablyGenerated (𝓤 β)] {t : ℕ → Set α}
700+
(ht : ∀ n, t n ∈ 𝔖) (hmono : Monotone t) (hex : ∀ s ∈ 𝔖, ∃ n, s ⊆ t n) :
701+
IsCountablyGenerated (𝓤 (α →ᵤ[𝔖] β)) :=
702+
let ⟨_V, hV⟩ := exists_antitone_basis (𝓤 β)
703+
(UniformOnFun.hasAntitoneBasis_uniformity 𝔖 ht hmono hex hV).isCountablyGenerated
704+
705+
variable (α β)
706+
660707
/-- For `f : α →ᵤ[𝔖] β`, where `𝔖 : Set (Set α)` is nonempty and directed, `𝓝 f` admits the
661708
family `{g | ∀ x ∈ S, (f x, g x) ∈ V}` for `S ∈ 𝔖` and `V ∈ 𝓑` as a filter basis, for any basis
662709
`𝓑` of `𝓤 β`. -/

0 commit comments

Comments
 (0)