topology.urysohns_lemmaMathlib.Topology.UrysohnsLemma

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
@@ -331,7 +331,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
     exact Real.dist_le_of_mem_Icc_01 (c.lim_mem_Icc _) (c.lim_mem_Icc _)
   · by_cases hxl : x ∈ c.left.U
     · filter_upwards [IsOpen.mem_nhds c.left.open_U hxl, ihn c.left] with _ hyl hyd
-      rw [pow_succ, c.lim_eq_midpoint, c.lim_eq_midpoint,
+      rw [pow_succ', c.lim_eq_midpoint, c.lim_eq_midpoint,
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hyl),
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hxl)]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
@@ -342,7 +342,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
         ihn c.left.right, ihn c.right] with y hyl hydl hydr
       replace hxl : x ∉ c.left.left.U; exact compl_subset_compl.2 c.left.left_U_subset_right_C hxl
       replace hyl : y ∉ c.left.left.U; exact compl_subset_compl.2 c.left.left_U_subset_right_C hyl
-      simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint,
+      simp only [pow_succ', c.lim_eq_midpoint, c.left.lim_eq_midpoint,
         c.left.left.lim_of_nmem_U _ hxl, c.left.left.lim_of_nmem_U _ hyl]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
       refine'
Diff
@@ -346,12 +346,12 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
         c.left.left.lim_of_nmem_U _ hxl, c.left.left.lim_of_nmem_U _ hyl]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
       refine'
