Documentation

Mathlib.Topology.UrysohnsLemma

Urysohn's lemma #

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

Implementation notes #

Most paper sources prove Urysohn's lemma using a family of open sets indexed by dyadic rational numbers on [0, 1]. There are many technical difficulties with formalizing this proof (e.g., one needs to formalize the "dyadic induction", then prove that the resulting family of open sets is 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 CU. Since X is a normal topological space, for each c : CU X 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:

For each x this is a monotone family of functions that are equal to zero on c.C and are equal to one outside of c.U. We also have c.approx n x ∈ [0, 1] for all c, n, and x.

Let Urysohns.CU.lim c be the supremum (or equivalently, the limit) of c.approx n. Then properties of Urysohns.CU.approx immediately imply that

In order to prove that c.lim is continuous at x, we prove by induction on n : ℕ that for y in a small neighborhood of x we have |c.lim y - c.lim x| ≤ (3 / 4) ^ n. Induction base follows from c.lim x ∈ [0, 1], c.lim y ∈ [0, 1]. For the induction step, consider two cases:

The actual formalization uses midpoint ℝ x y instead of (x + y) / 2 because we have more API lemmas about midpoint.

Tags #

Urysohn's lemma, normal topological space

structure Urysohns.CU (X : Type u_2) [TopologicalSpace X] :
Type u_2

An auxiliary type for the proof of Urysohn's lemma: a pair of a closed set C and its open neighborhood U.

Instances For
    Equations
    • Urysohns.instInhabitedCU = { default := { C := , U := Set.univ, closed_C := (_ : IsClosed ), open_U := (_ : IsOpen Set.univ), subset := (_ : Set.univ) } }
    @[simp]

    Due to normal_exists_closure_subset, for each c : CU X there exists an open set u such that c.C ⊆ u and closure u ⊆ c.U. c.left is the pair (c.C, u).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]

      Due to normal_exists_closure_subset, for each c : CU X 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).

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def Urysohns.CU.approx {X : Type u_1} [TopologicalSpace X] [NormalSpace X] :
        Urysohns.CU XX

        n-th approximation to a continuous function f : X → ℝ such that f = 0 on c.C and f = 1 outside of c.U.

        Equations
        Instances For
          theorem Urysohns.CU.approx_of_mem_C {X : Type u_1} [TopologicalSpace X] [NormalSpace X] (c : Urysohns.CU X) (n : ) {x : X} (hx : x c.C) :
          theorem Urysohns.CU.approx_of_nmem_U {X : Type u_1} [TopologicalSpace X] [NormalSpace X] (c : Urysohns.CU X) (n : ) {x : X} (hx : ¬x c.U) :
          theorem Urysohns.CU.approx_le_approx_of_U_sub_C {X : Type u_1} [TopologicalSpace X] [NormalSpace X] {c₁ : Urysohns.CU X} {c₂ : Urysohns.CU X} (h : c₁.U c₂.C) (n₁ : ) (n₂ : ) (x : X) :
          Urysohns.CU.approx n₂ c₂ x Urysohns.CU.approx n₁ c₁ x
          noncomputable def Urysohns.CU.lim {X : Type u_1} [TopologicalSpace X] [NormalSpace X] (c : Urysohns.CU X) (x : X) :

          A continuous function f : X → ℝ such that

          • 0 ≤ f x ≤ 1 for all x;
          • f equals zero on c.C and equals one outside of c.U;
          Equations
          Instances For
            theorem Urysohns.CU.tendsto_approx_atTop {X : Type u_1} [TopologicalSpace X] [NormalSpace X] (c : Urysohns.CU X) (x : X) :
            Filter.Tendsto (fun n => Urysohns.CU.approx n c x) Filter.atTop (nhds (Urysohns.CU.lim c x))
            theorem Urysohns.CU.lim_of_mem_C {X : Type u_1} [TopologicalSpace X] [NormalSpace X] (c : Urysohns.CU X) (x : X) (h : x c.C) :
            theorem Urysohns.CU.lim_of_nmem_U {X : Type u_1} [TopologicalSpace X] [NormalSpace X] (c : Urysohns.CU X) (x : X) (h : ¬x c.U) :

            Continuity of Urysohns.CU.lim. See module docstring for a sketch of the proofs.

            theorem exists_continuous_zero_one_of_closed {X : Type u_1} [TopologicalSpace X] [NormalSpace X] {s : Set X} {t : Set X} (hs : IsClosed s) (ht : IsClosed t) (hd : Disjoint s t) :
            f, Set.EqOn (f) 0 s Set.EqOn (f) 1 t ∀ (x : X), f x Set.Icc 0 1

            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

            • f equals zero on s;
            • f equals one on t;
            • 0 ≤ f x ≤ 1 for all x.