Lean library Β· module TopologyByExample.Theorems.StoneCechButterflyRecursion
Transfinite construction of 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 exists_basic_subset
TopologyByExample.StoneCechRemainder.exists_basic_subset
Every neighbourhood in the remainder contains a basic neighbourhood.
theorem exists_basic_subset (p : Carrier) {U : Set Carrier} (hU : U β π p) :
β A : Set β, p β basic A β§ basic A β U
Proof
:= by
rw [nhds_subtype_eq_comap] at hU
obtain β¨V, hV, hVUβ© := mem_comap.mp hU
obtain β¨_, β¨A, rflβ©, hA, hAVβ© := ultrafilterBasis_is_basis.mem_nhds_iff.mp hV
exact β¨A, hA, fun q hq β¦ hVU (hAV hq)β©
definition Pair
TopologyByExample.StoneCechRemainder.Butterfly.Pair
A pair of supports for the two new pieces at one stage.
abbrev Pair
:= Set β Γ Set β
definition Valid
TopologyByExample.StoneCechRemainder.Butterfly.Valid
The two unions of pieces already constructed are disjoint and omit the point.
def Valid (p : Carrier) {ΞΉ : Type*} (old : ΞΉ β Pair) : Prop
:=
(β i, p β basic (old i).1) β§ (β i, p β basic (old i).2) β§
Disjoint (β i, basic (old i).1) (β i, basic (old i).2)
definition StepSpec
TopologyByExample.StoneCechRemainder.Butterfly.StepSpec
One extension preserves the old wings, covers outside its neighbourhood, and meets that neighbourhood on both sides.
def StepSpec (p : Carrier) (N : Set β) {ΞΉ : Type*} (old : ΞΉ β Pair) (v : Pair) : Prop
theorem exists_step
TopologyByExample.StoneCechRemainder.Butterfly.exists_step
A valid countable family always admits another extension.
theorem exists_step {ΞΉ : Type*} [Countable ΞΉ] (p : Carrier) (N : Set β)
(hN : p β basic N) (old : ΞΉ β Pair) (hv : Valid p old) :
β v, StepSpec p N old v
Proof
:= by
obtain β¨U, V, hβ© := butterfly_step_countable p (fun i β¦ (old i).1)
(fun i β¦ (old i).2) hv.1 hv.2.1 hv.2.2 N hN
exact β¨(U, V), hβ©
definition next
TopologyByExample.StoneCechRemainder.Butterfly.next
Choose an extension whenever the preceding stages admit one.
def next (p : Carrier) (N : Set β) (a : OmegaOne) (old : Iio a β Pair) : Pair
:= by
classical
exact if h : β v, StepSpec p N old v then h.choose else (β
, β
)
theorem next_spec
TopologyByExample.StoneCechRemainder.Butterfly.next_spec
The choice has the required specification for valid preceding stages.
theorem next_spec (p : Carrier) (N : Set β) (hN : p β basic N)
(a : OmegaOne) (old : Iio a β Pair) (hv : Valid p old) :
StepSpec p N old (next p N a old)
Proof
:= by
let : Countable (Iio a) := (OmegaOne.countable_Iio a).to_subtype
have he := exists_step p N hN old hv
simp only [next, dite_eq_left he]
exact he.choose_spec
definition pieces
TopologyByExample.StoneCechRemainder.Butterfly.pieces
The pair of new pieces at every countable ordinal.
def pieces (p : Carrier) (N : OmegaOne β Set β) : OmegaOne β Pair
:=
wellFounded_lt.fix fun a old β¦ next p (N a) a (fun b β¦ old b.val b.property)
theorem pieces_spec
TopologyByExample.StoneCechRemainder.Butterfly.pieces_spec
Every stage satisfies the extension invariant.
theorem pieces_spec (p : Carrier) (N : OmegaOne β Set β)
(hN : β a, p β basic (N a)) (a : OmegaOne) :
StepSpec p (N a) (fun b : Iio a β¦ pieces p N b.val) (pieces p N a)
Proof
:= by
refine (wellFounded_lt : WellFounded ((Β· < Β·) : OmegaOne β OmegaOne β Prop)).induction
(C := fun a : OmegaOne β¦ StepSpec p (N a)
(fun b : Iio a β¦ pieces p N b.val) (pieces p N a)) a ?_
intro a ih
have hv : Valid p (fun b : Iio a β¦ pieces p N b.val) := by
refine β¨fun b β¦ (ih b.val (mem_Iio.mp b.property)).2.1,
fun b β¦ (ih b.val (mem_Iio.mp b.property)).2.2.1, ?_β©
apply disjoint_left.mpr
intro q hqA hqB
obtain β¨b, hbβ© := mem_iUnion.mp hqA
obtain β¨c, hcβ© := mem_iUnion.mp hqB
rcases lt_trichotomy b.val c.val with hbc | hbc | hcb
Β· exact disjoint_left.mp (ih c.val (mem_Iio.mp c.property)).1
(Or.inl (mem_iUnion.mpr β¨β¨b.val, hbcβ©, hbβ©)) (Or.inr hc)
Β· have he : b = c := Subtype.ext hbc
subst c
exact disjoint_left.mp (ih b.val (mem_Iio.mp b.property)).1 (Or.inr hb) (Or.inr hc)
Β· exact disjoint_left.mp (ih b.val (mem_Iio.mp b.property)).1
(Or.inr hb) (Or.inl (mem_iUnion.mpr β¨β¨c.val, hcbβ©, hcβ©))
conv_rhs => rw [pieces, WellFounded.fix_eq]
exact next_spec p (N a) (hN a) a _ hv
definition leftWing
TopologyByExample.StoneCechRemainder.Butterfly.leftWing
The union of the first pieces.
def leftWing (p : Carrier) (N : OmegaOne β Set β) : Set Carrier
:=
β a, basic (pieces p N a).1
definition rightWing
TopologyByExample.StoneCechRemainder.Butterfly.rightWing
The union of the second pieces.
def rightWing (p : Carrier) (N : OmegaOne β Set β) : Set Carrier
:=
β a, basic (pieces p N a).2
theorem disjoint_pieces
TopologyByExample.StoneCechRemainder.Butterfly.disjoint_pieces
Any first piece is disjoint from any second piece.
theorem disjoint_pieces (p : Carrier) (N : OmegaOne β Set β)
(hN : β a, p β basic (N a)) (a b : OmegaOne) :
Disjoint (basic (pieces p N a).1) (basic (pieces p N b).2)
Proof
:= by
apply disjoint_left.mpr
intro q ha hb
rcases lt_trichotomy a b with hab | rfl | hba
Β· exact disjoint_left.mp (pieces_spec p N hN b).1
(Or.inl (mem_iUnion.mpr β¨β¨a, habβ©, haβ©)) (Or.inr hb)
Β· exact disjoint_left.mp (pieces_spec p N hN a).1 (Or.inr ha) (Or.inr hb)
Β· exact disjoint_left.mp (pieces_spec p N hN a).1
(Or.inr ha) (Or.inl (mem_iUnion.mpr β¨β¨b, hbaβ©, hbβ©))
theorem disjoint_wings
TopologyByExample.StoneCechRemainder.Butterfly.disjoint_wings
The two final wings are disjoint.
theorem disjoint_wings (p : Carrier) (N : OmegaOne β Set β)
(hN : β a, p β basic (N a)) : Disjoint (leftWing p N) (rightWing p N)
Proof
:= by
apply disjoint_left.mpr
intro q ha hb
obtain β¨a, haβ© := mem_iUnion.mp ha
obtain β¨b, hbβ© := mem_iUnion.mp hb
exact disjoint_left.mp (disjoint_pieces p N hN a b) ha hb
theorem point_notMem_wings
TopologyByExample.StoneCechRemainder.Butterfly.point_notMem_wings
Both final wings omit the point.
theorem point_notMem_wings (p : Carrier) (N : OmegaOne β Set β)
(hN : β a, p β basic (N a)) : p β leftWing p N β§ p β rightWing p N
Proof
:= by
constructor
Β· intro hp
obtain β¨a, haβ© := mem_iUnion.mp hp
exact (pieces_spec p N hN a).2.1 ha
Β· intro hp
obtain β¨a, haβ© := mem_iUnion.mp hp
exact (pieces_spec p N hN a).2.2.1 ha
theorem wings_union
TopologyByExample.StoneCechRemainder.Butterfly.wings_union
Enumerating all basic neighbourhoods makes the wings cover the punctured remainder.
theorem wings_union (p : Carrier) (N : OmegaOne β Set β)
(hN : β a, p β basic (N a))
(hcover : β A, p β basic A β β a, N a = A) :
leftWing p N βͺ rightWing p N = {p}αΆ
Proof
:= by
ext q
constructor
Β· intro hq he
have heq : q = p := mem_singleton_iff.mp he
subst q
exact hq.elim (point_notMem_wings p N hN).1 (point_notMem_wings p N hN).2
Β· intro hq
have hpq : p β ({q}αΆ : Set Carrier) := by
simpa only [mem_compl_iff, mem_singleton_iff, ne_eq, eq_comm] using hq
obtain β¨A, hpA, hAqβ© := exists_basic_subset p
(isClosed_singleton.isOpen_compl.mem_nhds hpq)
obtain β¨a, rflβ© := hcover A hpA
have hqa : q β basic (N a) := fun h β¦ hAq h (mem_singleton q)
rcases (pieces_spec p N hN a).2.2.2.1 hqa with hl | hr
Β· exact Or.inl (mem_iUnion.mpr β¨a, hlβ©)
Β· exact Or.inr (mem_iUnion.mpr β¨a, hrβ©)
theorem point_mem_closure_wings
TopologyByExample.StoneCechRemainder.Butterfly.point_mem_closure_wings
Both wings accumulate at the omitted point when every basic neighbourhood occurs.
theorem point_mem_closure_wings (p : Carrier) (N : OmegaOne β Set β)
(hN : β a, p β basic (N a))
(hcover : β A, p β basic A β β a, N a = A) :
p β closure (leftWing p N) β§ p β closure (rightWing p N)
Proof
:= by
constructor
Β· apply mem_closure_iff_nhds.mpr
intro U hU
obtain β¨A, hpA, hAUβ© := exists_basic_subset p hU
obtain β¨a, rflβ© := hcover A hpA
obtain β¨q, hq, hqNβ© := (pieces_spec p N hN a).2.2.2.2.1
exact β¨q, hAU hqN, mem_iUnion.mpr β¨a, hqβ©β©
Β· apply mem_closure_iff_nhds.mpr
intro U hU
obtain β¨A, hpA, hAUβ© := exists_basic_subset p hU
obtain β¨a, rflβ© := hcover A hpA
obtain β¨q, hq, hqNβ© := (pieces_spec p N hN a).2.2.2.2.2
exact β¨q, hAU hqN, mem_iUnion.mpr β¨a, hqβ©β©