-        (div_le_div_of_le_of_nonneg (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _)
+        (div_le_div_of_nonneg_right (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _)
               zero_le_two).trans
           _
       rw [dist_self, zero_add]
       refine'
-        (div_le_div_of_le_of_nonneg (add_le_add (div_le_div_of_le_of_nonneg hydl zero_le_two) hydr)
+        (div_le_div_of_nonneg_right (add_le_add (div_le_div_of_nonneg_right hydl zero_le_two) hydr)
               zero_le_two).trans_eq
           _
       generalize (3 / 4 : ℝ) ^ n = r
Diff
@@ -365,7 +365,7 @@ end Urysohns
 
 variable [NormalSpace X]
 
-#print exists_continuous_zero_one_of_closed /-
+#print exists_continuous_zero_one_of_isClosed /-
 /-- Urysohns lemma: if `s` and `t` are two disjoint closed sets in a normal topological space `X`,
 then there exists a continuous function `f : X → ℝ` such that
 
@@ -373,7 +373,7 @@ then there exists a continuous function `f : X → ℝ` such that
 * `f` equals one on `t`;
 * `0 ≤ f x ≤ 1` for all `x`.
 -/
-theorem exists_continuous_zero_one_of_closed {s t : Set X} (hs : IsClosed s) (ht : IsClosed t)
+theorem exists_continuous_zero_one_of_isClosed {s t : Set X} (hs : IsClosed s) (ht : IsClosed t)
     (hd : Disjoint s t) : ∃ f : C(X, ℝ), EqOn f 0 s ∧ EqOn f 1 t ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 :=
   by
   -- The actual proof is in the code above. Here we just repack it into the expected format.
@@ -381,6 +381,6 @@ theorem exists_continuous_zero_one_of_closed {s t : Set X} (hs : IsClosed s) (ht
   exact
     ⟨⟨c.lim, c.continuous_lim⟩, c.lim_of_mem_C, fun x hx => c.lim_of_nmem_U _ fun h => h hx,
       c.lim_mem_Icc⟩
-#align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_closed
+#align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_isClosed
 -/
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
 -/
-import Mathbin.Analysis.NormedSpace.AddTorsor
-import Mathbin.LinearAlgebra.AffineSpace.Ordered
-import Mathbin.Topology.ContinuousFunction.Basic
+import Analysis.NormedSpace.AddTorsor
+import LinearAlgebra.AffineSpace.Ordered
+import Topology.ContinuousFunction.Basic
 
 #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"8eb9c42d4d34c77f6ee84ea766ae4070233a973c"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module topology.urysohns_lemma
-! leanprover-community/mathlib commit 8eb9c42d4d34c77f6ee84ea766ae4070233a973c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.NormedSpace.AddTorsor
 import Mathbin.LinearAlgebra.AffineSpace.Ordered
 import Mathbin.Topology.ContinuousFunction.Basic
 
+#align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"8eb9c42d4d34c77f6ee84ea766ae4070233a973c"
+
 /-!
 # Urysohn's lemma
 
Diff
@@ -158,6 +158,7 @@ noncomputable def approx : ℕ → CU X → X → ℝ
 #align urysohns.CU.approx Urysohns.CU.approx
 -/
 
+#print Urysohns.CU.approx_of_mem_C /-
 theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 :=
   by
   induction' n with n ihn generalizing c
@@ -166,7 +167,9 @@ theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx
     rw [ihn, ihn, midpoint_self]
     exacts [c.subset_right_C hx, hx]
 #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C
+-/
 
+#print Urysohns.CU.approx_of_nmem_U /-
 theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.approx n x = 1 :=
   by
   induction' n with n ihn generalizing c
@@ -175,7 +178,9 @@ theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.appro
     rw [ihn, ihn, midpoint_self]
     exacts [hx, fun hU => hx <| c.left_U_subset hU]
 #align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U
+-/
 
+#print Urysohns.CU.approx_nonneg /-
 theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x :=
   by
   induction' n with n ihn generalizing c
@@ -183,7 +188,9 @@ theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x :=
   · simp only [approx, midpoint_eq_smul_add, invOf_eq_inv]
     refine' mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg _ _) <;> apply ihn
 #align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonneg
+-/
 
+#print Urysohns.CU.approx_le_one /-
 theorem approx_le_one (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ 1 :=
   by
   induction' n with n ihn generalizing c
@@ -191,6 +198,7 @@ theorem approx_le_one (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ 1 :=
   · simp only [approx, midpoint_eq_smul_add, invOf_eq_inv, smul_eq_mul, ← div_eq_inv_mul]
     refine' Iff.mpr (div_le_one zero_lt_two) (add_le_add _ _) <;> apply ihn
 #align urysohns.CU.approx_le_one Urysohns.CU.approx_le_one
+-/
 
 #print Urysohns.CU.bddAbove_range_approx /-
 theorem bddAbove_range_approx (c : CU X) (x : X) : BddAbove (range fun n => c.approx n x) :=
@@ -198,6 +206,7 @@ theorem bddAbove_range_approx (c : CU X) (x : X) : BddAbove (range fun n => c.ap
 #align urysohns.CU.bdd_above_range_approx Urysohns.CU.bddAbove_range_approx
 -/
 
+#print Urysohns.CU.approx_le_approx_of_U_sub_C /-
 theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
     c₂.approx n₂ x ≤ c₁.approx n₁ x :=
   by
@@ -211,6 +220,7 @@ theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (
       approx n₂ c₂ x ≤ 1 := approx_le_one _ _ _
       _ = approx n₁ c₁ x := (approx_of_nmem_U _ _ hx).symm
 #align urysohns.CU.approx_le_approx_of_U_sub_C Urysohns.CU.approx_le_approx_of_U_sub_C
+-/
 
 #print Urysohns.CU.approx_mem_Icc_right_left /-
 theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
@@ -229,6 +239,7 @@ theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
 #align urysohns.CU.approx_mem_Icc_right_left Urysohns.CU.approx_mem_Icc_right_left
 -/
 
+#print Urysohns.CU.approx_le_succ /-
 theorem approx_le_succ (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ c.approx (n + 1) x :=
   by
   induction' n with n ihn generalizing c
@@ -237,6 +248,7 @@ theorem approx_le_succ (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ c.approx
   · rw [approx, approx]
     exact midpoint_le_midpoint (ihn _) (ihn _)
 #align urysohns.CU.approx_le_succ Urysohns.CU.approx_le_succ
+-/
 
 #print Urysohns.CU.approx_mono /-
 theorem approx_mono (c : CU X) (x : X) : Monotone fun n => c.approx n x :=
@@ -262,36 +274,50 @@ theorem tendsto_approx_atTop (c : CU X) (x : X) :
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
 -/
 
+#print Urysohns.CU.lim_of_mem_C /-
 theorem lim_of_mem_C (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
   simp only [CU.lim, approx_of_mem_C, h, ciSup_const]
 #align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_C
+-/
 
+#print Urysohns.CU.lim_of_nmem_U /-
 theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
   simp only [CU.lim, approx_of_nmem_U c _ h, ciSup_const]
 #align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_U
+-/
 
+#print Urysohns.CU.lim_eq_midpoint /-
 theorem lim_eq_midpoint (c : CU X) (x : X) : c.lim x = midpoint ℝ (c.left.lim x) (c.right.lim x) :=
   by
   refine' tendsto_nhds_unique (c.tendsto_approx_at_top x) ((tendsto_add_at_top_iff_nat 1).1 _)
   simp only [approx]
   exact (c.left.tendsto_approx_at_top x).midpoint (c.right.tendsto_approx_at_top x)
 #align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpoint
+-/
 
+#print Urysohns.CU.approx_le_lim /-
 theorem approx_le_lim (c : CU X) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x :=
   le_ciSup (c.bddAbove_range_approx x) _
 #align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_lim
+-/
 
+#print Urysohns.CU.lim_nonneg /-
 theorem lim_nonneg (c : CU X) (x : X) : 0 ≤ c.lim x :=
   (c.approx_nonneg 0 x).trans (c.approx_le_lim x 0)
 #align urysohns.CU.lim_nonneg Urysohns.CU.lim_nonneg
+-/
 
+#print Urysohns.CU.lim_le_one /-
 theorem lim_le_one (c : CU X) (x : X) : c.lim x ≤ 1 :=
   ciSup_le fun n => c.approx_le_one _ _
 #align urysohns.CU.lim_le_one Urysohns.CU.lim_le_one
+-/
 
+#print Urysohns.CU.lim_mem_Icc /-
 theorem lim_mem_Icc (c : CU X) (x : X) : c.lim x ∈ Icc (0 : ℝ) 1 :=
   ⟨c.lim_nonneg x, c.lim_le_one x⟩
 #align urysohns.CU.lim_mem_Icc Urysohns.CU.lim_mem_Icc
+-/
 
 #print Urysohns.CU.continuous_lim /-
 /-- Continuity of `urysohns.CU.lim`. See module docstring for a sketch of the proofs. -/
@@ -342,6 +368,7 @@ end Urysohns
 
 variable [NormalSpace X]
 
+#print exists_continuous_zero_one_of_closed /-
 /-- Urysohns lemma: if `s` and `t` are two disjoint closed sets in a normal topological space `X`,
 then there exists a continuous function `f : X → ℝ` such that
 
@@ -358,4 +385,5 @@ theorem exists_continuous_zero_one_of_closed {s t : Set X} (hs : IsClosed s) (ht
     ⟨⟨c.lim, c.continuous_lim⟩, c.lim_of_mem_C, fun x hx => c.lim_of_nmem_U _ fun h => h hx,
       c.lim_mem_Icc⟩
 #align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_closed
+-/
 
Diff
@@ -206,12 +206,10 @@ theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (
     calc
       approx n₂ c₂ x = 0 := approx_of_mem_C _ _ (h hx)
       _ ≤ approx n₁ c₁ x := approx_nonneg _ _ _
-      
   ·
     calc
       approx n₂ c₂ x ≤ 1 := approx_le_one _ _ _
       _ = approx n₁ c₁ x := (approx_of_nmem_U _ _ hx).symm
-      
 #align urysohns.CU.approx_le_approx_of_U_sub_C Urysohns.CU.approx_le_approx_of_U_sub_C
 
 #print Urysohns.CU.approx_mem_Icc_right_left /-
Diff
@@ -309,7 +309,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
     rw [pow_zero]
     exact Real.dist_le_of_mem_Icc_01 (c.lim_mem_Icc _) (c.lim_mem_Icc _)
   · by_cases hxl : x ∈ c.left.U
-    · filter_upwards [IsOpen.mem_nhds c.left.open_U hxl, ihn c.left]with _ hyl hyd
+    · filter_upwards [IsOpen.mem_nhds c.left.open_U hxl, ihn c.left] with _ hyl hyd
       rw [pow_succ, c.lim_eq_midpoint, c.lim_eq_midpoint,
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hyl),
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hxl)]
@@ -318,7 +318,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
       exact mul_le_mul h1234.le hyd dist_nonneg (h0.trans h1234).le
     · replace hxl : x ∈ c.left.right.Cᶜ; exact compl_subset_compl.2 c.left.right.subset hxl
       filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl,
-        ihn c.left.right, ihn c.right]with y hyl hydl hydr
+        ihn c.left.right, ihn c.right] with y hyl hydl hydr
       replace hxl : x ∉ c.left.left.U; exact compl_subset_compl.2 c.left.left_U_subset_right_C hxl
       replace hyl : y ∉ c.left.left.U; exact compl_subset_compl.2 c.left.left_U_subset_right_C hyl
       simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint,
Diff
@@ -164,7 +164,7 @@ theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx
   · exact indicator_of_not_mem (fun hU => hU <| c.subset hx) _
   · simp only [approx]
     rw [ihn, ihn, midpoint_self]
-    exacts[c.subset_right_C hx, hx]
+    exacts [c.subset_right_C hx, hx]
 #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C
 
 theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.approx n x = 1 :=
@@ -173,7 +173,7 @@ theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.appro
   · exact indicator_of_mem hx _
   · simp only [approx]
     rw [ihn, ihn, midpoint_self]
-    exacts[hx, fun hU => hx <| c.left_U_subset hU]
+    exacts [hx, fun hU => hx <| c.left_U_subset hU]
 #align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U
 
 theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x :=
@@ -227,7 +227,7 @@ theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
   · simp only [approx, mem_Icc]
     refine' ⟨midpoint_le_midpoint _ (ihn _).1, midpoint_le_midpoint (ihn _).2 _⟩ <;>
       apply approx_le_approx_of_U_sub_C
-    exacts[subset_closure, subset_closure]
+    exacts [subset_closure, subset_closure]
 #align urysohns.CU.approx_mem_Icc_right_left Urysohns.CU.approx_mem_Icc_right_left
 -/
 
@@ -334,7 +334,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
               zero_le_two).trans_eq
           _
       generalize (3 / 4 : ℝ) ^ n = r
-      field_simp [two_ne_zero' ℝ] ; ring
+      field_simp [two_ne_zero' ℝ]; ring
 #align urysohns.CU.continuous_lim Urysohns.CU.continuous_lim
 -/
 
Diff
@@ -81,7 +81,7 @@ variable {X : Type _} [TopologicalSpace X]
 
 open Set Filter TopologicalSpace
 
-open Topology Filter
+open scoped Topology Filter
 
 namespace Urysohns
 
Diff
@@ -158,12 +158,6 @@ noncomputable def approx : ℕ → CU X → X → ℝ
 #align urysohns.CU.approx Urysohns.CU.approx
 -/
 
-/- warning: urysohns.CU.approx_of_mem_C -> Urysohns.CU.approx_of_mem_C is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.c.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.C.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_Cₓ'. -/
 theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 :=
   by
   induction' n with n ihn generalizing c
@@ -173,12 +167,6 @@ theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx
     exacts[c.subset_right_C hx, hx]
 #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C
 
-/- warning: urysohns.CU.approx_of_nmem_U -> Urysohns.CU.approx_of_nmem_U is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Not (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.u.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Not (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.U.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_Uₓ'. -/
 theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.approx n x = 1 :=
   by
   induction' n with n ihn generalizing c
@@ -188,12 +176,6 @@ theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.appro
     exacts[hx, fun hU => hx <| c.left_U_subset hU]
 #align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U
 
-/- warning: urysohns.CU.approx_nonneg -> Urysohns.CU.approx_nonneg is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x)
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x)
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonnegₓ'. -/
 theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x :=
   by
   induction' n with n ihn generalizing c
@@ -202,12 +184,6 @@ theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x :=
     refine' mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg _ _) <;> apply ihn
 #align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonneg
 
-/- warning: urysohns.CU.approx_le_one -> Urysohns.CU.approx_le_one is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_one Urysohns.CU.approx_le_oneₓ'. -/
 theorem approx_le_one (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ 1 :=
   by
   induction' n with n ihn generalizing c
@@ -222,12 +198,6 @@ theorem bddAbove_range_approx (c : CU X) (x : X) : BddAbove (range fun n => c.ap
 #align urysohns.CU.bdd_above_range_approx Urysohns.CU.bddAbove_range_approx
 -/
 
-/- warning: urysohns.CU.approx_le_approx_of_U_sub_C -> Urysohns.CU.approx_le_approx_of_U_sub_C is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {c₁ : Urysohns.CU.{u1} X _inst_1} {c₂ : Urysohns.CU.{u1} X _inst_1}, (HasSubset.Subset.{u1} (Set.{u1} X) (Set.hasSubset.{u1} X) (Urysohns.CU.u.{u1} X _inst_1 c₁) (Urysohns.CU.c.{u1} X _inst_1 c₂)) -> (forall (n₁ : Nat) (n₂ : Nat) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₂ c₂ x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₁ c₁ x))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {c₁ : Urysohns.CU.{u1} X _inst_1} {c₂ : Urysohns.CU.{u1} X _inst_1}, (HasSubset.Subset.{u1} (Set.{u1} X) (Set.instHasSubsetSet.{u1} X) (Urysohns.CU.U.{u1} X _inst_1 c₁) (Urysohns.CU.C.{u1} X _inst_1 c₂)) -> (forall (n₁ : Nat) (n₂ : Nat) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₂ c₂ x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₁ c₁ x))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_approx_of_U_sub_C Urysohns.CU.approx_le_approx_of_U_sub_Cₓ'. -/
 theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
     c₂.approx n₂ x ≤ c₁.approx n₁ x :=
   by
@@ -261,12 +231,6 @@ theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
 #align urysohns.CU.approx_mem_Icc_right_left Urysohns.CU.approx_mem_Icc_right_left
 -/
 
-/- warning: urysohns.CU.approx_le_succ -> Urysohns.CU.approx_le_succ is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) c x)
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) c x)
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_succ Urysohns.CU.approx_le_succₓ'. -/
 theorem approx_le_succ (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ c.approx (n + 1) x :=
   by
   induction' n with n ihn generalizing c
@@ -300,32 +264,14 @@ theorem tendsto_approx_atTop (c : CU X) (x : X) :
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
 -/
 
-/- warning: urysohns.CU.lim_of_mem_C -> Urysohns.CU.lim_of_mem_C is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.c.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.C.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_Cₓ'. -/
 theorem lim_of_mem_C (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
   simp only [CU.lim, approx_of_mem_C, h, ciSup_const]
 #align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_C
 
-/- warning: urysohns.CU.lim_of_nmem_U -> Urysohns.CU.lim_of_nmem_U is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Not (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.u.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Not (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.U.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_Uₓ'. -/
 theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
   simp only [CU.lim, approx_of_nmem_U c _ h, ciSup_const]
 #align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_U
 
-/- warning: urysohns.CU.lim_eq_midpoint -> Urysohns.CU.lim_eq_midpoint is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.ring (invertibleTwo.{0} Real Real.divisionRing (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.addCommGroup Real.module (addGroupIsAddTorsor.{0} Real Real.addGroup) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.instRingReal (invertibleTwo.{0} Real Real.instDivisionRingReal (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.instAddCommGroupReal (NormedSpace.toModule.{0, 0} Real Real Real.normedField (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) (NormedField.toNormedSpace.{0} Real Real.normedField)) (NormedAddTorsor.toAddTorsor.{0, 0} Real Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) Real.pseudoMetricSpace (SeminormedAddCommGroup.toNormedAddTorsor.{0} Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpointₓ'. -/
 theorem lim_eq_midpoint (c : CU X) (x : X) : c.lim x = midpoint ℝ (c.left.lim x) (c.right.lim x) :=
   by
   refine' tendsto_nhds_unique (c.tendsto_approx_at_top x) ((tendsto_add_at_top_iff_nat 1).1 _)
@@ -333,42 +279,18 @@ theorem lim_eq_midpoint (c : CU X) (x : X) : c.lim x = midpoint ℝ (c.left.lim
   exact (c.left.tendsto_approx_at_top x).midpoint (c.right.tendsto_approx_at_top x)
 #align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpoint
 
-/- warning: urysohns.CU.approx_le_lim -> Urysohns.CU.approx_le_lim is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X) (n : Nat), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X) (n : Nat), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_limₓ'. -/
 theorem approx_le_lim (c : CU X) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x :=
   le_ciSup (c.bddAbove_range_approx x) _
 #align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_lim
 
-/- warning: urysohns.CU.lim_nonneg -> Urysohns.CU.lim_nonneg is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_nonneg Urysohns.CU.lim_nonnegₓ'. -/
 theorem lim_nonneg (c : CU X) (x : X) : 0 ≤ c.lim x :=
   (c.approx_nonneg 0 x).trans (c.approx_le_lim x 0)
 #align urysohns.CU.lim_nonneg Urysohns.CU.lim_nonneg
 
-/- warning: urysohns.CU.lim_le_one -> Urysohns.CU.lim_le_one is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_le_one Urysohns.CU.lim_le_oneₓ'. -/
 theorem lim_le_one (c : CU X) (x : X) : c.lim x ≤ 1 :=
   ciSup_le fun n => c.approx_le_one _ _
 #align urysohns.CU.lim_le_one Urysohns.CU.lim_le_one
 
-/- warning: urysohns.CU.lim_mem_Icc -> Urysohns.CU.lim_mem_Icc is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (Set.Icc.{0} Real Real.preorder (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Membership.mem.{0, 0} Real (Set.{0} Real) (Set.instMembershipSet.{0} Real) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (Set.Icc.{0} Real Real.instPreorderReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))
-Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_mem_Icc Urysohns.CU.lim_mem_Iccₓ'. -/
 theorem lim_mem_Icc (c : CU X) (x : X) : c.lim x ∈ Icc (0 : ℝ) 1 :=
   ⟨c.lim_nonneg x, c.lim_le_one x⟩
 #align urysohns.CU.lim_mem_Icc Urysohns.CU.lim_mem_Icc
@@ -422,12 +344,6 @@ end Urysohns
 
 variable [NormalSpace X]
 
-/- warning: exists_continuous_zero_one_of_closed -> exists_continuous_zero_one_of_closed is a dubious translation:
-lean 3 declaration is
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {s : Set.{u1} X} {t : Set.{u1} X}, (IsClosed.{u1} X _inst_1 s) -> (IsClosed.{u1} X _inst_1 t) -> (Disjoint.{u1} (Set.{u1} X) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} X) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.completeBooleanAlgebra.{u1} X)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} X) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} X) (Set.booleanAlgebra.{u1} X))) s t) -> (Exists.{succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (f : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => And (Set.EqOn.{u1, 0} X Real (coeFn.{succ u1, succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (_x : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => X -> Real) (ContinuousMap.hasCoeToFun.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) f) (OfNat.ofNat.{u1} (X -> Real) 0 (OfNat.mk.{u1} (X -> Real) 0 (Zero.zero.{u1} (X -> Real) (Pi.instZero.{u1, 0} X (fun (ᾰ : X) => Real) (fun (i : X) => Real.hasZero))))) s) (And (Set.EqOn.{u1, 0} X Real (coeFn.{succ u1, succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (_x : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => X -> Real) (ContinuousMap.hasCoeToFun.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) f) (OfNat.ofNat.{u1} (X -> Real) 1 (OfNat.mk.{u1} (X -> Real) 1 (One.one.{u1} (X -> Real) (Pi.instOne.{u1, 0} X (fun (ᾰ : X) => Real) (fun (i : X) => Real.hasOne))))) t) (forall (x : X), Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) (coeFn.{succ u1, succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (_x : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => X -> Real) (ContinuousMap.hasCoeToFun.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) f x) (Set.Icc.{0} Real Real.preorder (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))))))
-but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {s : Set.{u1} X} {t : Set.{u1} X}, (IsClosed.{u1} X _inst_1 s) -> (IsClosed.{u1} X _inst_1 t) -> (Disjoint.{u1} (Set.{u1} X) (OmegaCompletePartialOrder.toPartialOrder.{u1} (Set.{u1} X) (CompleteLattice.instOmegaCompletePartialOrder.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.instCompleteBooleanAlgebraSet.{u1} X)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} X) (Preorder.toLE.{u1} (Set.{u1} X) (PartialOrder.toPreorder.{u1} (Set.{u1} X) (OmegaCompletePartialOrder.toPartialOrder.{u1} (Set.{u1} X) (CompleteLattice.instOmegaCompletePartialOrder.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.instCompleteBooleanAlgebraSet.{u1} X)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.instCompleteBooleanAlgebraSet.{u1} X)))))) s t) -> (Exists.{succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (f : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => And (Set.EqOn.{u1, 0} X Real (FunLike.coe.{succ u1, succ u1, 1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X (fun (_x : X) => (fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) _x) (ContinuousMapClass.toFunLike.{u1, u1, 0} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (ContinuousMap.instContinuousMapClassContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)))) f) (OfNat.ofNat.{u1} (X -> Real) 0 (Zero.toOfNat0.{u1} (X -> Real) (Pi.instZero.{u1, 0} X (fun (a._@.Mathlib.Data.Set.Function._hyg.1349 : X) => Real) (fun (i : X) => Real.instZeroReal)))) s) (And (Set.EqOn.{u1, 0} X Real (FunLike.coe.{succ u1, succ u1, 1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X (fun (_x : X) => (fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) _x) (ContinuousMapClass.toFunLike.{u1, u1, 0} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (ContinuousMap.instContinuousMapClassContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)))) f) (OfNat.ofNat.{u1} (X -> Real) 1 (One.toOfNat1.{u1} (X -> Real) (Pi.instOne.{u1, 0} X (fun (a._@.Mathlib.Data.Set.Function._hyg.1349 : X) => Real) (fun (i : X) => Real.instOneReal)))) t) (forall (x : X), Membership.mem.{0, 0} ((fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) x) (Set.{0} Real) (Set.instMembershipSet.{0} Real) (FunLike.coe.{succ u1, succ u1, 1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X (fun (_x : X) => (fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) _x) (ContinuousMapClass.toFunLike.{u1, u1, 0} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (ContinuousMap.instContinuousMapClassContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)))) f x) (Set.Icc.{0} Real Real.instPreorderReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))))))
-Case conversion may be inaccurate. Consider using '#align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_closedₓ'. -/
 /-- Urysohns lemma: if `s` and `t` are two disjoint closed sets in a normal topological space `X`,
 then there exists a continuous function `f : X → ℝ` such that
 
Diff
@@ -394,14 +394,11 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
       rw [dist_self, add_zero, div_eq_inv_mul]
       exact mul_le_mul h1234.le hyd dist_nonneg (h0.trans h1234).le
-    · replace hxl : x ∈ c.left.right.Cᶜ
-      exact compl_subset_compl.2 c.left.right.subset hxl
+    · replace hxl : x ∈ c.left.right.Cᶜ; exact compl_subset_compl.2 c.left.right.subset hxl
       filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl,
         ihn c.left.right, ihn c.right]with y hyl hydl hydr
