Skip to content

Commit d2fb7e0

Browse files
committed
feat: generalize urysohns lemma (#32337)
Generalize some of the theorems in the Urysohn's lemma file.
1 parent 55bbac0 commit d2fb7e0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Mathlib/Topology/UrysohnsLemma.lean

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,10 @@ theorem exists_continuous_one_zero_of_isCompact_of_isGδ [RegularSpace X] [Local
478478
· apply le_trans _ hu.le
479479
exact (S x).tsum_le_tsum (fun n ↦ I n x) u_sum
480480

481-
/-- A variation of Urysohn's lemma. In a `T2Space X`, for a closed set `t` and a relatively
481+
/-- A variation of Urysohn's lemma. In a `R1Space X`, for a closed set `t` and a relatively
482482
compact open set `s` such that `t ⊆ s`, there is a continuous function `f` supported in `s`,
483483
`f x = 1` on `t` and `0 ≤ f x ≤ 1`. -/
484-
lemma exists_tsupport_one_of_isOpen_isClosed [T2Space X] {s t : Set X}
484+
lemma exists_tsupport_one_of_isOpen_isClosed [R1Space X] {s t : Set X}
485485
(hs : IsOpen s) (hscp : IsCompact (closure s)) (ht : IsClosed t) (hst : t ⊆ s) :
486486
∃ f : C(X, ℝ), tsupport f ⊆ s ∧ EqOn f 1 t ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1 := by
487487
-- separate `sᶜ` and `t` by `u` and `v`.
@@ -529,14 +529,16 @@ lemma exists_tsupport_one_of_isOpen_isClosed [T2Space X] {s t : Set X}
529529
/-- A variation of **Urysohn's lemma**. In a Hausdorff locally compact space, for a compact set `K`
530530
contained in an open set `V`, there exists a compactly supported continuous function `f` such that
531531
`0 ≤ f ≤ 1`, `f = 1` on K and the support of `f` is contained in `V`. -/
532-
lemma exists_continuousMap_one_of_isCompact_subset_isOpen [T2Space X] [LocallyCompactSpace X]
532+
lemma exists_continuousMap_one_of_isCompact_subset_isOpen [R1Space X] [LocallyCompactSpace X]
533533
{K V : Set X} (hK : IsCompact K) (hV : IsOpen V) (hKV : K ⊆ V) :
534534
∃ f : C(X, ℝ), Set.EqOn f 1 K ∧ IsCompact (tsupport f) ∧
535535
tsupport f ⊆ V ∧ ∀ x, f x ∈ Set.Icc 0 1 := by
536536
obtain ⟨U, hU1, hU2, hU3, hU4⟩ := exists_open_between_and_isCompact_closure hK hV hKV
537-
obtain ⟨f, hf1, hf2, hf3⟩ := exists_tsupport_one_of_isOpen_isClosed hU1 hU4 hK.isClosed hU2
538-
have : tsupport f ⊆ closure U := hf1.trans subset_closure
539-
exact ⟨f, hf2, hU4.of_isClosed_subset isClosed_closure this, this.trans hU3, hf3⟩
537+
obtain ⟨f, hf1, hf2, hf3⟩ := exists_tsupport_one_of_isOpen_isClosed hU1 hU4
538+
isClosed_closure (hK.closure_subset_of_isOpen hU1 hU2)
539+
have hfU : tsupport f ⊆ closure U := hf1.trans subset_closure
540+
exact ⟨f, hf2.mono subset_closure,
541+
.of_isClosed_subset hU4 isClosed_closure hfU, hfU.trans hU3, hf3⟩
540542

541543
theorem exists_continuous_nonneg_pos [RegularSpace X] [LocallyCompactSpace X] (x : X) :
542544
∃ f : C(X, ℝ), HasCompactSupport f ∧ 0 ≤ (f : X → ℝ) ∧ f x ≠ 0 := by

0 commit comments

Comments
 (0)