Lean library · module TopologyByExample.Spaces.HewittNeighbourhoods
Neighbourhoods in Hewitt's condensed corkscrew
Starting with a set of ordinary points, add a specified neighbourhood of each end attached to a point already reached. This describes both open neighbourhoods and closed neighbourhoods of controlled size.
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.
definition tip
TopologyByExample.HewittCondensedCorkscrew.tip
One of the two ends before attachment.
def tip : Bool → TychonoffCorkscrew.Space
| false => .neg | true => .pos
definition anchor
TopologyByExample.HewittCondensedCorkscrew.anchor
The ordinary point to which the indicated end is attached.
noncomputable def anchor (i : OmegaOne) (b : Bool)
:= copy i (tip b)
inductive type Reached
TopologyByExample.HewittCondensedCorkscrew.Reached
Ordinary points reached by starting with a seed in each copy and successively adding the indicated parts of every attached corkscrew.
inductive Reached (S : OmegaOne → Set TychonoffCorkscrew.Space)
(T : OmegaOne → Bool → Set TychonoffCorkscrew.Space) : Space → Prop
| seed (x : Space) (hx : ordinary x ∈ S x.index) : Reached S T x
| child (x : Space) (b : Bool) (hp : Reached S T (anchor x.index b))
(ht : ordinary x ∈ T x.index b) : Reached S T x
definition grow
TopologyByExample.HewittCondensedCorkscrew.grow
The set of points reached after finitely many steps of the construction.
def grow (S : OmegaOne → Set TychonoffCorkscrew.Space)
(T : OmegaOne → Bool → Set TychonoffCorkscrew.Space) : Set Space
:= {x | Reached S T x}
variable {S S' : OmegaOne → Set TychonoffCorkscrew.Space}
variable {T T' : OmegaOne → Bool → Set TychonoffCorkscrew.Space}
theorem grow_subset
TopologyByExample.HewittCondensedCorkscrew.grow_subset
A set containing the seeds and closed under the attachment steps contains all points reached.
theorem grow_subset {U : Set Space} (hs : ∀ x, ordinary x ∈ S x.index → x ∈ U)
(ht : ∀ x b, anchor x.index b ∈ U → ordinary x ∈ T x.index b → x ∈ U) :
grow S T ⊆ U
theorem grow_mono
TopologyByExample.HewittCondensedCorkscrew.grow_mono
Increasing the seeds or available attachment neighbourhoods increases the result.
theorem grow_mono (hs : ∀ i, S i ⊆ S' i) (ht : ∀ i b, T i b ⊆ T' i b) :
grow S T ⊆ grow S' T'
Proof
:=
grow_subset (fun x h ↦ .seed x (hs _ h)) (fun x b h h' ↦ .child x b h (ht _ _ h'))
theorem preimage_grow
TopologyByExample.HewittCondensedCorkscrew.preimage_grow
In a single corkscrew only its seed and the two parts attached at its own ends can contribute to the result.
theorem preimage_grow (hs : ∀ i b, tip b ∉ S i)
(ht : ∀ i b c, tip c ∈ T i b ↔ c = b) (i : OmegaOne) :
copy i ⁻¹' grow S T = S i ∪ ⋃ b, ⋃ (_ : anchor i b ∈ grow S T), T i b
Proof
:= by
have htip (b : Bool) : tip b ∈ copy i ⁻¹' grow S T ↔
tip b ∈ S i ∪ ⋃ c, ⋃ (_ : anchor i c ∈ grow S T), T i c := by
constructor
· intro h
exact Or.inr (mem_iUnion₂.mpr ⟨b, h, (ht i b b).mpr rfl⟩)
· rintro (h | h)
· exact (hs i b h).elim
· obtain ⟨c, hc, hbc⟩ := mem_iUnion₂.mp h
exact (ht i c b).mp hbc ▸ hc
ext t
cases t with
| neg => exact htip false
| pos => exact htip true
| point k y =>
constructor
· intro hx
cases (show Reached S T ⟨i,k,y⟩ from hx) with
| seed _ h => exact Or.inl h
| child _ b h ht => exact Or.inr (mem_iUnion₂.mpr ⟨b, h, ht⟩)
· rintro (h | h)
· exact Reached.seed _ h
· obtain ⟨b, hb, ht⟩ := mem_iUnion₂.mp h
exact Reached.child _ b hb ht
On this site: Hewitt's condensed corkscrew: Expanding a set through attached ends
theorem isOpen_grow
TopologyByExample.HewittCondensedCorkscrew.isOpen_grow
Open seeds and open end neighbourhoods produce an open set.
theorem isOpen_grow (hs : ∀ i b, tip b ∉ S i) (ht : ∀ i b c, tip c ∈ T i b ↔ c = b)
(ho : ∀ i, IsOpen (S i)) (hTo : ∀ i b, IsOpen (T i b)) : IsOpen (grow S T)
Proof
:= by
apply isOpen_iff.mpr
intro i
rw [preimage_grow hs ht]
exact (ho i).union (isOpen_iUnion fun b ↦ isOpen_iUnion fun _ ↦ hTo i b)
theorem isClosed_grow
TopologyByExample.HewittCondensedCorkscrew.isClosed_grow
Closed seeds and closed end neighbourhoods give a closed set, since each individual corkscrew has only two ends.
theorem isClosed_grow (hs : ∀ i b, tip b ∉ S i) (ht : ∀ i b c, tip c ∈ T i b ↔ c = b)
(hc : ∀ i, IsClosed (S i)) (hTc : ∀ i b, IsClosed (T i b)) : IsClosed (grow S T)
Proof
:= by
apply isClosed_iff.mpr
intro i
rw [preimage_grow hs ht]
exact (hc i).union (isClosed_iUnion_of_finite fun b ↦
isClosed_iUnion_of_finite fun _ ↦ hTc i b)
theorem tip_injective
TopologyByExample.HewittCondensedCorkscrew.tip_injective
private theorem tip_injective : Function.Injective tip
Proof
:= by
rintro (_ | _) (_ | _) h <;> first | rfl | cases h
instance regularSpace
TopologyByExample.HewittCondensedCorkscrew.regularSpace
Each open neighbourhood of a point contains a closed neighbourhood obtained by successively shrinking seeds and the two end neighbourhoods on every copy.
instance regularSpace : RegularSpace Space
Proof
:= by
classical
apply RegularSpace.of_exists_mem_nhds_isClosed_subset
intro x W hW
obtain ⟨U, hUW, hu, hx⟩ := mem_nhds_iff.mp hW
let P := copy x.index ⁻¹' U \ {tip false, tip true}
have hP : IsOpen P := ((isOpen_iff.mp hu) _).sdiff
(show ({tip false, tip true} : Set _).Finite by simp).isClosed
have hxP : ordinary x ∈ P := ⟨hx, by simp [ordinary, tip]⟩
obtain ⟨V, ⟨hxV, hv⟩, hVP⟩ := (hasBasis_opens_closure _).mem_iff.mp (hP.mem_nhds hxP)
let S (i : OmegaOne) := if i = x.index then V else ∅
let C (i : OmegaOne) := closure (S i)
have hs i : IsOpen (S i) := by dsimp [S]; split <;> simp [hv]
have hC i : C i ⊆ copy i ⁻¹' U \ {tip false, tip true} := by
by_cases hi : i = x.index
· subst i; simpa [C, S] using hVP
· simp [C, S, hi]
let bound (i : OmegaOne) (b : Bool) := {tip (!b)}ᶜ ∩
(if anchor i b ∈ U then copy i ⁻¹' U else univ)
have hbound i b : bound i b ∈ 𝓝 (tip b) := by
have hd : tip b ≠ tip (!b) := fun h ↦ by cases b <;> cases tip_injective h
refine inter_mem (isOpen_compl_singleton.mem_nhds hd) ?_
by_cases hb : anchor i b ∈ U
· simpa [hb] using ((isOpen_iff.mp hu) i).mem_nhds hb
· simp [hb]
choose T hT hTb using fun i b ↦ (hasBasis_opens_closure _).mem_iff.mp (hbound i b)
have htc (i : OmegaOne) (b c : Bool) : tip c ∈ closure (T i b) ↔ c = b := by
constructor
· intro h
have hne := (hTb i b h).1
cases b <;> cases c <;> first | rfl | exact (hne rfl).elim
· rintro rfl
exact subset_closure (hT i c).1
have hto i b c : tip c ∈ T i b ↔ c = b :=
⟨fun h ↦ (htc i b c).mp (subset_closure h), fun h ↦ h ▸ (hT i b).1⟩
have htip i b : tip b ∉ C i := fun h ↦ (hC i h).2 (by cases b <;> simp)
have hcl : IsClosed (grow C (fun i b ↦ closure (T i b))) :=
isClosed_grow htip htc (fun _ ↦ isClosed_closure) (fun _ _ ↦ isClosed_closure)
have hop : IsOpen (grow S T) :=
isOpen_grow (fun i b h ↦ htip i b (subset_closure h)) hto hs (fun i b ↦ (hT i b).2)
have hxin : x ∈ grow S T := Reached.seed _ (by simpa [S] using hxV)
refine ⟨_, mem_of_superset (hop.mem_nhds hxin)
(grow_mono (fun _ ↦ subset_closure) (fun _ _ ↦ subset_closure)), hcl, ?_⟩
apply Subset.trans _ hUW
apply grow_subset (fun y h ↦ (hC y.index h).1)
intro y b hb hy
simpa only [hb, ↓reduceIte, mem_preimage, copy_ordinary] using (hTb y.index b hy).2
On this site: Hewitt's condensed corkscrew is regular