topology.metric_space.polishMathlib.Topology.MetricSpace.Polish

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -85,13 +85,13 @@ class UpgradedPolishSpace (α : Type _) extends MetricSpace α, SecondCountableT
 #align upgraded_polish_space UpgradedPolishSpace
 -/
 
-#print polishSpace_of_complete_second_countable /-
-instance (priority := 100) polishSpace_of_complete_second_countable [m : MetricSpace α]
-    [h : SecondCountableTopology α] [h' : CompleteSpace α] : PolishSpace α
+#print PolishSpace.of_separableSpace_completeSpace_metrizable /-
+instance (priority := 100) PolishSpace.of_separableSpace_completeSpace_metrizable
+    [m : MetricSpace α] [h : SecondCountableTopology α] [h' : CompleteSpace α] : PolishSpace α
     where
   second_countable := h
   complete := ⟨m, rfl, h'⟩
-#align polish_space_of_complete_second_countable polishSpace_of_complete_second_countable
+#align polish_space_of_complete_second_countable PolishSpace.of_separableSpace_completeSpace_metrizable
 -/
 
 #print polishSpaceMetric /-
@@ -210,14 +210,12 @@ theorem IsClosed.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α
 #align is_closed.polish_space IsClosed.polishSpace
 -/
 
-#print PolishSpace.AuxCopy /-
 /-- A sequence of type synonyms of a given type `α`, useful in the proof of
 `exists_polish_space_forall_le` to endow each copy with a different topology. -/
 @[nolint unused_arguments has_nonempty_instance]
 def AuxCopy (α : Type _) {ι : Type _} (i : ι) : Type _ :=
   α
 #align polish_space.aux_copy PolishSpace.AuxCopy
--/
 
 #print PolishSpace.exists_polishSpace_forall_le /-
 /-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
Diff
@@ -453,7 +453,7 @@ theorem IsOpen.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α]
     (hs : IsOpen s) : PolishSpace s :=
   by
   rcases eq_empty_or_nonempty (sᶜ) with (h's | h's)
-  · simp at h's 
+  · simp at h's
     apply IsClosed.polishSpace
     rw [h's]
     exact isClosed_univ
Diff
@@ -61,7 +61,7 @@ variable {α : Type _} {β : Type _}
 
 
 #print PolishSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:400:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
 /-- 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
Diff
@@ -400,7 +400,7 @@ theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α]
     by
     apply cauchySeq_of_le_tendsto_0 (fun n : ℕ => (1 / 2) ^ n) (fun n m N hNn hNm => _) _
     · exact (dist_le_dist_complete_copy (u n) (u m)).trans (hu N n m hNn hNm).le
-    · exact tendsto_pow_atTop_nhds_0_of_lt_1 (by norm_num) (by norm_num)
+    · exact tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num)
   obtain ⟨x, xlim⟩ : ∃ x, tendsto (fun n => (u n).1) at_top (𝓝 x) :=
     haveI : Nonempty α := ⟨(u 0).1⟩
     ⟨_, A.tendsto_lim⟩
Diff
@@ -61,7 +61,7 @@ variable {α : Type _} {β : Type _}
 
 
 #print PolishSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:404:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
 /-- 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
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 -/
-import Mathbin.Topology.MetricSpace.PiNat
-import Mathbin.Topology.MetricSpace.Isometry
-import Mathbin.Topology.MetricSpace.Gluing
-import Mathbin.Analysis.Normed.Field.Basic
+import Topology.MetricSpace.PiNat
+import Topology.MetricSpace.Isometry
+import Topology.MetricSpace.Gluing
+import Analysis.Normed.Field.Basic
 
 #align_import topology.metric_space.polish from "leanprover-community/mathlib"@"86d1873c01a723aba6788f0b9051ae3d23b4c1c3"
 
@@ -61,7 +61,7 @@ variable {α : Type _} {β : Type _}
 
 
 #print PolishSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
 /-- 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
Diff
@@ -140,11 +140,9 @@ instance pi_countable {ι : Type _} [Countable ι] {E : ι → Type _} [∀ i, T
 #align polish_space.pi_countable PolishSpace.pi_countable
 -/
 
-#print PolishSpace.nat_fun /-
 /-- Without this instance, `polish_space (ℕ → ℕ)` is not found by typeclass inference. -/
 instance nat_fun [TopologicalSpace α] [PolishSpace α] : PolishSpace (ℕ → α) := by infer_instance
 #align polish_space.nat_fun PolishSpace.nat_fun
--/
 
 #print PolishSpace.sigma /-
 /-- A countable disjoint union of Polish spaces is Polish. -/
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module topology.metric_space.polish
-! leanprover-community/mathlib commit 86d1873c01a723aba6788f0b9051ae3d23b4c1c3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Topology.MetricSpace.PiNat
 import Mathbin.Topology.MetricSpace.Isometry
 import Mathbin.Topology.MetricSpace.Gluing
 import Mathbin.Analysis.Normed.Field.Basic
 
+#align_import topology.metric_space.polish from "leanprover-community/mathlib"@"86d1873c01a723aba6788f0b9051ae3d23b4c1c3"
+
 /-!
 # Polish spaces
 
Diff
@@ -64,7 +64,7 @@ variable {α : Type _} {β : Type _}
 
 
 #print PolishSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
 /-- 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
@@ -149,6 +149,7 @@ instance nat_fun [TopologicalSpace α] [PolishSpace α] : PolishSpace (ℕ → 
 #align polish_space.nat_fun PolishSpace.nat_fun
 -/
 
+#print PolishSpace.sigma /-
 /-- 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) :=
@@ -158,7 +159,9 @@ instance sigma {ι : Type _} [Countable ι] {E : ι → Type _} [∀ n, Topologi
   haveI : CompleteSpace (Σ n, E n) := sigma.complete_space
   infer_instance
 #align polish_space.sigma PolishSpace.sigma
+-/
 
+#print PolishSpace.sum /-
 /-- The disjoint union of two Polish spaces is Polish. -/
 instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [PolishSpace β] :
     PolishSpace (Sum α β) := by
@@ -167,14 +170,18 @@ instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [Polis
   letI : MetricSpace (Sum α β) := metric_space_sum
   infer_instance
 #align polish_space.sum PolishSpace.sum
+-/
 
+#print PolishSpace.exists_nat_nat_continuous_surjective /-
 /-- 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 :=
   letI := upgradePolishSpace α
   exists_nat_nat_continuous_surjective_of_completeSpace α
 #align polish_space.exists_nat_nat_continuous_surjective PolishSpace.exists_nat_nat_continuous_surjective
+-/
 
+#print ClosedEmbedding.polishSpace /-
 /-- Given a closed embedding into a Polish space, the source space is also Polish. -/
 theorem ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
     {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α :=
@@ -189,6 +196,7 @@ theorem ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β]
     exact hf.closed_range
   infer_instance
 #align closed_embedding.polish_space ClosedEmbedding.polishSpace
+-/
 
 #print Equiv.polishSpace_induced /-
 /-- Pulling back a Polish topology under an equiv gives again a Polish topology. -/
@@ -216,6 +224,7 @@ def AuxCopy (α : Type _) {ι : Type _} (i : ι) : Type _ :=
 #align polish_space.aux_copy PolishSpace.AuxCopy
 -/
 
+#print PolishSpace.exists_polishSpace_forall_le /-
 /-- 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 α]
@@ -280,6 +289,7 @@ theorem exists_polishSpace_forall_le {ι : Type _} [Countable ι] [t : Topologic
     · exact f_closed
   exact @ClosedEmbedding.polishSpace _ _ (T.induced f) T (by infer_instance) _ L
 #align polish_space.exists_polish_space_forall_le PolishSpace.exists_polishSpace_forall_le
+-/
 
 /-!
 ### An open subset of a Polish space is Polish
@@ -530,11 +540,13 @@ theorem IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α
 #align is_closed.is_clopenable IsClosed.isClopenable
 -/
 
+#print PolishSpace.IsClopenable.compl /-
 theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
     IsClopenable (sᶜ) := by
   rcases hs with ⟨t, t_le, t_polish, h, h'⟩
   exact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩
 #align polish_space.is_clopenable.compl PolishSpace.IsClopenable.compl
+-/
 
 #print IsOpen.isClopenable /-
 theorem IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α} (hs : IsOpen s) :
Diff
@@ -343,7 +343,6 @@ def TopologicalSpace.Opens.CompleteCopy.instMetricSpace (s : Set α) :
         rw [← Real.dist_eq, ← Real.dist_eq, ← Real.dist_eq]
         exact add_le_add (dist_triangle _ _ _) (dist_triangle _ _ _)
       _ = dist x y + dist y z := by rw [dist_complete_copy_eq, dist_complete_copy_eq]; abel
-      
   eq_of_dist_eq_zero := by
     intro x y hxy
     apply Subtype.coe_injective
@@ -424,7 +423,6 @@ theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α]
       _ = dist (u n) (u 0) + dist (1 / inf_dist (u 0).1 (sᶜ)) 0 := rfl
       _ < (1 / 2) ^ 0 + dist (1 / inf_dist (u 0).1 (sᶜ)) 0 :=
         add_lt_add_right (hu 0 n 0 (zero_le _) le_rfl) _
-      
   have Cpos : 0 < C := by
     apply lt_of_le_of_lt _ (hC 0)
     simp [inf_dist_nonneg]
Diff
@@ -64,7 +64,7 @@ variable {α : Type _} {β : Type _}
 
 
 #print PolishSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:394:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
 /-- 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
@@ -246,7 +246,7 @@ theorem exists_polishSpace_forall_le {ι : Type _} [Countable ι] [t : Topologic
   refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
   -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
   -- embedding.
-  have A : range f = ⋂ n, { x | x n = x default } :=
+  have A : range f = ⋂ n, {x | x n = x default} :=
     by
     ext x
     constructor
@@ -404,7 +404,7 @@ theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α]
   · refine' ⟨⟨x, xs⟩, _⟩
     have L : tendsto (fun n => (id ⟨(u n).1, (u n).2⟩ : s)) at_top (𝓝 ⟨x, xs⟩) := by
       apply embedding_subtype_coe.tendsto_nhds_iff.2; exact xlim
-    convert((complete_copy_id_homeo hs h's).symm.Continuous.Tendsto _).comp L
+    convert ((complete_copy_id_homeo hs h's).symm.Continuous.Tendsto _).comp L
     ext1 n
     simp [complete_copy_id_homeo]
   obtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / inf_dist (u n).1 (sᶜ) < C :=
Diff
@@ -84,7 +84,7 @@ class PolishSpace (α : Type _) [h : TopologicalSpace α] : Prop where
 class should be registered: It should be used as `letI := upgrade_polish_space α` to endow a Polish
 space with a complete metric. -/
 class UpgradedPolishSpace (α : Type _) extends MetricSpace α, SecondCountableTopology α,
-  CompleteSpace α
+    CompleteSpace α
 #align upgraded_polish_space UpgradedPolishSpace
 -/
 
@@ -151,11 +151,11 @@ instance nat_fun [TopologicalSpace α] [PolishSpace α] : PolishSpace (ℕ → 
 
 /-- 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) :=
+    [∀ n, PolishSpace (E n)] : PolishSpace (Σ n, E n) :=
   by
   letI := fun n => upgradePolishSpace (E n)
-  letI : MetricSpace (Σn, E n) := sigma.metric_space
-  haveI : CompleteSpace (Σn, E n) := sigma.complete_space
+  letI : MetricSpace (Σ n, E n) := sigma.metric_space
+  haveI : CompleteSpace (Σ n, E n) := sigma.complete_space
   infer_instance
 #align polish_space.sigma PolishSpace.sigma
 
@@ -450,7 +450,7 @@ theorem IsOpen.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α]
     (hs : IsOpen s) : PolishSpace s :=
   by
   rcases eq_empty_or_nonempty (sᶜ) with (h's | h's)
-  · simp at h's
+  · simp at h's 
     apply IsClosed.polishSpace
     rw [h's]
     exact isClosed_univ
Diff
@@ -354,11 +354,10 @@ def TopologicalSpace.Opens.CompleteCopy.instMetricSpace (s : Set α) :
 
 attribute [local instance] complete_copy_metric_space
 
-/- warning: polish_space.complete_copy_id_homeo clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align polish_space.complete_copy_id_homeo [anonymous]ₓ'. -/
 /-- The identity between the type synonym `complete_copy s` (with its modified metric) and the
 original subtype `s` is a homeomorphism. -/
-def [anonymous] (hs : IsOpen s) (h's : sᶜ.Nonempty) : TopologicalSpace.Opens.CompleteCopy s ≃ₜ s
+def completeCopyIdHomeo (hs : IsOpen s) (h's : sᶜ.Nonempty) :
+    TopologicalSpace.Opens.CompleteCopy s ≃ₜ s
     where
   toFun := id
   invFun := id
@@ -386,7 +385,7 @@ def [anonymous] (hs : IsOpen s) (h's : sᶜ.Nonempty) : TopologicalSpace.Opens.C
     · refine' (tendsto.sub_const _ _).abs
       refine' tendsto.div tendsto_const_nhds _ I.ne'
       exact ((continuous_inf_dist_pt _).comp continuous_subtype_val).Tendsto _
-#align polish_space.complete_copy_id_homeo [anonymous]
+#align polish_space.complete_copy_id_homeo PolishSpace.completeCopyIdHomeo
 
 theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α] (hs : IsOpen s)
     (h's : sᶜ.Nonempty) : CompleteSpace (TopologicalSpace.Opens.CompleteCopy s) :=
Diff
@@ -54,7 +54,7 @@ with additional properties:
 
 noncomputable section
 
-open Classical Topology Filter
+open scoped Classical Topology Filter
 
 open TopologicalSpace Set Metric Filter Function
 
Diff
@@ -149,12 +149,6 @@ instance nat_fun [TopologicalSpace α] [PolishSpace α] : PolishSpace (ℕ → 
 #align polish_space.nat_fun PolishSpace.nat_fun
 -/
 
-/- warning: polish_space.sigma -> PolishSpace.sigma is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} [_inst_1 : Countable.{succ u1} ι] {E : ι -> Type.{u2}} [_inst_2 : forall (n : ι), TopologicalSpace.{u2} (E n)] [_inst_3 : forall (n : ι), PolishSpace.{u2} (E n) (_inst_2 n)], PolishSpace.{max u1 u2} (Sigma.{u1, u2} ι (fun (n : ι) => E n)) (Sigma.topologicalSpace.{u1, u2} ι (fun (n : ι) => E n) (fun (a : ι) => _inst_2 a))
-but is expected to have type
-  forall {ι : Type.{u1}} [_inst_1 : Countable.{succ u1} ι] {E : ι -> Type.{u2}} [_inst_2 : forall (n : ι), TopologicalSpace.{u2} (E n)] [_inst_3 : forall (n : ι), PolishSpace.{u2} (E n) (_inst_2 n)], PolishSpace.{max u2 u1} (Sigma.{u1, u2} ι (fun (n : ι) => E n)) (instTopologicalSpaceSigma.{u1, u2} ι (fun (n : ι) => E n) (fun (a : ι) => _inst_2 a))
-Case conversion may be inaccurate. Consider using '#align polish_space.sigma PolishSpace.sigmaₓ'. -/
 /-- 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) :=
@@ -165,12 +159,6 @@ instance sigma {ι : Type _} [Countable ι] {E : ι → Type _} [∀ n, Topologi
   infer_instance
 #align polish_space.sigma PolishSpace.sigma
 
-/- warning: polish_space.sum -> PolishSpace.sum is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : TopologicalSpace.{u2} β] [_inst_4 : PolishSpace.{u2} β _inst_3], PolishSpace.{max u1 u2} (Sum.{u1, u2} α β) (Sum.topologicalSpace.{u1, u2} α β _inst_1 _inst_3)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : TopologicalSpace.{u2} β] [_inst_4 : PolishSpace.{u2} β _inst_3], PolishSpace.{max u2 u1} (Sum.{u1, u2} α β) (instTopologicalSpaceSum.{u1, u2} α β _inst_1 _inst_3)
-Case conversion may be inaccurate. Consider using '#align polish_space.sum PolishSpace.sumₓ'. -/
 /-- The disjoint union of two Polish spaces is Polish. -/
 instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [PolishSpace β] :
     PolishSpace (Sum α β) := by
@@ -180,12 +168,6 @@ instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [Polis
   infer_instance
 #align polish_space.sum PolishSpace.sum
 
-/- warning: polish_space.exists_nat_nat_continuous_surjective -> PolishSpace.exists_nat_nat_continuous_surjective is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : Nonempty.{succ u1} α], Exists.{succ u1} ((Nat -> Nat) -> α) (fun (f : (Nat -> Nat) -> α) => And (Continuous.{0, u1} (Nat -> Nat) α (Pi.topologicalSpace.{0, 0} Nat (fun (ᾰ : Nat) => Nat) (fun (a : Nat) => Nat.topologicalSpace)) _inst_1 f) (Function.Surjective.{1, succ u1} (Nat -> Nat) α f))
-but is expected to have type
-  forall (α : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : Nonempty.{succ u1} α], Exists.{succ u1} ((Nat -> Nat) -> α) (fun (f : (Nat -> Nat) -> α) => And (Continuous.{0, u1} (Nat -> Nat) α (Pi.topologicalSpace.{0, 0} Nat (fun (ᾰ : Nat) => Nat) (fun (a : Nat) => instTopologicalSpaceNat)) _inst_1 f) (Function.Surjective.{1, succ u1} (Nat -> Nat) α f))
-Case conversion may be inaccurate. Consider using '#align polish_space.exists_nat_nat_continuous_surjective PolishSpace.exists_nat_nat_continuous_surjectiveₓ'. -/
 /-- 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 :=
@@ -193,12 +175,6 @@ theorem exists_nat_nat_continuous_surjective (α : Type _) [TopologicalSpace α]
   exists_nat_nat_continuous_surjective_of_completeSpace α
 #align polish_space.exists_nat_nat_continuous_surjective PolishSpace.exists_nat_nat_continuous_surjective
 
-/- warning: closed_embedding.polish_space -> ClosedEmbedding.polishSpace is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PolishSpace.{u2} β _inst_2] {f : α -> β}, (ClosedEmbedding.{u1, u2} α β _inst_1 _inst_2 f) -> (PolishSpace.{u1} α _inst_1)
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} α] [_inst_2 : TopologicalSpace.{u1} β] [_inst_3 : PolishSpace.{u1} β _inst_2] {f : α -> β}, (ClosedEmbedding.{u2, u1} α β _inst_1 _inst_2 f) -> (PolishSpace.{u2} α _inst_1)
-Case conversion may be inaccurate. Consider using '#align closed_embedding.polish_space ClosedEmbedding.polishSpaceₓ'. -/
 /-- Given a closed embedding into a Polish space, the source space is also Polish. -/
 theorem ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
     {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α :=
@@ -240,12 +216,6 @@ def AuxCopy (α : Type _) {ι : Type _} (i : ι) : Type _ :=
 #align polish_space.aux_copy PolishSpace.AuxCopy
 -/
 
-/- warning: polish_space.exists_polish_space_forall_le -> PolishSpace.exists_polishSpace_forall_le is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : Countable.{succ u2} ι] [t : TopologicalSpace.{u1} α] [p : PolishSpace.{u1} α t] (m : ι -> (TopologicalSpace.{u1} α)), (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toHasLe.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) (m n) t) -> (forall (n : ι), PolishSpace.{u1} α (m n)) -> (Exists.{succ u1} (TopologicalSpace.{u1} α) (fun (t' : TopologicalSpace.{u1} α) => And (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toHasLe.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' (m n)) (And (LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toHasLe.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' t) (PolishSpace.{u1} α t'))))
-but is expected to have type
-  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : Countable.{succ u2} ι] [t : TopologicalSpace.{u1} α] [p : PolishSpace.{u1} α t] (m : ι -> (TopologicalSpace.{u1} α)), (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) (m n) t) -> (forall (n : ι), PolishSpace.{u1} α (m n)) -> (Exists.{succ u1} (TopologicalSpace.{u1} α) (fun (t' : TopologicalSpace.{u1} α) => And (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) t' (m n)) (And (LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) t' t) (PolishSpace.{u1} α t'))))
-Case conversion may be inaccurate. Consider using '#align polish_space.exists_polish_space_forall_le PolishSpace.exists_polishSpace_forall_leₓ'. -/
 /-- 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 α]
