Skip to content

Commit 3f3cfe1

Browse files
committed
completely pseudometrizable
1 parent a5e675b commit 3f3cfe1

2 files changed

Lines changed: 73 additions & 25 deletions

File tree

Mathlib/Topology/Baire/CompleteMetrizable.lean

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,22 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Sébastien Gouëzel, Yury Kudryashov
55
-/
66
import Mathlib.Analysis.SpecificLimits.Basic
7-
import Mathlib.Tactic.Finiteness
8-
import Mathlib.Topology.Metrizable.Uniformity
7+
import Mathlib.Topology.Metrizable.CompletelyMetrizable
98

109
/-!
1110
# First Baire theorem
1211
13-
In this file we prove that a completely metrizable topological space is a Baire space.
14-
Since `Mathlib` does not have the notion of a completely metrizable topological space yet,
15-
we state it for a complete uniform space with countably generated uniformity filter.
12+
In this file we prove that a completely pseudometrizable topological space is a Baire space.
1613
-/
1714

18-
open Filter EMetric Set
19-
open scoped Topology Uniformity ENNReal
15+
open EMetric Set TopologicalSpace
16+
open scoped ENNReal
2017

21-
variable {X : Type*} [UniformSpace X] [CompleteSpace X] [(𝓤 X).IsCountablyGenerated]
18+
variable {X : Type*} [TopologicalSpace X] [IsCompletelyPseudoMetrizableSpace X]
2219

23-
/-- **First Baire theorem**: a completely metrizable topological space has Baire property.
24-
25-
Since `Mathlib` does not have the notion of a completely metrizable topological space yet,
26-
we state it for a complete uniform space with countably generated uniformity filter. -/
27-
instance (priority := 100) BaireSpace.of_pseudoEMetricSpace_completeSpace : BaireSpace X := by
28-
let _ := UniformSpace.pseudoMetricSpace X
20+
/-- **First Baire theorem**: a completely pseudometrizable topological space has Baire property. -/
21+
instance (priority := 100) BaireSpace.of_pseudoMetricSpace_completeSpace : BaireSpace X := by
22+
let _ := upgradeIsCompletelyPseudoMetrizable X
2923
refine ⟨fun f ho hd => ?_⟩
3024
let B : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n
3125
have Bpos : ∀ n, 0 < B n := fun n ↦

Mathlib/Topology/Metrizable/CompletelyMetrizable.lean

Lines changed: 65 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,29 @@ import Mathlib.Topology.MetricSpace.Gluing
77
import Mathlib.Topology.Metrizable.Uniformity
88

99
/-!
10-
# Completely metrizable spaces
10+
# Completely (pseudo)metrizable spaces
1111
12-
A topological space is completely metrizable if one can endow it with a `MetricSpace` structure
13-
which makes it complete and gives the same topology. This typeclass allows to state theorems
14-
which do not require a `MetricSpace` structure to make sense without introducing such a structure.
12+
A topological space is completely (pseudo)metrizable if one can endow it with a
13+
`(Pseudo)MetricSpace` structure which makes it complete and gives the same topology. This typeclass
14+
allows to state theorems which do not require a `(Pseudo)MetricSpace` structure to make sense
15+
without introducing such a structure.
1516
It is in particular useful in measure theory, where one often assumes that a space is a
1617
`PolishSpace`, i.e. a separable and completely metrizable space. Sometimes the separability
1718
hypothesis is not needed and the right assumption is then `IsCompletelyMetrizableSpace`.
1819
1920
## Main definition
2021
21-
* `IsCompletelyMetrizableSpace X`: A topological space is completely metrizable if there exists a
22-
metric space structure compatible with the topology which makes the space complete.
23-
To endow such a space with a compatible distance, use `letI := upgradeIsCompletelyMetrizable X`.
22+
* `IsCompletely(Pseudo)MetrizableSpace X`: A topological space is completely (pseudo)metrizable if
23+
there exists a (pseudo)metric space structure compatible with the topology which makes the space
24+
complete. To endow such a space with a compatible distance, use
25+
`letI := upgradeIsCompletely(Pseudo)Metrizable X`.
2426
2527
## Implementation note
2628
27-
Given a `IsCompletelyMetrizableSpace X` instance, one may want to endow `X` with a complete metric.
28-
This can be done by writing `letI := upgradeIsCompletelyMetrizable X`, which will endow `X` with
29-
an `UpgradedIsCompletelyMetrizableSpace X` instance. This class is a convenience class and
30-
no instance should be registered for it.
29+
Given a `IsCompletely(Pseudo)MetrizableSpace X` instance, one may want to endow `X` with a complete
30+
(pseudo)metric. This can be done by writing `letI := upgradeIsCompletely(Pseudo)Metrizable X`,
31+
which will endow `X` with an `UpgradedIsCompletely(Pseudo)MetrizableSpace X` instance. This class
32+
is a convenience class and no instance should be registered for it.
3133
-/
3234

