Lean library · module TopologyByExample.Theorems.StoneCechButterflyStep
The countable extension step for butterfly wings
This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.
theorem basic_compl
TopologyByExample.StoneCechRemainder.basic_compl
Basic complements agree with complements of supports.
theorem basic_compl (A : Set ℕ) : basic Aᶜ = (basic A)ᶜ
Proof
:= by
ext p
exact Ultrafilter.compl_mem_iff_notMem
theorem basic_inter
TopologyByExample.StoneCechRemainder.basic_inter
Basic intersections agree with intersections of supports.
theorem basic_inter (A B : Set ℕ) : basic (A ∩ B) = basic A ∩ basic B
Proof
:= by
ext p
exact inter_mem_iff
theorem basic_union
TopologyByExample.StoneCechRemainder.basic_union
Basic unions agree with unions of supports.
theorem basic_union (A B : Set ℕ) : basic (A ∪ B) = basic A ∪ basic B
Proof
:= by
ext p
exact Ultrafilter.union_mem_iff
theorem basic_sdiff
TopologyByExample.StoneCechRemainder.basic_sdiff
Basic differences agree with differences of supports.
theorem basic_sdiff (A B : Set ℕ) : basic (A \ B) = basic A \ basic B
Proof
:= by
simp only [sdiff_eq_compl_inter, basic_inter, basic_compl]
theorem exists_two_common_basics
TopologyByExample.StoneCechRemainder.exists_two_common_basics
Countably many basic neighbourhoods have two disjoint nonempty basic subsets, both avoiding the original point.
theorem exists_two_common_basics (p : Carrier) (A : ℕ → Set ℕ)
(hA : ∀ n, p ∈ basic (A n)) :
∃ E F : Set ℕ, (basic E).Nonempty ∧ (basic F).Nonempty ∧
Disjoint (basic E) (basic F) ∧ p ∉ basic E ∧ p ∉ basic F ∧
(∀ n, basic E ⊆ basic (A n)) ∧ (∀ n, basic F ⊆ basic (A n))
Proof
:= by
obtain ⟨S, hS, hSA⟩ := exists_infinite_common_support p.property hA
obtain ⟨T, hTS, hT, hTp⟩ := exists_infinite_subset_notMem hS p.val
let e := hT.natEmbedding
let E : Set ℕ := range (fun n ↦ (e (2 * n)).val)
let F : Set ℕ := range (fun n ↦ (e (2 * n + 1)).val)
have hi (k : ℕ) : Function.Injective (fun n ↦ (e (2 * n + k)).val) := by
intro m n he
have := e.injective (Subtype.ext he)
omega
have hET : E ⊆ T := by
rintro _ ⟨n, rfl⟩; exact (e _).property
have hFT : F ⊆ T := by
rintro _ ⟨n, rfl⟩; exact (e _).property
have hEF : Disjoint E F := by
apply disjoint_left.mpr
rintro _ ⟨m, rfl⟩ ⟨n, hn⟩
have := e.injective (Subtype.ext hn)
omega
have hEI : E.Infinite := by
simpa only [Nat.add_zero] using infinite_range_of_injective (hi 0)
refine ⟨E, F, (basic_nonempty_iff E).mpr hEI,
(basic_nonempty_iff F).mpr (infinite_range_of_injective (hi 1)), ?_, ?_, ?_, ?_, ?_⟩
· apply (disjoint_basic_iff E F).mpr
rw [hEF.inter_eq]
exact finite_empty
· exact fun hp ↦ hTp (mem_of_superset hp hET)
· exact fun hp ↦ hTp (mem_of_superset hp hFT)
· intro n q hq
exact hSA q.val q.property (mem_of_superset hq (hET.trans hTS)) n
· intro n q hq
exact hSA q.val q.property (mem_of_superset hq (hFT.trans hTS)) n
theorem butterfly_step
TopologyByExample.StoneCechRemainder.butterfly_step
Extend two countable disjoint wings while covering the complement of a prescribed basic neighbourhood and meeting that neighbourhood on both sides.
theorem butterfly_step (p : Carrier) (A B : ℕ → Set ℕ)
(hA : ∀ n, p ∉ basic (A n)) (hB : ∀ n, p ∉ basic (B n))
(hd : Disjoint (⋃ n, basic (A n)) (⋃ n, basic (B n)))
(N : Set ℕ) (hN : p ∈ basic N) :
∃ U V : Set ℕ,
Disjoint ((⋃ n, basic (A n)) ∪ basic U) ((⋃ n, basic (B n)) ∪ basic V) ∧
p ∉ basic U ∧ p ∉ basic V ∧
(basic N)ᶜ ⊆ basic U ∪ basic V ∧
(basic U ∩ basic N).Nonempty ∧ (basic V ∩ basic N).Nonempty
Proof
:= by
classical
have hi : ∀ n m, (A n ∩ B m).Finite := by
intro n m
apply (disjoint_basic_iff (A n) (B m)).mp
exact hd.mono (subset_iUnion (fun k ↦ basic (A k)) n)
(subset_iUnion (fun k ↦ basic (B k)) m)
obtain ⟨C, hAC, hBC⟩ := exists_almost_separator A B hi
have hAK : (⋃ n, basic (A n)) ⊆ basic C := by
rintro q hq
obtain ⟨n, hn⟩ := mem_iUnion.mp hq
exact mem_of_almostSubset q.property hn (hAC n)
have hBK : (⋃ n, basic (B n)) ⊆ (basic C)ᶜ := by
rintro q hq
obtain ⟨n, hn⟩ := mem_iUnion.mp hq
exact Ultrafilter.compl_mem_iff_notMem.mp (mem_of_almostSubset q.property hn (hBC n))
let T : ℕ → Set ℕ := fun n ↦ (N ∩ (A n)ᶜ) ∩ (B n)ᶜ
have hT : ∀ n, p ∈ basic (T n) := by
intro n
exact inter_mem (inter_mem hN (Ultrafilter.compl_mem_iff_notMem.mpr (hA n)))
(Ultrafilter.compl_mem_iff_notMem.mpr (hB n))
obtain ⟨E, F, hE, hF, hEF, hpE, hpF, hET, hFT⟩ := exists_two_common_basics p T hT
have he (q : Carrier) (hq : q ∈ basic E) :
q ∈ basic N ∧ q ∉ ⋃ n, basic (A n) ∧ q ∉ ⋃ n, basic (B n) := by
have ht (n) := hET n hq
simp only [T, basic_inter, basic_compl, mem_inter_iff, mem_compl_iff] at ht
exact ⟨(ht 0).1.1, fun ha ↦ by
obtain ⟨n, hn⟩ := mem_iUnion.mp ha
exact (ht n).1.2 hn, fun hb ↦ by
obtain ⟨n, hn⟩ := mem_iUnion.mp hb
exact (ht n).2 hn⟩
have hf (q : Carrier) (hq : q ∈ basic F) :
q ∈ basic N ∧ q ∉ ⋃ n, basic (A n) ∧ q ∉ ⋃ n, basic (B n) := by
have ht (n) := hFT n hq
simp only [T, basic_inter, basic_compl, mem_inter_iff, mem_compl_iff] at ht
exact ⟨(ht 0).1.1, fun ha ↦ by
obtain ⟨n, hn⟩ := mem_iUnion.mp ha
exact (ht n).1.2 hn, fun hb ↦ by
obtain ⟨n, hn⟩ := mem_iUnion.mp hb
exact (ht n).2 hn⟩
refine ⟨(C \ N) ∪ E, (Cᶜ \ N) ∪ F, ?_⟩
simp only [basic_union, basic_sdiff, basic_compl]
refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩
· apply disjoint_left.mpr
intro q hqA hqB
rcases hqA with ha | ha | ha
· rcases hqB with hb | hb | hb
· exact hBK hb (hAK ha)
· exact hb.1 (hAK ha)
· exact (hf q hb).2.1 ha
· rcases hqB with hb | hb | hb
· exact hBK hb ha.1
· exact hb.1 ha.1
· exact ha.2 (hf q hb).1
· rcases hqB with hb | hb | hb
· exact (he q ha).2.2 hb
· exact hb.2 (he q ha).1
· exact disjoint_left.mp hEF ha hb
· simp only [mem_union, Set.mem_sdiff]
exact fun h ↦ h.elim (fun h ↦ h.2 hN) hpE
· simp only [mem_union, Set.mem_sdiff]
exact fun h ↦ h.elim (fun h ↦ h.2 hN) hpF
· intro q hq
by_cases hc : q ∈ basic C
· exact Or.inl (Or.inl ⟨hc, hq⟩)
· exact Or.inr (Or.inl ⟨hc, hq⟩)
· obtain ⟨q, hq⟩ := hE
exact ⟨q, Or.inr hq, (he q hq).1⟩
· obtain ⟨q, hq⟩ := hF
exact ⟨q, Or.inr hq, (hf q hq).1⟩
theorem butterfly_step_countable
TopologyByExample.StoneCechRemainder.butterfly_step_countable
The butterfly extension step also applies to an arbitrary countable set of previous stages, including an empty initial segment.
theorem butterfly_step_countable {ι : Type*} [Countable ι] (p : Carrier)
(A B : ι → Set ℕ)
(hA : ∀ i, p ∉ basic (A i)) (hB : ∀ i, p ∉ basic (B i))
(hd : Disjoint (⋃ i, basic (A i)) (⋃ i, basic (B i)))
(N : Set ℕ) (hN : p ∈ basic N) :
∃ U V : Set ℕ,
Disjoint ((⋃ i, basic (A i)) ∪ basic U) ((⋃ i, basic (B i)) ∪ basic V) ∧
p ∉ basic U ∧ p ∉ basic V ∧
(basic N)ᶜ ⊆ basic U ∪ basic V ∧
(basic U ∩ basic N).Nonempty ∧ (basic V ∩ basic N).Nonempty
Proof
:= by
obtain ⟨e, he⟩ := exists_surjective_nat (Option ι)
have heq (D : ι → Set ℕ) :
(⋃ n, basic ((e n).elim ∅ D)) = ⋃ i, basic (D i) := by
ext q
constructor
· intro hq
obtain ⟨n, hn⟩ := mem_iUnion.mp hq
cases hen : e n with
| none => simp [hen, basic] at hn
| some i => exact mem_iUnion.mpr ⟨i, by simpa [hen] using hn⟩
· intro hq
obtain ⟨i, hi⟩ := mem_iUnion.mp hq
obtain ⟨n, hn⟩ := he (some i)
exact mem_iUnion.mpr ⟨n, by simpa [hn] using hi⟩
have ha : ∀ n, p ∉ basic ((e n).elim ∅ A) := by
intro n
cases hen : e n with
| none => simp [basic]
| some i => exact hA i
have hb : ∀ n, p ∉ basic ((e n).elim ∅ B) := by
intro n
cases hen : e n with
| none => simp [basic]
| some i => exact hB i
have hd' : Disjoint (⋃ n, basic ((e n).elim ∅ A))
(⋃ n, basic ((e n).elim ∅ B)) := by
simpa only [heq] using hd
simpa only [heq] using butterfly_step p _ _ ha hb hd' N hN