@@ -385,11 +355,6 @@ def TopologicalSpace.Opens.CompleteCopy.instMetricSpace (s : Set α) :
 attribute [local instance] complete_copy_metric_space
 
 /- warning: polish_space.complete_copy_id_homeo clashes with [anonymous] -> [anonymous]
-warning: polish_space.complete_copy_id_homeo -> [anonymous] is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u_1}} [_inst_1 : MetricSpace.{u_1} α] {s : Set.{u_1} α}, (IsOpen.{u_1} α (UniformSpace.toTopologicalSpace.{u_1} α (PseudoMetricSpace.toUniformSpace.{u_1} α (MetricSpace.toPseudoMetricSpace.{u_1} α _inst_1))) s) -> (Set.Nonempty.{u_1} α (HasCompl.compl.{u_1} (Set.{u_1} α) (BooleanAlgebra.toHasCompl.{u_1} (Set.{u_1} α) (Set.booleanAlgebra.{u_1} α)) s)) -> (Homeomorph.{u_1, u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (coeSort.{max (succ u_1) 1, succ (succ u_1)} (Set.{u_1} α) Type.{u_1} (Set.hasCoeToSort.{u_1} α) s) (UniformSpace.toTopologicalSpace.{u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (PseudoMetricSpace.toUniformSpace.{u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (MetricSpace.toPseudoMetricSpace.{u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (TopologicalSpace.Opens.CompleteCopy.instMetricSpaceₓ.{u_1} α _inst_1 s)))) (Subtype.topologicalSpace.{u_1} α (fun (x : α) => Membership.Mem.{u_1, u_1} α (Set.{u_1} α) (Set.hasMem.{u_1} α) x s) (UniformSpace.toTopologicalSpace.{u_1} α (PseudoMetricSpace.toUniformSpace.{u_1} α (MetricSpace.toPseudoMetricSpace.{u_1} α _inst_1)))))
-but is expected to have type
-  forall {α : Type.{u}} {_inst_1 : Type.{v}}, (Nat -> α -> _inst_1) -> Nat -> (List.{u} α) -> (List.{v} _inst_1)
 Case conversion may be inaccurate. Consider using '#align polish_space.complete_copy_id_homeo [anonymous]ₓ'. -/
 /-- The identity between the type synonym `complete_copy s` (with its modified metric) and the
 original subtype `s` is a homeomorphism. -/
@@ -568,12 +533,6 @@ theorem IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α
 #align is_closed.is_clopenable IsClosed.isClopenable
 -/
 
-/- warning: polish_space.is_clopenable.compl -> PolishSpace.IsClopenable.compl is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α}, (PolishSpace.IsClopenable.{u1} α _inst_1 s) -> (PolishSpace.IsClopenable.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α}, (PolishSpace.IsClopenable.{u1} α _inst_1 s) -> (PolishSpace.IsClopenable.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))
-Case conversion may be inaccurate. Consider using '#align polish_space.is_clopenable.compl PolishSpace.IsClopenable.complₓ'. -/
 theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
     IsClopenable (sᶜ) := by
   rcases hs with ⟨t, t_le, t_polish, h, h'⟩
Diff
@@ -127,9 +127,7 @@ namespace PolishSpace
 
 #print PolishSpace.t2Space /-
 instance (priority := 100) t2Space (α : Type _) [TopologicalSpace α] [PolishSpace α] : T2Space α :=
-  by
-  letI := upgradePolishSpace α
-  infer_instance
+  by letI := upgradePolishSpace α; infer_instance
 #align polish_space.t2_space PolishSpace.t2Space
 -/
 
@@ -374,10 +372,7 @@ def TopologicalSpace.Opens.CompleteCopy.instMetricSpace (s : Set α) :
         by
         rw [← Real.dist_eq, ← Real.dist_eq, ← Real.dist_eq]
         exact add_le_add (dist_triangle _ _ _) (dist_triangle _ _ _)
-      _ = dist x y + dist y z :=
-        by
-        rw [dist_complete_copy_eq, dist_complete_copy_eq]
-        abel
+      _ = dist x y + dist y z := by rw [dist_complete_copy_eq, dist_complete_copy_eq]; abel
       
   eq_of_dist_eq_zero := by
     intro x y hxy
@@ -422,8 +417,7 @@ def [anonymous] (hs : IsOpen s) (h's : sᶜ.Nonempty) : TopologicalSpace.Opens.C
       rw [← hs.is_closed_compl.not_mem_iff_inf_dist_pos h's]
       simp
     apply tendsto.add
-    · apply Continuous.tendsto
-      exact continuous_subtype_coe.dist continuous_const
+    · apply Continuous.tendsto; exact continuous_subtype_coe.dist continuous_const
     · refine' (tendsto.sub_const _ _).abs
       refine' tendsto.div tendsto_const_nhds _ I.ne'
       exact ((continuous_inf_dist_pt _).comp continuous_subtype_val).Tendsto _
@@ -444,10 +438,8 @@ theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α]
     ⟨_, A.tendsto_lim⟩
   suffices xs : x ∈ s
   · refine' ⟨⟨x, xs⟩, _⟩
-    have L : tendsto (fun n => (id ⟨(u n).1, (u n).2⟩ : s)) at_top (𝓝 ⟨x, xs⟩) :=
-      by
-      apply embedding_subtype_coe.tendsto_nhds_iff.2
-      exact xlim
+    have L : tendsto (fun n => (id ⟨(u n).1, (u n).2⟩ : s)) at_top (𝓝 ⟨x, xs⟩) := by
+      apply embedding_subtype_coe.tendsto_nhds_iff.2; exact xlim
     convert((complete_copy_id_homeo hs h's).symm.Continuous.Tendsto _).comp L
     ext1 n
     simp [complete_copy_id_homeo]
@@ -455,10 +447,8 @@ theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α]
     by
     refine' ⟨(1 / 2) ^ 0 + dist (1 / inf_dist (u 0).1 (sᶜ)) 0, fun n => _⟩
     calc
-      1 / inf_dist (u n).val (sᶜ) ≤ dist (1 / inf_dist (u n).val (sᶜ)) 0 :=
-        by
-        rw [Real.dist_0_eq_abs]
-        exact le_abs_self _
+      1 / inf_dist (u n).val (sᶜ) ≤ dist (1 / inf_dist (u n).val (sᶜ)) 0 := by
+        rw [Real.dist_0_eq_abs]; exact le_abs_self _
       _ ≤
           dist (1 / inf_dist (u n).1 (sᶜ)) (1 / inf_dist (u 0).1 (sᶜ)) +
             dist (1 / inf_dist (u 0).1 (sᶜ)) 0 :=
@@ -477,10 +467,8 @@ theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α]
   have I : ∀ n, 1 / C ≤ inf_dist (u n).1 (sᶜ) :=
     by
     intro n
-    have : 0 < inf_dist (u n).val (sᶜ) :=
-      by
-      apply (hs.is_closed_compl.not_mem_iff_inf_dist_pos h's).1
-      simp
+    have : 0 < inf_dist (u n).val (sᶜ) := by
+      apply (hs.is_closed_compl.not_mem_iff_inf_dist_pos h's).1; simp
     rw [div_le_iff' Cpos]
     exact (div_le_iff this).1 (hC n).le
   have I' : 1 / C ≤ inf_dist x (sᶜ) :=
@@ -556,15 +544,11 @@ theorem IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α
     refine' ⟨f.symm ⁻¹' u, _, by simp only [Equiv.symm_symm, Equiv.symm_preimage_preimage]⟩
     refine' isOpen_sum_iff.2 ⟨_, _⟩
     · have : IsOpen ((coe : s → α) ⁻¹' u) := IsOpen.preimage continuous_subtype_val hu
-      have : Sum.inl ⁻¹' (⇑f.symm ⁻¹' u) = (coe : s → α) ⁻¹' u :=
-        by
-        ext x
+      have : Sum.inl ⁻¹' (⇑f.symm ⁻¹' u) = (coe : s → α) ⁻¹' u := by ext x;
         simp only [Equiv.symm_symm, mem_preimage, Equiv.Set.sumCompl_apply_inl]
       rwa [this]
     · have : IsOpen ((coe : t → α) ⁻¹' u) := IsOpen.preimage continuous_subtype_val hu
-      have : Sum.inr ⁻¹' (⇑f.symm ⁻¹' u) = (coe : t → α) ⁻¹' u :=
-        by
-        ext x
+      have : Sum.inr ⁻¹' (⇑f.symm ⁻¹' u) = (coe : t → α) ⁻¹' u := by ext x;
         simp only [Equiv.symm_symm, mem_preimage, Equiv.Set.sumCompl_apply_inr]
       rwa [this]
   · have : is_closed[t'] (g ⁻¹' range (Sum.inl : s → Sum s t)) :=
Diff
@@ -244,7 +244,7 @@ def AuxCopy (α : Type _) {ι : Type _} (i : ι) : Type _ :=
 
 /- warning: polish_space.exists_polish_space_forall_le -> PolishSpace.exists_polishSpace_forall_le is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : Countable.{succ u2} ι] [t : TopologicalSpace.{u1} α] [p : PolishSpace.{u1} α t] (m : ι -> (TopologicalSpace.{u1} α)), (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) (m n) t) -> (forall (n : ι), PolishSpace.{u1} α (m n)) -> (Exists.{succ u1} (TopologicalSpace.{u1} α) (fun (t' : TopologicalSpace.{u1} α) => And (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' (m n)) (And (LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' t) (PolishSpace.{u1} α t'))))
+  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : Countable.{succ u2} ι] [t : TopologicalSpace.{u1} α] [p : PolishSpace.{u1} α t] (m : ι -> (TopologicalSpace.{u1} α)), (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toHasLe.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) (m n) t) -> (forall (n : ι), PolishSpace.{u1} α (m n)) -> (Exists.{succ u1} (TopologicalSpace.{u1} α) (fun (t' : TopologicalSpace.{u1} α) => And (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toHasLe.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' (m n)) (And (LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toHasLe.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' t) (PolishSpace.{u1} α t'))))
 but is expected to have type
   forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : Countable.{succ u2} ι] [t : TopologicalSpace.{u1} α] [p : PolishSpace.{u1} α t] (m : ι -> (TopologicalSpace.{u1} α)), (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) (m n) t) -> (forall (n : ι), PolishSpace.{u1} α (m n)) -> (Exists.{succ u1} (TopologicalSpace.{u1} α) (fun (t' : TopologicalSpace.{u1} α) => And (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) t' (m n)) (And (LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) t' t) (PolishSpace.{u1} α t'))))
 Case conversion may be inaccurate. Consider using '#align polish_space.exists_polish_space_forall_le PolishSpace.exists_polishSpace_forall_leₓ'. -/
