Skip to content

Commit cd0d357

Browse files
committed
feat(Topology/UniformSpace/OfCompactT2): generalize theorem (#30917)
This PR continues the work from #24103. Original PR: #24103
1 parent 59f196f commit cd0d357

File tree

3 files changed

+46
-41
lines changed

3 files changed

+46
-41
lines changed

Mathlib/Topology/Separation/Regular.lean

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,17 @@ lemma IsClosed.HasSeparatingCover {s t : Set X} [LindelofSpace X] [RegularSpace
267267
u u_open (fun a ainh ↦ mem_iUnion.mpr ⟨a, u_nhds a ainh⟩)
268268
exact ⟨u ∘ f, f_cov, fun n ↦ ⟨u_open (f n), u_dis (f n)⟩⟩
269269

270+
/-- Given two separable points `x` and `y`, we can find neighbourhoods
271+
`x ∈ V₁ ⊆ U₁` and `y ∈ V₂ ⊆ U₂`, with the `Vₖ` closed and the `Uₖ` open,
272+
such that the `Uₖ` are disjoint. -/
273+
theorem disjoint_nested_nhds_of_not_inseparable [RegularSpace X] {x y : X} (h : ¬Inseparable x y) :
274+
∃ U₁ ∈ 𝓝 x, ∃ V₁ ∈ 𝓝 x, ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y,
275+
IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂ := by
276+
rcases r1_separation h with ⟨U₁, U₂, U₁_op, U₂_op, x_in, y_in, H⟩
277+
rcases exists_mem_nhds_isClosed_subset (U₁_op.mem_nhds x_in) with ⟨V₁, V₁_in, V₁_closed, h₁⟩
278+
rcases exists_mem_nhds_isClosed_subset (U₂_op.mem_nhds y_in) with ⟨V₂, V₂_in, V₂_closed, h₂⟩
279+
exact ⟨U₁, mem_of_superset V₁_in h₁, V₁, V₁_in, U₂, mem_of_superset V₂_in h₂, V₂, V₂_in,
280+
V₁_closed, V₂_closed, U₁_op, U₂_op, h₁, h₂, H⟩
270281

271282
end RegularSpace
272283

@@ -389,12 +400,8 @@ instance {ι : Type*} {X : ι → Type*} [∀ i, TopologicalSpace (X i)] [∀ i,
389400
with the `Vₖ` closed and the `Uₖ` open, such that the `Uₖ` are disjoint. -/
390401
theorem disjoint_nested_nhds [T3Space X] {x y : X} (h : x ≠ y) :
391402
∃ U₁ ∈ 𝓝 x, ∃ V₁ ∈ 𝓝 x, ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y,
392-
IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂ := by
393-
rcases t2_separation h with ⟨U₁, U₂, U₁_op, U₂_op, x_in, y_in, H⟩
394-
rcases exists_mem_nhds_isClosed_subset (U₁_op.mem_nhds x_in) with ⟨V₁, V₁_in, V₁_closed, h₁⟩
395-
rcases exists_mem_nhds_isClosed_subset (U₂_op.mem_nhds y_in) with ⟨V₂, V₂_in, V₂_closed, h₂⟩
396-
exact ⟨U₁, mem_of_superset V₁_in h₁, V₁, V₁_in, U₂, mem_of_superset V₂_in h₂, V₂, V₂_in,
397-
V₁_closed, V₂_closed, U₁_op, U₂_op, h₁, h₂, H⟩
403+
IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂ :=
404+
disjoint_nested_nhds_of_not_inseparable (mt Inseparable.eq h)
398405

399406
open SeparationQuotient
400407

Mathlib/Topology/UniformSpace/OfCompactT2.lean

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@ Authors: Patrick Massot, Yury Kudryashov
55
-/
66
import Mathlib.Topology.Separation.Regular
77
import Mathlib.Topology.UniformSpace.Defs
8+
import Mathlib.Tactic.TautoSet
89

910
/-!
1011
# Compact separated uniform spaces
1112
1213
## Main statement
1314
14-
* `uniformSpace_of_compact_t2`: every compact T2 topological structure is induced by a uniform
15+
* `uniformSpaceOfCompactR1`: every compact R1 topological structure is induced by a uniform
1516
structure. This uniform structure is described by `compactSpace_uniformity`.
1617
1718
## Implementation notes
1819
19-
The construction `uniformSpace_of_compact_t2` is not declared as an instance, as it would badly
20+
The construction `uniformSpaceOfCompactR1` is not declared as an instance, as it would badly
2021
loop.
2122
2223
## Tags
@@ -35,7 +36,7 @@ variable {γ : Type*}
3536

3637

3738
/-- The unique uniform structure inducing a given compact topological structure. -/
38-
def uniformSpaceOfCompactT2 [TopologicalSpace γ] [CompactSpace γ] [T2Space γ] : UniformSpace γ where
39+
def uniformSpaceOfCompactR1 [TopologicalSpace γ] [CompactSpace γ] [R1Space γ] : UniformSpace γ where
3940
uniformity := 𝓝ˢ (diagonal γ)
4041
symm := continuous_swap.tendsto_nhdsSet fun _ => Eq.symm
4142
comp := by
@@ -55,55 +56,53 @@ def uniformSpaceOfCompactT2 [TopologicalSpace γ] [CompactSpace γ] [T2Space γ]
5556
-- Hence compactness would give us a cluster point (x, y) for F ⊓ 𝓟 Vᶜ
5657
obtain ⟨⟨x, y⟩, hxy⟩ : ∃ p : γ × γ, ClusterPt p (F ⊓ 𝓟 Vᶜ) := exists_clusterPt_of_compactSpace _
5758
-- In particular (x, y) is a cluster point of 𝓟 Vᶜ, hence is not in the interior of V,
58-
-- and a fortiori not in Δ, so x ≠ y
59+
-- so x and y are inseparable
5960
have clV : ClusterPt (x, y) (𝓟 <| Vᶜ) := hxy.of_inf_right
60-
have : (x, y) ∉ interior V := by
61-
have : (x, y) ∈ closure Vᶜ := by rwa [mem_closure_iff_clusterPt]
62-
rwa [closure_compl] at this
63-
have diag_subset : diagonal γ ⊆ interior V := subset_interior_iff_mem_nhdsSet.2 V_in
64-
have x_ne_y : x ≠ y := mt (@diag_subset (x, y)) this
61+
have ninsep_xy : ¬Inseparable x y := by
62+
intro h
63+
rw [← mem_closure_iff_clusterPt, (h.prod .rfl).mem_closed_iff isClosed_closure,
64+
closure_compl] at clV
65+
apply clV
66+
rw [mem_interior_iff_mem_nhds]
67+
exact nhds_le_nhdsSet (mem_diagonal y) V_in
6568
-- Since γ is compact and Hausdorff, it is T₄, hence T₃.
6669
-- So there are closed neighborhoods V₁ and V₂ of x and y contained in
6770
-- disjoint open neighborhoods U₁ and U₂.
6871
obtain
69-
⟨U₁, _, V₁, V₁_in, U₂, _, V₂, V₂_in, V₁_cl, V₂_cl, U₁_op, U₂_op, VU₁, VU₂, hU₁₂⟩ :=
70-
disjoint_nested_nhds x_ne_y
72+
⟨U₁, -, V₁, V₁_in, U₂, -, V₂, V₂_in, V₁_cl, V₂_cl, U₁_op, U₂_op, VU₁, VU₂, hU₁₂⟩ :=
73+
disjoint_nested_nhds_of_not_inseparable ninsep_xy
7174
-- We set U₃ := (V₁ ∪ V₂)ᶜ so that W := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃ is an open
7275
-- neighborhood of Δ.
7376
let U₃ := (V₁ ∪ V₂)ᶜ
7477
have U₃_op : IsOpen U₃ := (V₁_cl.union V₂_cl).isOpen_compl
7578
let W := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃
7679
have W_in : W ∈ 𝓝Δ := by
7780
rw [mem_nhdsSet_iff_forall]
78-
rintro ⟨z, z'⟩ (rfl : z = z')
81+
rintro ⟨z, z'⟩ hzz'
7982
refine IsOpen.mem_nhds ?_ ?_
8083
· apply_rules [IsOpen.union, IsOpen.prod]
81-
· simp only [W, mem_union, mem_prod, and_self_iff]
82-
exact (_root_.em _).imp_left fun h => union_subset_union VU₁ VU₂ h
84+
· cases hzz'
85+
simp only [W, U₃, mem_union, mem_prod]
86+
tauto_set
8387
-- So W ○ W ∈ F by definition of F
84-
have : W ○ W ∈ F := by simpa only using mem_lift' W_in
88+
have : W ○ W ∈ F := mem_lift' W_in
8589
-- And V₁ ×ˢ V₂ ∈ 𝓝 (x, y)
8690
have hV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y) := prod_mem_nhds V₁_in V₂_in
8791
-- But (x, y) is also a cluster point of F so (V₁ ×ˢ V₂) ∩ (W ○ W) ≠ ∅
88-
-- However the construction of W implies (V₁ ×ˢ V₂) ∩ (W ○ W) = ∅.
89-
-- Indeed assume for contradiction there is some (u, v) in the intersection.
9092
obtain ⟨⟨u, v⟩, ⟨u_in, v_in⟩, w, huw, hwv⟩ :=
9193
clusterPt_iff_nonempty.mp hxy.of_inf_left hV₁₂ this
92-
-- So u ∈ V₁, v ∈ V₂, and there exists some w such that (u, w) ∈ W and (w, v) ∈ W.
93-
-- Because u is in V₁ which is disjoint from U₂ and U₃, (u, w) ∈ W forces (u, w) ∈ U₁ ×ˢ U₁.
94-
have uw_in : (u, w) ∈ U₁ ×ˢ U₁ :=
95-
(huw.resolve_right fun h => h.1 <| Or.inl u_in).resolve_right fun h =>
96-
hU₁₂.le_bot ⟨VU₁ u_in, h.1
97-
-- Similarly, because v ∈ V₂, (w, v) ∈ W forces (w, v) ∈ U₂ ×ˢ U₂.
98-
have wv_in : (w, v) ∈ U₂ ×ˢ U₂ :=
99-
(hwv.resolve_right fun h => h.2 <| Or.inr v_in).resolve_left fun h =>
100-
hU₁₂.le_bot ⟨h.2, VU₂ v_in⟩
101-
-- Hence w ∈ U₁ ∩ U₂ which is empty.
102-
-- So we have a contradiction
103-
exact hU₁₂.le_bot ⟨uw_in.2, wv_in.1
94+
-- However the construction of W implies (V₁ ×ˢ V₂) ∩ (W ○ W) = ∅.
95+
simp only [W, U₃, mem_union, mem_prod] at huw hwv
96+
tauto_set
10497
nhds_eq_comap_uniformity x := by
10598
simp_rw [nhdsSet_diagonal, comap_iSup, nhds_prod_eq, comap_prod, Function.comp_def, comap_id']
106-
rw [iSup_split_single _ x, comap_const_of_mem fun V => mem_of_mem_nhds]
107-
suffices ∀ y ≠ x, comap (fun _ : γ ↦ x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x by simpa
108-
intro y hxy
109-
simp [comap_const_of_notMem (compl_singleton_mem_nhds hxy) (not_not_intro rfl)]
99+
rw [iSup_split _ (Inseparable x)]
100+
conv_rhs =>
101+
congr
102+
· enter [1, i, 1, hi]
103+
rw [← hi.nhds_eq, comap_const_of_mem fun V => mem_of_mem_nhds]
104+
· enter [1, i, 1, hi]
105+
rw [(not_specializes_iff_exists_open.1 (mt Specializes.inseparable hi)).elim
106+
fun S hS => comap_const_of_notMem (hS.1.mem_nhds hS.2.1) hS.2.2]
107+
rw [iSup_subtype', @iSup_const _ _ _ _ ⟨⟨x, .rfl⟩⟩]
108+
simp

scripts/noshake.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
"Mathlib.Init"],
205205
"ignore":
206206
{"Mathlib.Util.Notation3": ["Lean.Elab.AuxDef", "Lean.Elab.BuiltinCommand"],
207+
"Mathlib.Topology.UniformSpace.OfCompactT2": ["Mathlib.Tactic.TautoSet"],
207208
"Mathlib.Topology.UniformSpace.Defs": ["Mathlib.Tactic.Monotonicity.Basic"],
208209
"Mathlib.Topology.Sober": ["Mathlib.Algebra.HierarchyDesign"],
209210
"Mathlib.Topology.Sheaves.Forget": ["Mathlib.Algebra.Category.Ring.Limits"],
@@ -427,9 +428,7 @@
427428
"Mathlib.Geometry.Manifold.Notation":
428429
["Mathlib.Geometry.Manifold.ContMDiff.Defs",
429430
"Mathlib.Geometry.Manifold.MFDeriv.Defs"],
430-
"Mathlib.FieldTheory.Normal.Defs": ["Mathlib.FieldTheory.Galois.Notation"],
431431
"Mathlib.FieldTheory.Galois.Notation": ["Mathlib.Algebra.Algebra.Equiv"],
432-
"Mathlib.FieldTheory.Finite.Basic": ["Mathlib.FieldTheory.Galois.Notation"],
433432
"Mathlib.Deprecated.NatLemmas": ["Batteries.Data.Nat.Lemmas", "Batteries.WF"],
434433
"Mathlib.Deprecated.MinMax": ["Mathlib.Order.MinMax"],
435434
"Mathlib.Deprecated.LazyList": ["Mathlib.Lean.Thunk"],

0 commit comments

Comments
 (0)