Lean library · module TopologyByExample.Spaces.LambdaConnectedIntervals
Connected subsets between two real points of Λ
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 connected_subset_real_interval
TopologyByExample.GillmanJerisonLambda.connected_subset_real_interval
A connected subset avoiding two real endpoints cannot leave the interval between them if it meets that interval.
theorem connected_subset_real_interval {s : Set GillmanJerisonLambda}
(hs : IsPreconnected s) {a b x : ℝ} (hax : a < x) (hxb : x < b)
(hx : real x ∈ s) (ha : real a ∉ s) (hb : real b ∉ s) :
s ⊆ real '' Ioo a b
Proof
:= by
let K := real '' Icc a b
let U := real '' Ioo a b
have hK : IsClosed K := (isCompact_Icc.image continuous_real).isClosed
have hU : IsOpen U := isOpenEmbedding_real.isOpenMap _ isOpen_Ioo
have hUK : U ⊆ K := image_mono Ioo_subset_Icc_self
have hcover : s ⊆ K ∪ Uᶜ := by
intro p _
by_cases hp : p ∈ U
· exact Or.inl (hUK hp)
· exact Or.inr hp
have hdis : s ∩ (K ∩ Uᶜ) = ∅ := by
apply eq_empty_iff_forall_notMem.2
rintro p ⟨hp, ⟨y, hy, rfl⟩, hn⟩
have hyne : y ≠ a ∧ y ≠ b := by
constructor
· intro h; exact ha (h ▸ hp)
· intro h; exact hb (h ▸ hp)
exact hn ⟨y, ⟨lt_of_le_of_ne hy.1 hyne.1.symm, lt_of_le_of_ne hy.2 hyne.2⟩, rfl⟩
rcases (isPreconnected_iff_subset_of_disjoint_closed.1 hs) K Uᶜ hK hU.isClosed_compl
hcover hdis with h | h
· intro p hp
obtain ⟨y, hy, rfl⟩ := h hp
refine ⟨y, ⟨?_, ?_⟩, rfl⟩
· apply lt_of_le_of_ne hy.1
intro he
exact ha (he ▸ hp)
· apply lt_of_le_of_ne hy.2
intro he
exact hb (he ▸ hp)
· exact False.elim (h hx ⟨x, ⟨hax, hxb⟩, rfl⟩)