Diff
@@ -291,7 +291,7 @@ theorem exists_polishSpace_forall_le {ι : Type _} [Countable ι] [t : Topologic
       exact (mem_Inter.1 hx n : _)
   have f_closed : IsClosed (range f) := by
     rw [A]
-    apply isClosed_interᵢ fun n => _
+    apply isClosed_iInter fun n => _
     have C : ∀ i : ι, Continuous fun x : ∀ n, aux_copy α n => (id (x i) : α) :=
       by
       intro i
@@ -602,8 +602,8 @@ theorem IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α}
 #align is_open.is_clopenable IsOpen.isClopenable
 -/
 
-#print PolishSpace.IsClopenable.unionᵢ /-
-theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
+#print PolishSpace.IsClopenable.iUnion /-
+theorem IsClopenable.iUnion [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
     (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) :=
   by
   choose m mt m_polish m_closed m_open using hs
@@ -611,7 +611,7 @@ theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : 
     ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=
     exists_polish_space_forall_le m mt m_polish
   have A : is_open[t'] (⋃ n, s n) := by
-    apply isOpen_unionᵢ
+    apply isOpen_iUnion
     intro n
     apply t'm n
     exact m_open n
@@ -620,7 +620,7 @@ theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : 
       t'' ≤ t' ∧ @PolishSpace α t'' ∧ is_closed[t''] (⋃ n, s n) ∧ is_open[t''] (⋃ n, s n) :=
     @IsOpen.isClopenable α t' t'_polish _ A
   exact ⟨t'', t''_le.trans ((t'm 0).trans (mt 0)), t''_polish, h1, h2⟩
-#align polish_space.is_clopenable.Union PolishSpace.IsClopenable.unionᵢ
+#align polish_space.is_clopenable.Union PolishSpace.IsClopenable.iUnion
 -/
 
 end PolishSpace
Diff
@@ -64,7 +64,7 @@ variable {α : Type _} {β : Type _}
 
 
 #print PolishSpace /-
-/- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
+/- ./././Mathport/Syntax/Translate/Command.lean:393:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
 /-- 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
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 
 ! This file was ported from Lean 3 source module topology.metric_space.polish
-! leanprover-community/mathlib commit bcfa726826abd57587355b4b5b7e78ad6527b7e4
+! leanprover-community/mathlib commit 86d1873c01a723aba6788f0b9051ae3d23b4c1c3
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,6 +16,9 @@ import Mathbin.Analysis.Normed.Field.Basic
 /-!
 # Polish spaces
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 A topological space is Polish if its topology is second-countable and there exists a compatible
 complete metric. This is the class of spaces that is well-behaved with respect to measure theory.
 In this file, we establish the basic properties of Polish spaces.
Diff
@@ -60,6 +60,7 @@ variable {α : Type _} {β : Type _}
 /-! ### Basic properties of Polish spaces -/
 
 
+#print PolishSpace /-
 /- ./././Mathport/Syntax/Translate/Command.lean:388:30: infer kinds are unsupported in Lean 4: #[`second_countable] [] -/
 /-- A Polish space is a topological space with second countable topology, that can be endowed
 with a metric for which it is complete.
@@ -73,33 +74,43 @@ class PolishSpace (α : Type _) [h : TopologicalSpace α] : Prop where
   complete :
     ∃ m : MetricSpace α, m.toUniformSpace.toTopologicalSpace = h ∧ @CompleteSpace α m.toUniformSpace
 #align polish_space PolishSpace
+-/
 
+#print UpgradedPolishSpace /-
 /-- 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 := upgrade_polish_space α` to endow a Polish
 space with a complete metric. -/
 class UpgradedPolishSpace (α : Type _) extends MetricSpace α, SecondCountableTopology α,
   CompleteSpace α
 #align upgraded_polish_space UpgradedPolishSpace
+-/
 
+#print polishSpace_of_complete_second_countable /-
 instance (priority := 100) polishSpace_of_complete_second_countable [m : MetricSpace α]
     [h : SecondCountableTopology α] [h' : CompleteSpace α] : PolishSpace α
     where
   second_countable := h
   complete := ⟨m, rfl, h'⟩
 #align polish_space_of_complete_second_countable polishSpace_of_complete_second_countable
+-/
 
+#print polishSpaceMetric /-
 /-- Construct on a Polish space a metric (compatible with the topology) which is complete. -/
 def polishSpaceMetric (α : Type _) [ht : TopologicalSpace α] [h : PolishSpace α] : MetricSpace α :=
   h.complete.some.replaceTopology h.complete.choose_spec.1.symm
 #align polish_space_metric polishSpaceMetric
+-/
 
+#print complete_polishSpaceMetric /-
 theorem complete_polishSpaceMetric (α : Type _) [ht : TopologicalSpace α] [h : PolishSpace α] :
     @CompleteSpace α (polishSpaceMetric α).toUniformSpace :=
   by
   convert h.complete.some_spec.2
   exact MetricSpace.replaceTopology_eq _ _
 #align complete_polish_space_metric complete_polishSpaceMetric
+-/
 
+#print upgradePolishSpace /-
 /-- This definition endows a Polish space with a complete metric. Use it as:
 `letI := upgrade_polish_space α`. -/
 def upgradePolishSpace (α : Type _) [ht : TopologicalSpace α] [h : PolishSpace α] :
@@ -107,15 +118,19 @@ def upgradePolishSpace (α : Type _) [ht : TopologicalSpace α] [h : PolishSpace
   letI := polishSpaceMetric α
   { complete_polishSpaceMetric α, PolishSpace.second_countable α with }
 #align upgrade_polish_space upgradePolishSpace
+-/
 
 namespace PolishSpace
 
+#print PolishSpace.t2Space /-
 instance (priority := 100) t2Space (α : Type _) [TopologicalSpace α] [PolishSpace α] : T2Space α :=
   by
   letI := upgradePolishSpace α
   infer_instance
 #align polish_space.t2_space PolishSpace.t2Space
+-/
 
+#print PolishSpace.pi_countable /-
 /-- 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) :=
@@ -125,11 +140,20 @@ instance pi_countable {ι : Type _} [Countable ι] {E : ι → Type _} [∀ i, T
   letI : MetricSpace (∀ i, E i) := PiCountable.metricSpace
   infer_instance
 #align polish_space.pi_countable PolishSpace.pi_countable
+-/
 
+#print PolishSpace.nat_fun /-
 /-- Without this instance, `polish_space (ℕ → ℕ)` is not found by typeclass inference. -/
 instance nat_fun [TopologicalSpace α] [PolishSpace α] : PolishSpace (ℕ → α) := by infer_instance
 #align polish_space.nat_fun PolishSpace.nat_fun
+-/
 
+/- warning: polish_space.sigma -> PolishSpace.sigma is a dubious translation:
+lean 3 declaration is
+  forall {ι : Type.{u1}} [_inst_1 : Countable.{succ u1} ι] {E : ι -> Type.{u2}} [_inst_2 : forall (n : ι), TopologicalSpace.{u2} (E n)] [_inst_3 : forall (n : ι), PolishSpace.{u2} (E n) (_inst_2 n)], PolishSpace.{max u1 u2} (Sigma.{u1, u2} ι (fun (n : ι) => E n)) (Sigma.topologicalSpace.{u1, u2} ι (fun (n : ι) => E n) (fun (a : ι) => _inst_2 a))
+but is expected to have type
+  forall {ι : Type.{u1}} [_inst_1 : Countable.{succ u1} ι] {E : ι -> Type.{u2}} [_inst_2 : forall (n : ι), TopologicalSpace.{u2} (E n)] [_inst_3 : forall (n : ι), PolishSpace.{u2} (E n) (_inst_2 n)], PolishSpace.{max u2 u1} (Sigma.{u1, u2} ι (fun (n : ι) => E n)) (instTopologicalSpaceSigma.{u1, u2} ι (fun (n : ι) => E n) (fun (a : ι) => _inst_2 a))
+Case conversion may be inaccurate. Consider using '#align polish_space.sigma PolishSpace.sigmaₓ'. -/
 /-- 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) :=
@@ -140,6 +164,12 @@ instance sigma {ι : Type _} [Countable ι] {E : ι → Type _} [∀ n, Topologi
   infer_instance
 #align polish_space.sigma PolishSpace.sigma
 
+/- warning: polish_space.sum -> PolishSpace.sum is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : TopologicalSpace.{u2} β] [_inst_4 : PolishSpace.{u2} β _inst_3], PolishSpace.{max u1 u2} (Sum.{u1, u2} α β) (Sum.topologicalSpace.{u1, u2} α β _inst_1 _inst_3)
+but is expected to have type
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : TopologicalSpace.{u2} β] [_inst_4 : PolishSpace.{u2} β _inst_3], PolishSpace.{max u2 u1} (Sum.{u1, u2} α β) (instTopologicalSpaceSum.{u1, u2} α β _inst_1 _inst_3)
+Case conversion may be inaccurate. Consider using '#align polish_space.sum PolishSpace.sumₓ'. -/
 /-- The disjoint union of two Polish spaces is Polish. -/
 instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [PolishSpace β] :
     PolishSpace (Sum α β) := by
@@ -149,6 +179,12 @@ instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [Polis
   infer_instance
 #align polish_space.sum PolishSpace.sum
 
+/- warning: polish_space.exists_nat_nat_continuous_surjective -> PolishSpace.exists_nat_nat_continuous_surjective is a dubious translation:
+lean 3 declaration is
+  forall (α : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : Nonempty.{succ u1} α], Exists.{succ u1} ((Nat -> Nat) -> α) (fun (f : (Nat -> Nat) -> α) => And (Continuous.{0, u1} (Nat -> Nat) α (Pi.topologicalSpace.{0, 0} Nat (fun (ᾰ : Nat) => Nat) (fun (a : Nat) => Nat.topologicalSpace)) _inst_1 f) (Function.Surjective.{1, succ u1} (Nat -> Nat) α f))
+but is expected to have type
+  forall (α : Type.{u1}) [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : PolishSpace.{u1} α _inst_1] [_inst_3 : Nonempty.{succ u1} α], Exists.{succ u1} ((Nat -> Nat) -> α) (fun (f : (Nat -> Nat) -> α) => And (Continuous.{0, u1} (Nat -> Nat) α (Pi.topologicalSpace.{0, 0} Nat (fun (ᾰ : Nat) => Nat) (fun (a : Nat) => instTopologicalSpaceNat)) _inst_1 f) (Function.Surjective.{1, succ u1} (Nat -> Nat) α f))
+Case conversion may be inaccurate. Consider using '#align polish_space.exists_nat_nat_continuous_surjective PolishSpace.exists_nat_nat_continuous_surjectiveₓ'. -/
 /-- 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 :=
@@ -156,6 +192,12 @@ theorem exists_nat_nat_continuous_surjective (α : Type _) [TopologicalSpace α]
   exists_nat_nat_continuous_surjective_of_completeSpace α
 #align polish_space.exists_nat_nat_continuous_surjective PolishSpace.exists_nat_nat_continuous_surjective
 
+/- warning: closed_embedding.polish_space -> ClosedEmbedding.polishSpace is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : TopologicalSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PolishSpace.{u2} β _inst_2] {f : α -> β}, (ClosedEmbedding.{u1, u2} α β _inst_1 _inst_2 f) -> (PolishSpace.{u1} α _inst_1)
+but is expected to have type
+  forall {α : Type.{u2}} {β : Type.{u1}} [_inst_1 : TopologicalSpace.{u2} α] [_inst_2 : TopologicalSpace.{u1} β] [_inst_3 : PolishSpace.{u1} β _inst_2] {f : α -> β}, (ClosedEmbedding.{u2, u1} α β _inst_1 _inst_2 f) -> (PolishSpace.{u2} α _inst_1)
+Case conversion may be inaccurate. Consider using '#align closed_embedding.polish_space ClosedEmbedding.polishSpaceₓ'. -/
 /-- Given a closed embedding into a Polish space, the source space is also Polish. -/
 theorem ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
     {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α :=
@@ -171,26 +213,38 @@ theorem ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β]
   infer_instance
 #align closed_embedding.polish_space ClosedEmbedding.polishSpace
 
+#print Equiv.polishSpace_induced /-
 /-- Pulling back a Polish topology under an equiv gives again a Polish topology. -/
 theorem Equiv.polishSpace_induced [t : TopologicalSpace β] [PolishSpace β] (f : α ≃ β) :
     @PolishSpace α (t.induced f) :=
   letI : TopologicalSpace α := t.induced f
   (f.to_homeomorph_of_inducing ⟨rfl⟩).ClosedEmbedding.PolishSpace
 #align equiv.polish_space_induced Equiv.polishSpace_induced
+-/
 
+#print IsClosed.polishSpace /-
 /-- A closed subset of a Polish space is also Polish. -/
 theorem IsClosed.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α] {s : Set α}
     (hs : IsClosed s) : PolishSpace s :=
   (IsClosed.closedEmbedding_subtype_val hs).PolishSpace
 #align is_closed.polish_space IsClosed.polishSpace
+-/
 
+#print PolishSpace.AuxCopy /-
 /-- A sequence of type synonyms of a given type `α`, useful in the proof of
 `exists_polish_space_forall_le` to endow each copy with a different topology. -/
 @[nolint unused_arguments has_nonempty_instance]
 def AuxCopy (α : Type _) {ι : Type _} (i : ι) : Type _ :=
   α
 #align polish_space.aux_copy PolishSpace.AuxCopy
+-/
 
+/- warning: polish_space.exists_polish_space_forall_le -> PolishSpace.exists_polishSpace_forall_le is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : Countable.{succ u2} ι] [t : TopologicalSpace.{u1} α] [p : PolishSpace.{u1} α t] (m : ι -> (TopologicalSpace.{u1} α)), (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) (m n) t) -> (forall (n : ι), PolishSpace.{u1} α (m n)) -> (Exists.{succ u1} (TopologicalSpace.{u1} α) (fun (t' : TopologicalSpace.{u1} α) => And (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' (m n)) (And (LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.partialOrder.{u1} α))) t' t) (PolishSpace.{u1} α t'))))
+but is expected to have type
+  forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : Countable.{succ u2} ι] [t : TopologicalSpace.{u1} α] [p : PolishSpace.{u1} α t] (m : ι -> (TopologicalSpace.{u1} α)), (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) (m n) t) -> (forall (n : ι), PolishSpace.{u1} α (m n)) -> (Exists.{succ u1} (TopologicalSpace.{u1} α) (fun (t' : TopologicalSpace.{u1} α) => And (forall (n : ι), LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) t' (m n)) (And (LE.le.{u1} (TopologicalSpace.{u1} α) (Preorder.toLE.{u1} (TopologicalSpace.{u1} α) (PartialOrder.toPreorder.{u1} (TopologicalSpace.{u1} α) (TopologicalSpace.instPartialOrderTopologicalSpace.{u1} α))) t' t) (PolishSpace.{u1} α t'))))
+Case conversion may be inaccurate. Consider using '#align polish_space.exists_polish_space_forall_le PolishSpace.exists_polishSpace_forall_leₓ'. -/
 /-- 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 α]
@@ -273,34 +327,37 @@ variable [MetricSpace α] {s : Set α}
 /-- A type synonym for a subset `s` of a metric space, on which we will construct another metric
 for which it will be complete. -/
 @[nolint has_nonempty_instance]
-def CompleteCopy {α : Type _} (s : Set α) : Type _ :=
+def TopologicalSpace.Opens.CompleteCopy {α : Type _} (s : Set α) : Type _ :=
   s
-#align polish_space.complete_copy PolishSpace.CompleteCopy
+#align polish_space.complete_copy TopologicalSpace.Opens.CompleteCopyₓ
 
 /-- A distance 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`. -/
-def hasDistCompleteCopy (s : Set α) : Dist (CompleteCopy s) :=
+def TopologicalSpace.Opens.CompleteCopy.instDist (s : Set α) :
+    Dist (TopologicalSpace.Opens.CompleteCopy s) :=
   ⟨fun x y => dist x.1 y.1 + abs (1 / infDist x.1 (sᶜ) - 1 / infDist y.1 (sᶜ))⟩
-#align polish_space.has_dist_complete_copy PolishSpace.hasDistCompleteCopy
+#align polish_space.has_dist_complete_copy TopologicalSpace.Opens.CompleteCopy.instDistₓ
 
 attribute [local instance] has_dist_complete_copy
 
-theorem dist_completeCopy_eq (x y : CompleteCopy s) :
+theorem TopologicalSpace.Opens.CompleteCopy.dist_eq (x y : TopologicalSpace.Opens.CompleteCopy s) :
     dist x y = dist x.1 y.1 + abs (1 / infDist x.1 (sᶜ) - 1 / infDist y.1 (sᶜ)) :=
   rfl
-#align polish_space.dist_complete_copy_eq PolishSpace.dist_completeCopy_eq
+#align polish_space.dist_complete_copy_eq TopologicalSpace.Opens.CompleteCopy.dist_eqₓ
 
-theorem dist_le_dist_completeCopy (x y : CompleteCopy s) : dist x.1 y.1 ≤ dist x y :=
+theorem TopologicalSpace.Opens.CompleteCopy.dist_val_le_dist
+    (x y : TopologicalSpace.Opens.CompleteCopy s) : dist x.1 y.1 ≤ dist x y :=
   (le_add_iff_nonneg_right _).2 (abs_nonneg _)
-#align polish_space.dist_le_dist_complete_copy PolishSpace.dist_le_dist_completeCopy
+#align polish_space.dist_le_dist_complete_copy TopologicalSpace.Opens.CompleteCopy.dist_val_le_distₓ
 
 /-- 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`. -/
-def completeCopyMetricSpace (s : Set α) : MetricSpace (CompleteCopy s)
+def TopologicalSpace.Opens.CompleteCopy.instMetricSpace (s : Set α) :
+    MetricSpace (TopologicalSpace.Opens.CompleteCopy s)
     where
   dist_self x := by simp [dist_complete_copy_eq]
   dist_comm x y := by simp [dist_complete_copy_eq, dist_comm, abs_sub_comm]
@@ -325,13 +382,20 @@ def completeCopyMetricSpace (s : Set α) : MetricSpace (CompleteCopy s)
     refine' dist_le_zero.1 _
     rw [← hxy]
     exact dist_le_dist_complete_copy x y
-#align polish_space.complete_copy_metric_space PolishSpace.completeCopyMetricSpace
+#align polish_space.complete_copy_metric_space TopologicalSpace.Opens.CompleteCopy.instMetricSpaceₓ
 
 attribute [local instance] complete_copy_metric_space
 
+/- warning: polish_space.complete_copy_id_homeo clashes with [anonymous] -> [anonymous]
+warning: polish_space.complete_copy_id_homeo -> [anonymous] is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u_1}} [_inst_1 : MetricSpace.{u_1} α] {s : Set.{u_1} α}, (IsOpen.{u_1} α (UniformSpace.toTopologicalSpace.{u_1} α (PseudoMetricSpace.toUniformSpace.{u_1} α (MetricSpace.toPseudoMetricSpace.{u_1} α _inst_1))) s) -> (Set.Nonempty.{u_1} α (HasCompl.compl.{u_1} (Set.{u_1} α) (BooleanAlgebra.toHasCompl.{u_1} (Set.{u_1} α) (Set.booleanAlgebra.{u_1} α)) s)) -> (Homeomorph.{u_1, u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (coeSort.{max (succ u_1) 1, succ (succ u_1)} (Set.{u_1} α) Type.{u_1} (Set.hasCoeToSort.{u_1} α) s) (UniformSpace.toTopologicalSpace.{u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (PseudoMetricSpace.toUniformSpace.{u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (MetricSpace.toPseudoMetricSpace.{u_1} (TopologicalSpace.Opens.CompleteCopyₓ.{u_1} α s) (TopologicalSpace.Opens.CompleteCopy.instMetricSpaceₓ.{u_1} α _inst_1 s)))) (Subtype.topologicalSpace.{u_1} α (fun (x : α) => Membership.Mem.{u_1, u_1} α (Set.{u_1} α) (Set.hasMem.{u_1} α) x s) (UniformSpace.toTopologicalSpace.{u_1} α (PseudoMetricSpace.toUniformSpace.{u_1} α (MetricSpace.toPseudoMetricSpace.{u_1} α _inst_1)))))
+but is expected to have type
+  forall {α : Type.{u}} {_inst_1 : Type.{v}}, (Nat -> α -> _inst_1) -> Nat -> (List.{u} α) -> (List.{v} _inst_1)
+Case conversion may be inaccurate. Consider using '#align polish_space.complete_copy_id_homeo [anonymous]ₓ'. -/
 /-- The identity between the type synonym `complete_copy s` (with its modified metric) and the
 original subtype `s` is a homeomorphism. -/
-def completeCopyIdHomeo (hs : IsOpen s) (h's : sᶜ.Nonempty) : CompleteCopy s ≃ₜ s
+def [anonymous] (hs : IsOpen s) (h's : sᶜ.Nonempty) : TopologicalSpace.Opens.CompleteCopy s ≃ₜ s
     where
   toFun := id
   invFun := id
@@ -360,10 +424,10 @@ def completeCopyIdHomeo (hs : IsOpen s) (h's : sᶜ.Nonempty) : CompleteCopy s 
     · refine' (tendsto.sub_const _ _).abs
       refine' tendsto.div tendsto_const_nhds _ I.ne'
       exact ((continuous_inf_dist_pt _).comp continuous_subtype_val).Tendsto _
-#align polish_space.complete_copy_id_homeo PolishSpace.completeCopyIdHomeo
+#align polish_space.complete_copy_id_homeo [anonymous]
 
-theorem completeSpace_completeCopy [CompleteSpace α] (hs : IsOpen s) (h's : sᶜ.Nonempty) :
-    CompleteSpace (CompleteCopy s) :=
+theorem TopologicalSpace.Opens.CompleteCopy.instCompleteSpace [CompleteSpace α] (hs : IsOpen s)
+    (h's : sᶜ.Nonempty) : CompleteSpace (TopologicalSpace.Opens.CompleteCopy s) :=
   by
   refine' Metric.complete_of_convergent_controlled_sequences (fun n => (1 / 2) ^ n) (by simp) _
   intro u hu
@@ -423,8 +487,9 @@ theorem completeSpace_completeCopy [CompleteSpace α] (hs : IsOpen s) (h's : s
   suffices x ∉ sᶜ by simpa
   apply (hs.is_closed_compl.not_mem_iff_inf_dist_pos h's).2 (lt_of_lt_of_le _ I')
   simp [Cpos]
-#align polish_space.complete_space_complete_copy PolishSpace.completeSpace_completeCopy
+#align polish_space.complete_space_complete_copy TopologicalSpace.Opens.CompleteCopy.instCompleteSpaceₓ
 
+#print IsOpen.polishSpace /-
 /-- An open subset of a Polish space is also Polish. -/
 theorem IsOpen.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α] {s : Set α}
     (hs : IsOpen s) : PolishSpace s :=
@@ -440,19 +505,23 @@ theorem IsOpen.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α]
       (complete_copy_id_homeo hs h's).Embedding.SecondCountableTopology
     exact (complete_copy_id_homeo hs h's).symm.ClosedEmbedding.PolishSpace
 #align is_open.polish_space IsOpen.polishSpace
+-/
 
 end CompleteCopy
 
 /-! ### Clopenable sets in Polish spaces -/
 
 
+#print PolishSpace.IsClopenable /-
 /-- 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 `is_clopenable_iff_measurable_set`). -/
 def IsClopenable [t : TopologicalSpace α] (s : Set α) : Prop :=
   ∃ t' : TopologicalSpace α, t' ≤ t ∧ @PolishSpace α t' ∧ is_closed[t'] s ∧ is_open[t'] s
 #align polish_space.is_clopenable PolishSpace.IsClopenable
+-/
 
+#print IsClosed.isClopenable /-
 /-- 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 IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α} (hs : IsClosed s) :
@@ -510,17 +579,27 @@ theorem IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α
     convert this
     exact A.symm
 #align is_closed.is_clopenable IsClosed.isClopenable
+-/
 
+/- warning: polish_space.is_clopenable.compl -> PolishSpace.IsClopenable.compl is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α}, (PolishSpace.IsClopenable.{u1} α _inst_1 s) -> (PolishSpace.IsClopenable.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.booleanAlgebra.{u1} α)) s))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} α] {s : Set.{u1} α}, (PolishSpace.IsClopenable.{u1} α _inst_1 s) -> (PolishSpace.IsClopenable.{u1} α _inst_1 (HasCompl.compl.{u1} (Set.{u1} α) (BooleanAlgebra.toHasCompl.{u1} (Set.{u1} α) (Set.instBooleanAlgebraSet.{u1} α)) s))
+Case conversion may be inaccurate. Consider using '#align polish_space.is_clopenable.compl PolishSpace.IsClopenable.complₓ'. -/
 theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
     IsClopenable (sᶜ) := by
   rcases hs with ⟨t, t_le, t_polish, h, h'⟩
   exact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩
 #align polish_space.is_clopenable.compl PolishSpace.IsClopenable.compl
 
+#print IsOpen.isClopenable /-
 theorem IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α} (hs : IsOpen s) :
     IsClopenable s := by simpa using hs.is_closed_compl.is_clopenable.compl
 #align is_open.is_clopenable IsOpen.isClopenable
+-/
 
+#print PolishSpace.IsClopenable.unionᵢ /-
 theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
     (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) :=
   by
@@ -539,6 +618,7 @@ theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : 
     @IsOpen.isClopenable α t' t'_polish _ A
   exact ⟨t'', t''_le.trans ((t'm 0).trans (mt 0)), t''_polish, h1, h2⟩
 #align polish_space.is_clopenable.Union PolishSpace.IsClopenable.unionᵢ
+-/
 
 end PolishSpace
 
Diff
@@ -381,7 +381,7 @@ theorem completeSpace_completeCopy [CompleteSpace α] (hs : IsOpen s) (h's : s
       by
       apply embedding_subtype_coe.tendsto_nhds_iff.2
       exact xlim
-    convert ((complete_copy_id_homeo hs h's).symm.Continuous.Tendsto _).comp L
+    convert((complete_copy_id_homeo hs h's).symm.Continuous.Tendsto _).comp L
     ext1 n
     simp [complete_copy_id_homeo]
   obtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / inf_dist (u n).1 (sᶜ) < C :=
Diff
@@ -281,7 +281,7 @@ def CompleteCopy {α : Type _} (s : Set α) : Type _ :=
 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`. -/
-def hasDistCompleteCopy (s : Set α) : HasDist (CompleteCopy s) :=
+def hasDistCompleteCopy (s : Set α) : Dist (CompleteCopy s) :=
   ⟨fun x y => dist x.1 y.1 + abs (1 / infDist x.1 (sᶜ) - 1 / infDist y.1 (sᶜ))⟩
 #align polish_space.has_dist_complete_copy PolishSpace.hasDistCompleteCopy
 
Diff
@@ -395,11 +395,11 @@ theorem completeSpace_completeCopy [CompleteSpace α] (hs : IsOpen s) (h's : s
       _ ≤
           dist (1 / inf_dist (u n).1 (sᶜ)) (1 / inf_dist (u 0).1 (sᶜ)) +
             dist (1 / inf_dist (u 0).1 (sᶜ)) 0 :=
-        dist_triangle _ _ _
+        (dist_triangle _ _ _)
       _ ≤
           dist (u n).1 (u 0).1 + dist (1 / inf_dist (u n).1 (sᶜ)) (1 / inf_dist (u 0).1 (sᶜ)) +
             dist (1 / inf_dist (u 0).1 (sᶜ)) 0 :=
-        add_le_add (le_add_of_nonneg_left dist_nonneg) le_rfl
+        (add_le_add (le_add_of_nonneg_left dist_nonneg) le_rfl)
       _ = dist (u n) (u 0) + dist (1 / inf_dist (u 0).1 (sᶜ)) 0 := rfl
       _ < (1 / 2) ^ 0 + dist (1 / inf_dist (u 0).1 (sᶜ)) 0 :=
         add_lt_add_right (hu 0 n 0 (zero_le _) le_rfl) _

Changes in mathlib4

mathlib3
mathlib4
chore: classify porting notes referring to missing linters (#12098)

Reference the newly created issues #12094 and #12096, as well as the pre-existing #5171. Change all references to #10927 to #5171. Some of these changes were not labelled as "porting note"; change this for good measure.

Diff
@@ -251,7 +251,7 @@ variable [MetricSpace α] {s : Opens α}
 
 /-- 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: was @[nolint has_nonempty_instance]
+-- Porting note(#5171): was @[nolint has_nonempty_instance]
 def CompleteCopy {α : Type*} [MetricSpace α] (s : Opens α) : Type _ := s
 #align polish_space.complete_copy TopologicalSpace.Opens.CompleteCopyₓ
 
chore: rename open_range to isOpen_range, closed_range to isClosed_range (#11438)

All these lemmas refer to the range of some function being open/range (i.e. isOpen or isClosed).

Diff
@@ -159,7 +159,7 @@ theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpa
   haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology
   have : CompleteSpace α := by
     rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]
-    exact hf.closed_range.isComplete
+    exact hf.isClosed_range.isComplete
   infer_instance
 #align closed_embedding.polish_space ClosedEmbedding.polishSpace
 
feat: better polishSpace_of_complete_second_countable (#10890)
  • Make it work for a UniformSpace with extra properties.
  • Use it to golf some instances.

Co-authored-by: @ADedecker

Diff
@@ -48,8 +48,8 @@ with additional properties:
 
 noncomputable section
 
-open scoped Classical
-open Topology Filter TopologicalSpace Set Metric Function
+open scoped Topology Uniformity
+open Filter TopologicalSpace Set Metric Function
 
 variable {α : Type*} {β : Type*}
 
@@ -76,10 +76,12 @@ class UpgradedPolishSpace (α : Type*) extends MetricSpace α, SecondCountableTo
   CompleteSpace α
 #align upgraded_polish_space UpgradedPolishSpace
 
-instance (priority := 100) polishSpace_of_complete_second_countable [m : MetricSpace α]
-    [SecondCountableTopology α] [h' : CompleteSpace α] : PolishSpace α where
-  complete := ⟨m, rfl, h'⟩
-#align polish_space_of_complete_second_countable polishSpace_of_complete_second_countable
+instance (priority := 100) PolishSpace.of_separableSpace_completeSpace_metrizable [UniformSpace α]
+    [SeparableSpace α] [CompleteSpace α] [(𝓤 α).IsCountablyGenerated] [T0Space α] :
+    PolishSpace α where
+  toSecondCountableTopology := UniformSpace.secondCountable_of_separable α
+  complete := ⟨UniformSpace.metricSpace α, rfl, ‹_›⟩
+#align polish_space_of_complete_second_countable PolishSpace.of_separableSpace_completeSpace_metrizable
 
 /-- Construct on a Polish space a metric (compatible with the topology) which is complete. -/
 def polishSpaceMetric (α : Type*) [TopologicalSpace α] [h : PolishSpace α] : MetricSpace α :=
@@ -107,18 +109,14 @@ instance (priority := 100) instMetrizableSpace (α : Type*) [TopologicalSpace α
   letI := upgradePolishSpace α
   infer_instance
 
-instance (priority := 100) t2Space (α : Type*) [TopologicalSpace α] [PolishSpace α] :
-    T2Space α := by
-  letI := upgradePolishSpace α
-  infer_instance
+@[deprecated] -- 2024-02-23
+theorem t2Space (α : Type*) [TopologicalSpace α] [PolishSpace α] : T2Space α := inferInstance
 #align polish_space.t2_space PolishSpace.t2Space
 
 /-- 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) := by
-  cases nonempty_encodable ι
   letI := fun i => upgradePolishSpace (E i)
-  letI : MetricSpace (∀ i, E i) := PiCountable.metricSpace
   infer_instance
 #align polish_space.pi_countable PolishSpace.pi_countable
 
@@ -143,7 +141,6 @@ instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [Polis
     PolishSpace (α ⊕ β) :=
   letI := upgradePolishSpace α
   letI := upgradePolishSpace β
-  letI : MetricSpace (α ⊕ β) := metricSpaceSum
   inferInstance
 #align polish_space.sum PolishSpace.sum
 
@@ -194,62 +191,42 @@ instance instPolishSpaceUniv [TopologicalSpace α] [PolishSpace α] :
   isClosed_univ.polishSpace
 #align measure_theory.set.univ.polish_space PolishSpace.instPolishSpaceUniv
 
-/-- A sequence of type synonyms of a given type `α`, useful in the proof of
-`exists_polishSpace_forall_le` to endow each copy with a different topology. -/
-@[nolint unusedArguments]
-def AuxCopy (α : Type*) {ι : Type*} (_i : ι) : Type _ := α
-#align polish_space.aux_copy PolishSpace.AuxCopy
+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 := by
+  choose u hcomp hcount hut using ht
+  obtain rfl : t = fun i ↦ (u i).toTopologicalSpace := (funext hut).symm
+  refine ⟨⨅ i, u i, .iInf hcomp ht₀, ?_, UniformSpace.toTopologicalSpace_iInf⟩
+  rw [iInf_uniformity]
+  infer_instance
+
+protected theorem iInf {ι : Type*} [Countable ι] {t : ι → TopologicalSpace α}
+    (ht₀ : ∃ i₀, ∀ i, t i ≤ t i₀) (ht : ∀ i, @PolishSpace α (t i)) : @PolishSpace α (⨅ i, t i) := by
+  rcases ht₀ with ⟨i₀, hi₀⟩
+  rcases CompletePseudometrizable.iInf ⟨t i₀, letI := t i₀; haveI := ht i₀; inferInstance, hi₀⟩
+    fun i ↦
+      letI := t i; haveI := ht i; letI := upgradePolishSpace α
+      ⟨inferInstance, inferInstance, inferInstance, rfl⟩
+    with ⟨u, hcomp, hcount, htop⟩
+  rw [← htop]
+  have : @SecondCountableTopology α u.toTopologicalSpace :=
+    htop.symm ▸ secondCountableTopology_iInf fun i ↦ letI := t i; (ht i).toSecondCountableTopology
+  have : @T1Space α u.toTopologicalSpace :=
+    htop.symm ▸ t1Space_antitone (iInf_le _ i₀) (by letI := t i₀; haveI := ht i₀; infer_instance)
+  infer_instance
+#noalign polish_space.aux_copy
 
 /-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
-topology which is finer than all of them.
-
-Porting note (#11215): TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
+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' := by
-  rcases isEmpty_or_nonempty ι with (hι | hι)
-  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
-  inhabit ι
-  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
-    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
-    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
-  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
-  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
-  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
-  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
-  -- show that the induced topology is finer than all the `m n`.
-  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
-    rw [induced_to_pi]
-    exact iInf_le_of_le n (@induced_id _ (m n)).le
-  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
-  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
-  -- embedding.
-  have A : range f = ⋂ n, { x | x n = x default } := by
-    ext x
-    constructor
-    · rintro ⟨y, rfl⟩
-      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
-    · refine fun hx ↦ ⟨x default, ?_⟩
-      ext1 n
-      symm
-      exact mem_iInter.1 hx n
-  have f_closed : IsClosed (range f) := by
-    rw [A]
-    refine isClosed_iInter fun n => ?_
-    have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
-      have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
-      this.comp (continuous_apply i)
-    apply isClosed_eq (C n) (C default)
-  have K : @_root_.Embedding _ _ (T.induced f) T f := by
-    refine Function.Injective.embedding_induced fun x y hxy ↦ ?_
-    have : f x default = f y default := by rw [hxy]
-    exact this
-  have L : @ClosedEmbedding _ _ (T.induced f) T f := by
-    refine @ClosedEmbedding.mk _ _ (T.induced f) T f ?_ ?_
-    · exact K
-    · exact f_closed
-  exact @ClosedEmbedding.polishSpace _ _ (T.induced f) T (by infer_instance) _ L
+    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=
+  ⟨⨅ i : Option ι, i.elim t m, fun i ↦ iInf_le _ (some i), iInf_le _ none,
+    .iInf ⟨none, Option.forall.2 ⟨le_rfl, hm⟩⟩ <| Option.forall.2 ⟨p, h'm⟩⟩
 #align polish_space.exists_polish_space_forall_le PolishSpace.exists_polishSpace_forall_le
 
 end PolishSpace
@@ -400,6 +377,7 @@ theorem _root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s :
   /- Both sets `s` and `sᶜ` admit a Polish topology. So does their disjoint union `s ⊕ sᶜ`.
     Pulling back this topology by the canonical bijection with `α` gives the desired Polish
     topology in which `s` is both open and closed. -/
+  classical
   haveI : PolishSpace s := hs.polishSpace
   let t : Set α := sᶜ
   haveI : PolishSpace t := hs.isOpen_compl.polishSpace
chore: classify todo porting notes (#11216)

Classifies by adding issue number #11215 to porting notes claiming "TODO".

Diff
@@ -203,7 +203,7 @@ def AuxCopy (α : Type*) {ι : Type*} (_i : ι) : Type _ := α
 /-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
 topology which is finer than all of them.
 
-Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
+Porting note (#11215): TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
 theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
     [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
     (h'm : ∀ n, @PolishSpace α (m n)) :
@@ -426,7 +426,7 @@ theorem _root_.IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : S
   simpa using hs.isClosed_compl.isClopenable.compl
 #align is_open.is_clopenable IsOpen.isClopenable
 
--- Porting note: TODO: generalize for free to `[Countable ι] {s : ι → Set α}`
+-- Porting note (#11215): TODO: generalize for free to `[Countable ι] {s : ι → Set α}`
 theorem IsClopenable.iUnion [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
     (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) := by
   choose m mt m_polish _ m_open using hs
chore: scope open Classical (#11199)

We remove all but one open Classicals, instead preferring to use open scoped Classical. The only real side-effect this led to is moving a couple declarations to use Exists.choose instead of Classical.choose.

The first few commits are explicitly labelled regex replaces for ease of review.

Diff
@@ -48,7 +48,8 @@ with additional properties:
 
 noncomputable section
 
-open Classical Topology Filter TopologicalSpace Set Metric Function
+open scoped Classical
+open Topology Filter TopologicalSpace Set Metric Function
 
 variable {α : Type*} {β : Type*}
 
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -273,7 +273,7 @@ variable [MetricSpace α] {s : Opens α}
 
 /-- 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: was @[nolint has_nonempty_instance]
+-- Porting note: was @[nolint has_nonempty_instance]
 def CompleteCopy {α : Type*} [MetricSpace α] (s : Opens α) : Type _ := s
 #align polish_space.complete_copy TopologicalSpace.Opens.CompleteCopyₓ
 
@@ -425,7 +425,7 @@ theorem _root_.IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : S
   simpa using hs.isClosed_compl.isClopenable.compl
 #align is_open.is_clopenable IsOpen.isClopenable
 
--- porting note: TODO: generalize for free to `[Countable ι] {s : ι → Set α}`
+-- Porting note: TODO: generalize for free to `[Countable ι] {s : ι → Set α}`
 theorem IsClopenable.iUnion [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
     (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) := by
   choose m mt m_polish _ m_open using hs
chore: remove stream-of-conciousness syntax for obtain (#11045)

This covers many instances, but is not exhaustive.

Independently of whether that syntax should be avoided (similar to #10534), I think all these changes are small improvements.

Diff
@@ -346,8 +346,8 @@ instance instCompleteSpace [CompleteSpace α] : CompleteSpace (CompleteCopy s) :
   obtain ⟨x, xlim⟩ : ∃ x, Tendsto (fun n => (u n).1) atTop (𝓝 x) := cauchySeq_tendsto_of_complete A
   by_cases xs : x ∈ s
   · exact ⟨⟨x, xs⟩, tendsto_subtype_rng.2 xlim⟩
-  obtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / infDist (u n).1 sᶜ < C
-  · refine ⟨(1 / 2) ^ 0 + 1 / infDist (u 0).1 sᶜ, fun n ↦ ?_⟩
+  obtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / infDist (u n).1 sᶜ < C := by
+    refine ⟨(1 / 2) ^ 0 + 1 / infDist (u 0).1 sᶜ, fun n ↦ ?_⟩
     rw [← sub_lt_iff_lt_add]
     calc
       _ ≤ |1 / infDist (u n).1 sᶜ - 1 / infDist (u 0).1 sᶜ| := le_abs_self _
@@ -430,7 +430,7 @@ theorem IsClopenable.iUnion [t : TopologicalSpace α] [PolishSpace α] {s : ℕ
     (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) := by
   choose m mt m_polish _ m_open using hs
   obtain ⟨t', t'm, -, t'_polish⟩ :
-    ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=
+      ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=
     exists_polishSpace_forall_le m mt m_polish
   have A : IsOpen[t'] (⋃ n, s n) := by
     apply isOpen_iUnion
chore: more backporting of simp changes from #10995 (#11001)

Co-authored-by: Patrick Massot <patrickmassot@free.fr> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -411,7 +411,7 @@ theorem _root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s :
   · rw [← f.induced_symm]
     exact f.symm.polishSpace_induced
   · rw [isOpen_coinduced, isOpen_sum_iff]
-    simp [preimage_preimage]
+    simp [f, preimage_preimage]
 #align is_closed.is_clopenable IsClosed.isClopenable
 
 theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
feat: add measurableSet_tendsto_nhds (#10146)

Add measurableSet_tendsto: the set of points for which a measurable sequence of functions converges to a given filter is measurable.

Co-authored-by: Rémy Degenne <remydegenne@gmail.com>

Diff
@@ -101,6 +101,11 @@ def upgradePolishSpace (α : Type*) [TopologicalSpace α] [PolishSpace α] :
 
 namespace PolishSpace
 
+instance (priority := 100) instMetrizableSpace (α : Type*) [TopologicalSpace α] [PolishSpace α] :
+    MetrizableSpace α := by
+  letI := upgradePolishSpace α
+  infer_instance
+
 instance (priority := 100) t2Space (α : Type*) [TopologicalSpace α] [PolishSpace α] :
     T2Space α := by
   letI := upgradePolishSpace α
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -319,8 +319,8 @@ instance instMetricSpace : MetricSpace (CompleteCopy s) := by
     · rcases h x hx with ⟨ε, ε0, hε⟩
       simp only [dist_eq, one_div] at hε
       have : Tendsto (fun y : s ↦ dist x.1 y.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist y.1 sᶜ)⁻¹|)
-        (𝓝 x) (𝓝 (dist x.1 x.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist x.1 sᶜ)⁻¹|))
-      · refine (tendsto_const_nhds.dist continuous_subtype_val.continuousAt).add
+          (𝓝 x) (𝓝 (dist x.1 x.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist x.1 sᶜ)⁻¹|)) := by
+        refine (tendsto_const_nhds.dist continuous_subtype_val.continuousAt).add
           (tendsto_const_nhds.sub <| ?_).abs
         refine (continuousAt_inv_infDist_pt ?_).comp continuous_subtype_val.continuousAt
         rw [s.isOpen.isClosed_compl.closure_eq, mem_compl_iff, not_not]
@@ -334,8 +334,8 @@ instance instMetricSpace : MetricSpace (CompleteCopy s) := by
 
 instance instCompleteSpace [CompleteSpace α] : CompleteSpace (CompleteCopy s) := by
   refine Metric.complete_of_convergent_controlled_sequences ((1 / 2) ^ ·) (by simp) fun u hu ↦ ?_
-  have A : CauchySeq fun n => (u n).1
-  · refine cauchySeq_of_le_tendsto_0 (fun n : ℕ => (1 / 2) ^ n) (fun n m N hNn hNm => ?_) ?_
+  have A : CauchySeq fun n => (u n).1 := by
+    refine cauchySeq_of_le_tendsto_0 (fun n : ℕ => (1 / 2) ^ n) (fun n m N hNn hNm => ?_) ?_
     · exact (dist_val_le_dist (u n) (u m)).trans (hu N n m hNn hNm).le
     · exact tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num)
   obtain ⟨x, xlim⟩ : ∃ x, Tendsto (fun n => (u n).1) atTop (𝓝 x) := cauchySeq_tendsto_of_complete A
@@ -398,8 +398,8 @@ theorem _root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s :
   let t : Set α := sᶜ
   haveI : PolishSpace t := hs.isOpen_compl.polishSpace
   let f : s ⊕ t ≃ α := Equiv.Set.sumCompl s
-  have hle : TopologicalSpace.coinduced f instTopologicalSpaceSum ≤ ‹_›
-  · simp only [instTopologicalSpaceSum, coinduced_sup, coinduced_compose, sup_le_iff,
+  have hle : TopologicalSpace.coinduced f instTopologicalSpaceSum ≤ ‹_› := by
+    simp only [instTopologicalSpaceSum, coinduced_sup, coinduced_compose, sup_le_iff,
       ← continuous_iff_coinduced_le]
     exact ⟨continuous_subtype_val, continuous_subtype_val⟩
   refine ⟨.coinduced f instTopologicalSpaceSum, hle, ?_, hs.mono hle, ?_⟩
chore(Analysis/SpecificLimits/* and others): rename _0 -> _zero, _1 -> _one (#10077)

See here on Zulip.

This PR changes a bunch of names containing nhds_0 or/and lt_1 to nhds_zero or/and lt_one.

Diff
@@ -337,7 +337,7 @@ instance instCompleteSpace [CompleteSpace α] : CompleteSpace (CompleteCopy s) :
   have A : CauchySeq fun n => (u n).1
   · refine cauchySeq_of_le_tendsto_0 (fun n : ℕ => (1 / 2) ^ n) (fun n m N hNn hNm => ?_) ?_
     · exact (dist_val_le_dist (u n) (u m)).trans (hu N n m hNn hNm).le
-    · exact tendsto_pow_atTop_nhds_0_of_lt_1 (by norm_num) (by norm_num)
+    · exact tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num)
   obtain ⟨x, xlim⟩ : ∃ x, Tendsto (fun n => (u n).1) atTop (𝓝 x) := cauchySeq_tendsto_of_complete A
   by_cases xs : x ∈ s
   · exact ⟨⟨x, xs⟩, tendsto_subtype_rng.2 xlim⟩
chore(Topology/Basic): rename variables (#9956)

Use X, Y, Z for topological spaces.

Diff
@@ -406,8 +406,7 @@ theorem _root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s :
   · rw [← f.induced_symm]
     exact f.symm.polishSpace_induced
   · rw [isOpen_coinduced, isOpen_sum_iff]
-    convert And.intro (isOpen_univ (α := s)) (isOpen_empty (α := (sᶜ : Set α)))
-      <;> ext ⟨x, hx⟩ <;> simpa using hx
+    simp [preimage_preimage]
 #align is_closed.is_clopenable IsClosed.isClopenable
 
 theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
feat: add standard Borel space class (#7243)

add a class StandardBorelSpace, whose relationship to PolishSpace is analogous to the relationship between PolishSpace and complete metric space. The usefulness is shown by _root_.MeasurableSet.standardBorel: A measurable subset of a standard Borel space is Polish. Note that a borel measurable subset of a Polish space will not typically be Polish in the induced topology!

Specific things done in this PR:

  • added some basic instances for StandardBorelSpace
  • changed theorems with hypotheses [MeasurableSpace X] [TopologicalSpace X] [BorelSpace X] [PolishSpace X] but which do not refer to the topology on X to depend instead on [MeasurableSpace X][StandardBorelSpace X]. These automatically generalize the old theorems thanks to standardBorel_of_polish.

I believe this sort of refactoring can be pushed a lot farther in future PRs.

Co-authored-by: Felix-Weilacher <112423742+Felix-Weilacher@users.noreply.github.com>

Diff
@@ -125,6 +125,13 @@ instance sigma {ι : Type*} [Countable ι] {E : ι → Type*} [∀ n, Topologica
   inferInstance
 #align polish_space.sigma PolishSpace.sigma
 
+/-- The product of two Polish spaces is Polish. -/
+instance prod [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [PolishSpace β] :
+    PolishSpace (α × β) :=
+  letI := upgradePolishSpace α
+  letI := upgradePolishSpace β
+  inferInstance
+
 /-- The disjoint union of two Polish spaces is Polish. -/
 instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [PolishSpace β] :
     PolishSpace (α ⊕ β) :=
chore: implement porting notes about Polish spaces (#6991)

Make the following changes which were intentionally left till after the port:

  • Move several instances of PolishSpace from MeasureTheory.Constructions.Polish to Topology.MetricSpace.Polish

  • Remove instance of PolishSpace for nat -> nat, since lean4 can find this automatically

  • Change PolishSpace to extend SecondCountableTopology, since lean4 now allows loops in TC inference.

Diff
@@ -62,8 +62,8 @@ 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 α] : Prop where
-  secondCountableTopology : SecondCountableTopology α
+class PolishSpace (α : Type*) [h : TopologicalSpace α]
+    extends SecondCountableTopology α : Prop where
   complete : ∃ m : MetricSpace α, m.toUniformSpace.toTopologicalSpace = h ∧
     @CompleteSpace α m.toUniformSpace
 #align polish_space PolishSpace
@@ -76,8 +76,7 @@ class UpgradedPolishSpace (α : Type*) extends MetricSpace α, SecondCountableTo
 #align upgraded_polish_space UpgradedPolishSpace
 
 instance (priority := 100) polishSpace_of_complete_second_countable [m : MetricSpace α]
-    [h : SecondCountableTopology α] [h' : CompleteSpace α] : PolishSpace α where
-  secondCountableTopology := h
+    [SecondCountableTopology α] [h' : CompleteSpace α] : PolishSpace α where
   complete := ⟨m, rfl, h'⟩
 #align polish_space_of_complete_second_countable polishSpace_of_complete_second_countable
 
@@ -97,7 +96,7 @@ theorem complete_polishSpaceMetric (α : Type*) [ht : TopologicalSpace α] [h :
 def upgradePolishSpace (α : Type*) [TopologicalSpace α] [PolishSpace α] :
     UpgradedPolishSpace α :=
   letI := polishSpaceMetric α
-  { complete_polishSpaceMetric α, PolishSpace.secondCountableTopology with }
+  { complete_polishSpaceMetric α with }
 #align upgrade_polish_space upgradePolishSpace
 
 namespace PolishSpace
@@ -117,11 +116,6 @@ instance pi_countable {ι : Type*} [Countable ι] {E : ι → Type*} [∀ i, Top
   infer_instance
 #align polish_space.pi_countable PolishSpace.pi_countable
 
-/-- Without this instance, Lean 3 was unable to find `PolishSpace (ℕ → ℕ)` by typeclass inference.
-Porting note: TODO: test with Lean 4. -/
-instance nat_fun [TopologicalSpace α] [PolishSpace α] : PolishSpace (ℕ → α) := inferInstance
-#align polish_space.nat_fun PolishSpace.nat_fun
-
 /-- 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) :=
@@ -159,6 +153,16 @@ theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpa
   infer_instance
 #align closed_embedding.polish_space ClosedEmbedding.polishSpace
 
+/-- Any countable discrete space is Polish. -/
+instance (priority := 50) polish_of_countable [TopologicalSpace α]
+    [h : Countable α] [DiscreteTopology α] : PolishSpace α := by
+  obtain ⟨f, hf⟩ := h.exists_injective_nat
+  have : ClosedEmbedding f := by
+    apply closedEmbedding_of_continuous_injective_closed continuous_of_discreteTopology hf
+    exact fun t _ => isClosed_discrete _
+  exact this.polishSpace
+#align polish_of_countable PolishSpace.polish_of_countable
+
 /-- 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) :=
@@ -167,11 +171,16 @@ theorem _root_.Equiv.polishSpace_induced [t : TopologicalSpace β] [PolishSpace
 #align equiv.polish_space_induced Equiv.polishSpace_induced
 
 /-- A closed subset of a Polish space is also Polish. -/
-theorem _root_.IsClosed.polishSpace {α : Type*} [TopologicalSpace α] [PolishSpace α] {s : Set α}
+theorem _root_.IsClosed.polishSpace [TopologicalSpace α] [PolishSpace α] {s : Set α}
     (hs : IsClosed s) : PolishSpace s :=
   (IsClosed.closedEmbedding_subtype_val hs).polishSpace
 #align is_closed.polish_space IsClosed.polishSpace
 
+instance instPolishSpaceUniv [TopologicalSpace α] [PolishSpace α] :
+    PolishSpace (univ : Set α) :=
+  isClosed_univ.polishSpace
+#align measure_theory.set.univ.polish_space PolishSpace.instPolishSpaceUniv
+
 /-- A sequence of type synonyms of a given type `α`, useful in the proof of
 `exists_polishSpace_forall_le` to endow each copy with a different topology. -/
 @[nolint unusedArguments]
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -50,7 +50,7 @@ noncomputable section
 
 open Classical Topology Filter TopologicalSpace Set Metric Function
 
-variable {α : Type _} {β : Type _}
+variable {α : Type*} {β : Type*}
 
 /-! ### Basic properties of Polish spaces -/
 
@@ -62,7 +62,7 @@ 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 α] : Prop where
+class PolishSpace (α : Type*) [h : TopologicalSpace α] : Prop where
   secondCountableTopology : SecondCountableTopology α
   complete : ∃ m : MetricSpace α, m.toUniformSpace.toTopologicalSpace = h ∧
     @CompleteSpace α m.toUniformSpace
@@ -71,7 +71,7 @@ class PolishSpace (α : Type _) [h : TopologicalSpace α] : Prop where
 /-- 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 α,
+class UpgradedPolishSpace (α : Type*) extends MetricSpace α, SecondCountableTopology α,
   CompleteSpace α
 #align upgraded_polish_space UpgradedPolishSpace
 
@@ -82,11 +82,11 @@ instance (priority := 100) polishSpace_of_complete_second_countable [m : MetricS
 #align polish_space_of_complete_second_countable polishSpace_of_complete_second_countable
 
 /-- Construct on a Polish space a metric (compatible with the topology) which is complete. -/
-def polishSpaceMetric (α : Type _) [TopologicalSpace α] [h : PolishSpace α] : MetricSpace α :=
+def polishSpaceMetric (α : Type*) [TopologicalSpace α] [h : PolishSpace α] : MetricSpace α :=
   h.complete.choose.replaceTopology h.complete.choose_spec.1.symm
 #align polish_space_metric polishSpaceMetric
 
-theorem complete_polishSpaceMetric (α : Type _) [ht : TopologicalSpace α] [h : PolishSpace α] :
+theorem complete_polishSpaceMetric (α : Type*) [ht : TopologicalSpace α] [h : PolishSpace α] :
     @CompleteSpace α (polishSpaceMetric α).toUniformSpace := by
   convert h.complete.choose_spec.2
   exact MetricSpace.replaceTopology_eq _ _
@@ -94,7 +94,7 @@ theorem complete_polishSpaceMetric (α : Type _) [ht : TopologicalSpace α] [h :
 
 /-- This definition endows a Polish space with a complete metric. Use it as:
 `letI := upgradePolishSpace α`. -/
-def upgradePolishSpace (α : Type _) [TopologicalSpace α] [PolishSpace α] :
+def upgradePolishSpace (α : Type*) [TopologicalSpace α] [PolishSpace α] :
     UpgradedPolishSpace α :=
   letI := polishSpaceMetric α
   { complete_polishSpaceMetric α, PolishSpace.secondCountableTopology with }
@@ -102,14 +102,14 @@ def upgradePolishSpace (α : Type _) [TopologicalSpace α] [PolishSpace α] :
 
 namespace PolishSpace
 
-instance (priority := 100) t2Space (α : Type _) [TopologicalSpace α] [PolishSpace α] :
+instance (priority := 100) t2Space (α : Type*) [TopologicalSpace α] [PolishSpace α] :
     T2Space α := by
   letI := upgradePolishSpace α
   infer_instance
 #align polish_space.t2_space PolishSpace.t2Space
 
 /-- A countable product of Polish spaces is Polish. -/
-instance pi_countable {ι : Type _} [Countable ι] {E : ι → Type _} [∀ i, TopologicalSpace (E i)]
+instance pi_countable {ι : Type*} [Countable ι] {E : ι → Type*} [∀ i, TopologicalSpace (E i)]
     [∀ i, PolishSpace (E i)] : PolishSpace (∀ i, E i) := by
   cases nonempty_encodable ι
   letI := fun i => upgradePolishSpace (E i)
@@ -123,7 +123,7 @@ instance nat_fun [TopologicalSpace α] [PolishSpace α] : PolishSpace (ℕ → 
 #align polish_space.nat_fun PolishSpace.nat_fun
 
 /-- A countable disjoint union of Polish spaces is Polish. -/
-instance sigma {ι : Type _} [Countable ι] {E : ι → Type _} [∀ n, TopologicalSpace (E n)]
+instance sigma {ι : Type*} [Countable ι] {E : ι → Type*} [∀ n, TopologicalSpace (E n)]
     [∀ n, PolishSpace (E n)] : PolishSpace (Σn, E n) :=
   letI := fun n => upgradePolishSpace (E n)
   letI : MetricSpace (Σn, E n) := Sigma.metricSpace
@@ -141,7 +141,7 @@ instance sum [TopologicalSpace α] [PolishSpace α] [TopologicalSpace β] [Polis
 #align polish_space.sum PolishSpace.sum
 
 /-- Any nonempty Polish space is the continuous image of the fundamental space `ℕ → ℕ`. -/
-theorem exists_nat_nat_continuous_surjective (α : Type _) [TopologicalSpace α] [PolishSpace α]
+theorem exists_nat_nat_continuous_surjective (α : Type*) [TopologicalSpace α] [PolishSpace α]
     [Nonempty α] : ∃ f : (ℕ → ℕ) → α, Continuous f ∧ Surjective f :=
   letI := upgradePolishSpace α
   exists_nat_nat_continuous_surjective_of_completeSpace α
@@ -167,7 +167,7 @@ theorem _root_.Equiv.polishSpace_induced [t : TopologicalSpace β] [PolishSpace
 #align equiv.polish_space_induced Equiv.polishSpace_induced
 
 /-- A closed subset of a Polish space is also Polish. -/
-theorem _root_.IsClosed.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α] {s : Set α}
+theorem _root_.IsClosed.polishSpace {α : Type*} [TopologicalSpace α] [PolishSpace α] {s : Set α}
     (hs : IsClosed s) : PolishSpace s :=
   (IsClosed.closedEmbedding_subtype_val hs).polishSpace
 #align is_closed.polish_space IsClosed.polishSpace
@@ -175,14 +175,14 @@ theorem _root_.IsClosed.polishSpace {α : Type _} [TopologicalSpace α] [PolishS
 /-- A sequence of type synonyms of a given type `α`, useful in the proof of
 `exists_polishSpace_forall_le` to endow each copy with a different topology. -/
 @[nolint unusedArguments]
-def AuxCopy (α : Type _) {ι : Type _} (_i : ι) : Type _ := α
+def AuxCopy (α : Type*) {ι : Type*} (_i : ι) : Type _ := α
 #align polish_space.aux_copy PolishSpace.AuxCopy
 
 /-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
 topology which is finer than all of them.
 
 Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
-theorem exists_polishSpace_forall_le {ι : Type _} [Countable ι] [t : TopologicalSpace α]
+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' := by
@@ -253,7 +253,7 @@ variable [MetricSpace α] {s : Opens α}
 /-- 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: was @[nolint has_nonempty_instance]
-def CompleteCopy {α : Type _} [MetricSpace α] (s : Opens α) : Type _ := s
+def CompleteCopy {α : Type*} [MetricSpace α] (s : Opens α) : Type _ := s
 #align polish_space.complete_copy TopologicalSpace.Opens.CompleteCopyₓ
 
 namespace CompleteCopy
@@ -348,7 +348,7 @@ instance instCompleteSpace [CompleteSpace α] : CompleteSpace (CompleteCopy s) :
 #align polish_space.complete_space_complete_copy TopologicalSpace.Opens.CompleteCopy.instCompleteSpaceₓ
 
 /-- An open subset of a Polish space is also Polish. -/
-theorem _root_.IsOpen.polishSpace {α : Type _} [TopologicalSpace α] [PolishSpace α] {s : Set α}
+theorem _root_.IsOpen.polishSpace {α : Type*} [TopologicalSpace α] [PolishSpace α] {s : Set α}
     (hs : IsOpen s) : PolishSpace s := by
   letI := upgradePolishSpace α
   lift s to Opens α using hs
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module topology.metric_space.polish
-! leanprover-community/mathlib commit bcfa726826abd57587355b4b5b7e78ad6527b7e4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Topology.MetricSpace.PiNat
 import Mathlib.Topology.MetricSpace.Isometry
@@ -14,6 +9,8 @@ import Mathlib.Topology.MetricSpace.Gluing
 import Mathlib.Topology.Sets.Opens
 import Mathlib.Analysis.Normed.Field.Basic
 
+#align_import topology.metric_space.polish from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
+
 /-!
 # Polish spaces
 
fix: change compl precedence (#5586)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -245,7 +245,7 @@ boundary.
 
 Porting note: definitions and lemmas in this section now take `(s : Opens α)` instead of
 `{s : Set α} (hs : IsOpen s)` so that we can turn various definitions and lemmas into instances.
-Also, some lemmas used to assume `Set.Nonempty (sᶜ)` in Lean 3. In fact, this assumption is not
+Also, some lemmas used to assume `Set.Nonempty sᶜ` in Lean 3. In fact, this assumption is not
 needed, so it was dropped.
 -/
 
@@ -266,11 +266,11 @@ by `dist' x y = dist x y + |1 / dist x sᶜ - 1 / dist y sᶜ|`, where the secon
 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) where
-  dist x y := dist x.1 y.1 + abs (1 / infDist x.1 (sᶜ) - 1 / infDist y.1 (sᶜ))
+  dist x y := dist x.1 y.1 + abs (1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ)
 #align polish_space.has_dist_complete_copy TopologicalSpace.Opens.CompleteCopy.instDistₓ
 
 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ᶜ)) :=
+    dist x y = dist x.1 y.1 + abs (1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ) :=
   rfl
 #align polish_space.dist_complete_copy_eq TopologicalSpace.Opens.CompleteCopy.dist_eqₓ
 
@@ -295,9 +295,9 @@ instance instMetricSpace : MetricSpace (CompleteCopy s) := by
   · simp only [dist_eq, dist_self, one_div, sub_self, abs_zero, add_zero]
   · simp only [dist_eq, dist_comm, abs_sub_comm]
   · calc
-      dist x z = dist x.1 z.1 + |1 / infDist x.1 (sᶜ) - 1 / infDist z.1 (sᶜ)| := rfl
-      _ ≤ dist x.1 y.1 + dist y.1 z.1 + (|1 / infDist x.1 (sᶜ) - 1 / infDist y.1 (sᶜ)| +
-            |1 / infDist y.1 (sᶜ) - 1 / infDist z.1 (sᶜ)|) :=
+      dist x z = dist x.1 z.1 + |1 / infDist x.1 sᶜ - 1 / infDist z.1 sᶜ| := rfl
+      _ ≤ dist x.1 y.1 + dist y.1 z.1 + (|1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ| +
+            |1 / infDist y.1 sᶜ - 1 / infDist z.1 sᶜ|) :=
         add_le_add (dist_triangle _ _ _) (dist_triangle (1 / infDist _ _) _ _)
       _ = dist x y + dist y z := add_add_add_comm ..
   · refine ⟨fun h x hx ↦ ?_, fun h ↦ isOpen_iff_mem_nhds.2 fun x hx ↦ ?_⟩
@@ -305,8 +305,8 @@ instance instMetricSpace : MetricSpace (CompleteCopy s) := by
       exact ⟨ε, ε0, fun y hy ↦ hε <| (dist_comm _ _).trans_lt <| (dist_val_le_dist _ _).trans_lt hy⟩
     · rcases h x hx with ⟨ε, ε0, hε⟩
       simp only [dist_eq, one_div] at hε
-      have : Tendsto (fun y : s ↦ dist x.1 y.1 + |(infDist x.1 (sᶜ))⁻¹ - (infDist y.1 (sᶜ))⁻¹|)
-        (𝓝 x) (𝓝 (dist x.1 x.1 + |(infDist x.1 (sᶜ))⁻¹ - (infDist x.1 (sᶜ))⁻¹|))
+      have : Tendsto (fun y : s ↦ dist x.1 y.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist y.1 sᶜ)⁻¹|)
+        (𝓝 x) (𝓝 (dist x.1 x.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist x.1 sᶜ)⁻¹|))
       · refine (tendsto_const_nhds.dist continuous_subtype_val.continuousAt).add
           (tendsto_const_nhds.sub <| ?_).abs
         refine (continuousAt_inv_infDist_pt ?_).comp continuous_subtype_val.continuousAt
@@ -328,23 +328,23 @@ instance instCompleteSpace [CompleteSpace α] : CompleteSpace (CompleteCopy s) :
   obtain ⟨x, xlim⟩ : ∃ x, Tendsto (fun n => (u n).1) atTop (𝓝 x) := cauchySeq_tendsto_of_complete A
   by_cases xs : x ∈ s
   · exact ⟨⟨x, xs⟩, tendsto_subtype_rng.2 xlim⟩
-  obtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / infDist (u n).1 (sᶜ) < C
-  · refine ⟨(1 / 2) ^ 0 + 1 / infDist (u 0).1 (sᶜ), fun n ↦ ?_⟩
+  obtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / infDist (u n).1 sᶜ < C
+  · refine ⟨(1 / 2) ^ 0 + 1 / infDist (u 0).1 sᶜ, fun n ↦ ?_⟩
     rw [← sub_lt_iff_lt_add]
     calc
-      _ ≤ |1 / infDist (u n).1 (sᶜ) - 1 / infDist (u 0).1 (sᶜ)| := le_abs_self _
-      _ = |1 / infDist (u 0).1 (sᶜ) - 1 / infDist (u n).1 (sᶜ)| := abs_sub_comm _ _
+      _ ≤ |1 / infDist (u n).1 sᶜ - 1 / infDist (u 0).1 sᶜ| := le_abs_self _
+      _ = |1 / infDist (u 0).1 sᶜ - 1 / infDist (u n).1 sᶜ| := abs_sub_comm _ _
       _ ≤ dist (u 0) (u n) := le_add_of_nonneg_left dist_nonneg
       _ < (1 / 2) ^ 0 := hu 0 0 n le_rfl n.zero_le
   have Cpos : 0 < C := lt_of_le_of_lt (div_nonneg zero_le_one infDist_nonneg) (hC 0)
-  have Hmem : ∀ {y}, y ∈ s ↔ 0 < infDist y (sᶜ) := fun {y} ↦ by
+  have Hmem : ∀ {y}, y ∈ s ↔ 0 < infDist y sᶜ := fun {y} ↦ by
     rw [← s.isOpen.isClosed_compl.not_mem_iff_infDist_pos ⟨x, xs⟩]; exact not_not.symm
-  have I : ∀ n, 1 / C ≤ infDist (u n).1 (sᶜ) := fun n ↦ by
-    have : 0 < infDist (u n).1 (sᶜ) := Hmem.1 (u n).2
+  have I : ∀ n, 1 / C ≤ infDist (u n).1 sᶜ := fun n ↦ by
+    have : 0 < infDist (u n).1 sᶜ := Hmem.1 (u n).2
     rw [div_le_iff' Cpos]
     exact (div_le_iff this).1 (hC n).le
-  have I' : 1 / C ≤ infDist x (sᶜ) :=
-    have : Tendsto (fun n => infDist (u n).1 (sᶜ)) atTop (𝓝 (infDist x (sᶜ))) :=
+  have I' : 1 / C ≤ infDist x sᶜ :=
+    have : Tendsto (fun n => infDist (u n).1 sᶜ) atTop (𝓝 (infDist x sᶜ)) :=
       ((continuous_infDist_pt (sᶜ : Set α)).tendsto x).comp xlim
     ge_of_tendsto' this I
   exact absurd (Hmem.2 <| lt_of_lt_of_le (div_pos one_pos Cpos) I') xs
@@ -398,7 +398,7 @@ theorem _root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s :
 #align is_closed.is_clopenable IsClosed.isClopenable
 
 theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
-    IsClopenable (sᶜ) := by
+    IsClopenable sᶜ := by
   rcases hs with ⟨t, t_le, t_polish, h, h'⟩
   exact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩
 #align polish_space.is_clopenable.compl PolishSpace.IsClopenable.compl
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -202,7 +202,7 @@ theorem exists_polishSpace_forall_le {ι : Type _} [Countable ι] [t : Topologic
   -- show that the induced topology is finer than all the `m n`.
   have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
     rw [induced_to_pi]
-    exact infᵢ_le_of_le n (@induced_id _ (m n)).le
+    exact iInf_le_of_le n (@induced_id _ (m n)).le
   refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
   -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
   -- embedding.
@@ -210,14 +210,14 @@ theorem exists_polishSpace_forall_le {ι : Type _} [Countable ι] [t : Topologic
     ext x
     constructor
     · rintro ⟨y, rfl⟩
-      exact mem_interᵢ.2 fun n => by simp only [mem_setOf_eq]
+      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
     · refine fun hx ↦ ⟨x default, ?_⟩
       ext1 n
       symm
-      exact mem_interᵢ.1 hx n
+      exact mem_iInter.1 hx n
   have f_closed : IsClosed (range f) := by
     rw [A]
-    refine isClosed_interᵢ fun n => ?_
+    refine isClosed_iInter fun n => ?_
     have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
       have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
       this.comp (continuous_apply i)
@@ -409,14 +409,14 @@ theorem _root_.IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : S
 #align is_open.is_clopenable IsOpen.isClopenable
 
 -- porting note: TODO: generalize for free to `[Countable ι] {s : ι → Set α}`
-theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
+theorem IsClopenable.iUnion [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α}
     (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n) := by
   choose m mt m_polish _ m_open using hs
   obtain ⟨t', t'm, -, t'_polish⟩ :
     ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=
     exists_polishSpace_forall_le m mt m_polish
   have A : IsOpen[t'] (⋃ n, s n) := by
-    apply isOpen_unionᵢ
+    apply isOpen_iUnion
     intro n
     apply t'm n
     exact m_open n
@@ -424,6 +424,6 @@ theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : 
       t'' ≤ t' ∧ @PolishSpace α t'' ∧ IsClosed[t''] (⋃ n, s n) ∧ IsOpen[t''] (⋃ n, s n) :=
     @IsOpen.isClopenable α t' t'_polish _ A
   exact ⟨t'', t''_le.trans ((t'm 0).trans (mt 0)), t''_polish, h1, h2⟩
-#align polish_space.is_clopenable.Union PolishSpace.IsClopenable.unionᵢ
+#align polish_space.is_clopenable.Union PolishSpace.IsClopenable.iUnion
 
 end PolishSpace
chore: tidy various files (#3718)
Diff
@@ -37,16 +37,16 @@ In this file, we establish the basic properties of Polish spaces.
 A fundamental property of Polish spaces is that one can put finer topologies, still Polish,
 with additional properties:
 
-* `exists_polish_space_forall_le`: on a topological space, consider countably many topologies
+* `exists_polishSpace_forall_le`: on a topological space, consider countably many topologies
   `t n`, all Polish and finer than the original topology. Then there exists another Polish
   topology which is finer than all the `t n`.
-* `is_clopenable s` is a property of a subset `s` of a topological space, requiring that there
+* `IsClopenable s` is a property of a subset `s` of a topological space, requiring that there
   exists a finer topology, which is Polish, for which `s` becomes open and closed. We show that
   this property is satisfied for open sets, closed sets, for complements, and for countable unions.
   Once Borel-measurable sets are defined in later files, it will follow that any Borel-measurable
   set is clopenable. Once the Lusin-Souslin theorem is proved using analytic sets, we will even
   show that a set is clopenable if and only if it is Borel-measurable, see
-  `is_clopenable_iff_measurable_set`.
+  `isClopenable_iff_measurableSet`.
 -/
 
 noncomputable section
@@ -176,7 +176,7 @@ theorem _root_.IsClosed.polishSpace {α : Type _} [TopologicalSpace α] [PolishS
 #align is_closed.polish_space IsClosed.polishSpace
 
 /-- A sequence of type synonyms of a given type `α`, useful in the proof of
-`exists_polish_space_forall_le` to endow each copy with a different topology. -/
+`exists_polishSpace_forall_le` to endow each copy with a different topology. -/
 @[nolint unusedArguments]
 def AuxCopy (α : Type _) {ι : Type _} (_i : ι) : Type _ := α
 #align polish_space.aux_copy PolishSpace.AuxCopy
@@ -369,7 +369,7 @@ namespace PolishSpace
 
 /-- 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 `is_clopenable_iff_measurable_set`). -/
+but this is nontrivial (see `isClopenable_iff_measurableSet`). -/
 def IsClopenable [t : TopologicalSpace α] (s : Set α) : Prop :=
   ∃ t' : TopologicalSpace α, t' ≤ t ∧ @PolishSpace α t' ∧ IsClosed[t'] s ∧ IsOpen[t'] s
 #align polish_space.is_clopenable PolishSpace.IsClopenable
@@ -427,4 +427,3 @@ theorem IsClopenable.unionᵢ [t : TopologicalSpace α] [PolishSpace α] {s : 
 #align polish_space.is_clopenable.Union PolishSpace.IsClopenable.unionᵢ
 
 end PolishSpace
-
feat: port Topology.MetricSpace.Polish (#3357)

Co-authored-by: Scott Morrison <scott@tqft.net>

Dependencies 10 + 611

612 files ported (98.4%)
270323 lines ported (98.1%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file