Skip to content

Commit a79d64d

Browse files
committed
feat: singletons are closed in T1 spaces (#14824)
1 parent bff6c19 commit a79d64d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Mathlib/Data/Set/Subsingleton.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ theorem subsingleton_univ_iff : (univ : Set α).Subsingleton ↔ Subsingleton α
8484
⟨subsingleton_of_univ_subsingleton, fun h => @subsingleton_univ _ h⟩
8585
#align set.subsingleton_univ_iff Set.subsingleton_univ_iff
8686

87+
lemma Subsingleton.inter_singleton : (s ∩ {a}).Subsingleton :=
88+
Set.subsingleton_of_subset_singleton Set.inter_subset_right
89+
90+
lemma Subsingleton.singleton_inter : ({a} ∩ s).Subsingleton :=
91+
Set.subsingleton_of_subset_singleton Set.inter_subset_left
92+
8793
theorem subsingleton_of_subsingleton [Subsingleton α] {s : Set α} : Set.Subsingleton s :=
8894
subsingleton_univ.anti (subset_univ s)
8995
#align set.subsingleton_of_subsingleton Set.subsingleton_of_subsingleton

Mathlib/Topology/Separation.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,17 @@ theorem SeparationQuotient.t1Space_iff : T1Space (SeparationQuotient X) ↔ R0Sp
10681068
erw [mk_eq_mk, inseparable_iff_specializes_and]
10691069
exact ⟨xspecy, yspecx⟩
10701070

1071+
lemma Set.Subsingleton.isClosed [T1Space X] {A : Set X} (h : A.Subsingleton) : IsClosed A := by
1072+
rcases h.eq_empty_or_singleton with rfl | ⟨x, rfl⟩
1073+
· exact isClosed_empty
1074+
· exact isClosed_singleton
1075+
1076+
lemma isClosed_inter_singleton [T1Space X] {A : Set X} {a : X} : IsClosed (A ∩ {a}) :=
1077+
Subsingleton.inter_singleton.isClosed
1078+
1079+
lemma isClosed_singleton_inter [T1Space X] {A : Set X} {a : X} : IsClosed ({a} ∩ A) :=
1080+
Subsingleton.singleton_inter.isClosed
1081+
10711082
theorem singleton_mem_nhdsWithin_of_mem_discrete {s : Set X} [DiscreteTopology s] {x : X}
10721083
(hx : x ∈ s) : {x} ∈ 𝓝[s] x := by
10731084
have : ({⟨x, hx⟩} : Set s) ∈ 𝓝 (⟨x, hx⟩ : s) := by simp [nhds_discrete]

0 commit comments

Comments
 (0)