File: Mathlib/Topology/MetricSpace/Polish.lean

full_name: PolishSpace.complete
code: /-- A Polish space is a topological space with second countable topology, that can be endowed
with a metric for which it is complete.
We register an instance from complete second countable metric space to polish space, and not the
other way around as this is the most common use case.

To endow a Polish space with a complete metric space structure, do `letI := upgradePolishSpace α`.
-/
class PolishSpace (α : Type*) [h : TopologicalSpace α]
    extends SecondCountableTopology α : Prop where
  complete : ∃ m : MetricSpace α, m.toUniformSpace.toTopologicalSpace = h ∧
    @CompleteSpace α m.toUniformSpace
goal: ∃ m, UniformSpace.toTopologicalSpace = h ∧ CompleteSpace α

full_name: PolishSpace
code: /-- A Polish space is a topological space with second countable topology, that can be endowed
with a metric for which it is complete.
We register an instance from complete second countable metric space to polish space, and not the
other way around as this is the most common use case.

To endow a Polish space with a complete metric space structure, do `letI := upgradePolishSpace α`.
-/
class PolishSpace (α : Type*) [h : TopologicalSpace α]
    extends SecondCountableTopology α : Prop where
  complete : ∃ m : MetricSpace α, m.toUniformSpace.toTopologicalSpace = h ∧
    @CompleteSpace α m.toUniformSpace
goal: Prop

full_name: UpgradedPolishSpace
code: /-- A convenience class, for a Polish space endowed with a complete metric. No instance of this
class should be registered: It should be used as `letI := upgradePolishSpace α` to endow a Polish
space with a complete metric. -/
class UpgradedPolishSpace (α : Type*) extends MetricSpace α, SecondCountableTopology α,
  CompleteSpace α
goal: Type u_3

full_name: PolishSpace.of_separableSpace_completeSpace_metrizable
code: instance (priority := 100) PolishSpace.of_separableSpace_completeSpace_metrizable [UniformSpace α]
    [SeparableSpace α] [CompleteSpace α] [(𝓤 α).IsCountablyGenerated] [T0Space α] :
    PolishSpace α 
goal: PolishSpace α

full_name: polishSpaceMetric
code: /-- Construct on a Polish space a metric (compatible with the topology) which is complete. -/
def polishSpaceMetric (α : Type*) [TopologicalSpace α] [h : PolishSpace α] : MetricSpace α 
goal: MetricSpace α

full_name: complete_polishSpaceMetric
code: theorem complete_polishSpaceMetric (α : Type*) [ht : TopologicalSpace α] [h : PolishSpace α] :
    @CompleteSpace α (polishSpaceMetric α).toUniformSpace 
goal: CompleteSpace α

full_name: upgradePolishSpace
code: /-- This definition endows a Polish space with a complete metric. Use it as:
`letI := upgradePolishSpace α`. -/
def upgradePolishSpace (α : Type*) [TopologicalSpace α] [PolishSpace α] :
    UpgradedPolishSpace α 
goal: UpgradedPolishSpace α

full_name: PolishSpace.instMetrizableSpace
code: instance (priority := 100) instMetrizableSpace (α : Type*) [TopologicalSpace α] [PolishSpace α] :
    MetrizableSpace α 
goal: TopologicalSpace.MetrizableSpace α

full_name: PolishSpace.t2Space
code: @[deprecated (since := "2024-02-23")]
theorem t2Space (α : Type*) [TopologicalSpace α] [PolishSpace α] : T2Space α 
goal: T2Space α

full_name: PolishSpace.pi_countable
code: /-- A countable product of Polish spaces is Polish. -/
instance pi_countable {ι : Type*} [Countable ι] {E : ι → Type*} [∀ i, TopologicalSpace (E i)]
    [∀ i, PolishSpace (E i)] : PolishSpace (∀ i, E i) 
goal: PolishSpace ((i : ι) → E i)

full_name: PolishSpace.sigma
code: /-- A countable disjoint union of Polish spaces is Polish. -/
instance sigma {ι : Type*} [Countable ι] {E : ι → Type*} [∀ n, TopologicalSpace (E n)]
    [∀ n, PolishSpace (E n)] : PolishSpace (Σn, E n) 