-      replace hxl : x ∉ c.left.left.U
-      exact compl_subset_compl.2 c.left.left_U_subset_right_C hxl
-      replace hyl : y ∉ c.left.left.U
-      exact compl_subset_compl.2 c.left.left_U_subset_right_C hyl
+      replace hxl : x ∉ c.left.left.U; exact compl_subset_compl.2 c.left.left_U_subset_right_C hxl
+      replace hyl : y ∉ c.left.left.U; exact compl_subset_compl.2 c.left.left_U_subset_right_C hyl
       simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint,
         c.left.left.lim_of_nmem_U _ hxl, c.left.left.lim_of_nmem_U _ hyl]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
@@ -415,8 +412,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
               zero_le_two).trans_eq
           _
       generalize (3 / 4 : ℝ) ^ n = r
-      field_simp [two_ne_zero' ℝ]
-      ring
+      field_simp [two_ne_zero' ℝ] ; ring
 #align urysohns.CU.continuous_lim Urysohns.CU.continuous_lim
 -/
 
Diff
@@ -324,7 +324,7 @@ theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
 lean 3 declaration is
   forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.ring (invertibleTwo.{0} Real Real.divisionRing (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.addCommGroup Real.module (addGroupIsAddTorsor.{0} Real Real.addGroup) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
 but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.instRingReal (invertibleTwo.{0} Real Real.instDivisionRingReal (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.instAddCommGroupReal (AffineMap.instModuleToSemiringToAddCommMonoidToNonUnitalNonAssocSemiringToNonUnitalNonAssocRingToNonUnitalRing.{0} Real Real.instRingReal) (NormedAddTorsor.toAddTorsor.{0, 0} Real Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) Real.pseudoMetricSpace (SeminormedAddCommGroup.toNormedAddTorsor.{0} Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.instRingReal (invertibleTwo.{0} Real Real.instDivisionRingReal (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.instAddCommGroupReal (NormedSpace.toModule.{0, 0} Real Real Real.normedField (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) (NormedField.toNormedSpace.{0} Real Real.normedField)) (NormedAddTorsor.toAddTorsor.{0, 0} Real Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) Real.pseudoMetricSpace (SeminormedAddCommGroup.toNormedAddTorsor.{0} Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
 Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpointₓ'. -/
 theorem lim_eq_midpoint (c : CU X) (x : X) : c.lim x = midpoint ℝ (c.left.lim x) (c.right.lim x) :=
   by
Diff
@@ -296,7 +296,7 @@ protected noncomputable def lim (c : CU X) (x : X) : ℝ :=
 #print Urysohns.CU.tendsto_approx_atTop /-
 theorem tendsto_approx_atTop (c : CU X) (x : X) :
     Tendsto (fun n => c.approx n x) atTop (𝓝 <| c.lim x) :=
-  tendsto_atTop_csupᵢ (c.approx_mono x) ⟨1, fun x ⟨n, hn⟩ => hn ▸ c.approx_le_one _ _⟩
+  tendsto_atTop_ciSup (c.approx_mono x) ⟨1, fun x ⟨n, hn⟩ => hn ▸ c.approx_le_one _ _⟩
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
 -/
 
@@ -307,7 +307,7 @@ but is expected to have type
   forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.C.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
 Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_Cₓ'. -/
 theorem lim_of_mem_C (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
-  simp only [CU.lim, approx_of_mem_C, h, csupᵢ_const]
+  simp only [CU.lim, approx_of_mem_C, h, ciSup_const]
 #align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_C
 
 /- warning: urysohns.CU.lim_of_nmem_U -> Urysohns.CU.lim_of_nmem_U is a dubious translation:
@@ -317,7 +317,7 @@ but is expected to have type
   forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Not (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.U.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))
 Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_Uₓ'. -/
 theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
-  simp only [CU.lim, approx_of_nmem_U c _ h, csupᵢ_const]
+  simp only [CU.lim, approx_of_nmem_U c _ h, ciSup_const]
 #align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_U
 
 /- warning: urysohns.CU.lim_eq_midpoint -> Urysohns.CU.lim_eq_midpoint is a dubious translation:
@@ -340,7 +340,7 @@ but is expected to have type
   forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X) (n : Nat), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
 Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_limₓ'. -/
 theorem approx_le_lim (c : CU X) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x :=
-  le_csupᵢ (c.bddAbove_range_approx x) _
+  le_ciSup (c.bddAbove_range_approx x) _
 #align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_lim
 
 /- warning: urysohns.CU.lim_nonneg -> Urysohns.CU.lim_nonneg is a dubious translation:
@@ -360,7 +360,7 @@ but is expected to have type
   forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))
 Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_le_one Urysohns.CU.lim_le_oneₓ'. -/
 theorem lim_le_one (c : CU X) (x : X) : c.lim x ≤ 1 :=
-  csupᵢ_le fun n => c.approx_le_one _ _
+  ciSup_le fun n => c.approx_le_one _ _
 #align urysohns.CU.lim_le_one Urysohns.CU.lim_le_one
 
 /- warning: urysohns.CU.lim_mem_Icc -> Urysohns.CU.lim_mem_Icc is a dubious translation:
Diff
@@ -324,7 +324,7 @@ theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
 lean 3 declaration is
   forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.ring (invertibleTwo.{0} Real Real.divisionRing (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.addCommGroup Real.module (addGroupIsAddTorsor.{0} Real Real.addGroup) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
 but is expected to have type
-  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.instRingReal (invertibleTwo.{0} Real Real.instDivisionRingReal (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.instAddCommGroupReal instModuleRealSemiringInstAddCommMonoidReal (NormedAddTorsor.toAddTorsor.{0, 0} Real Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) Real.pseudoMetricSpace (SeminormedAddCommGroup.toNormedAddTorsor.{0} Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.instRingReal (invertibleTwo.{0} Real Real.instDivisionRingReal (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.instAddCommGroupReal (AffineMap.instModuleToSemiringToAddCommMonoidToNonUnitalNonAssocSemiringToNonUnitalNonAssocRingToNonUnitalRing.{0} Real Real.instRingReal) (NormedAddTorsor.toAddTorsor.{0, 0} Real Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) Real.pseudoMetricSpace (SeminormedAddCommGroup.toNormedAddTorsor.{0} Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
 Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpointₓ'. -/
 theorem lim_eq_midpoint (c : CU X) (x : X) : c.lim x = midpoint ℝ (c.left.lim x) (c.right.lim x) :=
   by
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
 
 ! This file was ported from Lean 3 source module topology.urysohns_lemma
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 8eb9c42d4d34c77f6ee84ea766ae4070233a973c
 ! 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.ContinuousFunction.Basic
 /-!
 # Urysohn's lemma
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we prove Urysohn's lemma `exists_continuous_zero_one_of_closed`: for any two disjoint
 closed sets `s` and `t` in a normal topological space `X` there exists a continuous function
 `f : X → ℝ` such that
Diff
@@ -82,6 +82,7 @@ open Topology Filter
 
 namespace Urysohns
 
+#print Urysohns.CU /-
 /-- An auxiliary type for the proof of Urysohn's lemma: a pair of a closed set `C` and its
 open neighborhood `U`. -/
 @[protect_proj]
@@ -91,6 +92,7 @@ structure CU (X : Type _) [TopologicalSpace X] where
   open_u : IsOpen U
   Subset : C ⊆ U
 #align urysohns.CU Urysohns.CU
+-/
 
 instance : Inhabited (CU X) :=
   ⟨⟨∅, univ, isClosed_empty, isOpen_univ, empty_subset _⟩⟩
@@ -99,6 +101,7 @@ variable [NormalSpace X]
 
 namespace CU
 
+#print Urysohns.CU.left /-
 /-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
 such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.left` is the pair `(c.C, u)`. -/
 @[simps C]
@@ -109,7 +112,9 @@ def left (c : CU X) : CU X where
   open_u := (normal_exists_closure_subset c.closed_c c.open_u c.Subset).choose_spec.1
   Subset := (normal_exists_closure_subset c.closed_c c.open_u c.Subset).choose_spec.2.1
 #align urysohns.CU.left Urysohns.CU.left
+-/
 
+#print Urysohns.CU.right /-
 /-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
 such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.right` is the pair `(closure u, c.U)`. -/
 @[simps U]
@@ -121,44 +126,71 @@ def right (c : CU X) : CU X
   open_u := c.open_u
   Subset := (normal_exists_closure_subset c.closed_c c.open_u c.Subset).choose_spec.2.2
 #align urysohns.CU.right Urysohns.CU.right
+-/
 
-theorem left_u_subset_right_c (c : CU X) : c.left.U ⊆ c.right.C :=
+#print Urysohns.CU.left_U_subset_right_C /-
+theorem left_U_subset_right_C (c : CU X) : c.left.U ⊆ c.right.C :=
   subset_closure
-#align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_u_subset_right_c
+#align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C
+-/
 
-theorem left_u_subset (c : CU X) : c.left.U ⊆ c.U :=
-  Subset.trans c.left_u_subset_right_c c.right.Subset
-#align urysohns.CU.left_U_subset Urysohns.CU.left_u_subset
+#print Urysohns.CU.left_U_subset /-
+theorem left_U_subset (c : CU X) : c.left.U ⊆ c.U :=
+  Subset.trans c.left_U_subset_right_C c.right.Subset
+#align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset
+-/
 
-theorem subset_right_c (c : CU X) : c.C ⊆ c.right.C :=
-  Subset.trans c.left.Subset c.left_u_subset_right_c
-#align urysohns.CU.subset_right_C Urysohns.CU.subset_right_c
+#print Urysohns.CU.subset_right_C /-
+theorem subset_right_C (c : CU X) : c.C ⊆ c.right.C :=
+  Subset.trans c.left.Subset c.left_U_subset_right_C
+#align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C
+-/
 
+#print Urysohns.CU.approx /-
 /-- `n`-th approximation to a continuous function `f : X → ℝ` such that `f = 0` on `c.C` and `f = 1`
 outside of `c.U`. -/
 noncomputable def approx : ℕ → CU X → X → ℝ
   | 0, c, x => indicator (c.Uᶜ) 1 x
   | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x)
 #align urysohns.CU.approx Urysohns.CU.approx
+-/
 
-theorem approx_of_mem_c (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 :=
+/- warning: urysohns.CU.approx_of_mem_C -> Urysohns.CU.approx_of_mem_C is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.c.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.C.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_Cₓ'. -/
+theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 :=
   by
   induction' n with n ihn generalizing c
   · exact indicator_of_not_mem (fun hU => hU <| c.subset hx) _
   · simp only [approx]
     rw [ihn, ihn, midpoint_self]
     exacts[c.subset_right_C hx, hx]
-#align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_c
-
-theorem approx_of_nmem_u (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.approx n x = 1 :=
+#align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C
+
+/- warning: urysohns.CU.approx_of_nmem_U -> Urysohns.CU.approx_of_nmem_U is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Not (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.u.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) {x : X}, (Not (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.U.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_Uₓ'. -/
+theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.approx n x = 1 :=
   by
   induction' n with n ihn generalizing c
   · exact indicator_of_mem hx _
   · simp only [approx]
     rw [ihn, ihn, midpoint_self]
     exacts[hx, fun hU => hx <| c.left_U_subset hU]
-#align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_u
-
+#align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U
+
+/- warning: urysohns.CU.approx_nonneg -> Urysohns.CU.approx_nonneg is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x)
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x)
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonnegₓ'. -/
 theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x :=
   by
   induction' n with n ihn generalizing c
@@ -167,6 +199,12 @@ theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x :=
     refine' mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg _ _) <;> apply ihn
 #align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonneg
 
+/- warning: urysohns.CU.approx_le_one -> Urysohns.CU.approx_le_one is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_one Urysohns.CU.approx_le_oneₓ'. -/
 theorem approx_le_one (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ 1 :=
   by
   induction' n with n ihn generalizing c
@@ -175,11 +213,19 @@ theorem approx_le_one (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ 1 :=
     refine' Iff.mpr (div_le_one zero_lt_two) (add_le_add _ _) <;> apply ihn
 #align urysohns.CU.approx_le_one Urysohns.CU.approx_le_one
 
+#print Urysohns.CU.bddAbove_range_approx /-
 theorem bddAbove_range_approx (c : CU X) (x : X) : BddAbove (range fun n => c.approx n x) :=
   ⟨1, fun y ⟨n, hn⟩ => hn ▸ c.approx_le_one n x⟩
 #align urysohns.CU.bdd_above_range_approx Urysohns.CU.bddAbove_range_approx
+-/
 
-theorem approx_le_approx_of_u_sub_c {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
+/- warning: urysohns.CU.approx_le_approx_of_U_sub_C -> Urysohns.CU.approx_le_approx_of_U_sub_C is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {c₁ : Urysohns.CU.{u1} X _inst_1} {c₂ : Urysohns.CU.{u1} X _inst_1}, (HasSubset.Subset.{u1} (Set.{u1} X) (Set.hasSubset.{u1} X) (Urysohns.CU.u.{u1} X _inst_1 c₁) (Urysohns.CU.c.{u1} X _inst_1 c₂)) -> (forall (n₁ : Nat) (n₂ : Nat) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₂ c₂ x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₁ c₁ x))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {c₁ : Urysohns.CU.{u1} X _inst_1} {c₂ : Urysohns.CU.{u1} X _inst_1}, (HasSubset.Subset.{u1} (Set.{u1} X) (Set.instHasSubsetSet.{u1} X) (Urysohns.CU.U.{u1} X _inst_1 c₁) (Urysohns.CU.C.{u1} X _inst_1 c₂)) -> (forall (n₁ : Nat) (n₂ : Nat) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₂ c₂ x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n₁ c₁ x))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_approx_of_U_sub_C Urysohns.CU.approx_le_approx_of_U_sub_Cₓ'. -/
+theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
     c₂.approx n₂ x ≤ c₁.approx n₁ x :=
   by
   by_cases hx : x ∈ c₁.U
@@ -193,8 +239,9 @@ theorem approx_le_approx_of_u_sub_c {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (
       approx n₂ c₂ x ≤ 1 := approx_le_one _ _ _
       _ = approx n₁ c₁ x := (approx_of_nmem_U _ _ hx).symm
       
-#align urysohns.CU.approx_le_approx_of_U_sub_C Urysohns.CU.approx_le_approx_of_u_sub_c
+#align urysohns.CU.approx_le_approx_of_U_sub_C Urysohns.CU.approx_le_approx_of_U_sub_C
 
+#print Urysohns.CU.approx_mem_Icc_right_left /-
 theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
     c.approx n x ∈ Icc (c.right.approx n x) (c.left.approx n x) :=
   by
@@ -209,7 +256,14 @@ theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
       apply approx_le_approx_of_U_sub_C
     exacts[subset_closure, subset_closure]
 #align urysohns.CU.approx_mem_Icc_right_left Urysohns.CU.approx_mem_Icc_right_left
+-/
 
+/- warning: urysohns.CU.approx_le_succ -> Urysohns.CU.approx_le_succ is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) c x)
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (n : Nat) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) c x)
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_succ Urysohns.CU.approx_le_succₓ'. -/
 theorem approx_le_succ (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ c.approx (n + 1) x :=
   by
   induction' n with n ihn generalizing c
@@ -219,10 +273,13 @@ theorem approx_le_succ (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ c.approx
     exact midpoint_le_midpoint (ihn _) (ihn _)
 #align urysohns.CU.approx_le_succ Urysohns.CU.approx_le_succ
 
+#print Urysohns.CU.approx_mono /-
 theorem approx_mono (c : CU X) (x : X) : Monotone fun n => c.approx n x :=
   monotone_nat_of_le_succ fun n => c.approx_le_succ n x
 #align urysohns.CU.approx_mono Urysohns.CU.approx_mono
+-/
 
+#print Urysohns.CU.lim /-
 /-- A continuous function `f : X → ℝ` such that
 
 * `0 ≤ f x ≤ 1` for all `x`;
@@ -231,20 +288,41 @@ theorem approx_mono (c : CU X) (x : X) : Monotone fun n => c.approx n x :=
 protected noncomputable def lim (c : CU X) (x : X) : ℝ :=
   ⨆ n, c.approx n x
 #align urysohns.CU.lim Urysohns.CU.lim
+-/
 
+#print Urysohns.CU.tendsto_approx_atTop /-
 theorem tendsto_approx_atTop (c : CU X) (x : X) :
     Tendsto (fun n => c.approx n x) atTop (𝓝 <| c.lim x) :=
   tendsto_atTop_csupᵢ (c.approx_mono x) ⟨1, fun x ⟨n, hn⟩ => hn ▸ c.approx_le_one _ _⟩
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
+-/
 
-theorem lim_of_mem_c (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
+/- warning: urysohns.CU.lim_of_mem_C -> Urysohns.CU.lim_of_mem_C is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.c.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.C.{u1} X _inst_1 c)) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_Cₓ'. -/
+theorem lim_of_mem_C (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
   simp only [CU.lim, approx_of_mem_C, h, csupᵢ_const]
-#align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_c
-
-theorem lim_of_nmem_u (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
+#align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_C
+
+/- warning: urysohns.CU.lim_of_nmem_U -> Urysohns.CU.lim_of_nmem_U is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Not (Membership.Mem.{u1, u1} X (Set.{u1} X) (Set.hasMem.{u1} X) x (Urysohns.CU.u.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), (Not (Membership.mem.{u1, u1} X (Set.{u1} X) (Set.instMembershipSet.{u1} X) x (Urysohns.CU.U.{u1} X _inst_1 c))) -> (Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_Uₓ'. -/
+theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
   simp only [CU.lim, approx_of_nmem_U c _ h, csupᵢ_const]
-#align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_u
-
+#align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_U
+
+/- warning: urysohns.CU.lim_eq_midpoint -> Urysohns.CU.lim_eq_midpoint is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.ring (invertibleTwo.{0} Real Real.divisionRing (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.addCommGroup Real.module (addGroupIsAddTorsor.{0} Real Real.addGroup) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Eq.{1} Real (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (midpoint.{0, 0, 0} Real Real Real Real.instRingReal (invertibleTwo.{0} Real Real.instDivisionRingReal (StrictOrderedSemiring.to_charZero.{0} Real Real.strictOrderedSemiring)) Real.instAddCommGroupReal instModuleRealSemiringInstAddCommMonoidReal (NormedAddTorsor.toAddTorsor.{0, 0} Real Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))) Real.pseudoMetricSpace (SeminormedAddCommGroup.toNormedAddTorsor.{0} Real (NonUnitalSeminormedRing.toSeminormedAddCommGroup.{0} Real (NonUnitalNormedRing.toNonUnitalSeminormedRing.{0} Real (NormedRing.toNonUnitalNormedRing.{0} Real (NormedCommRing.toNormedRing.{0} Real Real.normedCommRing)))))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.left.{u1} X _inst_1 _inst_2 c) x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 (Urysohns.CU.right.{u1} X _inst_1 _inst_2 c) x))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpointₓ'. -/
 theorem lim_eq_midpoint (c : CU X) (x : X) : c.lim x = midpoint ℝ (c.left.lim x) (c.right.lim x) :=
   by
   refine' tendsto_nhds_unique (c.tendsto_approx_at_top x) ((tendsto_add_at_top_iff_nat 1).1 _)
@@ -252,22 +330,47 @@ theorem lim_eq_midpoint (c : CU X) (x : X) : c.lim x = midpoint ℝ (c.left.lim
   exact (c.left.tendsto_approx_at_top x).midpoint (c.right.tendsto_approx_at_top x)
 #align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpoint
 
+/- warning: urysohns.CU.approx_le_lim -> Urysohns.CU.approx_le_lim is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X) (n : Nat), LE.le.{0} Real Real.hasLe (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X) (n : Nat), LE.le.{0} Real Real.instLEReal (Urysohns.CU.approx.{u1} X _inst_1 _inst_2 n c x) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_limₓ'. -/
 theorem approx_le_lim (c : CU X) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x :=
   le_csupᵢ (c.bddAbove_range_approx x) _
 #align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_lim
 
+/- warning: urysohns.CU.lim_nonneg -> Urysohns.CU.lim_nonneg is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x)
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_nonneg Urysohns.CU.lim_nonnegₓ'. -/
 theorem lim_nonneg (c : CU X) (x : X) : 0 ≤ c.lim x :=
   (c.approx_nonneg 0 x).trans (c.approx_le_lim x 0)
 #align urysohns.CU.lim_nonneg Urysohns.CU.lim_nonneg
 
+/- warning: urysohns.CU.lim_le_one -> Urysohns.CU.lim_le_one is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.hasLe (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), LE.le.{0} Real Real.instLEReal (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_le_one Urysohns.CU.lim_le_oneₓ'. -/
 theorem lim_le_one (c : CU X) (x : X) : c.lim x ≤ 1 :=
   csupᵢ_le fun n => c.approx_le_one _ _
 #align urysohns.CU.lim_le_one Urysohns.CU.lim_le_one
 
+/- warning: urysohns.CU.lim_mem_Icc -> Urysohns.CU.lim_mem_Icc is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (Set.Icc.{0} Real Real.preorder (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] (c : Urysohns.CU.{u1} X _inst_1) (x : X), Membership.mem.{0, 0} Real (Set.{0} Real) (Set.instMembershipSet.{0} Real) (Urysohns.CU.lim.{u1} X _inst_1 _inst_2 c x) (Set.Icc.{0} Real Real.instPreorderReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))
+Case conversion may be inaccurate. Consider using '#align urysohns.CU.lim_mem_Icc Urysohns.CU.lim_mem_Iccₓ'. -/
 theorem lim_mem_Icc (c : CU X) (x : X) : c.lim x ∈ Icc (0 : ℝ) 1 :=
   ⟨c.lim_nonneg x, c.lim_le_one x⟩
 #align urysohns.CU.lim_mem_Icc Urysohns.CU.lim_mem_Icc
 
+#print Urysohns.CU.continuous_lim /-
 /-- Continuity of `urysohns.CU.lim`. See module docstring for a sketch of the proofs. -/
 theorem continuous_lim (c : CU X) : Continuous c.lim :=
   by
@@ -312,6 +415,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim :=
       field_simp [two_ne_zero' ℝ]
       ring
 #align urysohns.CU.continuous_lim Urysohns.CU.continuous_lim
+-/
 
 end CU
 
@@ -319,6 +423,12 @@ end Urysohns
 
 variable [NormalSpace X]
 
+/- warning: exists_continuous_zero_one_of_closed -> exists_continuous_zero_one_of_closed is a dubious translation:
+lean 3 declaration is
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {s : Set.{u1} X} {t : Set.{u1} X}, (IsClosed.{u1} X _inst_1 s) -> (IsClosed.{u1} X _inst_1 t) -> (Disjoint.{u1} (Set.{u1} X) (CompleteSemilatticeInf.toPartialOrder.{u1} (Set.{u1} X) (CompleteLattice.toCompleteSemilatticeInf.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.completeBooleanAlgebra.{u1} X)))))) (GeneralizedBooleanAlgebra.toOrderBot.{u1} (Set.{u1} X) (BooleanAlgebra.toGeneralizedBooleanAlgebra.{u1} (Set.{u1} X) (Set.booleanAlgebra.{u1} X))) s t) -> (Exists.{succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (f : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => And (Set.EqOn.{u1, 0} X Real (coeFn.{succ u1, succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (_x : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => X -> Real) (ContinuousMap.hasCoeToFun.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) f) (OfNat.ofNat.{u1} (X -> Real) 0 (OfNat.mk.{u1} (X -> Real) 0 (Zero.zero.{u1} (X -> Real) (Pi.instZero.{u1, 0} X (fun (ᾰ : X) => Real) (fun (i : X) => Real.hasZero))))) s) (And (Set.EqOn.{u1, 0} X Real (coeFn.{succ u1, succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (_x : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => X -> Real) (ContinuousMap.hasCoeToFun.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) f) (OfNat.ofNat.{u1} (X -> Real) 1 (OfNat.mk.{u1} (X -> Real) 1 (One.one.{u1} (X -> Real) (Pi.instOne.{u1, 0} X (fun (ᾰ : X) => Real) (fun (i : X) => Real.hasOne))))) t) (forall (x : X), Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) (coeFn.{succ u1, succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (_x : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => X -> Real) (ContinuousMap.hasCoeToFun.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) f x) (Set.Icc.{0} Real Real.preorder (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))))))))
+but is expected to have type
+  forall {X : Type.{u1}} [_inst_1 : TopologicalSpace.{u1} X] [_inst_2 : NormalSpace.{u1} X _inst_1] {s : Set.{u1} X} {t : Set.{u1} X}, (IsClosed.{u1} X _inst_1 s) -> (IsClosed.{u1} X _inst_1 t) -> (Disjoint.{u1} (Set.{u1} X) (OmegaCompletePartialOrder.toPartialOrder.{u1} (Set.{u1} X) (CompleteLattice.instOmegaCompletePartialOrder.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.instCompleteBooleanAlgebraSet.{u1} X)))))) (BoundedOrder.toOrderBot.{u1} (Set.{u1} X) (Preorder.toLE.{u1} (Set.{u1} X) (PartialOrder.toPreorder.{u1} (Set.{u1} X) (OmegaCompletePartialOrder.toPartialOrder.{u1} (Set.{u1} X) (CompleteLattice.instOmegaCompletePartialOrder.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.instCompleteBooleanAlgebraSet.{u1} X)))))))) (CompleteLattice.toBoundedOrder.{u1} (Set.{u1} X) (Order.Coframe.toCompleteLattice.{u1} (Set.{u1} X) (CompleteDistribLattice.toCoframe.{u1} (Set.{u1} X) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u1} (Set.{u1} X) (Set.instCompleteBooleanAlgebraSet.{u1} X)))))) s t) -> (Exists.{succ u1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) (fun (f : ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) => And (Set.EqOn.{u1, 0} X Real (FunLike.coe.{succ u1, succ u1, 1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X (fun (_x : X) => (fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) _x) (ContinuousMapClass.toFunLike.{u1, u1, 0} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (ContinuousMap.instContinuousMapClassContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)))) f) (OfNat.ofNat.{u1} (X -> Real) 0 (Zero.toOfNat0.{u1} (X -> Real) (Pi.instZero.{u1, 0} X (fun (a._@.Mathlib.Data.Set.Function._hyg.1349 : X) => Real) (fun (i : X) => Real.instZeroReal)))) s) (And (Set.EqOn.{u1, 0} X Real (FunLike.coe.{succ u1, succ u1, 1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X (fun (_x : X) => (fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) _x) (ContinuousMapClass.toFunLike.{u1, u1, 0} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (ContinuousMap.instContinuousMapClassContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)))) f) (OfNat.ofNat.{u1} (X -> Real) 1 (One.toOfNat1.{u1} (X -> Real) (Pi.instOne.{u1, 0} X (fun (a._@.Mathlib.Data.Set.Function._hyg.1349 : X) => Real) (fun (i : X) => Real.instOneReal)))) t) (forall (x : X), Membership.mem.{0, 0} ((fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) x) (Set.{0} Real) (Set.instMembershipSet.{0} Real) (FunLike.coe.{succ u1, succ u1, 1} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X (fun (_x : X) => (fun (x._@.Mathlib.Topology.ContinuousFunction.Basic._hyg.699 : X) => Real) _x) (ContinuousMapClass.toFunLike.{u1, u1, 0} (ContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace))) X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)) (ContinuousMap.instContinuousMapClassContinuousMap.{u1, 0} X Real _inst_1 (UniformSpace.toTopologicalSpace.{0} Real (PseudoMetricSpace.toUniformSpace.{0} Real Real.pseudoMetricSpace)))) f x) (Set.Icc.{0} Real Real.instPreorderReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)))))))
+Case conversion may be inaccurate. Consider using '#align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_closedₓ'. -/
 /-- Urysohns lemma: if `s` and `t` are two disjoint closed sets in a normal topological space `X`,
 then there exists a continuous function `f : X → ℝ` such that
 
