Lean library · module TopologyByExample.Spaces.MisraAttachmentTopology
Topology of the Misra adjunction
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.
structure Patch
TopologyByExample.MisraAttachment.Patch
Compatible subsets of the old space and all attached copies.
structure Patch {X ι : Type*} (t : ι → Bool → X) where
/-- The prescribed subset of the old space. -/
old : Set X
/-- The prescribed subset in each attached copy. -/
fresh : ι → Set MisraE0
agrees : ∀ i s, MisraE0.apex s ∈ fresh i ↔ t i s ∈ old
definition set
TopologyByExample.MisraAttachment.Patch.set
Descend a compatible family of subsets to the adjunction.
def Patch.set {X ι : Type*} {t : ι → Bool → X} (P : Patch t) : Set (Space t)
Definition
:=
Set.ofPred <| Quot.lift
(Sum.elim (fun x ↦ x ∈ P.old) (fun p : Σ _ : ι, MisraE0 ↦ p.2 ∈ P.fresh p.1)) (by
intro a b h
cases h with
| attach i s => exact propext (P.agrees i s))
theorem mem_set_base
TopologyByExample.MisraAttachment.Patch.mem_set_base
The descended set has the prescribed old-space trace.
@[simp] theorem Patch.mem_set_base {X ι : Type*} {t : ι → Bool → X} (P : Patch t) (x : X) :
base t x ∈ P.set ↔ x ∈ P.old
Proof
:= Iff.rfl
theorem mem_set_copy
TopologyByExample.MisraAttachment.Patch.mem_set_copy
The descended set has the prescribed trace on each copy.
@[simp] theorem Patch.mem_set_copy {X ι : Type*} {t : ι → Bool → X} (P : Patch t)
(i : ι) (x : MisraE0) : copy t i x ∈ P.set ↔ x ∈ P.fresh i
Proof
:= Iff.rfl
theorem isOpen
TopologyByExample.MisraAttachment.Patch.isOpen
Compatible open subsets descend to an open subset of the quotient.
theorem Patch.isOpen {X ι : Type*} [TopologicalSpace X] {t : ι → Bool → X} (P : Patch t)
(ho : IsOpen P.old) (hf : ∀ i, IsOpen (P.fresh i)) : IsOpen P.set
Proof
:= by
apply (isQuotientMap_quot_mk (r := Rel t)).isOpen_preimage.mp
apply isOpen_sum_iff.2
exact ⟨ho, isOpen_sigma_iff.2 hf⟩
definition compl
TopologyByExample.MisraAttachment.Patch.compl
Complement each constituent of a compatible patch.
def Patch.compl {X ι : Type*} {t : ι → Bool → X} (P : Patch t) : Patch t
Definition
where
old := P.oldᶜ
fresh i := (P.fresh i)ᶜ
agrees i s := not_congr (P.agrees i s)
theorem compl_set
TopologyByExample.MisraAttachment.Patch.compl_set
Complementation commutes with descending a patch.
theorem Patch.compl_set {X ι : Type*} {t : ι → Bool → X} (P : Patch t) :
P.compl.set = P.setᶜ
Proof
:= by
ext x
induction x using Quot.inductionOn with
| h x => cases x <;> rfl
theorem isClopen
TopologyByExample.MisraAttachment.Patch.isClopen
Compatible clopen subsets descend to a clopen subset.
theorem Patch.isClopen {X ι : Type*} [TopologicalSpace X] {t : ι → Bool → X} (P : Patch t)
(ho : IsClopen P.old) (hf : ∀ i, IsClopen (P.fresh i)) : IsClopen P.set
Proof
:= by
refine ⟨?_, P.isOpen ho.isOpen (fun i ↦ (hf i).isOpen)⟩
apply isOpen_compl_iff.1
rw [← P.compl_set]
exact P.compl.isOpen ho.compl.isOpen (fun i ↦ (hf i).compl.isOpen)
theorem disjoint
TopologyByExample.MisraAttachment.Patch.disjoint
Disjoint compatible patches descend to disjoint subsets.
theorem Patch.disjoint {X ι : Type*} {t : ι → Bool → X} (P Q : Patch t)
(ho : Disjoint P.old Q.old) (hf : ∀ i, Disjoint (P.fresh i) (Q.fresh i)) :
Disjoint P.set Q.set
Proof
:= by
apply disjoint_left.2
intro z
induction z using Quot.inductionOn with
| h z =>
cases z with
| inl x => exact fun hp hq ↦ disjoint_left.1 ho hp hq
| inr p => exact fun hp hq ↦ disjoint_left.1 (hf p.1) hp hq
definition tailPatch
TopologyByExample.MisraAttachment.tailPatch
Extend an old subset by the selected apex tails in every copy.
noncomputable def tailPatch {X ι : Type*} (t : ι → Bool → X) (U : Set X)
(δ : OmegaOne) : Patch t
Definition
where
old := U
fresh i := ⋃ s, ⋃ (_ : t i s ∈ U), MisraE0.apexNhd s δ
agrees i s := by simp [MisraE0.apexNhd]
theorem isOpen_tailPatch
TopologyByExample.MisraAttachment.isOpen_tailPatch
Open old subsets have open tail extensions.
theorem isOpen_tailPatch {X ι : Type*} [TopologicalSpace X] (t : ι → Bool → X)
{U : Set X} (hU : IsOpen U) (δ : OmegaOne) : IsOpen (tailPatch t U δ).set
Proof
:=
(tailPatch t U δ).isOpen hU (fun _ ↦ isOpen_iUnion fun s ↦
isOpen_iUnion fun _ ↦ MisraE0.isOpen_apexNhd s δ)
theorem disjoint_tailPatch
TopologyByExample.MisraAttachment.disjoint_tailPatch
Tail extensions preserve disjointness of old subsets.
theorem disjoint_tailPatch {X ι : Type*} (t : ι → Bool → X) {U V : Set X}
(hUV : Disjoint U V) (δ ε : OmegaOne) :
Disjoint (tailPatch t U δ).set (tailPatch t V ε).set
Proof
:= by
apply Patch.disjoint _ _ hUV
intro i
apply disjoint_left.2
intro x hx hy
obtain ⟨s, hs, hxs⟩ := mem_iUnion₂.1 hx
obtain ⟨r, hr, hyr⟩ := mem_iUnion₂.1 hy
by_cases hsr : s = r
· subst r
exact disjoint_left.1 hUV hs hr
· exact disjoint_left.1 (MisraE0.disjoint_apexNhd hsr δ ε) hxs hyr
theorem exists_disjoint_open_extensions
TopologyByExample.MisraAttachment.exists_disjoint_open_extensions
Every pair of disjoint open sets has disjoint open extensions to the adjunction.
theorem exists_disjoint_open_extensions {X ι : Type*} [TopologicalSpace X]
(t : ι → Bool → X) {U V : Set X} (hU : IsOpen U) (hV : IsOpen V)
(hUV : Disjoint U V) : ∃ U' V' : Set (Space t), IsOpen U' ∧ IsOpen V' ∧
base t ⁻¹' U' = U ∧ base t ⁻¹' V' = V ∧ Disjoint U' V'
Proof
:= by
exact ⟨(tailPatch t U ⊥).set, (tailPatch t V ⊥).set,
isOpen_tailPatch t hU ⊥, isOpen_tailPatch t hV ⊥, rfl, rfl,
disjoint_tailPatch t hUV ⊥ ⊥⟩
definition oldLabel
TopologyByExample.MisraAttachment.oldLabel
Remember an old point represented by an apex, and discard all genuinely new points.
def oldLabel {X ι : Type*} (t : ι → Bool → X) : Space t → Option X
Definition
:=
Quot.lift (Sum.elim some (fun p : Σ _ : ι, MisraE0 ↦ match p.2 with
| .apex s => some (t p.1 s)
| _ => none)) (by intro a b h; cases h; rfl)
theorem base_injective
TopologyByExample.MisraAttachment.base_injective
No two old points are identified in the adjunction.
theorem base_injective {X ι : Type*} (t : ι → Bool → X) : Function.Injective (base t)
Proof
:= by
intro x y h
exact Option.some.inj (congrArg (oldLabel t) h)
theorem isInducing_base
TopologyByExample.MisraAttachment.isInducing_base
The old space has exactly its original topology inside the adjunction.
theorem isInducing_base {X ι : Type*} [TopologicalSpace X] (t : ι → Bool → X) :
IsInducing (base t)
Proof
:= by
constructor
apply TopologicalSpace.ext
funext U
apply propext
constructor
· intro hU
exact ⟨(tailPatch t U ⊥).set, isOpen_tailPatch t hU ⊥, rfl⟩
· rintro ⟨V, hV, rfl⟩
exact hV.preimage (continuous_base t)
theorem isEmbedding_base
TopologyByExample.MisraAttachment.isEmbedding_base
The old space embeds into the adjunction.
theorem isEmbedding_base {X ι : Type*} [TopologicalSpace X] (t : ι → Bool → X) :
IsEmbedding (base t)
Proof
:= ⟨isInducing_base t, base_injective t⟩
definition singlePatch
TopologyByExample.MisraAttachment.singlePatch
A subset of one new copy, avoiding both attachment points.
noncomputable def singlePatch {X ι : Type*} (t : ι → Bool → X) (i : ι)
(U : Set MisraE0) (hU : ∀ s, MisraE0.apex s ∉ U) : Patch t
Definition
where
old := ∅
fresh j := if j = i then U else ∅
agrees j s := by
classical
by_cases hj : j = i <;> simp [hj, hU s]
theorem isClopen_singlePatch
TopologyByExample.MisraAttachment.isClopen_singlePatch
A clopen set in a copy that avoids both apices remains clopen after attachment.
theorem isClopen_singlePatch {X ι : Type*} [TopologicalSpace X] (t : ι → Bool → X)
(i : ι) {U : Set MisraE0} (hU : IsClopen U) (ha : ∀ s, MisraE0.apex s ∉ U) :
IsClopen (singlePatch t i U ha).set
Proof
:= by
classical
apply Patch.isClopen _ isClopen_empty
intro j
by_cases hj : j = i <;> simp [singlePatch, hj, hU, isClopen_empty]
theorem exists_clopen_avoiding
TopologyByExample.MisraAttachment.exists_clopen_avoiding
Non-apex points have clopen neighbourhoods avoiding both apices and any other fixed point.
theorem exists_clopen_avoiding {x y : MisraE0} (hx : ∀ s, x ≠ MisraE0.apex s)
(hxy : x ≠ y) : ∃ U : Set MisraE0, IsClopen U ∧ x ∈ U ∧ y ∉ U ∧
∀ s, MisraE0.apex s ∉ U
Proof
:= by
let F : Set MisraE0 := {y, MisraE0.apex false, MisraE0.apex true}
have hF : IsClosed F :=
(((finite_singleton (MisraE0.apex true)).insert (MisraE0.apex false)).insert y).isClosed
have hxF : x ∈ Fᶜ := by simp [F, hxy, hx false, hx true]
obtain ⟨U, hU, hxU, hsub⟩ := MisraE0.exists_isClopen_subset_of_ne_apex hx
hF.isOpen_compl hxF
refine ⟨U, hU, hxU, fun hy ↦ hsub hy (by simp [F]), ?_⟩
intro s hs
exact hsub hs (by cases s <;> simp [F])
theorem exists_clopen_separator_new
TopologyByExample.MisraAttachment.exists_clopen_separator_new
Every genuinely new point has a clopen separator from every distinct point.
theorem exists_clopen_separator_new {X ι : Type*} [TopologicalSpace X]
(t : ι → Bool → X) (i : ι) {x : MisraE0} (hx : ∀ s, x ≠ MisraE0.apex s)
{z : Space t} (hne : copy t i x ≠ z) :
∃ V : Set (Space t), IsClopen V ∧ copy t i x ∈ V ∧ z ∉ V
Proof
:= by
classical
induction z using Quot.inductionOn with
| h z =>
cases z with
| inl y =>
obtain ⟨U, hU, hxU, _, ha⟩ := exists_clopen_avoiding hx (hx false)
refine ⟨(singlePatch t i U ha).set, isClopen_singlePatch t i hU ha, ?_, ?_⟩
· simpa [singlePatch] using hxU
· exact notMem_empty y
| inr p =>
rcases p with ⟨j, y⟩
by_cases hij : j = i
· subst j
have hxy : x ≠ y := fun h ↦ hne (congrArg (copy t i) h)
obtain ⟨U, hU, hxU, hyU, ha⟩ := exists_clopen_avoiding hx hxy
refine ⟨(singlePatch t i U ha).set, isClopen_singlePatch t i hU ha, ?_, ?_⟩
· simpa [singlePatch] using hxU
· change y ∉ (singlePatch t i U ha).fresh i
simpa [singlePatch] using hyU
· obtain ⟨U, hU, hxU, _, ha⟩ := exists_clopen_avoiding hx (hx false)
refine ⟨(singlePatch t i U ha).set, isClopen_singlePatch t i hU ha, ?_, ?_⟩
· simpa [singlePatch] using hxU
· change y ∉ (singlePatch t i U ha).fresh j
simp [singlePatch, hij]
theorem base_or_new
TopologyByExample.MisraAttachment.base_or_new
Every point is old or is represented by a non-apex point of a new copy.
theorem base_or_new {X ι : Type*} (t : ι → Bool → X) (z : Space t) :
(∃ x, z = base t x) ∨ ∃ i x, (∀ s, x ≠ MisraE0.apex s) ∧ z = copy t i x
Proof
:= by
induction z using Quot.inductionOn with
| h z =>
cases z with
| inl x => exact Or.inl ⟨x, rfl⟩
| inr p =>
rcases p with ⟨i, x⟩
cases x with
| apex s => exact Or.inl ⟨t i s, copy_apex t i s⟩
| row α => exact Or.inr ⟨i, .row α, by simp, rfl⟩
| cell s α β => exact Or.inr ⟨i, .cell s α β, by simp, rfl⟩
instance
instance {X ι : Type*} [TopologicalSpace X] [T2Space X] (t : ι → Bool → X) :
T2Space (Space t)
Proof
where
t2 x y hxy := by
rcases base_or_new t x with ⟨a, rfl⟩ | ⟨i, a, ha, rfl⟩
· rcases base_or_new t y with ⟨b, rfl⟩ | ⟨j, b, hb, rfl⟩
· have hab : a ≠ b := fun h ↦ hxy (congrArg (base t) h)
obtain ⟨U, V, hU, hV, haU, hbV, hUV⟩ := t2_separation hab
obtain ⟨U', V', hU', hV', htraceU, htraceV, hdisj⟩ :=
exists_disjoint_open_extensions t hU hV hUV
refine ⟨U', V', hU', hV', ?_, ?_, hdisj⟩
· exact (show a ∈ base t ⁻¹' U' from htraceU.symm ▸ haU)
· exact (show b ∈ base t ⁻¹' V' from htraceV.symm ▸ hbV)
· obtain ⟨V, hV, hbV, haV⟩ := exists_clopen_separator_new t j hb hxy.symm
exact ⟨Vᶜ, V, hV.isClosed.isOpen_compl, hV.isOpen, haV, hbV,
disjoint_compl_left⟩
· obtain ⟨U, hU, haU, hyU⟩ := exists_clopen_separator_new t i ha hxy
exact ⟨U, Uᶜ, hU.isOpen, hU.isClosed.isOpen_compl, haU, hyU, disjoint_compl_right⟩
theorem isClosed_range_base
TopologyByExample.MisraAttachment.isClosed_range_base
The old space has closed image in the adjunction.
theorem isClosed_range_base {X ι : Type*} [TopologicalSpace X] (t : ι → Bool → X) :
IsClosed (range (base t))
Proof
:= by
classical
apply isOpen_compl_iff.1
apply isOpen_iff_mem_nhds.2
intro z hz
rcases base_or_new t z with ⟨a, rfl⟩ | ⟨i, x, hx, rfl⟩
· exact False.elim (hz (mem_range_self a))
· obtain ⟨U, hU, hxU, _, ha⟩ := exists_clopen_avoiding hx (hx false)
let P := singlePatch t i U ha
have hop : IsOpen P.set := (isClopen_singlePatch t i hU ha).isOpen
have hxP : copy t i x ∈ P.set := by simpa [P, singlePatch] using hxU
apply Filter.mem_of_superset (hop.mem_nhds hxP)
intro z hzP
rintro ⟨a, rfl⟩
exact (show base t a ∉ P.set from notMem_empty a) hzP
theorem isClosedEmbedding_base
TopologyByExample.MisraAttachment.isClosedEmbedding_base
The old space is embedded as a closed subspace.
theorem isClosedEmbedding_base {X ι : Type*} [TopologicalSpace X] (t : ι → Bool → X) :
IsClosedEmbedding (base t)
Proof
:= ⟨isEmbedding_base t, isClosed_range_base t⟩