goal: PolishSpace ((n : ι) × E n)

full_name: PolishSpace.prod
code: /-- The product of two Polish spaces is Polish. -/
instance prod [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [PolishSpace β] :
    PolishSpace (α × β) 
goal: PolishSpace (α × β)

full_name: PolishSpace.sum
code: /-- The disjoint union of two Polish spaces is Polish. -/
instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [PolishSpace β] :
    PolishSpace (α ⊕ β) 
goal: PolishSpace (α ⊕ β)

full_name: PolishSpace.exists_nat_nat_continuous_surjective
code: /-- Any nonempty Polish space is the continuous image of the fundamental space `ℕ → ℕ`. -/
theorem exists_nat_nat_continuous_surjective (α : Type*) [TopologicalSpace α] [PolishSpace α]
    [Nonempty α] : ∃ f : (ℕ → ℕ) → α, Continuous f ∧ Surjective f 
goal: ∃ f, Continuous f ∧ Function.Surjective f

full_name: ClosedEmbedding.polishSpace
code: /-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α 
goal: PolishSpace α

full_name: PolishSpace.polish_of_countable
code: /-- Any countable discrete space is Polish. -/
instance (priority := 50) polish_of_countable [TopologicalSpace α]
    [h : Countable α] [DiscreteTopology α] : PolishSpace α 
goal: PolishSpace α

full_name: Equiv.polishSpace_induced
code: /-- Pulling back a Polish topology under an equiv gives again a Polish topology. -/
theorem _root_.Equiv.polishSpace_induced [t : TopologicalSpace β] [PolishSpace β] (f : α ≃ β) :
    @PolishSpace α (t.induced f) 
goal: PolishSpace α

full_name: IsClosed.polishSpace
code: /-- A closed subset of a Polish space is also Polish. -/
theorem _root_.IsClosed.polishSpace [TopologicalSpace α] [PolishSpace α] {s : Set α}
    (hs : IsClosed s) : PolishSpace s 
goal: PolishSpace ↑s

full_name: PolishSpace.instPolishSpaceUniv
code: instance instPolishSpaceUniv [TopologicalSpace α] [PolishSpace α] :
    PolishSpace (univ : Set α) 
goal: PolishSpace ↑Set.univ

full_name: CompletePseudometrizable.iInf
code: protected theorem _root_.CompletePseudometrizable.iInf {ι : Type*} [Countable ι]
    {t : ι → TopologicalSpace α} (ht₀ : ∃ t₀, @T2Space α t₀ ∧ ∀ i, t i ≤ t₀)
    (ht : ∀ i, ∃ u : UniformSpace α, CompleteSpace α ∧ 𝓤[u].IsCountablyGenerated ∧
      u.toTopologicalSpace = t i) :
    ∃ u : UniformSpace α, CompleteSpace α ∧
      𝓤[u].IsCountablyGenerated ∧ u.toTopologicalSpace = ⨅ i, t i 
goal: ∃ u, CompleteSpace α ∧ (𝓤 α).IsCountablyGenerated ∧ UniformSpace.toTopologicalSpace = ⨅ i, t i

full_name: PolishSpace.iInf
code: protected theorem iInf {ι : Type*} [Countable ι] {t : ι → TopologicalSpace α}
    (ht₀ : ∃ i₀, ∀ i, t i ≤ t i₀) (ht : ∀ i, @PolishSpace α (t i)) : @PolishSpace α (⨅ i, t i) 
goal: PolishSpace α

full_name: PolishSpace.exists_polishSpace_forall_le
code: /-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' 
goal: ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

full_name: PolishSpace.instENNReal
code: instance : PolishSpace ENNReal 
goal: PolishSpace ENNReal

full_name: TopologicalSpace.Opens.CompleteCopy
code: /-- A type synonym for a subset `s` of a metric space, on which we will construct another metric
for which it will be complete. -/
-- Porting note(#5171): was @[nolint has_nonempty_instance]
def CompleteCopy {α : Type*} [MetricSpace α] (s : Opens α) : Type _ 
goal: Type u_3

full_name: TopologicalSpace.Opens.CompleteCopy.instDist
code: /-- A distance on an open subset `s` of a metric space, designed to make it complete.  It is given
by `dist' x y = dist x y + |1 / dist x sᶜ - 1 / dist y sᶜ|`, where the second term blows up close to
the boundary to ensure that Cauchy sequences for `dist'` remain well inside `s`. -/
-- Porting note: in mathlib3 this was only a local instance.
instance instDist : Dist (CompleteCopy s) 
goal: Dist s.CompleteCopy

full_name: TopologicalSpace.Opens.CompleteCopy.dist_eq
code: theorem dist_eq (x y : CompleteCopy s) :
    dist x y = dist x.1 y.1 + abs (1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ) 
goal: dist x y = dist ↑x ↑y + |1 / Metric.infDist (↑x) (↑s)ᶜ - 1 / Metric.infDist (↑y) (↑s)ᶜ|

full_name: TopologicalSpace.Opens.CompleteCopy.dist_val_le_dist
code: theorem dist_val_le_dist (x y : CompleteCopy s) : dist x.1 y.1 ≤ dist x y 
goal: dist ↑x ↑y ≤ dist x y

full_name: TopologicalSpace.Opens.CompleteCopy.inst
code: instance : TopologicalSpace (CompleteCopy s) 
goal: TopologicalSpace s.CompleteCopy

full_name: TopologicalSpace.Opens.CompleteCopy.instT0Space
code: instance : T0Space (CompleteCopy s) 
goal: T0Space s.CompleteCopy

full_name: TopologicalSpace.Opens.CompleteCopy.instMetricSpace
code: /-- A metric space structure on a subset `s` of a metric space, designed to make it complete
if `s` is open. It is given by `dist' x y = dist x y + |1 / dist x sᶜ - 1 / dist y sᶜ|`, where the
second term blows up close to the boundary to ensure that Cauchy sequences for `dist'` remain well
inside `s`.

Porting note: the definition changed to ensure that the `TopologicalSpace` structure on
`TopologicalSpace.Opens.CompleteCopy s` is definitionally equal to the original one. -/
-- Porting note: in mathlib3 this was only a local instance.
instance instMetricSpace : MetricSpace (CompleteCopy s) 
goal: MetricSpace s.CompleteCopy

full_name: TopologicalSpace.Opens.CompleteCopy.instCompleteSpace
code: instance instCompleteSpace [CompleteSpace α] : CompleteSpace (CompleteCopy s) 
goal: CompleteSpace s.CompleteCopy

full_name: IsOpen.polishSpace
code: /-- An open subset of a Polish space is also Polish. -/
theorem _root_.IsOpen.polishSpace {α : Type*} [TopologicalSpace α] [PolishSpace α] {s : Set α}
    (hs : IsOpen s) : PolishSpace s 
goal: PolishSpace ↑s

full_name: PolishSpace.IsClopenable
code: /-- A set in a topological space is clopenable if there exists a finer Polish topology for which
this set is open and closed. It turns out that this notion is equivalent to being Borel-measurable,
but this is nontrivial (see `isClopenable_iff_measurableSet`). -/
def IsClopenable [t : TopologicalSpace α] (s : Set α) : Prop 
goal: Prop

full_name: IsClosed.isClopenable
code: /-- Given a closed set `s` in a Polish space, one can construct a finer Polish topology for
which `s` is both open and closed. -/
theorem _root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α}
    (hs : IsClosed s) : IsClopenable s 
goal: PolishSpace.IsClopenable s

full_name: PolishSpace.IsClopenable.compl
code: theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
    IsClopenable sᶜ 
goal: PolishSpace.IsClopenable sᶜ

full_name: IsOpen.isClopenable
code: theorem _root_.IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α}
    (hs : IsOpen s) : IsClopenable s 
goal: PolishSpace.IsClopenable s

full_name: PolishSpace.IsClopenable.iUnion
code: theorem IsClopenable.iUnion [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
    (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) 
goal: PolishSpace.IsClopenable (⋃ n, s n)