Diff
@@ -234,7 +234,7 @@ protected noncomputable def lim (c : CU X) (x : X) : ℝ :=
 
 theorem tendsto_approx_atTop (c : CU X) (x : X) :
     Tendsto (fun n => c.approx n x) atTop (𝓝 <| c.lim x) :=
-  tendsto_atTop_csupr (c.approx_mono x) ⟨1, fun x ⟨n, hn⟩ => hn ▸ c.approx_le_one _ _⟩
+  tendsto_atTop_csupᵢ (c.approx_mono x) ⟨1, fun x ⟨n, hn⟩ => hn ▸ c.approx_le_one _ _⟩
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
 
 theorem lim_of_mem_c (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
Diff
@@ -86,7 +86,7 @@ namespace Urysohns
 open neighborhood `U`. -/
 @[protect_proj]
 structure CU (X : Type _) [TopologicalSpace X] where
-  (c U : Set X)
+  (C U : Set X)
   closed_c : IsClosed C
   open_u : IsOpen U
   Subset : C ⊆ U
@@ -101,9 +101,9 @@ namespace CU
 
 /-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
 such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.left` is the pair `(c.C, u)`. -/
-@[simps c]
+@[simps C]
 def left (c : CU X) : CU X where
-  c := c.c
+  C := c.C
   U := (normal_exists_closure_subset c.closed_c c.open_u c.Subset).some
   closed_c := c.closed_c
   open_u := (normal_exists_closure_subset c.closed_c c.open_u c.Subset).choose_spec.1
@@ -115,14 +115,14 @@ such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.right` is the pair `(closure u
 @[simps U]
 def right (c : CU X) : CU X
     where
-  c := closure (normal_exists_closure_subset c.closed_c c.open_u c.Subset).some
+  C := closure (normal_exists_closure_subset c.closed_c c.open_u c.Subset).some
   U := c.U
   closed_c := isClosed_closure
   open_u := c.open_u
   Subset := (normal_exists_closure_subset c.closed_c c.open_u c.Subset).choose_spec.2.2
 #align urysohns.CU.right Urysohns.CU.right
 
-theorem left_u_subset_right_c (c : CU X) : c.left.U ⊆ c.right.c :=
+theorem left_u_subset_right_c (c : CU X) : c.left.U ⊆ c.right.C :=
   subset_closure
 #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_u_subset_right_c
 
@@ -130,7 +130,7 @@ theorem left_u_subset (c : CU X) : c.left.U ⊆ c.U :=
   Subset.trans c.left_u_subset_right_c c.right.Subset
 #align urysohns.CU.left_U_subset Urysohns.CU.left_u_subset
 
-theorem subset_right_c (c : CU X) : c.c ⊆ c.right.c :=
+theorem subset_right_c (c : CU X) : c.C ⊆ c.right.C :=
   Subset.trans c.left.Subset c.left_u_subset_right_c
 #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_c
 
@@ -141,7 +141,7 @@ noncomputable def approx : ℕ → CU X → X → ℝ
   | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x)
 #align urysohns.CU.approx Urysohns.CU.approx
 
-theorem approx_of_mem_c (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.c) : c.approx n x = 0 :=
+theorem approx_of_mem_c (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 :=
   by
   induction' n with n ihn generalizing c
   · exact indicator_of_not_mem (fun hU => hU <| c.subset hx) _
@@ -179,7 +179,7 @@ theorem bddAbove_range_approx (c : CU X) (x : X) : BddAbove (range fun n => c.ap
   ⟨1, fun y ⟨n, hn⟩ => hn ▸ c.approx_le_one n x⟩
 #align urysohns.CU.bdd_above_range_approx Urysohns.CU.bddAbove_range_approx
 
-theorem approx_le_approx_of_u_sub_c {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.c) (n₁ n₂ : ℕ) (x : X) :
+theorem approx_le_approx_of_u_sub_c {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
     c₂.approx n₂ x ≤ c₁.approx n₁ x :=
   by
   by_cases hx : x ∈ c₁.U
@@ -237,7 +237,7 @@ theorem tendsto_approx_atTop (c : CU X) (x : X) :
   tendsto_atTop_csupr (c.approx_mono x) ⟨1, fun x ⟨n, hn⟩ => hn ▸ c.approx_le_one _ _⟩
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
 
-theorem lim_of_mem_c (c : CU X) (x : X) (h : x ∈ c.c) : c.lim x = 0 := by
+theorem lim_of_mem_c (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
   simp only [CU.lim, approx_of_mem_C, h, csupᵢ_const]
 #align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_c
 

Changes in mathlib4

mathlib3
mathlib4
change the order of operation in zsmulRec and nsmulRec (#11451)

We change the following field in the definition of an additive commutative monoid:

 nsmul_succ : ∀ (n : ℕ) (x : G),
-  AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+  AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x

where the latter is more natural

We adjust the definitions of ^ in monoids, groups, etc. Originally there was a warning comment about why this natural order was preferred

use x * npowRec n x and not npowRec n x * x in the definition to make sure that definitional unfolding of npowRec is blocked, to avoid deep recursion issues.

but it seems to no longer apply.

Remarks on the PR :

  • pow_succ and pow_succ' have switched their meanings.
  • Most of the time, the proofs were adjusted by priming/unpriming one lemma, or exchanging left and right; a few proofs were more complicated to adjust.
  • In particular, [Mathlib/NumberTheory/RamificationInertia.lean] used Ideal.IsPrime.mul_mem_pow which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul.
  • the docstring for Cauchy condensation test in [Mathlib/Analysis/PSeries.lean] was mathematically incorrect, I added the mention that the function is antitone.
Diff
@@ -288,7 +288,7 @@ theorem continuous_lim (c : CU P) : Continuous c.lim := by
     exact Real.dist_le_of_mem_Icc_01 (c.lim_mem_Icc _) (c.lim_mem_Icc _)
   · by_cases hxl : x ∈ c.left.U
     · filter_upwards [IsOpen.mem_nhds c.left.open_U hxl, ihn c.left] with _ hyl hyd
-      rw [pow_succ, c.lim_eq_midpoint, c.lim_eq_midpoint,
+      rw [pow_succ', c.lim_eq_midpoint, c.lim_eq_midpoint,
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hyl),
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hxl)]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
chore: golf using filter_upwards (#11208)

This is presumably not exhaustive, but covers about a hundred instances.

Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.

Diff
@@ -283,7 +283,7 @@ theorem continuous_lim (c : CU P) : Continuous c.lim := by
       (Metric.nhds_basis_closedBall_pow (h0.trans h1234) h1).tendsto_right_iff.2 fun n _ => _
   simp only [Metric.mem_closedBall]
   induction' n with n ihn generalizing c
-  · refine' eventually_of_forall fun y => _
+  · filter_upwards with y
     rw [pow_zero]
     exact Real.dist_le_of_mem_Icc_01 (c.lim_mem_Icc _) (c.lim_mem_Icc _)
   · by_cases hxl : x ∈ c.left.U
chore: Rename monotonicity of / lemmas (#10634)

The new names and argument orders match the corresponding * lemmas, which I already took care of in a previous PR.

From LeanAPAP

Diff
@@ -305,8 +305,8 @@ theorem continuous_lim (c : CU P) : Continuous c.lim := by
       simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint,
         c.left.left.lim_of_nmem_U _ hxl, c.left.left.lim_of_nmem_U _ hyl]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
-      refine' (div_le_div_of_le zero_le_two
-        (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _)).trans _
+      refine' (div_le_div_of_nonneg_right (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _)
+        zero_le_two).trans _
       rw [dist_self, zero_add]
       set r := (3 / 4 : ℝ) ^ n
       calc _ ≤ (r / 2 + r) / 2 := by gcongr
chore: move Mathlib to v4.7.0-rc1 (#11162)

This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0 branch as we update to intermediate nightlies.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>

Diff
@@ -187,6 +187,7 @@ theorem approx_le_one (c : CU P) (n : ℕ) (x : X) : c.approx n x ≤ 1 := by
   · exact indicator_apply_le' (fun _ => le_rfl) fun _ => zero_le_one
   · simp only [approx, midpoint_eq_smul_add, invOf_eq_inv, smul_eq_mul, ← div_eq_inv_mul]
     have := add_le_add (ihn (left c)) (ihn (right c))
+    set_option tactic.skipAssignedInstances false in
     norm_num at this
     exact Iff.mpr (div_le_one zero_lt_two) this
 #align urysohns.CU.approx_le_one Urysohns.CU.approx_le_one
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
@@ -434,14 +434,14 @@ theorem exists_continuous_one_zero_of_isCompact_of_isGδ [RegularSpace X] [Local
       have : mᶜ ⊆ (U n ∩ interior m)ᶜ := by
         simpa using (inter_subset_right _ _).trans interior_subset
       exact fm n (this hx)
-    simp [B]
+    simp [g, B]
   have I n x : u n * f n x ≤ u n := mul_le_of_le_one_right (u_pos n).le (f_range n x).2
   have S x : Summable (fun n ↦ u n * f n x) := Summable.of_nonneg_of_le
       (fun n ↦ mul_nonneg (u_pos n).le (f_range n x).1) (fun n ↦ I n x) u_sum
   refine ⟨⟨g, ?_⟩, ?_, hgmc.mono (subset_compl_comm.mp mt), ?_, fun x ↦ ⟨?_, ?_⟩⟩
   · apply continuous_tsum (fun n ↦ continuous_const.mul (f n).continuous) u_sum (fun n x ↦ ?_)
     simpa [abs_of_nonneg, (u_pos n).le, (f_range n x).1] using I n x
-  · apply Subset.antisymm (fun x hx ↦ by simp [fs _ hx, hu]) ?_
+  · apply Subset.antisymm (fun x hx ↦ by simp [g, fs _ hx, hu]) ?_
     apply compl_subset_compl.1
     intro x hx
     obtain ⟨n, hn⟩ : ∃ n, x ∉ U n := by simpa [hU] using hx
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

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

This follows on from #6964.

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

Diff
@@ -293,14 +293,14 @@ theorem continuous_lim (c : CU P) : Continuous c.lim := by
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
       rw [dist_self, add_zero, div_eq_inv_mul]
       gcongr
-    · replace hxl : x ∈ c.left.right.Cᶜ
-      exact compl_subset_compl.2 c.left.right.subset hxl
+    · replace hxl : x ∈ c.left.right.Cᶜ :=
+        compl_subset_compl.2 c.left.right.subset hxl
       filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl,
         ihn c.left.right, ihn c.right] with y hyl hydl hydr
-      replace hxl : x ∉ c.left.left.U
-      exact compl_subset_compl.2 c.left.left_U_subset_right_C hxl
-      replace hyl : y ∉ c.left.left.U
-      exact compl_subset_compl.2 c.left.left_U_subset_right_C hyl
+      replace hxl : x ∉ c.left.left.U :=
+        compl_subset_compl.2 c.left.left_U_subset_right_C hxl
+      replace hyl : y ∉ c.left.left.U :=
+        compl_subset_compl.2 c.left.left_U_subset_right_C hyl
       simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint,
         c.left.left.lim_of_nmem_U _ hxl, c.left.left.lim_of_nmem_U _ hyl]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
feat: a compact Gdelta set is a level set of a compactly supported function (#10101)
Diff
@@ -6,7 +6,9 @@ Authors: Yury G. Kudryashov
 import Mathlib.Analysis.NormedSpace.AddTorsor
 import Mathlib.LinearAlgebra.AffineSpace.Ordered
 import Mathlib.Topology.ContinuousFunction.Basic
-import Mathlib.Algebra.Order.Support
+import Mathlib.Topology.GDelta
+import Mathlib.Analysis.NormedSpace.FunctionSeries
+import Mathlib.Analysis.SpecificLimits.Basic
 
 #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
 
@@ -398,3 +400,68 @@ theorem exists_continuous_one_zero_of_isCompact [RegularSpace X] [LocallyCompact
     exact interior_subset hx
   · have : 0 ≤ f x ∧ f x ≤ 1 := by simpa using h'f x
     simp [this]
+
+/-- Urysohn's lemma: if `s` and `t` are two disjoint sets in a regular locally compact topological
+space `X`, with `s` compact and `t` closed, then there exists a continuous compactly supported
+function `f : X → ℝ` such that
+
+* `f` equals one on `s`;
+* `f` equals zero on `t`;
+* `0 ≤ f x ≤ 1` for all `x`.
+
+Moreover, if `s` is Gδ, one can ensure that `f ⁻¹ {1}` is exactly `s`.
+-/
+theorem exists_continuous_one_zero_of_isCompact_of_isGδ [RegularSpace X] [LocallyCompactSpace X]
+    {s t : Set X} (hs : IsCompact s) (h's : IsGδ s) (ht : IsClosed t) (hd : Disjoint s t) :
+    ∃ f : C(X, ℝ), s = f ⁻¹' {1} ∧ EqOn f 0 t ∧ HasCompactSupport f
+      ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 := by
+  rcases h's.eq_iInter_nat with ⟨U, U_open, hU⟩
+  obtain ⟨m, m_comp, -, sm, mt⟩ : ∃ m, IsCompact m ∧ IsClosed m ∧ s ⊆ interior m ∧ m ⊆ tᶜ :=
+    exists_compact_closed_between hs ht.isOpen_compl hd.symm.subset_compl_left
+  have A n : ∃ f : C(X, ℝ), EqOn f 1 s ∧ EqOn f 0 (U n ∩ interior m)ᶜ ∧ HasCompactSupport f
+      ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 := by
+    apply exists_continuous_one_zero_of_isCompact hs
+      ((U_open n).inter isOpen_interior).isClosed_compl
+    rw [disjoint_compl_right_iff_subset]
+    exact subset_inter ((hU.subset.trans (iInter_subset U n))) sm
+  choose f fs fm _hf f_range using A
+  obtain ⟨u, u_pos, u_sum, hu⟩ : ∃ (u : ℕ → ℝ), (∀ i, 0 < u i) ∧ Summable u ∧ ∑' i, u i = 1 :=
+    ⟨fun n ↦ 1/2/2^n, fun n ↦ by positivity, summable_geometric_two' 1, tsum_geometric_two' 1⟩
+  let g : X → ℝ := fun x ↦ ∑' n, u n * f n x
+  have hgmc : EqOn g 0 mᶜ := by
+    intro x hx
+    have B n : f n x = 0 := by
+      have : mᶜ ⊆ (U n ∩ interior m)ᶜ := by
+        simpa using (inter_subset_right _ _).trans interior_subset
+      exact fm n (this hx)
+    simp [B]
+  have I n x : u n * f n x ≤ u n := mul_le_of_le_one_right (u_pos n).le (f_range n x).2
+  have S x : Summable (fun n ↦ u n * f n x) := Summable.of_nonneg_of_le
+      (fun n ↦ mul_nonneg (u_pos n).le (f_range n x).1) (fun n ↦ I n x) u_sum
+  refine ⟨⟨g, ?_⟩, ?_, hgmc.mono (subset_compl_comm.mp mt), ?_, fun x ↦ ⟨?_, ?_⟩⟩
+  · apply continuous_tsum (fun n ↦ continuous_const.mul (f n).continuous) u_sum (fun n x ↦ ?_)
+    simpa [abs_of_nonneg, (u_pos n).le, (f_range n x).1] using I n x
+  · apply Subset.antisymm (fun x hx ↦ by simp [fs _ hx, hu]) ?_
+    apply compl_subset_compl.1
+    intro x hx
+    obtain ⟨n, hn⟩ : ∃ n, x ∉ U n := by simpa [hU] using hx
+    have fnx : f n x = 0 := fm _ (by simp [hn])
+    have : g x < 1 := by
+      apply lt_of_lt_of_le ?_ hu.le
+      exact tsum_lt_tsum (i := n) (fun i ↦ I i x) (by simp [fnx, u_pos n]) (S x) u_sum
+    simpa using this.ne
+  · exact HasCompactSupport.of_support_subset_isCompact m_comp
+      (Function.support_subset_iff'.mpr hgmc)
+  · exact tsum_nonneg (fun n ↦ mul_nonneg (u_pos n).le (f_range n x).1)
+  · apply le_trans _ hu.le
+    exact tsum_le_tsum (fun n ↦ I n x) (S x) u_sum
+
+theorem exists_continuous_nonneg_pos [RegularSpace X] [LocallyCompactSpace X] (x : X) :
+    ∃ f : C(X, ℝ), HasCompactSupport f ∧ 0 ≤ (f : X → ℝ) ∧ f x ≠ 0 := by
+  rcases exists_compact_mem_nhds x with ⟨k, hk, k_mem⟩
+  rcases exists_continuous_one_zero_of_isCompact hk isClosed_empty (disjoint_empty k)
+    with ⟨f, fk, -, f_comp, hf⟩
+  refine ⟨f, f_comp, fun x ↦ (hf x).1, ?_⟩
+  have := fk (mem_of_mem_nhds k_mem)
+  simp only [ContinuousMap.coe_mk, Pi.one_apply] at this
+  simp [this]
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -6,6 +6,7 @@ Authors: Yury G. Kudryashov
 import Mathlib.Analysis.NormedSpace.AddTorsor
 import Mathlib.LinearAlgebra.AffineSpace.Ordered
 import Mathlib.Topology.ContinuousFunction.Basic
+import Mathlib.Algebra.Order.Support
 
 #align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
 
feat: deprecate div_le_div_of_le_of_nonneg (#9399)

This was noticed in the discussion around #9393.

Diff
@@ -301,8 +301,8 @@ theorem continuous_lim (c : CU P) : Continuous c.lim := by
       simp only [pow_succ, c.lim_eq_midpoint, c.left.lim_eq_midpoint,
         c.left.left.lim_of_nmem_U _ hxl, c.left.left.lim_of_nmem_U _ hyl]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
-      refine' (div_le_div_of_le_of_nonneg (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _)
-        zero_le_two).trans _
+      refine' (div_le_div_of_le zero_le_two
+        (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _)).trans _
       rw [dist_self, zero_add]
       set r := (3 / 4 : ℝ) ^ n
       calc _ ≤ (r / 2 + r) / 2 := by gcongr
chore: rename some lemmas involving "of_closed" (#8492)

Three particular examples which caught my eye; not exhaustive.

Diff
@@ -12,7 +12,7 @@ import Mathlib.Topology.ContinuousFunction.Basic
 /-!
 # Urysohn's lemma
 
-In this file we prove Urysohn's lemma `exists_continuous_zero_one_of_closed`: for any two disjoint
+In this file we prove Urysohn's lemma `exists_continuous_zero_one_of_isClosed`: for any two disjoint
 closed sets `s` and `t` in a normal topological space `X` there exists a continuous function
 `f : X → ℝ` such that
 
@@ -320,7 +320,7 @@ then there exists a continuous function `f : X → ℝ` such that
 * `f` equals one on `t`;
 * `0 ≤ f x ≤ 1` for all `x`.
 -/
-theorem exists_continuous_zero_one_of_closed [NormalSpace X]
+theorem exists_continuous_zero_one_of_isClosed [NormalSpace X]
     {s t : Set X} (hs : IsClosed s) (ht : IsClosed t)
     (hd : Disjoint s t) : ∃ f : C(X, ℝ), EqOn f 0 s ∧ EqOn f 1 t ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 := by
   -- The actual proof is in the code above. Here we just repack it into the expected format.
@@ -338,7 +338,7 @@ theorem exists_continuous_zero_one_of_closed [NormalSpace X]
       exact ⟨v, v_open, cv, hv, trivial⟩ }
   exact ⟨⟨c.lim, c.continuous_lim⟩, c.lim_of_mem_C, fun x hx => c.lim_of_nmem_U _ fun h => h hx,
     c.lim_mem_Icc⟩
-#align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_closed
+#align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_isClosed
 
 /-- Urysohn's lemma: if `s` and `t` are two disjoint sets in a regular locally compact topological
 space `X`, with `s` compact and `t` closed, then there exists a continuous
feat: Urysohn lemma in regular locally compact spaces (#8124)

Also change a few theorems to instances, as instance loops are not a problem any more.


Open in Gitpod

Diff
@@ -20,6 +20,14 @@ closed sets `s` and `t` in a normal topological space `X` there exists a continu
 * `f` equals one on `t`;
 * `0 ≤ f x ≤ 1` for all `x`.
 
+We also give versions in a regular locally compact space where one assumes that `s` is compact
+and `t` is closed, in `exists_continuous_zero_one_of_isCompact`
+and `exists_continuous_one_zero_of_isCompact` (the latter providing additionally a function with
+compact support).
+
+We write a generic proof so that it applies both to normal spaces and to regular locally
+compact spaces.
+
 ## Implementation notes
 
 Most paper sources prove Urysohn's lemma using a family of open sets indexed by dyadic rational
@@ -28,10 +36,10 @@ needs to formalize the "dyadic induction", then prove that the resulting family
 monotone). So, we formalize a slightly different proof.
 
 Let `Urysohns.CU` be the type of pairs `(C, U)` of a closed set `C` and an open set `U` such that
-`C ⊆ U`. Since `X` is a normal topological space, for each `c : CU X` there exists an open set `u`
+`C ⊆ U`. Since `X` is a normal topological space, for each `c : CU` there exists an open set `u`
 such that `c.C ⊆ u ∧ closure u ⊆ c.U`. We define `c.left` and `c.right` to be `(c.C, u)` and
 `(closure u, c.U)`, respectively. Then we define a family of functions
-`Urysohns.CU.approx (c : Urysohns.CU X) (n : ℕ) : X → ℝ` by recursion on `n`:
+`Urysohns.CU.approx (c : Urysohns.CU) (n : ℕ) : X → ℝ` by recursion on `n`:
 
 * `c.approx 0` is the indicator of `c.Uᶜ`;
 * `c.approx (n + 1) x = (c.left.approx n x + c.right.approx n x) / 2`.
@@ -66,76 +74,88 @@ lemmas about `midpoint`.
 
 ## Tags
 
-Urysohn's lemma, normal topological space
+Urysohn's lemma, normal topological space, locally compact topological space
 -/
 
 
 variable {X : Type*} [TopologicalSpace X]
 
 open Set Filter TopologicalSpace Topology Filter
+open scoped Pointwise
 
 namespace Urysohns
 
 set_option linter.uppercaseLean3 false
 
 /-- An auxiliary type for the proof of Urysohn's lemma: a pair of a closed set `C` and its
-open neighborhood `U`. -/
-structure CU (X : Type*) [TopologicalSpace X] where
-  protected (C U : Set X)
+open neighborhood `U`, together with the assumption that `C` satisfies the property `P C`. The
+latter assumption will make it possible to prove simultaneously both versions of Urysohn's lemma,
+in normal spaces (with `P` always true) and in locally compact spaces (with `P = IsCompact`).
+We put also in the structure the assumption that, for any such pair, one may find an intermediate
+pair inbetween satisfying `P`, to avoid carrying it around in the argument. -/
+structure CU {X : Type*} [TopologicalSpace X] (P : Set X → Prop) where
+  /-- The inner set in the inductive construction towards Urysohn's lemma -/
+  protected C : Set X
+  /-- The outer set in the inductive construction towards Urysohn's lemma -/
+  protected U : Set X
+  protected P_C : P C
   protected closed_C : IsClosed C
   protected open_U : IsOpen U
   protected subset : C ⊆ U
+  protected hP : ∀ {c u : Set X}, IsClosed c → P c → IsOpen u → c ⊆ u →
+    ∃ v, IsOpen v ∧ c ⊆ v ∧ closure v ⊆ u ∧ P (closure v)
 #align urysohns.CU Urysohns.CU
 
-instance : Inhabited (CU X) :=
-  ⟨⟨∅, univ, isClosed_empty, isOpen_univ, empty_subset _⟩⟩
-
-variable [NormalSpace X]
-
 namespace CU
 
-/-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
+variable {P : Set X → Prop}
+
+/-- By assumption, for each `c : CU P` there exists an open set `u`
 such that `c.C ⊆ u` and `closure u ⊆ c.U`. `c.left` is the pair `(c.C, u)`. -/
 @[simps C]
-def left (c : CU X) : CU X where
+def left (c : CU P) : CU P where
   C := c.C
-  U := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose
+  U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose
   closed_C := c.closed_C
-  open_U := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose_spec.1
-  subset := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose_spec.2.1
+  P_C := c.P_C
+  open_U := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.1
+  subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.1
+  hP := c.hP
 #align urysohns.CU.left Urysohns.CU.left
 
-/-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
+/-- By assumption, for each `c : CU P` there exists an open set `u`
 such that `c.C ⊆ u` and `closure u ⊆ c.U`. `c.right` is the pair `(closure u, c.U)`. -/
 @[simps U]
-def right (c : CU X) : CU X where
-  C := closure (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose
+def right (c : CU P) : CU P where
+  C := closure (c.hP c.closed_C c.P_C c.open_U c.subset).choose
   U := c.U
   closed_C := isClosed_closure
+  P_C := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.2
   open_U := c.open_U
-  subset := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose_spec.2.2
+  subset := (c.hP c.closed_C c.P_C c.open_U c.subset).choose_spec.2.2.1
+  hP := c.hP
 #align urysohns.CU.right Urysohns.CU.right
 
-theorem left_U_subset_right_C (c : CU X) : c.left.U ⊆ c.right.C :=
+theorem left_U_subset_right_C (c : CU P) : c.left.U ⊆ c.right.C :=
   subset_closure
 #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C
 
-theorem left_U_subset (c : CU X) : c.left.U ⊆ c.U :=
+theorem left_U_subset (c : CU P) : c.left.U ⊆ c.U :=
   Subset.trans c.left_U_subset_right_C c.right.subset
 #align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset
 
-theorem subset_right_C (c : CU X) : c.C ⊆ c.right.C :=
+theorem subset_right_C (c : CU P) : c.C ⊆ c.right.C :=
   Subset.trans c.left.subset c.left_U_subset_right_C
 #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C
 
 /-- `n`-th approximation to a continuous function `f : X → ℝ` such that `f = 0` on `c.C` and `f = 1`
 outside of `c.U`. -/
-noncomputable def approx : ℕ → CU X → X → ℝ
+noncomputable def approx : ℕ → CU P → X → ℝ
   | 0, c, x => indicator c.Uᶜ 1 x
   | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x)
 #align urysohns.CU.approx Urysohns.CU.approx
 
-theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by
+theorem approx_of_mem_C (c : CU P) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by
   induction' n with n ihn generalizing c
   · exact indicator_of_not_mem (fun (hU : x ∈ c.Uᶜ) => hU <| c.subset hx) _
   · simp only [approx]
@@ -143,7 +163,7 @@ theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx
     exacts [c.subset_right_C hx, hx]
 #align urysohns.CU.approx_of_mem_C Urysohns.CU.approx_of_mem_C
 
-theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.approx n x = 1 := by
+theorem approx_of_nmem_U (c : CU P) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.approx n x = 1 := by
   induction' n with n ihn generalizing c
   · rw [← mem_compl_iff] at hx
     exact indicator_of_mem hx _
@@ -152,14 +172,14 @@ theorem approx_of_nmem_U (c : CU X) (n : ℕ) {x : X} (hx : x ∉ c.U) : c.appro
     exacts [hx, fun hU => hx <| c.left_U_subset hU]
 #align urysohns.CU.approx_of_nmem_U Urysohns.CU.approx_of_nmem_U
 
-theorem approx_nonneg (c : CU X) (n : ℕ) (x : X) : 0 ≤ c.approx n x := by
+theorem approx_nonneg (c : CU P) (n : ℕ) (x : X) : 0 ≤ c.approx n x := by
   induction' n with n ihn generalizing c
   · exact indicator_nonneg (fun _ _ => zero_le_one) _
   · simp only [approx, midpoint_eq_smul_add, invOf_eq_inv]
     refine' mul_nonneg (inv_nonneg.2 zero_le_two) (add_nonneg _ _) <;> apply ihn
 #align urysohns.CU.approx_nonneg Urysohns.CU.approx_nonneg
 
-theorem approx_le_one (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ 1 := by
+theorem approx_le_one (c : CU P) (n : ℕ) (x : X) : c.approx n x ≤ 1 := by
   induction' n with n ihn generalizing c
   · exact indicator_apply_le' (fun _ => le_rfl) fun _ => zero_le_one
   · simp only [approx, midpoint_eq_smul_add, invOf_eq_inv, smul_eq_mul, ← div_eq_inv_mul]
@@ -168,11 +188,11 @@ theorem approx_le_one (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ 1 := by
     exact Iff.mpr (div_le_one zero_lt_two) this
 #align urysohns.CU.approx_le_one Urysohns.CU.approx_le_one
 
-theorem bddAbove_range_approx (c : CU X) (x : X) : BddAbove (range fun n => c.approx n x) :=
+theorem bddAbove_range_approx (c : CU P) (x : X) : BddAbove (range fun n => c.approx n x) :=
   ⟨1, fun _ ⟨n, hn⟩ => hn ▸ c.approx_le_one n x⟩
 #align urysohns.CU.bdd_above_range_approx Urysohns.CU.bddAbove_range_approx
 
-theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
+theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU P} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
     c₂.approx n₂ x ≤ c₁.approx n₁ x := by
   by_cases hx : x ∈ c₁.U
   · calc
@@ -183,7 +203,7 @@ theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU X} (h : c₁.U ⊆ c₂.C) (
       _ = approx n₁ c₁ x := (approx_of_nmem_U _ _ hx).symm
 #align urysohns.CU.approx_le_approx_of_U_sub_C Urysohns.CU.approx_le_approx_of_U_sub_C
 
-theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
+theorem approx_mem_Icc_right_left (c : CU P) (n : ℕ) (x : X) :
     c.approx n x ∈ Icc (c.right.approx n x) (c.left.approx n x) := by
   induction' n with n ihn generalizing c
   · exact ⟨le_rfl, indicator_le_indicator_of_subset (compl_subset_compl.2 c.left_U_subset)
@@ -194,7 +214,7 @@ theorem approx_mem_Icc_right_left (c : CU X) (n : ℕ) (x : X) :
     exacts [subset_closure, subset_closure]
 #align urysohns.CU.approx_mem_Icc_right_left Urysohns.CU.approx_mem_Icc_right_left
 
-theorem approx_le_succ (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ c.approx (n + 1) x := by
+theorem approx_le_succ (c : CU P) (n : ℕ) (x : X) : c.approx n x ≤ c.approx (n + 1) x := by
   induction' n with n ihn generalizing c
   · simp only [approx, right_U, right_le_midpoint]
     exact (approx_mem_Icc_right_left c 0 x).2
@@ -202,7 +222,7 @@ theorem approx_le_succ (c : CU X) (n : ℕ) (x : X) : c.approx n x ≤ c.approx
     exact midpoint_le_midpoint (ihn _) (ihn _)
 #align urysohns.CU.approx_le_succ Urysohns.CU.approx_le_succ
 
-theorem approx_mono (c : CU X) (x : X) : Monotone fun n => c.approx n x :=
+theorem approx_mono (c : CU P) (x : X) : Monotone fun n => c.approx n x :=
   monotone_nat_of_le_succ fun n => c.approx_le_succ n x
 #align urysohns.CU.approx_mono Urysohns.CU.approx_mono
 
@@ -211,48 +231,48 @@ theorem approx_mono (c : CU X) (x : X) : Monotone fun n => c.approx n x :=
 * `0 ≤ f x ≤ 1` for all `x`;
 * `f` equals zero on `c.C` and equals one outside of `c.U`;
 -/
-protected noncomputable def lim (c : CU X) (x : X) : ℝ :=
+protected noncomputable def lim (c : CU P) (x : X) : ℝ :=
   ⨆ n, c.approx n x
 #align urysohns.CU.lim Urysohns.CU.lim
 
-theorem tendsto_approx_atTop (c : CU X) (x : X) :
+theorem tendsto_approx_atTop (c : CU P) (x : X) :
     Tendsto (fun n => c.approx n x) atTop (𝓝 <| c.lim x) :=
   tendsto_atTop_ciSup (c.approx_mono x) ⟨1, fun _ ⟨_, hn⟩ => hn ▸ c.approx_le_one _ _⟩
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
 
-theorem lim_of_mem_C (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
+theorem lim_of_mem_C (c : CU P) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
   simp only [CU.lim, approx_of_mem_C, h, ciSup_const]
 #align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_C
 
-theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
+theorem lim_of_nmem_U (c : CU P) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
   simp only [CU.lim, approx_of_nmem_U c _ h, ciSup_const]
 #align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_U
 
-theorem lim_eq_midpoint (c : CU X) (x : X) :
+theorem lim_eq_midpoint (c : CU P) (x : X) :
     c.lim x = midpoint ℝ (c.left.lim x) (c.right.lim x) := by
   refine' tendsto_nhds_unique (c.tendsto_approx_atTop x) ((tendsto_add_atTop_iff_nat 1).1 _)
   simp only [approx]
   exact (c.left.tendsto_approx_atTop x).midpoint (c.right.tendsto_approx_atTop x)
 #align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpoint
 
-theorem approx_le_lim (c : CU X) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x :=
+theorem approx_le_lim (c : CU P) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x :=
   le_ciSup (c.bddAbove_range_approx x) _
 #align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_lim
 
-theorem lim_nonneg (c : CU X) (x : X) : 0 ≤ c.lim x :=
+theorem lim_nonneg (c : CU P) (x : X) : 0 ≤ c.lim x :=
   (c.approx_nonneg 0 x).trans (c.approx_le_lim x 0)
 #align urysohns.CU.lim_nonneg Urysohns.CU.lim_nonneg
 
-theorem lim_le_one (c : CU X) (x : X) : c.lim x ≤ 1 :=
+theorem lim_le_one (c : CU P) (x : X) : c.lim x ≤ 1 :=
   ciSup_le fun _ => c.approx_le_one _ _
 #align urysohns.CU.lim_le_one Urysohns.CU.lim_le_one
 
-theorem lim_mem_Icc (c : CU X) (x : X) : c.lim x ∈ Icc (0 : ℝ) 1 :=
+theorem lim_mem_Icc (c : CU P) (x : X) : c.lim x ∈ Icc (0 : ℝ) 1 :=
   ⟨c.lim_nonneg x, c.lim_le_one x⟩
 #align urysohns.CU.lim_mem_Icc Urysohns.CU.lim_mem_Icc
 
 /-- Continuity of `Urysohns.CU.lim`. See module docstring for a sketch of the proofs. -/
-theorem continuous_lim (c : CU X) : Continuous c.lim := by
+theorem continuous_lim (c : CU P) : Continuous c.lim := by
   obtain ⟨h0, h1234, h1⟩ : 0 < (2⁻¹ : ℝ) ∧ (2⁻¹ : ℝ) < 3 / 4 ∧ (3 / 4 : ℝ) < 1 := by norm_num
   refine'
     continuous_iff_continuousAt.2 fun x =>
@@ -293,8 +313,6 @@ end CU
 
 end Urysohns
 
-variable [NormalSpace X]
-
 /-- Urysohn's lemma: if `s` and `t` are two disjoint closed sets in a normal topological space `X`,
 then there exists a continuous function `f : X → ℝ` such that
 
@@ -302,10 +320,80 @@ then there exists a continuous function `f : X → ℝ` such that
 * `f` equals one on `t`;
 * `0 ≤ f x ≤ 1` for all `x`.
 -/
-theorem exists_continuous_zero_one_of_closed {s t : Set X} (hs : IsClosed s) (ht : IsClosed t)
+theorem exists_continuous_zero_one_of_closed [NormalSpace X]
+    {s t : Set X} (hs : IsClosed s) (ht : IsClosed t)
     (hd : Disjoint s t) : ∃ f : C(X, ℝ), EqOn f 0 s ∧ EqOn f 1 t ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 := by
   -- The actual proof is in the code above. Here we just repack it into the expected format.
-  set c : Urysohns.CU X := ⟨s, tᶜ, hs, ht.isOpen_compl, disjoint_left.1 hd⟩
+  let P : Set X → Prop := fun _ ↦ True
+  set c : Urysohns.CU P :=
+  { C := s
+    U := tᶜ
+    P_C := trivial
+    closed_C := hs
+    open_U := ht.isOpen_compl
+    subset := disjoint_left.1 hd
+    hP := by
+      rintro c u c_closed - u_open cu
+      rcases normal_exists_closure_subset c_closed u_open cu with ⟨v, v_open, cv, hv⟩
+      exact ⟨v, v_open, cv, hv, trivial⟩ }
   exact ⟨⟨c.lim, c.continuous_lim⟩, c.lim_of_mem_C, fun x hx => c.lim_of_nmem_U _ fun h => h hx,
     c.lim_mem_Icc⟩
 #align exists_continuous_zero_one_of_closed exists_continuous_zero_one_of_closed
+
+/-- Urysohn's lemma: if `s` and `t` are two disjoint sets in a regular locally compact topological
+space `X`, with `s` compact and `t` closed, then there exists a continuous
+function `f : X → ℝ` such that
+
+* `f` equals zero on `s`;
+* `f` equals one on `t`;
+* `0 ≤ f x ≤ 1` for all `x`.
+-/
+theorem exists_continuous_zero_one_of_isCompact [RegularSpace X] [LocallyCompactSpace X]
+    {s t : Set X} (hs : IsCompact s) (ht : IsClosed t) (hd : Disjoint s t) :
+    ∃ f : C(X, ℝ), EqOn f 0 s ∧ EqOn f 1 t ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 := by
+  obtain ⟨k, k_comp, k_closed, sk, kt⟩ : ∃ k, IsCompact k ∧ IsClosed k ∧ s ⊆ interior k ∧ k ⊆ tᶜ :=
+    exists_compact_closed_between hs ht.isOpen_compl hd.symm.subset_compl_left
+  let P : Set X → Prop := IsCompact
+  set c : Urysohns.CU P :=
+  { C := k
+    U := tᶜ
+    P_C := k_comp
+    closed_C := k_closed
+    open_U := ht.isOpen_compl
+    subset := kt
+    hP := by
+      rintro c u - c_comp u_open cu
+      rcases exists_compact_closed_between c_comp u_open cu with ⟨k, k_comp, k_closed, ck, ku⟩
+      have A : closure (interior k) ⊆ k :=
+        (IsClosed.closure_subset_iff k_closed).2 interior_subset
+      refine ⟨interior k, isOpen_interior, ck, A.trans ku,
+        k_comp.of_isClosed_subset isClosed_closure A⟩ }
+  exact ⟨⟨c.lim, c.continuous_lim⟩, fun x hx ↦ c.lim_of_mem_C _ (sk.trans interior_subset hx),
+    fun x hx => c.lim_of_nmem_U _ fun h => h hx, c.lim_mem_Icc⟩
+
+/-- Urysohn's lemma: if `s` and `t` are two disjoint sets in a regular locally compact topological
+space `X`, with `s` compact and `t` closed, then there exists a continuous compactly supported
+function `f : X → ℝ` such that
+
+* `f` equals one on `s`;
+* `f` equals zero on `t`;
+* `0 ≤ f x ≤ 1` for all `x`.
+-/
+theorem exists_continuous_one_zero_of_isCompact [RegularSpace X] [LocallyCompactSpace X]
+    {s t : Set X} (hs : IsCompact s) (ht : IsClosed t) (hd : Disjoint s t) :
+    ∃ f : C(X, ℝ), EqOn f 1 s ∧ EqOn f 0 t ∧ HasCompactSupport f ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 := by
+  obtain ⟨k, k_comp, k_closed, sk, kt⟩ : ∃ k, IsCompact k ∧ IsClosed k ∧ s ⊆ interior k ∧ k ⊆ tᶜ :=
+    exists_compact_closed_between hs ht.isOpen_compl hd.symm.subset_compl_left
+  rcases exists_continuous_zero_one_of_isCompact hs isOpen_interior.isClosed_compl
+    (disjoint_compl_right_iff_subset.mpr sk) with ⟨⟨f, hf⟩, hfs, hft, h'f⟩
+  have A : t ⊆ (interior k)ᶜ := subset_compl_comm.mpr (interior_subset.trans kt)
+  refine ⟨⟨fun x ↦ 1 - f x, continuous_const.sub hf⟩, fun x hx ↦ by simpa using hfs hx,
+    fun x hx ↦ by simpa [sub_eq_zero] using (hft (A hx)).symm, ?_, fun x ↦ ?_⟩
+  · apply HasCompactSupport.intro' k_comp k_closed (fun x hx ↦ ?_)
+    simp only [ContinuousMap.coe_mk, sub_eq_zero]
+    apply (hft _).symm
+    contrapose! hx
+    simp only [mem_compl_iff, not_not] at hx
+    exact interior_subset hx
+  · have : 0 ≤ f x ∧ f x ≤ 1 := by simpa using h'f x
+    simp [this]
chore: cleanup typo in filter_upwards (#7719)

mathport was forgetting a space in filter_upwards [...]with instead of filter_upwards [...] with.

Diff
@@ -263,7 +263,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim := by
     rw [pow_zero]
     exact Real.dist_le_of_mem_Icc_01 (c.lim_mem_Icc _) (c.lim_mem_Icc _)
   · by_cases hxl : x ∈ c.left.U
-    · filter_upwards [IsOpen.mem_nhds c.left.open_U hxl, ihn c.left]with _ hyl hyd
+    · filter_upwards [IsOpen.mem_nhds c.left.open_U hxl, ihn c.left] with _ hyl hyd
       rw [pow_succ, c.lim_eq_midpoint, c.lim_eq_midpoint,
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hyl),
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hxl)]
@@ -273,7 +273,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim := by
     · replace hxl : x ∈ c.left.right.Cᶜ
       exact compl_subset_compl.2 c.left.right.subset hxl
       filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl,
-        ihn c.left.right, ihn c.right]with y hyl hydl hydr
+        ihn c.left.right, ihn c.right] with y hyl hydl hydr
       replace hxl : x ∉ c.left.left.U
       exact compl_subset_compl.2 c.left.left_U_subset_right_C hxl
       replace hyl : y ∉ c.left.left.U
chore: banish Type _ and Sort _ (#6499)

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

This has nice performance benefits.

Diff
@@ -70,7 +70,7 @@ Urysohn's lemma, normal topological space
 -/
 
 
-variable {X : Type _} [TopologicalSpace X]
+variable {X : Type*} [TopologicalSpace X]
 
 open Set Filter TopologicalSpace Topology Filter
 
@@ -80,7 +80,7 @@ set_option linter.uppercaseLean3 false
 
 /-- An auxiliary type for the proof of Urysohn's lemma: a pair of a closed set `C` and its
 open neighborhood `U`. -/
-structure CU (X : Type _) [TopologicalSpace X] where
+structure CU (X : Type*) [TopologicalSpace X] where
   protected (C U : Set X)
   protected closed_C : IsClosed C
   protected open_U : IsOpen U
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) 2021 Yury G. Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module topology.urysohns_lemma
-! 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.NormedSpace.AddTorsor
 import Mathlib.LinearAlgebra.AffineSpace.Ordered
 import Mathlib.Topology.ContinuousFunction.Basic
 
+#align_import topology.urysohns_lemma from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
 /-!
 # Urysohn's lemma
 
fix: change compl precedence (#5586)

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

Diff
@@ -134,7 +134,7 @@ theorem subset_right_C (c : CU X) : c.C ⊆ c.right.C :=
 /-- `n`-th approximation to a continuous function `f : X → ℝ` such that `f = 0` on `c.C` and `f = 1`
 outside of `c.U`. -/
 noncomputable def approx : ℕ → CU X → X → ℝ
-  | 0, c, x => indicator (c.Uᶜ) 1 x
+  | 0, c, x => indicator c.Uᶜ 1 x
   | n + 1, c, x => midpoint ℝ (approx n c.left x) (approx n c.right x)
 #align urysohns.CU.approx Urysohns.CU.approx
 
chore: fix many typos (#4983)

These are all doc fixes

Diff
@@ -98,7 +98,7 @@ variable [NormalSpace X]
 namespace CU
 
 /-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
-such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.left` is the pair `(c.C, u)`. -/
+such that `c.C ⊆ u` and `closure u ⊆ c.U`. `c.left` is the pair `(c.C, u)`. -/
 @[simps C]
 def left (c : CU X) : CU X where
   C := c.C
@@ -109,7 +109,7 @@ def left (c : CU X) : CU X where
 #align urysohns.CU.left Urysohns.CU.left
 
 /-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
-such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.right` is the pair `(closure u, c.U)`. -/
+such that `c.C ⊆ u` and `closure u ⊆ c.U`. `c.right` is the pair `(closure u, c.U)`. -/
 @[simps U]
 def right (c : CU X) : CU X where
   C := closure (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose
feat: golf using gcongr throughout the library (#4702)

100 sample uses of the new tactic gcongr, added in #3965.

Diff
@@ -272,7 +272,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim := by
         c.right.lim_of_mem_C _ (c.left_U_subset_right_C hxl)]
       refine' (dist_midpoint_midpoint_le _ _ _ _).trans _
       rw [dist_self, add_zero, div_eq_inv_mul]
-      exact mul_le_mul h1234.le hyd dist_nonneg (h0.trans h1234).le
+      gcongr
     · replace hxl : x ∈ c.left.right.Cᶜ
       exact compl_subset_compl.2 c.left.right.subset hxl
       filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl,
@@ -287,11 +287,9 @@ theorem continuous_lim (c : CU X) : Continuous c.lim := by
       refine' (div_le_div_of_le_of_nonneg (add_le_add_right (dist_midpoint_midpoint_le _ _ _ _) _)
         zero_le_two).trans _
       rw [dist_self, zero_add]
-      refine' (div_le_div_of_le_of_nonneg (add_le_add (div_le_div_of_le_of_nonneg hydl zero_le_two)
-        hydr) zero_le_two).trans_eq _
-      generalize (3 / 4 : ℝ) ^ n = r
-      field_simp [two_ne_zero' ℝ]
-      ring
+      set r := (3 / 4 : ℝ) ^ n
+      calc _ ≤ (r / 2 + r) / 2 := by gcongr
+        _ = _ := by field_simp; ring
 #align urysohns.CU.continuous_lim Urysohns.CU.continuous_lim
 
 end CU
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
@@ -220,15 +220,15 @@ protected noncomputable def lim (c : CU X) (x : X) : ℝ :=
 
 theorem tendsto_approx_atTop (c : CU X) (x : X) :
     Tendsto (fun n => c.approx n x) atTop (𝓝 <| c.lim x) :=
-  tendsto_atTop_csupᵢ (c.approx_mono x) ⟨1, fun _ ⟨_, hn⟩ => hn ▸ c.approx_le_one _ _⟩
+  tendsto_atTop_ciSup (c.approx_mono x) ⟨1, fun _ ⟨_, hn⟩ => hn ▸ c.approx_le_one _ _⟩
 #align urysohns.CU.tendsto_approx_at_top Urysohns.CU.tendsto_approx_atTop
 
 theorem lim_of_mem_C (c : CU X) (x : X) (h : x ∈ c.C) : c.lim x = 0 := by
-  simp only [CU.lim, approx_of_mem_C, h, csupᵢ_const]
+  simp only [CU.lim, approx_of_mem_C, h, ciSup_const]
 #align urysohns.CU.lim_of_mem_C Urysohns.CU.lim_of_mem_C
 
 theorem lim_of_nmem_U (c : CU X) (x : X) (h : x ∉ c.U) : c.lim x = 1 := by
-  simp only [CU.lim, approx_of_nmem_U c _ h, csupᵢ_const]
+  simp only [CU.lim, approx_of_nmem_U c _ h, ciSup_const]
 #align urysohns.CU.lim_of_nmem_U Urysohns.CU.lim_of_nmem_U
 
 theorem lim_eq_midpoint (c : CU X) (x : X) :
@@ -239,7 +239,7 @@ theorem lim_eq_midpoint (c : CU X) (x : X) :
 #align urysohns.CU.lim_eq_midpoint Urysohns.CU.lim_eq_midpoint
 
 theorem approx_le_lim (c : CU X) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x :=
-  le_csupᵢ (c.bddAbove_range_approx x) _
+  le_ciSup (c.bddAbove_range_approx x) _
 #align urysohns.CU.approx_le_lim Urysohns.CU.approx_le_lim
 
 theorem lim_nonneg (c : CU X) (x : X) : 0 ≤ c.lim x :=
@@ -247,7 +247,7 @@ theorem lim_nonneg (c : CU X) (x : X) : 0 ≤ c.lim x :=
 #align urysohns.CU.lim_nonneg Urysohns.CU.lim_nonneg
 
 theorem lim_le_one (c : CU X) (x : X) : c.lim x ≤ 1 :=
-  csupᵢ_le fun _ => c.approx_le_one _ _
+  ciSup_le fun _ => c.approx_le_one _ _
 #align urysohns.CU.lim_le_one Urysohns.CU.lim_le_one
 
 theorem lim_mem_Icc (c : CU X) (x : X) : c.lim x ∈ Icc (0 : ℝ) 1 :=
chore: tidy various files (#3718)
Diff
@@ -75,9 +75,7 @@ Urysohn's lemma, normal topological space
 
 variable {X : Type _} [TopologicalSpace X]
 
-open Set Filter TopologicalSpace
-
-open Topology Filter
+open Set Filter TopologicalSpace Topology Filter
 
 namespace Urysohns
 
@@ -89,7 +87,7 @@ structure CU (X : Type _) [TopologicalSpace X] where
   protected (C U : Set X)
   protected closed_C : IsClosed C
   protected open_U : IsOpen U
-  protected Subset : C ⊆ U
+  protected subset : C ⊆ U
 #align urysohns.CU Urysohns.CU
 
 instance : Inhabited (CU X) :=
@@ -104,21 +102,21 @@ such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.left` is the pair `(c.C, u)`.
 @[simps C]
 def left (c : CU X) : CU X where
   C := c.C
-  U := (normal_exists_closure_subset c.closed_C c.open_U c.Subset).choose
+  U := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose
   closed_C := c.closed_C
-  open_U := (normal_exists_closure_subset c.closed_C c.open_U c.Subset).choose_spec.1
-  Subset := (normal_exists_closure_subset c.closed_C c.open_U c.Subset).choose_spec.2.1
+  open_U := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose_spec.1
+  subset := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose_spec.2.1
 #align urysohns.CU.left Urysohns.CU.left
 
 /-- Due to `normal_exists_closure_subset`, for each `c : CU X` there exists an open set `u`
 such chat `c.C ⊆ u` and `closure u ⊆ c.U`. `c.right` is the pair `(closure u, c.U)`. -/
 @[simps U]
 def right (c : CU X) : CU X where
-  C := closure (normal_exists_closure_subset c.closed_C c.open_U c.Subset).choose
+  C := closure (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose
   U := c.U
   closed_C := isClosed_closure
   open_U := c.open_U
-  Subset := (normal_exists_closure_subset c.closed_C c.open_U c.Subset).choose_spec.2.2
+  subset := (normal_exists_closure_subset c.closed_C c.open_U c.subset).choose_spec.2.2
 #align urysohns.CU.right Urysohns.CU.right
 
 theorem left_U_subset_right_C (c : CU X) : c.left.U ⊆ c.right.C :=
@@ -126,11 +124,11 @@ theorem left_U_subset_right_C (c : CU X) : c.left.U ⊆ c.right.C :=
 #align urysohns.CU.left_U_subset_right_C Urysohns.CU.left_U_subset_right_C
 
 theorem left_U_subset (c : CU X) : c.left.U ⊆ c.U :=
-  Subset.trans c.left_U_subset_right_C c.right.Subset
+  Subset.trans c.left_U_subset_right_C c.right.subset
 #align urysohns.CU.left_U_subset Urysohns.CU.left_U_subset
 
 theorem subset_right_C (c : CU X) : c.C ⊆ c.right.C :=
-  Subset.trans c.left.Subset c.left_U_subset_right_C
+  Subset.trans c.left.subset c.left_U_subset_right_C
 #align urysohns.CU.subset_right_C Urysohns.CU.subset_right_C
 
 /-- `n`-th approximation to a continuous function `f : X → ℝ` such that `f = 0` on `c.C` and `f = 1`
@@ -142,7 +140,7 @@ noncomputable def approx : ℕ → CU X → X → ℝ
 
 theorem approx_of_mem_C (c : CU X) (n : ℕ) {x : X} (hx : x ∈ c.C) : c.approx n x = 0 := by
   induction' n with n ihn generalizing c
-  · exact indicator_of_not_mem (fun (hU : x ∈ c.Uᶜ) => hU <| c.Subset hx) _
+  · exact indicator_of_not_mem (fun (hU : x ∈ c.Uᶜ) => hU <| c.subset hx) _
   · simp only [approx]
     rw [ihn, ihn, midpoint_self]
     exacts [c.subset_right_C hx, hx]
@@ -276,7 +274,7 @@ theorem continuous_lim (c : CU X) : Continuous c.lim := by
       rw [dist_self, add_zero, div_eq_inv_mul]
       exact mul_le_mul h1234.le hyd dist_nonneg (h0.trans h1234).le
     · replace hxl : x ∈ c.left.right.Cᶜ
-      exact compl_subset_compl.2 c.left.right.Subset hxl
+      exact compl_subset_compl.2 c.left.right.subset hxl
       filter_upwards [IsOpen.mem_nhds (isOpen_compl_iff.2 c.left.right.closed_C) hxl,
         ihn c.left.right, ihn c.right]with y hyl hydl hydr
       replace hxl : x ∉ c.left.left.U
feat: port Topology.UrysohnsLemma (#3490)

Co-authored-by: Lucas V. R <lvr@s-viva.xyz> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Dependencies 10 + 641

642 files ported (98.5%)
277790 lines ported (98.1%)
Show graph

The unported dependencies are

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