topology.metric_space.closedsMathlib.Topology.MetricSpace.Closeds

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -209,7 +209,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
 #align emetric.closeds.complete_space EMetric.Closeds.completeSpace
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (v «expr ⊆ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (v «expr ⊆ » s) -/
 #print EMetric.Closeds.compactSpace /-
 /-- In a compact space, the type of closed subsets is compact. -/
 instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
Diff
@@ -90,7 +90,7 @@ theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
     rcases exists_edist_lt_of_Hausdorff_edist_lt hx Dtu with ⟨y, hy, Dxy⟩
     -- y : α,  hy : y ∈ u, Dxy : edist x y < ε
     exact ⟨y, hu hy, Dxy⟩
-  rwa [hs.closure_eq] at this 
+  rwa [hs.closure_eq] at this
 #align emetric.is_closed_subsets_of_is_closed EMetric.isClosed_subsets_of_isClosed
 -/
 
@@ -181,7 +181,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_Inter.1 xt0 n
     rcases mem_closure_iff.1 this (B n) (B_pos n) with ⟨z, hz, Dxz⟩
     -- z : α,  Dxz : edist x z < B n,
-    simp only [exists_prop, Set.mem_iUnion] at hz 
+    simp only [exists_prop, Set.mem_iUnion] at hz
     rcases hz with ⟨m, ⟨m_ge_n, hm⟩⟩
     -- m : ℕ, m_ge_n : m ≥ n, hm : z ∈ s m
     have : Hausdorff_edist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
@@ -202,7 +202,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     ENNReal.Tendsto.const_mul
       (ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one <| by simp [ENNReal.one_lt_two])
       (Or.inr <| by simp)
-  rw [MulZeroClass.mul_zero] at this 
+  rw [MulZeroClass.mul_zero] at this
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b
   exact ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
   exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩
@@ -236,7 +236,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       · intro x hx
         have : x ∈ ⋃ y ∈ s, ball y δ := hs (by simp)
         rcases mem_Union₂.1 this with ⟨y, ys, dy⟩
-        have : edist y x < δ := by simp at dy  <;> rwa [edist_comm] at dy 
+        have : edist y x < δ := by simp at dy <;> rwa [edist_comm] at dy
         exact ⟨y, ⟨ys, ⟨x, hx, this⟩⟩, le_of_lt dy⟩
       · rintro x ⟨hx1, ⟨y, yu, hy⟩⟩
         exact ⟨y, yu, le_of_lt hy⟩
@@ -248,7 +248,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       · apply fs.finite_subsets.subset fun b => _
         simp only [and_imp, Set.mem_image, Set.mem_setOf_eq, exists_imp]
         intro x hx hx'
-        rwa [hx'] at hx 
+        rwa [hx'] at hx
       · exact set_like.coe_injective.inj_on F
     -- `F` is ε-dense
     · obtain ⟨t0, t0s, Dut0⟩ := main u
@@ -274,7 +274,7 @@ instance NonemptyCompacts.emetricSpace : EMetricSpace (NonemptyCompacts α)
     NonemptyCompacts.ext <|
       by
       have : closure (s : Set α) = closure t := Hausdorff_edist_zero_iff_closure_eq_closure.1 h
-      rwa [s.is_compact.is_closed.closure_eq, t.is_compact.is_closed.closure_eq] at this 
+      rwa [s.is_compact.is_closed.closure_eq, t.is_compact.is_closed.closure_eq] at this
 #align emetric.nonempty_compacts.emetric_space EMetric.NonemptyCompacts.emetricSpace
 -/
 
@@ -303,7 +303,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
   refine' isClosed_of_closure_subset fun s hs => ⟨_, _⟩
   · -- take a set set t which is nonempty and at a finite distance of s
     rcases mem_closure_iff.1 hs ⊤ ENNReal.coe_lt_top with ⟨t, ht, Dst⟩
-    rw [edist_comm] at Dst 
+    rw [edist_comm] at Dst
     -- since `t` is nonempty, so is `s`
     exact nonempty_of_Hausdorff_edist_ne_top ht.1 (ne_of_lt Dst)
   · refine' isCompact_iff_totallyBounded_isComplete.2 ⟨_, s.closed.is_complete⟩
Diff
@@ -200,7 +200,8 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   refine' tendsto_at_top.2 fun ε εpos => _
   have : tendsto (fun n => 2 * B n) at_top (𝓝 (2 * 0)) :=
     ENNReal.Tendsto.const_mul
-      (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
+      (ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one <| by simp [ENNReal.one_lt_two])
+      (Or.inr <| by simp)
   rw [MulZeroClass.mul_zero] at this 
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b
   exact ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2019 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.Analysis.SpecificLimits.Basic
-import Mathbin.Topology.MetricSpace.HausdorffDistance
-import Mathbin.Topology.Sets.Compacts
+import Analysis.SpecificLimits.Basic
+import Topology.MetricSpace.HausdorffDistance
+import Topology.Sets.Compacts
 
 #align_import topology.metric_space.closeds from "leanprover-community/mathlib"@"ce38d86c0b2d427ce208c3cee3159cb421d2b3c4"
 
@@ -208,7 +208,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
 #align emetric.closeds.complete_space EMetric.Closeds.completeSpace
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (v «expr ⊆ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (v «expr ⊆ » s) -/
 #print EMetric.Closeds.compactSpace /-
 /-- In a compact space, the type of closed subsets is compact. -/
 instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2019 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.closeds
-! leanprover-community/mathlib commit ce38d86c0b2d427ce208c3cee3159cb421d2b3c4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecificLimits.Basic
 import Mathbin.Topology.MetricSpace.HausdorffDistance
 import Mathbin.Topology.Sets.Compacts
 
+#align_import topology.metric_space.closeds from "leanprover-community/mathlib"@"ce38d86c0b2d427ce208c3cee3159cb421d2b3c4"
+
 /-!
 # Closed subsets
 
@@ -211,7 +208,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
 #align emetric.closeds.complete_space EMetric.Closeds.completeSpace
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (v «expr ⊆ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (v «expr ⊆ » s) -/
 #print EMetric.Closeds.compactSpace /-
 /-- In a compact space, the type of closed subsets is compact. -/
 instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
Diff
@@ -474,15 +474,19 @@ theorem lipschitz_infDist_set (x : α) : LipschitzWith 1 fun s : NonemptyCompact
 #align metric.lipschitz_inf_dist_set Metric.lipschitz_infDist_set
 -/
 
+#print Metric.lipschitz_infDist /-
 theorem lipschitz_infDist : LipschitzWith 2 fun p : α × NonemptyCompacts α => infDist p.1 p.2 :=
   @LipschitzWith.uncurry _ _ _ _ _ _ (fun (x : α) (s : NonemptyCompacts α) => infDist x s) 1 1
     (fun s => lipschitz_infDist_pt s) lipschitz_infDist_set
 #align metric.lipschitz_inf_dist Metric.lipschitz_infDist
+-/
 
+#print Metric.uniformContinuous_infDist_Hausdorff_dist /-
 theorem uniformContinuous_infDist_Hausdorff_dist :
     UniformContinuous fun p : α × NonemptyCompacts α => infDist p.1 p.2 :=
   lipschitz_infDist.UniformContinuous
 #align metric.uniform_continuous_inf_dist_Hausdorff_dist Metric.uniformContinuous_infDist_Hausdorff_dist
+-/
 
 end
 
Diff
@@ -75,7 +75,6 @@ theorem continuous_infEdist_Hausdorff_edist :
     _ ≤ inf_edist y t + (edist (x, s) (y, t) + edist (x, s) (y, t)) :=
       (add_le_add_left (add_le_add (le_max_left _ _) (le_max_right _ _)) _)
     _ = inf_edist y t + 2 * edist (x, s) (y, t) := by rw [← mul_two, mul_comm]
-    
 #align emetric.continuous_inf_edist_Hausdorff_edist Emetric.continuous_infEdist_Hausdorff_edist
 
 #print EMetric.isClosed_subsets_of_isClosed /-
@@ -196,8 +195,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
         calc
           edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
           _ ≤ B n + B n := (add_le_add (le_of_lt Dxz) (le_of_lt Dzy))
-          _ = 2 * B n := (two_mul _).symm
-          ⟩
+          _ = 2 * B n := (two_mul _).symm⟩
   -- Deduce from the above inequalities that the distance between `s n` and `t0` is at most `2 B n`.
   have main : ∀ n : ℕ, edist (s n) t ≤ 2 * B n := fun n =>
     Hausdorff_edist_le_of_mem_edist (I1 n) (I2 n)
@@ -329,7 +327,6 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
         edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
         _ < ε / 2 + ε / 2 := (ENNReal.add_lt_add Dxz Dzy)
         _ = ε := ENNReal.add_halves _
-        
     exact mem_bUnion hy this
 #align emetric.nonempty_compacts.is_closed_in_closeds EMetric.NonemptyCompacts.isClosed_in_closeds
 -/
@@ -401,7 +398,6 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
           edist x (F z) ≤ edist x z + edist z (F z) := edist_triangle _ _ _
           _ < δ / 2 + δ / 2 := (ENNReal.add_lt_add Dxz (Fspec z).2)
           _ = δ := ENNReal.add_halves _
-          
       -- keep only the points in `b` that are close to point in `t`, yielding a new set `c`
       let c := {y ∈ b | ∃ x ∈ t, edist x y < δ}
       have : c.finite := ‹b.finite›.Subset fun x hx => hx.1
@@ -420,7 +416,6 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
           calc
             edist y x = edist x y := edist_comm _ _
             _ ≤ δ := le_of_lt Dyx
-            
         exact ⟨x, xt, this⟩
       -- it follows that their Hausdorff distance is small
       have : Hausdorff_edist (t : Set α) c ≤ δ := Hausdorff_edist_le_of_mem_edist tc ct
Diff
@@ -213,7 +213,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
 #align emetric.closeds.complete_space EMetric.Closeds.completeSpace
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (v «expr ⊆ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (v «expr ⊆ » s) -/
 #print EMetric.Closeds.compactSpace /-
 /-- In a compact space, the type of closed subsets is compact. -/
 instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
Diff
@@ -81,7 +81,7 @@ theorem continuous_infEdist_Hausdorff_edist :
 #print EMetric.isClosed_subsets_of_isClosed /-
 /-- Subsets of a given closed subset form a closed set -/
 theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
-    IsClosed { t : Closeds α | (t : Set α) ⊆ s } :=
+    IsClosed {t : Closeds α | (t : Set α) ⊆ s} :=
   by
   refine' isClosed_of_closure_subset fun t ht x hx => _
   -- t : closeds α,  ht : t ∈ closure {t : closeds α | t ⊆ s},
@@ -234,7 +234,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
     have main : ∀ u : Set α, ∃ (v : _) (_ : v ⊆ s), Hausdorff_edist u v ≤ δ :=
       by
       intro u
-      let v := { x : α | x ∈ s ∧ ∃ y ∈ u, edist x y < δ }
+      let v := {x : α | x ∈ s ∧ ∃ y ∈ u, edist x y < δ}
       exists v, (fun x hx => hx.1 : v ⊆ s)
       refine' Hausdorff_edist_le_of_mem_edist _ _
       · intro x hx
@@ -245,7 +245,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       · rintro x ⟨hx1, ⟨y, yu, hy⟩⟩
         exact ⟨y, yu, le_of_lt hy⟩
     -- introduce the set F of all subsets of `s` (seen as members of `closeds α`).
-    let F := { f : closeds α | (f : Set α) ⊆ s }
+    let F := {f : closeds α | (f : Set α) ⊆ s}
     refine' ⟨F, _, fun u _ => _⟩
     -- `F` is finite
     · apply @finite.of_finite_image _ _ F coe
@@ -297,7 +297,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
   by
   have :
     range nonempty_compacts.to_closeds =
-      { s : closeds α | (s : Set α).Nonempty ∧ IsCompact (s : Set α) } :=
+      {s : closeds α | (s : Set α).Nonempty ∧ IsCompact (s : Set α)} :=
     by
     ext s
     refine' ⟨_, fun h => ⟨⟨⟨s, h.2⟩, h.1⟩, closeds.ext rfl⟩⟩
@@ -368,8 +368,8 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
         approximations in `s` of the centers of these balls give the required finite approximation
         of `t`. -/
     rcases exists_countable_dense α with ⟨s, cs, s_dense⟩
-    let v0 := { t : Set α | t.Finite ∧ t ⊆ s }
-    let v : Set (nonempty_compacts α) := { t : nonempty_compacts α | (t : Set α) ∈ v0 }
+    let v0 := {t : Set α | t.Finite ∧ t ⊆ s}
+    let v : Set (nonempty_compacts α) := {t : nonempty_compacts α | (t : Set α) ∈ v0}
     refine' ⟨⟨v, _, _⟩⟩
     · have : v0.countable := countable_set_of_finite_subset cs
       exact this.preimage SetLike.coe_injective
@@ -403,7 +403,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
           _ = δ := ENNReal.add_halves _
           
       -- keep only the points in `b` that are close to point in `t`, yielding a new set `c`
-      let c := { y ∈ b | ∃ x ∈ t, edist x y < δ }
+      let c := {y ∈ b | ∃ x ∈ t, edist x y < δ}
       have : c.finite := ‹b.finite›.Subset fun x hx => hx.1
       -- points in `t` are well approximated by points in `c`
       have tc : ∀ x ∈ t, ∃ y ∈ c, edist x y ≤ δ :=
Diff
@@ -94,7 +94,7 @@ theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
     rcases exists_edist_lt_of_Hausdorff_edist_lt hx Dtu with ⟨y, hy, Dxy⟩
     -- y : α,  hy : y ∈ u, Dxy : edist x y < ε
     exact ⟨y, hu hy, Dxy⟩
-  rwa [hs.closure_eq] at this
+  rwa [hs.closure_eq] at this 
 #align emetric.is_closed_subsets_of_is_closed EMetric.isClosed_subsets_of_isClosed
 -/
 
@@ -185,7 +185,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_Inter.1 xt0 n
     rcases mem_closure_iff.1 this (B n) (B_pos n) with ⟨z, hz, Dxz⟩
     -- z : α,  Dxz : edist x z < B n,
-    simp only [exists_prop, Set.mem_iUnion] at hz
+    simp only [exists_prop, Set.mem_iUnion] at hz 
     rcases hz with ⟨m, ⟨m_ge_n, hm⟩⟩
     -- m : ℕ, m_ge_n : m ≥ n, hm : z ∈ s m
     have : Hausdorff_edist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
@@ -206,7 +206,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   have : tendsto (fun n => 2 * B n) at_top (𝓝 (2 * 0)) :=
     ENNReal.Tendsto.const_mul
       (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
-  rw [MulZeroClass.mul_zero] at this
+  rw [MulZeroClass.mul_zero] at this 
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b
   exact ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
   exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩
@@ -231,7 +231,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       ⟨s, fs, hs⟩
     -- s : set α,  fs : s.finite,  hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
     -- we first show that any set is well approximated by a subset of `s`.
-    have main : ∀ u : Set α, ∃ (v : _)(_ : v ⊆ s), Hausdorff_edist u v ≤ δ :=
+    have main : ∀ u : Set α, ∃ (v : _) (_ : v ⊆ s), Hausdorff_edist u v ≤ δ :=
       by
       intro u
       let v := { x : α | x ∈ s ∧ ∃ y ∈ u, edist x y < δ }
@@ -240,7 +240,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       · intro x hx
         have : x ∈ ⋃ y ∈ s, ball y δ := hs (by simp)
         rcases mem_Union₂.1 this with ⟨y, ys, dy⟩
-        have : edist y x < δ := by simp at dy <;> rwa [edist_comm] at dy
+        have : edist y x < δ := by simp at dy  <;> rwa [edist_comm] at dy 
         exact ⟨y, ⟨ys, ⟨x, hx, this⟩⟩, le_of_lt dy⟩
       · rintro x ⟨hx1, ⟨y, yu, hy⟩⟩
         exact ⟨y, yu, le_of_lt hy⟩
@@ -252,7 +252,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       · apply fs.finite_subsets.subset fun b => _
         simp only [and_imp, Set.mem_image, Set.mem_setOf_eq, exists_imp]
         intro x hx hx'
-        rwa [hx'] at hx
+        rwa [hx'] at hx 
       · exact set_like.coe_injective.inj_on F
     -- `F` is ε-dense
     · obtain ⟨t0, t0s, Dut0⟩ := main u
@@ -278,7 +278,7 @@ instance NonemptyCompacts.emetricSpace : EMetricSpace (NonemptyCompacts α)
     NonemptyCompacts.ext <|
       by
       have : closure (s : Set α) = closure t := Hausdorff_edist_zero_iff_closure_eq_closure.1 h
-      rwa [s.is_compact.is_closed.closure_eq, t.is_compact.is_closed.closure_eq] at this
+      rwa [s.is_compact.is_closed.closure_eq, t.is_compact.is_closed.closure_eq] at this 
 #align emetric.nonempty_compacts.emetric_space EMetric.NonemptyCompacts.emetricSpace
 -/
 
@@ -307,7 +307,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
   refine' isClosed_of_closure_subset fun s hs => ⟨_, _⟩
   · -- take a set set t which is nonempty and at a finite distance of s
     rcases mem_closure_iff.1 hs ⊤ ENNReal.coe_lt_top with ⟨t, ht, Dst⟩
-    rw [edist_comm] at Dst
+    rw [edist_comm] at Dst 
     -- since `t` is nonempty, so is `s`
     exact nonempty_of_Hausdorff_edist_ne_top ht.1 (ne_of_lt Dst)
   · refine' isCompact_iff_totallyBounded_isComplete.2 ⟨_, s.closed.is_complete⟩
Diff
@@ -33,7 +33,7 @@ always finite in this context.
 
 noncomputable section
 
-open Classical Topology ENNReal
+open scoped Classical Topology ENNReal
 
 universe u
 
Diff
@@ -479,23 +479,11 @@ theorem lipschitz_infDist_set (x : α) : LipschitzWith 1 fun s : NonemptyCompact
 #align metric.lipschitz_inf_dist_set Metric.lipschitz_infDist_set
 -/
 
-/- warning: metric.lipschitz_inf_dist -> Metric.lipschitz_infDist is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (MetricSpace.toPseudoMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Metric.NonemptyCompacts.metricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 2 (OfNat.mk.{0} NNReal 2 (bit0.{0} NNReal (Distrib.toHasAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (SetLike.Set.hasCoeT.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.setLike.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (EMetricSpace.toPseudoEMetricSpace.{u1} α (MetricSpace.toEMetricSpace.{u1} α _inst_1)) (EMetricSpace.toPseudoEMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (EMetric.NonemptyCompacts.emetricSpace.{u1} α (MetricSpace.toEMetricSpace.{u1} α _inst_1)))) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 2 (instOfNat.{0} NNReal 2 (CanonicallyOrderedCommSemiring.toNatCast.{0} NNReal instNNRealCanonicallyOrderedCommSemiring) (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) (SetLike.coe.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.instSetLikeNonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
-Case conversion may be inaccurate. Consider using '#align metric.lipschitz_inf_dist Metric.lipschitz_infDistₓ'. -/
 theorem lipschitz_infDist : LipschitzWith 2 fun p : α × NonemptyCompacts α => infDist p.1 p.2 :=
   @LipschitzWith.uncurry _ _ _ _ _ _ (fun (x : α) (s : NonemptyCompacts α) => infDist x s) 1 1
     (fun s => lipschitz_infDist_pt s) lipschitz_infDist_set
 #align metric.lipschitz_inf_dist Metric.lipschitz_infDist
 
-/- warning: metric.uniform_continuous_inf_dist_Hausdorff_dist -> Metric.uniformContinuous_infDist_Hausdorff_dist is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], UniformContinuous.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (Prod.uniformSpace.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toUniformSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (MetricSpace.toPseudoMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Metric.NonemptyCompacts.metricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (SetLike.Set.hasCoeT.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.setLike.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], UniformContinuous.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (instUniformSpaceProd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toUniformSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (MetricSpace.toPseudoMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Metric.NonemptyCompacts.metricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) (SetLike.coe.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.instSetLikeNonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
-Case conversion may be inaccurate. Consider using '#align metric.uniform_continuous_inf_dist_Hausdorff_dist Metric.uniformContinuous_infDist_Hausdorff_distₓ'. -/
 theorem uniformContinuous_infDist_Hausdorff_dist :
     UniformContinuous fun p : α × NonemptyCompacts α => infDist p.1 p.2 :=
   lipschitz_infDist.UniformContinuous
Diff
@@ -124,7 +124,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     standard criterion. -/
   refine' complete_of_convergent_controlled_sequences B B_pos fun s hs => _
   let t0 := ⋂ n, closure (⋃ m ≥ n, s m : Set α)
-  let t : closeds α := ⟨t0, isClosed_interᵢ fun _ => isClosed_closure⟩
+  let t : closeds α := ⟨t0, isClosed_iInter fun _ => isClosed_closure⟩
   use t
   -- The inequality is written this way to agree with `edist_le_of_edist_le_geometric_of_tendsto₀`
   have I1 : ∀ n, ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n :=
@@ -165,8 +165,8 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
       mem_Inter.2 fun k =>
         mem_closure_of_tendsto y_lim
           (by
-            simp only [exists_prop, Set.mem_unionᵢ, Filter.eventually_atTop, Set.mem_preimage,
-              Set.preimage_unionᵢ]
+            simp only [exists_prop, Set.mem_iUnion, Filter.eventually_atTop, Set.mem_preimage,
+              Set.preimage_iUnion]
             exact ⟨k, fun m hm => ⟨n + m, zero_add k ▸ add_le_add (zero_le n) hm, (z m).2⟩⟩)
     use this
     -- Then, we check that `y` is close to `x = z n`. This follows from the fact that `y`
@@ -185,7 +185,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_Inter.1 xt0 n
     rcases mem_closure_iff.1 this (B n) (B_pos n) with ⟨z, hz, Dxz⟩
     -- z : α,  Dxz : edist x z < B n,
-    simp only [exists_prop, Set.mem_unionᵢ] at hz
+    simp only [exists_prop, Set.mem_iUnion] at hz
     rcases hz with ⟨m, ⟨m_ge_n, hm⟩⟩
     -- m : ℕ, m_ge_n : m ≥ n, hm : z ∈ s m
     have : Hausdorff_edist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
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.closeds
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit ce38d86c0b2d427ce208c3cee3159cb421d2b3c4
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Topology.Sets.Compacts
 /-!
 # Closed subsets
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file defines the metric and emetric space structure on the types of closed subsets and nonempty
 compact subsets of a metric or emetric space.
 
Diff
@@ -42,6 +42,7 @@ section
 
 variable {α : Type u} [EMetricSpace α] {s : Set α}
 
+#print EMetric.Closeds.emetricSpace /-
 /-- In emetric spaces, the Hausdorff edistance defines an emetric space structure
 on the type of closed subsets -/
 instance Closeds.emetricSpace : EMetricSpace (Closeds α)
@@ -52,7 +53,8 @@ instance Closeds.emetricSpace : EMetricSpace (Closeds α)
   edist_triangle s t u := hausdorffEdist_triangle
   eq_of_edist_eq_zero s t h :=
     Closeds.ext <| (hausdorffEdist_zero_iff_eq_of_closed s.closed t.closed).1 h
-#align emetric.closeds.emetric_space Emetric.Closeds.emetricSpace
+#align emetric.closeds.emetric_space EMetric.Closeds.emetricSpace
+-/
 
 /-- The edistance to a closed set depends continuously on the point and the set -/
 theorem continuous_infEdist_Hausdorff_edist :
@@ -73,6 +75,7 @@ theorem continuous_infEdist_Hausdorff_edist :
     
 #align emetric.continuous_inf_edist_Hausdorff_edist Emetric.continuous_infEdist_Hausdorff_edist
 
+#print EMetric.isClosed_subsets_of_isClosed /-
 /-- Subsets of a given closed subset form a closed set -/
 theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
     IsClosed { t : Closeds α | (t : Set α) ⊆ s } :=
@@ -89,13 +92,17 @@ theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
     -- y : α,  hy : y ∈ u, Dxy : edist x y < ε
     exact ⟨y, hu hy, Dxy⟩
   rwa [hs.closure_eq] at this
-#align emetric.is_closed_subsets_of_is_closed Emetric.isClosed_subsets_of_isClosed
+#align emetric.is_closed_subsets_of_is_closed EMetric.isClosed_subsets_of_isClosed
+-/
 
+#print EMetric.Closeds.edist_eq /-
 /-- By definition, the edistance on `closeds α` is given by the Hausdorff edistance -/
 theorem Closeds.edist_eq {s t : Closeds α} : edist s t = hausdorffEdist (s : Set α) t :=
   rfl
-#align emetric.closeds.edist_eq Emetric.Closeds.edist_eq
+#align emetric.closeds.edist_eq EMetric.Closeds.edist_eq
+-/
 
+#print EMetric.Closeds.completeSpace /-
 /-- In a complete space, the type of closed subsets is complete for the
 Hausdorff edistance. -/
 instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :=
@@ -200,9 +207,11 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b
   exact ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
   exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩
-#align emetric.closeds.complete_space Emetric.Closeds.completeSpace
+#align emetric.closeds.complete_space EMetric.Closeds.completeSpace
+-/
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (v «expr ⊆ » s) -/
+#print EMetric.Closeds.compactSpace /-
 /-- In a compact space, the type of closed subsets is compact. -/
 instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
   ⟨by
@@ -250,8 +259,10 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       have : edist u t < ε := lt_of_le_of_lt Dut0 δlt
       apply mem_Union₂.2
       exact ⟨t, ‹t ∈ F›, this⟩⟩
-#align emetric.closeds.compact_space Emetric.Closeds.compactSpace
+#align emetric.closeds.compact_space EMetric.Closeds.compactSpace
+-/
 
+#print EMetric.NonemptyCompacts.emetricSpace /-
 /-- In an emetric space, the type of non-empty compact subsets is an emetric space,
 where the edistance is the Hausdorff edistance -/
 instance NonemptyCompacts.emetricSpace : EMetricSpace (NonemptyCompacts α)
@@ -265,14 +276,18 @@ instance NonemptyCompacts.emetricSpace : EMetricSpace (NonemptyCompacts α)
       by
       have : closure (s : Set α) = closure t := Hausdorff_edist_zero_iff_closure_eq_closure.1 h
       rwa [s.is_compact.is_closed.closure_eq, t.is_compact.is_closed.closure_eq] at this
-#align emetric.nonempty_compacts.emetric_space Emetric.NonemptyCompacts.emetricSpace
+#align emetric.nonempty_compacts.emetric_space EMetric.NonemptyCompacts.emetricSpace
+-/
 
+#print EMetric.NonemptyCompacts.ToCloseds.uniformEmbedding /-
 /-- `nonempty_compacts.to_closeds` is a uniform embedding (as it is an isometry) -/
 theorem NonemptyCompacts.ToCloseds.uniformEmbedding :
     UniformEmbedding (@NonemptyCompacts.toCloseds α _ _) :=
   Isometry.uniformEmbedding fun x y => rfl
-#align emetric.nonempty_compacts.to_closeds.uniform_embedding Emetric.NonemptyCompacts.ToCloseds.uniformEmbedding
+#align emetric.nonempty_compacts.to_closeds.uniform_embedding EMetric.NonemptyCompacts.ToCloseds.uniformEmbedding
+-/
 
+#print EMetric.NonemptyCompacts.isClosed_in_closeds /-
 /-- The range of `nonempty_compacts.to_closeds` is closed in a complete space -/
 theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
     IsClosed (range <| @NonemptyCompacts.toCloseds α _ _) :=
@@ -313,16 +328,20 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
         _ = ε := ENNReal.add_halves _
         
     exact mem_bUnion hy this
-#align emetric.nonempty_compacts.is_closed_in_closeds Emetric.NonemptyCompacts.isClosed_in_closeds
+#align emetric.nonempty_compacts.is_closed_in_closeds EMetric.NonemptyCompacts.isClosed_in_closeds
+-/
 
+#print EMetric.NonemptyCompacts.completeSpace /-
 /-- In a complete space, the type of nonempty compact subsets is complete. This follows
 from the same statement for closed subsets -/
 instance NonemptyCompacts.completeSpace [CompleteSpace α] : CompleteSpace (NonemptyCompacts α) :=
   (completeSpace_iff_isComplete_range
         NonemptyCompacts.ToCloseds.uniformEmbedding.to_uniformInducing).2 <|
     NonemptyCompacts.isClosed_in_closeds.IsComplete
-#align emetric.nonempty_compacts.complete_space Emetric.NonemptyCompacts.completeSpace
+#align emetric.nonempty_compacts.complete_space EMetric.NonemptyCompacts.completeSpace
+-/
 
+#print EMetric.NonemptyCompacts.compactSpace /-
 /-- In a compact space, the type of nonempty compact subsets is compact. This follows from
 the same statement for closed subsets -/
 instance NonemptyCompacts.compactSpace [CompactSpace α] : CompactSpace (NonemptyCompacts α) :=
@@ -330,8 +349,10 @@ instance NonemptyCompacts.compactSpace [CompactSpace α] : CompactSpace (Nonempt
     rw [nonempty_compacts.to_closeds.uniform_embedding.embedding.is_compact_iff_is_compact_image]
     rw [image_univ]
     exact nonempty_compacts.is_closed_in_closeds.is_compact⟩
-#align emetric.nonempty_compacts.compact_space Emetric.NonemptyCompacts.compactSpace
+#align emetric.nonempty_compacts.compact_space EMetric.NonemptyCompacts.compactSpace
+-/
 
+#print EMetric.NonemptyCompacts.secondCountableTopology /-
 /-- In a second countable space, the type of nonempty compact subsets is second countable -/
 instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
     SecondCountableTopology (NonemptyCompacts α) :=
@@ -414,7 +435,8 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
       -- we have proved that `d` is a good approximation of `t` as requested
       exact ⟨d, ‹d ∈ v›, Dtc⟩
   UniformSpace.secondCountable_of_separable (nonempty_compacts α)
-#align emetric.nonempty_compacts.second_countable_topology Emetric.NonemptyCompacts.secondCountableTopology
+#align emetric.nonempty_compacts.second_countable_topology EMetric.NonemptyCompacts.secondCountableTopology
+-/
 
 end
 
@@ -428,6 +450,7 @@ section
 
 variable {α : Type u} [MetricSpace α]
 
+#print Metric.NonemptyCompacts.metricSpace /-
 /-- `nonempty_compacts α` inherits a metric space structure, as the Hausdorff
 edistance between two such sets is finite. -/
 instance NonemptyCompacts.metricSpace : MetricSpace (NonemptyCompacts α) :=
@@ -435,24 +458,41 @@ instance NonemptyCompacts.metricSpace : MetricSpace (NonemptyCompacts α) :=
     hausdorffEdist_ne_top_of_nonempty_of_bounded x.Nonempty y.Nonempty x.IsCompact.Bounded
       y.IsCompact.Bounded
 #align metric.nonempty_compacts.metric_space Metric.NonemptyCompacts.metricSpace
+-/
 
+#print Metric.NonemptyCompacts.dist_eq /-
 /-- The distance on `nonempty_compacts α` is the Hausdorff distance, by construction -/
 theorem NonemptyCompacts.dist_eq {x y : NonemptyCompacts α} :
     dist x y = hausdorffDist (x : Set α) y :=
   rfl
 #align metric.nonempty_compacts.dist_eq Metric.NonemptyCompacts.dist_eq
+-/
 
+#print Metric.lipschitz_infDist_set /-
 theorem lipschitz_infDist_set (x : α) : LipschitzWith 1 fun s : NonemptyCompacts α => infDist x s :=
   LipschitzWith.of_le_add fun s t => by
     rw [dist_comm]
     exact inf_dist_le_inf_dist_add_Hausdorff_dist (edist_ne_top t s)
 #align metric.lipschitz_inf_dist_set Metric.lipschitz_infDist_set
+-/
 
+/- warning: metric.lipschitz_inf_dist -> Metric.lipschitz_infDist is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (MetricSpace.toPseudoMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Metric.NonemptyCompacts.metricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 2 (OfNat.mk.{0} NNReal 2 (bit0.{0} NNReal (Distrib.toHasAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (SetLike.Set.hasCoeT.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.setLike.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (EMetricSpace.toPseudoEMetricSpace.{u1} α (MetricSpace.toEMetricSpace.{u1} α _inst_1)) (EMetricSpace.toPseudoEMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (EMetric.NonemptyCompacts.emetricSpace.{u1} α (MetricSpace.toEMetricSpace.{u1} α _inst_1)))) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 2 (instOfNat.{0} NNReal 2 (CanonicallyOrderedCommSemiring.toNatCast.{0} NNReal instNNRealCanonicallyOrderedCommSemiring) (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) (SetLike.coe.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.instSetLikeNonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
+Case conversion may be inaccurate. Consider using '#align metric.lipschitz_inf_dist Metric.lipschitz_infDistₓ'. -/
 theorem lipschitz_infDist : LipschitzWith 2 fun p : α × NonemptyCompacts α => infDist p.1 p.2 :=
   @LipschitzWith.uncurry _ _ _ _ _ _ (fun (x : α) (s : NonemptyCompacts α) => infDist x s) 1 1
     (fun s => lipschitz_infDist_pt s) lipschitz_infDist_set
 #align metric.lipschitz_inf_dist Metric.lipschitz_infDist
 
+/- warning: metric.uniform_continuous_inf_dist_Hausdorff_dist -> Metric.uniformContinuous_infDist_Hausdorff_dist is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], UniformContinuous.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (Prod.uniformSpace.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toUniformSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (MetricSpace.toPseudoMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Metric.NonemptyCompacts.metricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (HasLiftT.mk.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Set.{u1} α) (SetLike.Set.hasCoeT.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.setLike.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : MetricSpace.{u1} α], UniformContinuous.{u1, 0} (Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) Real (instUniformSpaceProd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toUniformSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (MetricSpace.toPseudoMetricSpace.{u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Metric.NonemptyCompacts.metricSpace.{u1} α _inst_1)))) (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace) (fun (p : Prod.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1))))) => Metric.infDist.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1) (Prod.fst.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p) (SetLike.coe.{u1, u1} (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) α (TopologicalSpace.NonemptyCompacts.instSetLikeNonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) (Prod.snd.{u1, u1} α (TopologicalSpace.NonemptyCompacts.{u1} α (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α (MetricSpace.toPseudoMetricSpace.{u1} α _inst_1)))) p)))
+Case conversion may be inaccurate. Consider using '#align metric.uniform_continuous_inf_dist_Hausdorff_dist Metric.uniformContinuous_infDist_Hausdorff_distₓ'. -/
 theorem uniformContinuous_infDist_Hausdorff_dist :
     UniformContinuous fun p : α × NonemptyCompacts α => infDist p.1 p.2 :=
   lipschitz_infDist.UniformContinuous
Diff
@@ -196,7 +196,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   have : tendsto (fun n => 2 * B n) at_top (𝓝 (2 * 0)) :=
     ENNReal.Tendsto.const_mul
       (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
-  rw [mul_zero] at this
+  rw [MulZeroClass.mul_zero] at this
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b
   exact ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
   exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩
Diff
@@ -40,11 +40,11 @@ namespace Emetric
 
 section
 
-variable {α : Type u} [EmetricSpace α] {s : Set α}
+variable {α : Type u} [EMetricSpace α] {s : Set α}
 
 /-- In emetric spaces, the Hausdorff edistance defines an emetric space structure
 on the type of closed subsets -/
-instance Closeds.emetricSpace : EmetricSpace (Closeds α)
+instance Closeds.emetricSpace : EMetricSpace (Closeds α)
     where
   edist s t := hausdorffEdist (s : Set α) t
   edist_self s := hausdorffEdist_self
@@ -211,10 +211,10 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
         start from a set `s` which is ε-dense in α. Then the subsets of `s`
         are finitely many, and ε-dense for the Hausdorff distance. -/
     refine'
-      isCompact_of_totallyBounded_isClosed (Emetric.totallyBounded_iff.2 fun ε εpos => _)
+      isCompact_of_totallyBounded_isClosed (EMetric.totallyBounded_iff.2 fun ε εpos => _)
         isClosed_univ
     rcases exists_between εpos with ⟨δ, δpos, δlt⟩
-    rcases Emetric.totallyBounded_iff.1
+    rcases EMetric.totallyBounded_iff.1
         (isCompact_iff_totallyBounded_isComplete.1 (@isCompact_univ α _ _)).1 δ δpos with
       ⟨s, fs, hs⟩
     -- s : set α,  fs : s.finite,  hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
@@ -254,7 +254,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
 
 /-- In an emetric space, the type of non-empty compact subsets is an emetric space,
 where the edistance is the Hausdorff edistance -/
-instance NonemptyCompacts.emetricSpace : EmetricSpace (NonemptyCompacts α)
+instance NonemptyCompacts.emetricSpace : EMetricSpace (NonemptyCompacts α)
     where
   edist s t := hausdorffEdist (s : Set α) t
   edist_self s := hausdorffEdist_self
@@ -431,7 +431,7 @@ variable {α : Type u} [MetricSpace α]
 /-- `nonempty_compacts α` inherits a metric space structure, as the Hausdorff
 edistance between two such sets is finite. -/
 instance NonemptyCompacts.metricSpace : MetricSpace (NonemptyCompacts α) :=
-  EmetricSpace.toMetricSpace fun x y =>
+  EMetricSpace.toMetricSpace fun x y =>
     hausdorffEdist_ne_top_of_nonempty_of_bounded x.Nonempty y.Nonempty x.IsCompact.Bounded
       y.IsCompact.Bounded
 #align metric.nonempty_compacts.metric_space Metric.NonemptyCompacts.metricSpace
Diff
@@ -64,11 +64,11 @@ theorem continuous_infEdist_Hausdorff_edist :
     inf_edist x s ≤ inf_edist x t + Hausdorff_edist (t : Set α) s :=
       inf_edist_le_inf_edist_add_Hausdorff_edist
     _ ≤ inf_edist y t + edist x y + Hausdorff_edist (t : Set α) s :=
-      add_le_add_right inf_edist_le_inf_edist_add_edist _
+      (add_le_add_right inf_edist_le_inf_edist_add_edist _)
     _ = inf_edist y t + (edist x y + Hausdorff_edist (s : Set α) t) := by
       rw [add_assoc, Hausdorff_edist_comm]
     _ ≤ inf_edist y t + (edist (x, s) (y, t) + edist (x, s) (y, t)) :=
-      add_le_add_left (add_le_add (le_max_left _ _) (le_max_right _ _)) _
+      (add_le_add_left (add_le_add (le_max_left _ _) (le_max_right _ _)) _)
     _ = inf_edist y t + 2 * edist (x, s) (y, t) := by rw [← mul_two, mul_comm]
     
 #align emetric.continuous_inf_edist_Hausdorff_edist Emetric.continuous_infEdist_Hausdorff_edist
@@ -185,7 +185,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
       ⟨y, hy,
         calc
           edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
-          _ ≤ B n + B n := add_le_add (le_of_lt Dxz) (le_of_lt Dzy)
+          _ ≤ B n + B n := (add_le_add (le_of_lt Dxz) (le_of_lt Dzy))
           _ = 2 * B n := (two_mul _).symm
           ⟩
   -- Deduce from the above inequalities that the distance between `s n` and `t0` is at most `2 B n`.
@@ -202,7 +202,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩
 #align emetric.closeds.complete_space Emetric.Closeds.completeSpace
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (v «expr ⊆ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (v «expr ⊆ » s) -/
 /-- In a compact space, the type of closed subsets is compact. -/
 instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
   ⟨by
@@ -309,7 +309,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
     have : edist x y < ε :=
       calc
         edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
-        _ < ε / 2 + ε / 2 := ENNReal.add_lt_add Dxz Dzy
+        _ < ε / 2 + ε / 2 := (ENNReal.add_lt_add Dxz Dzy)
         _ = ε := ENNReal.add_halves _
         
     exact mem_bUnion hy this
@@ -375,7 +375,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
         exists F z, mem_image_of_mem _ za
         calc
           edist x (F z) ≤ edist x z + edist z (F z) := edist_triangle _ _ _
-          _ < δ / 2 + δ / 2 := ENNReal.add_lt_add Dxz (Fspec z).2
+          _ < δ / 2 + δ / 2 := (ENNReal.add_lt_add Dxz (Fspec z).2)
           _ = δ := ENNReal.add_halves _
           
       -- keep only the points in `b` that are close to point in `t`, yielding a new set `c`
Diff
@@ -30,7 +30,7 @@ always finite in this context.
 
 noncomputable section
 
-open Classical Topology Ennreal
+open Classical Topology ENNReal
 
 universe u
 
@@ -105,8 +105,8 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     completeness, by a standard completeness criterion.
     We use the shorthand `B n = 2^{-n}` in ennreal. -/
   let B : ℕ → ℝ≥0∞ := fun n => 2⁻¹ ^ n
-  have B_pos : ∀ n, (0 : ℝ≥0∞) < B n := by simp [B, Ennreal.pow_pos]
-  have B_ne_top : ∀ n, B n ≠ ⊤ := by simp [B, Ennreal.pow_ne_top]
+  have B_pos : ∀ n, (0 : ℝ≥0∞) < B n := by simp [B, ENNReal.pow_pos]
+  have B_ne_top : ∀ n, B n ≠ ⊤ := by simp [B, ENNReal.pow_ne_top]
   /- Consider a sequence of closed sets `s n` with `edist (s n) (s (n+1)) < B n`.
     We will show that it converges. The limit set is t0 = ⋂n, closure (⋃m≥n, s m).
     We will have to show that a point in `s n` is close to a point in `t0`, and a point
@@ -138,7 +138,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
           refine' exists_edist_lt_of_Hausdorff_edist_lt _ _
           · exact s (n + l)
           · exact z.2
-          simp only [B, Ennreal.inv_pow, div_eq_mul_inv]
+          simp only [B, ENNReal.inv_pow, div_eq_mul_inv]
           rw [← pow_add]
           apply hs <;> simp
         exact ⟨⟨z', z'_mem⟩, le_of_lt hz'⟩
@@ -194,8 +194,8 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   -- from this, the convergence of `s n` to `t0` follows.
   refine' tendsto_at_top.2 fun ε εpos => _
   have : tendsto (fun n => 2 * B n) at_top (𝓝 (2 * 0)) :=
-    Ennreal.Tendsto.const_mul
-      (Ennreal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [Ennreal.one_lt_two]) (Or.inr <| by simp)
+    ENNReal.Tendsto.const_mul
+      (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
   rw [mul_zero] at this
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b
   exact ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
@@ -288,7 +288,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
   rw [this]
   refine' isClosed_of_closure_subset fun s hs => ⟨_, _⟩
   · -- take a set set t which is nonempty and at a finite distance of s
-    rcases mem_closure_iff.1 hs ⊤ Ennreal.coe_lt_top with ⟨t, ht, Dst⟩
+    rcases mem_closure_iff.1 hs ⊤ ENNReal.coe_lt_top with ⟨t, ht, Dst⟩
     rw [edist_comm] at Dst
     -- since `t` is nonempty, so is `s`
     exact nonempty_of_Hausdorff_edist_ne_top ht.1 (ne_of_lt Dst)
@@ -296,10 +296,10 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
     refine' totally_bounded_iff.2 fun ε (εpos : 0 < ε) => _
     -- we have to show that s is covered by finitely many eballs of radius ε
     -- pick a nonempty compact set t at distance at most ε/2 of s
-    rcases mem_closure_iff.1 hs (ε / 2) (Ennreal.half_pos εpos.ne') with ⟨t, ht, Dst⟩
+    rcases mem_closure_iff.1 hs (ε / 2) (ENNReal.half_pos εpos.ne') with ⟨t, ht, Dst⟩
     -- cover this space with finitely many balls of radius ε/2
     rcases totally_bounded_iff.1 (isCompact_iff_totallyBounded_isComplete.1 ht.2).1 (ε / 2)
-        (Ennreal.half_pos εpos.ne') with
+        (ENNReal.half_pos εpos.ne') with
       ⟨u, fu, ut⟩
     refine' ⟨u, ⟨fu, fun x hx => _⟩⟩
     -- u : set α,  fu : u.finite,  ut : t ⊆ ⋃ (y : α) (H : y ∈ u), eball y (ε / 2)
@@ -309,8 +309,8 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
     have : edist x y < ε :=
       calc
         edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
-        _ < ε / 2 + ε / 2 := Ennreal.add_lt_add Dxz Dzy
-        _ = ε := Ennreal.add_halves _
+        _ < ε / 2 + ε / 2 := ENNReal.add_lt_add Dxz Dzy
+        _ = ε := ENNReal.add_halves _
         
     exact mem_bUnion hy this
 #align emetric.nonempty_compacts.is_closed_in_closeds Emetric.NonemptyCompacts.isClosed_in_closeds
@@ -352,7 +352,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
     · refine' fun t => mem_closure_iff.2 fun ε εpos => _
       -- t is a compact nonempty set, that we have to approximate uniformly by a a set in `v`.
       rcases exists_between εpos with ⟨δ, δpos, δlt⟩
-      have δpos' : 0 < δ / 2 := Ennreal.half_pos δpos.ne'
+      have δpos' : 0 < δ / 2 := ENNReal.half_pos δpos.ne'
       -- construct a map F associating to a point in α an approximating point in s, up to δ/2.
       have Exy : ∀ x, ∃ y, y ∈ s ∧ edist x y < δ / 2 :=
         by
@@ -375,8 +375,8 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
         exists F z, mem_image_of_mem _ za
         calc
           edist x (F z) ≤ edist x z + edist z (F z) := edist_triangle _ _ _
-          _ < δ / 2 + δ / 2 := Ennreal.add_lt_add Dxz (Fspec z).2
-          _ = δ := Ennreal.add_halves _
+          _ < δ / 2 + δ / 2 := ENNReal.add_lt_add Dxz (Fspec z).2
+          _ = δ := ENNReal.add_halves _
           
       -- keep only the points in `b` that are close to point in `t`, yielding a new set `c`
       let c := { y ∈ b | ∃ x ∈ t, edist x y < δ }

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -171,7 +171,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
       ⟨y, hy,
         calc
           edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
-          _ ≤ B n + B n := (add_le_add (le_of_lt Dxz) (le_of_lt Dzy))
+          _ ≤ B n + B n := add_le_add (le_of_lt Dxz) (le_of_lt Dzy)
           _ = 2 * B n := (two_mul _).symm
           ⟩
   -- Deduce from the above inequalities that the distance between `s n` and `t0` is at most `2 B n`.
@@ -288,7 +288,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
     have : edist x y < ε :=
       calc
         edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
-        _ < ε / 2 + ε / 2 := (ENNReal.add_lt_add Dxz Dzy)
+        _ < ε / 2 + ε / 2 := ENNReal.add_lt_add Dxz Dzy
         _ = ε := ENNReal.add_halves _
     exact mem_biUnion hy this
 #align emetric.nonempty_compacts.is_closed_in_closeds EMetric.NonemptyCompacts.isClosed_in_closeds
@@ -349,7 +349,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
         exists F z, mem_image_of_mem _ za
         calc
           edist x (F z) ≤ edist x z + edist z (F z) := edist_triangle _ _ _
-          _ < δ / 2 + δ / 2 := (ENNReal.add_lt_add Dxz (Fspec z).2)
+          _ < δ / 2 + δ / 2 := ENNReal.add_lt_add Dxz (Fspec z).2
           _ = δ := ENNReal.add_halves _
       -- keep only the points in `b` that are close to point in `t`, yielding a new set `c`
       let c := { y ∈ b | ∃ x ∈ t, edist x y < δ }
chore: tidy various files (#11490)
Diff
@@ -203,7 +203,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       EMetric.totallyBounded_iff.1
         (isCompact_iff_totallyBounded_isComplete.1 (@isCompact_univ α _ _)).1 δ δpos
     -- we first show that any set is well approximated by a subset of `s`.
-    have main : ∀ u : Set α, ∃ (v : _) (_ : v ⊆ s), hausdorffEdist u v ≤ δ := by
+    have main : ∀ u : Set α, ∃ v ⊆ s, hausdorffEdist u v ≤ δ := by
       intro u
       let v := { x : α | x ∈ s ∧ ∃ y ∈ u, edist x y < δ }
       exists v, (fun x hx => hx.1 : v ⊆ s)
chore: tidy various files (#11135)
Diff
@@ -73,16 +73,13 @@ set_option linter.uppercaseLean3 false in
 /-- Subsets of a given closed subset form a closed set -/
 theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
     IsClosed { t : Closeds α | (t : Set α) ⊆ s } := by
-  refine' isClosed_of_closure_subset fun t ht x hx => _
-  -- t : Closeds α, ht : t ∈ closure {t : Closeds α | t ⊆ s},
-  -- x : α, hx : x ∈ t
-  -- goal : x ∈ s
+  refine isClosed_of_closure_subset fun
+    (t : Closeds α) (ht : t ∈ closure {t : Closeds α | (t : Set α) ⊆ s}) (x : α) (hx : x ∈ t) => ?_
   have : x ∈ closure s := by
     refine' mem_closure_iff.2 fun ε εpos => _
-    rcases mem_closure_iff.1 ht ε εpos with ⟨u, hu, Dtu⟩
-    -- u : Closeds α, hu : u ∈ {t : Closeds α | t ⊆ s}, hu' : edist t u < ε
-    rcases exists_edist_lt_of_hausdorffEdist_lt hx Dtu with ⟨y, hy, Dxy⟩
-    -- y : α, hy : y ∈ u, Dxy : edist x y < ε
+    obtain ⟨u : Closeds α, hu : u ∈ {t : Closeds α | (t : Set α) ⊆ s}, Dtu : edist t u < ε⟩ :=
+      mem_closure_iff.1 ht ε εpos
+    obtain ⟨y : α, hy : y ∈ u, Dxy : edist x y < ε⟩ := exists_edist_lt_of_hausdorffEdist_lt hx Dtu
     exact ⟨y, hu hy, Dxy⟩
   rwa [hs.closure_eq] at this
 #align emetric.is_closed_subsets_of_is_closed EMetric.isClosed_subsets_of_isClosed
@@ -164,14 +161,12 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
             as required. -/
     intro n x xt0
     have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_iInter.1 xt0 n
-    rcases mem_closure_iff.1 this (B n) (B_pos n) with ⟨z, hz, Dxz⟩
-    -- z : α, Dxz : edist x z < B n,
+    obtain ⟨z : α, hz, Dxz : edist x z < B n⟩ := mem_closure_iff.1 this (B n) (B_pos n)
     simp only [exists_prop, Set.mem_iUnion] at hz
-    rcases hz with ⟨m, ⟨m_ge_n, hm⟩⟩
-    -- m : ℕ, m_ge_n : m ≥ n, hm : z ∈ s m
+    obtain ⟨m : ℕ, m_ge_n : m ≥ n, hm : z ∈ (s m : Set α)⟩ := hz
     have : hausdorffEdist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
-    rcases exists_edist_lt_of_hausdorffEdist_lt hm this with ⟨y, hy, Dzy⟩
-    -- y : α, hy : y ∈ s n, Dzy : edist z y < B n
+    obtain ⟨y : α, hy : y ∈ (s n : Set α), Dzy : edist z y < B n⟩ :=
+      exists_edist_lt_of_hausdorffEdist_lt hm this
     exact
       ⟨y, hy,
         calc
@@ -204,10 +199,9 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       isCompact_of_totallyBounded_isClosed (EMetric.totallyBounded_iff.2 fun ε εpos => _)
         isClosed_univ
     rcases exists_between εpos with ⟨δ, δpos, δlt⟩
-    rcases EMetric.totallyBounded_iff.1
-        (isCompact_iff_totallyBounded_isComplete.1 (@isCompact_univ α _ _)).1 δ δpos with
-      ⟨s, fs, hs⟩
-    -- s : Set α, fs : s.Finite, hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
+    obtain ⟨s : Set α, fs : s.Finite, hs : univ ⊆ ⋃ y ∈ s, ball y δ⟩ :=
+      EMetric.totallyBounded_iff.1
+        (isCompact_iff_totallyBounded_isComplete.1 (@isCompact_univ α _ _)).1 δ δpos
     -- we first show that any set is well approximated by a subset of `s`.
     have main : ∀ u : Set α, ∃ (v : _) (_ : v ⊆ s), hausdorffEdist u v ≤ δ := by
       intro u
@@ -311,8 +305,7 @@ instance NonemptyCompacts.completeSpace [CompleteSpace α] : CompleteSpace (None
 the same statement for closed subsets -/
 instance NonemptyCompacts.compactSpace [CompactSpace α] : CompactSpace (NonemptyCompacts α) :=
   ⟨by
-    rw [NonemptyCompacts.ToCloseds.uniformEmbedding.embedding.isCompact_iff]
-    rw [image_univ]
+    rw [NonemptyCompacts.ToCloseds.uniformEmbedding.embedding.isCompact_iff, image_univ]
     exact NonemptyCompacts.isClosed_in_closeds.isCompact⟩
 #align emetric.nonempty_compacts.compact_space EMetric.NonemptyCompacts.compactSpace
 
@@ -345,8 +338,8 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
       have Fspec : ∀ x, F x ∈ s ∧ edist x (F x) < δ / 2 := fun x => (Exy x).choose_spec
       -- cover `t` with finitely many balls. Their centers form a set `a`
       have : TotallyBounded (t : Set α) := t.isCompact.totallyBounded
-      rcases totallyBounded_iff.1 this (δ / 2) δpos' with ⟨a, af, ta⟩
-      -- a : set α, af : a.finite, ta : t ⊆ ⋃ (y : α) (H : y ∈ a), eball y (δ / 2)
+      obtain ⟨a : Set α, af : Set.Finite a, ta : (t : Set α) ⊆ ⋃ y ∈ a, ball y (δ / 2)⟩ :=
+        totallyBounded_iff.1 this (δ / 2) δpos'
       -- replace each center by a nearby approximation in `s`, giving a new set `b`
       let b := F '' a
       have : b.Finite := af.image _
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
@@ -27,11 +27,13 @@ always finite in this context.
 
 noncomputable section
 
-open Classical Topology ENNReal
+open scoped Classical
+open Topology ENNReal
 
 universe u
 
-open Classical Set Function TopologicalSpace Filter
+open scoped Classical
+open Set Function TopologicalSpace Filter
 
 namespace EMetric
 
@@ -131,9 +133,9 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
           rw [← pow_add]
           apply hs <;> simp
         exact ⟨⟨z', z'_mem⟩, le_of_lt hz'⟩
-      use fun k => Nat.recOn k ⟨x, hx⟩ fun l z => choose (this l z)
+      use fun k => Nat.recOn k ⟨x, hx⟩ fun l z => (this l z).choose
       simp only [Nat.add_zero, Nat.zero_eq, Nat.rec_zero, Nat.rec_add_one, true_and]
-      exact fun k => choose_spec (this k _)
+      exact fun k => (this k _).choose_spec
     -- it follows from the previous bound that `z` is a Cauchy sequence
     have : CauchySeq fun k => (z k : α) := cauchySeq_of_edist_le_geometric_two (B n) (B_ne_top n) hz
     -- therefore, it converges
@@ -339,8 +341,8 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
         intro x
         rcases mem_closure_iff.1 (s_dense x) (δ / 2) δpos' with ⟨y, ys, hy⟩
         exact ⟨y, ⟨ys, hy⟩⟩
-      let F x := choose (Exy x)
-      have Fspec : ∀ x, F x ∈ s ∧ edist x (F x) < δ / 2 := fun x => choose_spec (Exy x)
+      let F x := (Exy x).choose
+      have Fspec : ∀ x, F x ∈ s ∧ edist x (F x) < δ / 2 := fun x => (Exy x).choose_spec
       -- cover `t` with finitely many balls. Their centers form a set `a`
       have : TotallyBounded (t : Set α) := t.isCompact.totallyBounded
       rcases totallyBounded_iff.1 this (δ / 2) δpos' with ⟨a, af, ta⟩
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
@@ -98,8 +98,8 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     completeness, by a standard completeness criterion.
     We use the shorthand `B n = 2^{-n}` in ennreal. -/
   let B : ℕ → ℝ≥0∞ := fun n => 2⁻¹ ^ n
-  have B_pos : ∀ n, (0 : ℝ≥0∞) < B n := by simp [ENNReal.pow_pos]
-  have B_ne_top : ∀ n, B n ≠ ⊤ := by simp [ENNReal.pow_ne_top]
+  have B_pos : ∀ n, (0 : ℝ≥0∞) < B n := by simp [B, ENNReal.pow_pos]
+  have B_ne_top : ∀ n, B n ≠ ⊤ := by simp [B, ENNReal.pow_ne_top]
   /- Consider a sequence of closed sets `s n` with `edist (s n) (s (n+1)) < B n`.
     We will show that it converges. The limit set is `t0 = ⋂n, closure (⋃m≥n, s m)`.
     We will have to show that a point in `s n` is close to a point in `t0`, and a point
@@ -226,7 +226,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
     · apply @Finite.of_finite_image _ _ F _
       · apply fs.finite_subsets.subset fun b => _
         exact fun s => (s : Set α)
-        simp only [and_imp, Set.mem_image, Set.mem_setOf_eq, exists_imp]
+        simp only [F, and_imp, Set.mem_image, Set.mem_setOf_eq, exists_imp]
         intro _ x hx hx'
         rwa [hx'] at hx
       · exact SetLike.coe_injective.injOn F
@@ -363,7 +363,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
       have tc : ∀ x ∈ t, ∃ y ∈ c, edist x y ≤ δ := by
         intro x hx
         rcases tb x hx with ⟨y, yv, Dxy⟩
-        have : y ∈ c := by simp [-mem_image]; exact ⟨yv, ⟨x, hx, Dxy⟩⟩
+        have : y ∈ c := by simp [c, -mem_image]; exact ⟨yv, ⟨x, hx, Dxy⟩⟩
         exact ⟨y, this, le_of_lt Dxy⟩
       -- points in `c` are well approximated by points in `t`
       have ct : ∀ y ∈ c, ∃ x ∈ t, edist y x ≤ δ := by
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
@@ -183,8 +183,8 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   -- from this, the convergence of `s n` to `t0` follows.
   refine' tendsto_atTop.2 fun ε εpos => _
   have : Tendsto (fun n => 2 * B n) atTop (𝓝 (2 * 0)) :=
-    ENNReal.Tendsto.const_mul
-      (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
+    ENNReal.Tendsto.const_mul (ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one <|
+      by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
   rw [mul_zero] at this
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b :=
     ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
chore: missing spaces after rcases, convert and congrm (#7725)

Replace rcases( with rcases (. Same thing for convert( and congrm(. No other change.

Diff
@@ -382,7 +382,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
       let d : NonemptyCompacts α := ⟨⟨c, ‹c.Finite›.isCompact⟩, hc⟩
       have : c ⊆ s := by
         intro x hx
-        rcases(mem_image _ _ _).1 hx.1 with ⟨y, ⟨_, yx⟩⟩
+        rcases (mem_image _ _ _).1 hx.1 with ⟨y, ⟨_, yx⟩⟩
         rw [← yx]
         exact (Fspec y).1
       have : d ∈ v := ⟨‹c.Finite›, this⟩
feat: sigma-compact sets (#7576)

Define sigma-compact subsets of a topological space and show their basic properties.

  • compact sets are sigma-compact
  • countable unions of (sigma-)compact sets are sigma-compact
  • closed subsets of sigma-compact sets are sigma-compact.

Relate them to sigma-compact space: a set is sigma-compact iff it is a sigma-compact space (w.r.t. the subspace topology).

In a later PR, we'll show that sigma-compact measure zero sets are nowhere dense.

Co-authored-by: David Loeffler <d.loeffler.01@cantab.net> Co-authored-by: grunweg <grunweg@posteo.de>

Diff
@@ -309,7 +309,7 @@ instance NonemptyCompacts.completeSpace [CompleteSpace α] : CompleteSpace (None
 the same statement for closed subsets -/
 instance NonemptyCompacts.compactSpace [CompactSpace α] : CompactSpace (NonemptyCompacts α) :=
   ⟨by
-    rw [NonemptyCompacts.ToCloseds.uniformEmbedding.embedding.isCompact_iff_isCompact_image]
+    rw [NonemptyCompacts.ToCloseds.uniformEmbedding.embedding.isCompact_iff]
     rw [image_univ]
     exact NonemptyCompacts.isClosed_in_closeds.isCompact⟩
 #align emetric.nonempty_compacts.compact_space EMetric.NonemptyCompacts.compactSpace
refactor(Topology/MetricSpace): remove Metric.Bounded (#7240)

Use Bornology.IsBounded instead.

Diff
@@ -407,8 +407,8 @@ variable {α : Type u} [MetricSpace α]
 edistance between two such sets is finite. -/
 instance NonemptyCompacts.metricSpace : MetricSpace (NonemptyCompacts α) :=
   EMetricSpace.toMetricSpace fun x y =>
-    hausdorffEdist_ne_top_of_nonempty_of_bounded x.nonempty y.nonempty x.isCompact.bounded
-      y.isCompact.bounded
+    hausdorffEdist_ne_top_of_nonempty_of_bounded x.nonempty y.nonempty x.isCompact.isBounded
+      y.isCompact.isBounded
 #align metric.nonempty_compacts.metric_space Metric.NonemptyCompacts.metricSpace
 
 /-- The distance on `NonemptyCompacts α` is the Hausdorff distance, by construction -/
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -185,7 +185,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
   have : Tendsto (fun n => 2 * B n) atTop (𝓝 (2 * 0)) :=
     ENNReal.Tendsto.const_mul
       (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
-  rw [MulZeroClass.mul_zero] at this
+  rw [mul_zero] at this
   obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b :=
     ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
   exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩
chore: fix grammar mistakes (#6121)
Diff
@@ -270,7 +270,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
     exact ⟨s.nonempty, s.isCompact⟩
   rw [this]
   refine' isClosed_of_closure_subset fun s hs => ⟨_, _⟩
-  · -- take a set set t which is nonempty and at a finite distance of s
+  · -- take a set t which is nonempty and at a finite distance of s
     rcases mem_closure_iff.1 hs ⊤ ENNReal.coe_lt_top with ⟨t, ht, Dst⟩
     rw [edist_comm] at Dst
     -- since `t` is nonempty, so is `s`
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,16 +2,13 @@
 Copyright (c) 2019 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.closeds
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.SpecificLimits.Basic
 import Mathlib.Topology.MetricSpace.HausdorffDistance
 import Mathlib.Topology.Sets.Compacts
 
+#align_import topology.metric_space.closeds from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
 /-!
 # Closed subsets
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -75,15 +75,15 @@ set_option linter.uppercaseLean3 false in
 theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
     IsClosed { t : Closeds α | (t : Set α) ⊆ s } := by
   refine' isClosed_of_closure_subset fun t ht x hx => _
-  -- t : Closeds α,  ht : t ∈ closure {t : Closeds α | t ⊆ s},
-  -- x : α,  hx : x ∈ t
+  -- t : Closeds α, ht : t ∈ closure {t : Closeds α | t ⊆ s},
+  -- x : α, hx : x ∈ t
   -- goal : x ∈ s
   have : x ∈ closure s := by
     refine' mem_closure_iff.2 fun ε εpos => _
     rcases mem_closure_iff.1 ht ε εpos with ⟨u, hu, Dtu⟩
-    -- u : Closeds α,  hu : u ∈ {t : Closeds α | t ⊆ s},  hu' : edist t u < ε
+    -- u : Closeds α, hu : u ∈ {t : Closeds α | t ⊆ s}, hu' : edist t u < ε
     rcases exists_edist_lt_of_hausdorffEdist_lt hx Dtu with ⟨y, hy, Dxy⟩
-    -- y : α,  hy : y ∈ u, Dxy : edist x y < ε
+    -- y : α, hy : y ∈ u, Dxy : edist x y < ε
     exact ⟨y, hu hy, Dxy⟩
   rwa [hs.closure_eq] at this
 #align emetric.is_closed_subsets_of_is_closed EMetric.isClosed_subsets_of_isClosed
@@ -166,13 +166,13 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     intro n x xt0
     have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_iInter.1 xt0 n
     rcases mem_closure_iff.1 this (B n) (B_pos n) with ⟨z, hz, Dxz⟩
-    -- z : α,  Dxz : edist x z < B n,
+    -- z : α, Dxz : edist x z < B n,
     simp only [exists_prop, Set.mem_iUnion] at hz
     rcases hz with ⟨m, ⟨m_ge_n, hm⟩⟩
     -- m : ℕ, m_ge_n : m ≥ n, hm : z ∈ s m
     have : hausdorffEdist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
     rcases exists_edist_lt_of_hausdorffEdist_lt hm this with ⟨y, hy, Dzy⟩
-    -- y : α,  hy : y ∈ s n,  Dzy : edist z y < B n
+    -- y : α, hy : y ∈ s n, Dzy : edist z y < B n
     exact
       ⟨y, hy,
         calc
@@ -208,7 +208,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
     rcases EMetric.totallyBounded_iff.1
         (isCompact_iff_totallyBounded_isComplete.1 (@isCompact_univ α _ _)).1 δ δpos with
       ⟨s, fs, hs⟩
-    -- s : Set α,  fs : s.Finite,  hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
+    -- s : Set α, fs : s.Finite, hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
     -- we first show that any set is well approximated by a subset of `s`.
     have main : ∀ u : Set α, ∃ (v : _) (_ : v ⊆ s), hausdorffEdist u v ≤ δ := by
       intro u
@@ -288,7 +288,7 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
         (ENNReal.half_pos εpos.ne') with
       ⟨u, fu, ut⟩
     refine' ⟨u, ⟨fu, fun x hx => _⟩⟩
-    -- u : set α,  fu : u.finite,  ut : t ⊆ ⋃ (y : α) (H : y ∈ u), eball y (ε / 2)
+    -- u : set α, fu : u.finite, ut : t ⊆ ⋃ (y : α) (H : y ∈ u), eball y (ε / 2)
     -- then s is covered by the union of the balls centered at u of radius ε
     rcases exists_edist_lt_of_hausdorffEdist_lt hx Dst with ⟨z, hz, Dxz⟩
     rcases mem_iUnion₂.1 (ut hz) with ⟨y, hy, Dzy⟩
@@ -347,7 +347,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
       -- cover `t` with finitely many balls. Their centers form a set `a`
       have : TotallyBounded (t : Set α) := t.isCompact.totallyBounded
       rcases totallyBounded_iff.1 this (δ / 2) δpos' with ⟨a, af, ta⟩
-      -- a : set α,  af : a.finite,  ta : t ⊆ ⋃ (y : α) (H : y ∈ a), eball y (δ / 2)
+      -- a : set α, af : a.finite, ta : t ⊆ ⋃ (y : α) (H : y ∈ a), eball y (δ / 2)
       -- replace each center by a nearby approximation in `s`, giving a new set `b`
       let b := F '' a
       have : b.Finite := af.image _
chore: formatting issues (#4947)

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -210,7 +210,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       ⟨s, fs, hs⟩
     -- s : Set α,  fs : s.Finite,  hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
     -- we first show that any set is well approximated by a subset of `s`.
-    have main : ∀ u : Set α, ∃ (v : _)(_ : v ⊆ s), hausdorffEdist u v ≤ δ := by
+    have main : ∀ u : Set α, ∃ (v : _) (_ : v ⊆ s), hausdorffEdist u v ≤ δ := by
       intro u
       let v := { x : α | x ∈ s ∧ ∃ y ∈ u, edist x y < δ }
       exists v, (fun x hx => hx.1 : v ⊆ s)
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
@@ -110,7 +110,7 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     standard criterion. -/
   refine' complete_of_convergent_controlled_sequences B B_pos fun s hs => _
   let t0 := ⋂ n, closure (⋃ m ≥ n, s m : Set α)
-  let t : Closeds α := ⟨t0, isClosed_interᵢ fun _ => isClosed_closure⟩
+  let t : Closeds α := ⟨t0, isClosed_iInter fun _ => isClosed_closure⟩
   use t
   -- The inequality is written this way to agree with `edist_le_of_edist_le_geometric_of_tendsto₀`
   have I1 : ∀ n, ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n := by
@@ -145,11 +145,11 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     -- the limit point `y` will be the desired point, in `t0` and close to our initial point `x`.
     -- First, we check it belongs to `t0`.
     have : y ∈ t0 :=
-      mem_interᵢ.2 fun k =>
+      mem_iInter.2 fun k =>
         mem_closure_of_tendsto y_lim
           (by
-            simp only [exists_prop, Set.mem_unionᵢ, Filter.eventually_atTop, Set.mem_preimage,
-              Set.preimage_unionᵢ]
+            simp only [exists_prop, Set.mem_iUnion, Filter.eventually_atTop, Set.mem_preimage,
+              Set.preimage_iUnion]
             exact ⟨k, fun m hm => ⟨n + m, zero_add k ▸ add_le_add (zero_le n) hm, (z m).2⟩⟩)
     use this
     -- Then, we check that `y` is close to `x = z n`. This follows from the fact that `y`
@@ -164,10 +164,10 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
             `s n` are close, this point is itself well approximated by a point `y` in `s n`,
             as required. -/
     intro n x xt0
-    have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_interᵢ.1 xt0 n
+    have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_iInter.1 xt0 n
     rcases mem_closure_iff.1 this (B n) (B_pos n) with ⟨z, hz, Dxz⟩
     -- z : α,  Dxz : edist x z < B n,
-    simp only [exists_prop, Set.mem_unionᵢ] at hz
+    simp only [exists_prop, Set.mem_iUnion] at hz
     rcases hz with ⟨m, ⟨m_ge_n, hm⟩⟩
     -- m : ℕ, m_ge_n : m ≥ n, hm : z ∈ s m
     have : hausdorffEdist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
@@ -217,7 +217,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       refine' hausdorffEdist_le_of_mem_edist _ _
       · intro x hx
         have : x ∈ ⋃ y ∈ s, ball y δ := hs (by simp)
-        rcases mem_unionᵢ₂.1 this with ⟨y, ys, dy⟩
+        rcases mem_iUnion₂.1 this with ⟨y, ys, dy⟩
         have : edist y x < δ := by simp at dy; rwa [edist_comm] at dy
         exact ⟨y, ⟨ys, ⟨x, hx, this⟩⟩, le_of_lt dy⟩
       · rintro x ⟨_, ⟨y, yu, hy⟩⟩
@@ -239,7 +239,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
       let t : Closeds α := ⟨t0, this⟩
       have : t ∈ F := t0s
       have : edist u t < ε := lt_of_le_of_lt Dut0 δlt
-      apply mem_unionᵢ₂.2
+      apply mem_iUnion₂.2
       exact ⟨t, ‹t ∈ F›, this⟩⟩
 #align emetric.closeds.compact_space EMetric.Closeds.compactSpace
 
@@ -291,13 +291,13 @@ theorem NonemptyCompacts.isClosed_in_closeds [CompleteSpace α] :
     -- u : set α,  fu : u.finite,  ut : t ⊆ ⋃ (y : α) (H : y ∈ u), eball y (ε / 2)
     -- then s is covered by the union of the balls centered at u of radius ε
     rcases exists_edist_lt_of_hausdorffEdist_lt hx Dst with ⟨z, hz, Dxz⟩
-    rcases mem_unionᵢ₂.1 (ut hz) with ⟨y, hy, Dzy⟩
+    rcases mem_iUnion₂.1 (ut hz) with ⟨y, hy, Dzy⟩
     have : edist x y < ε :=
       calc
         edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
         _ < ε / 2 + ε / 2 := (ENNReal.add_lt_add Dxz Dzy)
         _ = ε := ENNReal.add_halves _
-    exact mem_bunionᵢ hy this
+    exact mem_biUnion hy this
 #align emetric.nonempty_compacts.is_closed_in_closeds EMetric.NonemptyCompacts.isClosed_in_closeds
 
 /-- In a complete space, the type of nonempty compact subsets is complete. This follows
@@ -353,7 +353,7 @@ instance NonemptyCompacts.secondCountableTopology [SecondCountableTopology α] :
       have : b.Finite := af.image _
       have tb : ∀ x ∈ t, ∃ y ∈ b, edist x y < δ := by
         intro x hx
-        rcases mem_unionᵢ₂.1 (ta hx) with ⟨z, za, Dxz⟩
+        rcases mem_iUnion₂.1 (ta hx) with ⟨z, za, Dxz⟩
         exists F z, mem_image_of_mem _ za
         calc
           edist x (F z) ≤ edist x z + edist z (F z) := edist_triangle _ _ _
chore: tidy various files (#3606)
Diff
@@ -75,13 +75,13 @@ set_option linter.uppercaseLean3 false in
 theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
     IsClosed { t : Closeds α | (t : Set α) ⊆ s } := by
   refine' isClosed_of_closure_subset fun t ht x hx => _
-  -- t : closeds α,  ht : t ∈ closure {t : closeds α | t ⊆ s},
+  -- t : Closeds α,  ht : t ∈ closure {t : Closeds α | t ⊆ s},
   -- x : α,  hx : x ∈ t
   -- goal : x ∈ s
   have : x ∈ closure s := by
     refine' mem_closure_iff.2 fun ε εpos => _
     rcases mem_closure_iff.1 ht ε εpos with ⟨u, hu, Dtu⟩
-    -- u : closeds α,  hu : u ∈ {t : closeds α | t ⊆ s},  hu' : edist t u < ε
+    -- u : Closeds α,  hu : u ∈ {t : Closeds α | t ⊆ s},  hu' : edist t u < ε
     rcases exists_edist_lt_of_hausdorffEdist_lt hx Dtu with ⟨y, hy, Dxy⟩
     -- y : α,  hy : y ∈ u, Dxy : edist x y < ε
     exact ⟨y, hu hy, Dxy⟩
@@ -189,8 +189,8 @@ instance Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) :
     ENNReal.Tendsto.const_mul
       (ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1 <| by simp [ENNReal.one_lt_two]) (Or.inr <| by simp)
   rw [MulZeroClass.mul_zero] at this
-  obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b
-  exact ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
+  obtain ⟨N, hN⟩ : ∃ N, ∀ b ≥ N, ε > 2 * B b :=
+    ((tendsto_order.1 this).2 ε εpos).exists_forall_of_atTop
   exact ⟨N, fun n hn => lt_of_le_of_lt (main n) (hN n hn)⟩
 #align emetric.closeds.complete_space EMetric.Closeds.completeSpace
 
@@ -208,7 +208,7 @@ instance Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
     rcases EMetric.totallyBounded_iff.1
         (isCompact_iff_totallyBounded_isComplete.1 (@isCompact_univ α _ _)).1 δ δpos with
       ⟨s, fs, hs⟩
-    -- s : set α,  fs : s.finite,  hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
+    -- s : Set α,  fs : s.Finite,  hs : univ ⊆ ⋃ (y : α) (H : y ∈ s), eball y δ
     -- we first show that any set is well approximated by a subset of `s`.
     have main : ∀ u : Set α, ∃ (v : _)(_ : v ⊆ s), hausdorffEdist u v ≤ δ := by
       intro u
@@ -431,7 +431,7 @@ theorem lipschitz_infDist : LipschitzWith 2 fun p : α × NonemptyCompacts α =>
   convert @LipschitzWith.uncurry α (NonemptyCompacts α) ℝ _ _ _
     (fun (x : α) (s : NonemptyCompacts α) => infDist x s) 1 1
     (fun s => lipschitz_infDist_pt ↑s) lipschitz_infDist_set
-  norm_cast
+  norm_num
 #align metric.lipschitz_inf_dist Metric.lipschitz_infDist
 
 theorem uniformContinuous_infDist_Hausdorff_dist :
feat: port Topology.MetricSpace.Closeds (#3338)

Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: int-y1 <jason_yuen2007@hotmail.com>

Dependencies 10 + 606

607 files ported (98.4%)
265770 lines ported (98.0%)
Show graph

The unported dependencies are

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