3335
open Filter Function Set Topology
@@ -36,6 +38,52 @@ variable {X Y : Type*}
3638

3739
namespace TopologicalSpace
3840

41+
/-- A topological space is completely pseudometrizable if there exists a pseudometric space
42+
structure compatible with the topology which makes the space complete.
43+
To endow such a space with a compatible distance, use
44+
`letI := upgradeIsCompletelyPseudoMetrizable X`. -/
45+
class IsCompletelyPseudoMetrizableSpace (X : Type*) [t : TopologicalSpace X] : Prop where
46+
complete : ∃ m : PseudoMetricSpace X, m.toUniformSpace.toTopologicalSpace = t ∧
47+
@CompleteSpace X m.toUniformSpace
48+
49+
instance (priority := 100) _root_.PseudoMetricSpace.toIsCompletelPseudoMetrizableSpace
50+
[PseudoMetricSpace X] [CompleteSpace X] : IsCompletelyPseudoMetrizableSpace X :=
51+
⟨⟨‹_›, rfl, ‹_›⟩⟩
52+
53+
/-- A convenience class, for a completely pseudometrizable space endowed with a complete
54+
pseudometric. No instance of this class should be registered: It should be used as
55+
`letI := upgradeIsCompletelyPseudoMetrizable X` to endow a completely pseudometrizable
56+
space with a complete pseudometric. -/
57+
class UpgradedIsCompletelyPseudoMetrizableSpace (X : Type*) extends
58+
PseudoMetricSpace X, CompleteSpace X
59+
60+
open scoped Uniformity in
61+
instance (priority := 100) IsCompletelyPseudoMetrizableSpace.of_completeSpace_pseudometrizable
62+
[UniformSpace X] [CompleteSpace X] [(𝓤 X).IsCountablyGenerated] :
63+
IsCompletelyPseudoMetrizableSpace X where
64+
complete := ⟨UniformSpace.pseudoMetricSpace X, rfl, ‹_›⟩
65+
66+
/-- Construct on a completely pseudometrizable space a pseudometric (compatible with the topology)
67+
which is complete. -/
68+
noncomputable def completelyPseudoMetrizableMetric (X : Type*) [TopologicalSpace X]
69+
[h : IsCompletelyPseudoMetrizableSpace X] : PseudoMetricSpace X :=
70+
h.complete.choose.replaceTopology h.complete.choose_spec.1.symm
71+
72+
theorem complete_completelyPseudoMetrizableMetric (X : Type*) [ht : TopologicalSpace X]
73+
[h : IsCompletelyPseudoMetrizableSpace X] :
74+
@CompleteSpace X (completelyPseudoMetrizableMetric X).toUniformSpace := by
75+
convert h.complete.choose_spec.2
76+
exact PseudoMetricSpace.replaceTopology_eq _ _
77+
78+
/-- This definition endows a completely pseudometrizable space with a complete pseudometric.
79+
Use it as: `letI := upgradeIsCompletelyMetrizable X`. -/
80+
noncomputable
81+
def upgradeIsCompletelyPseudoMetrizable (X : Type*) [TopologicalSpace X]
82+
[IsCompletelyPseudoMetrizableSpace X] :
83+
UpgradedIsCompletelyPseudoMetrizableSpace X :=
84+
letI := completelyPseudoMetrizableMetric X
85+
{ complete_completelyPseudoMetrizableMetric X with }
86+
3987
/-- A topological space is completely metrizable if there exists a metric space structure
4088
compatible with the topology which makes the space complete.
4189
To endow such a space with a compatible distance, use
@@ -44,6 +92,12 @@ class IsCompletelyMetrizableSpace (X : Type*) [t : TopologicalSpace X] : Prop wh
4492
complete : ∃ m : MetricSpace X, m.toUniformSpace.toTopologicalSpace = t ∧
4593
@CompleteSpace X m.toUniformSpace
4694

95+
/-- A completely metrizable space is completely pseudometrizable. -/
96+
instance IsCompletelyPseudoMetrizableSpace.IsCompletelyMetrizableSpace [TopologicalSpace X]
97+
[IsCompletelyMetrizableSpace X] : IsCompletelyPseudoMetrizableSpace X := by
98+
obtain ⟨m, _, _⟩ := ‹_›
99+
use m.toPseudoMetricSpace
100+
47101
instance (priority := 100) _root_.MetricSpace.toIsCompletelyMetrizableSpace
48102
[MetricSpace X] [CompleteSpace X] : IsCompletelyMetrizableSpace X :=
49103
⟨⟨‹_›, rfl, ‹_›⟩⟩

0 commit comments

Comments
 (0)