Lean library · module TopologyByExample.Spaces.TangoraConnected
The connected sets in Tangora's example
Every connected Euclidean open set remains connected after the refinement. The complements of the two rational classes, however, are both closed and totally disconnected.
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.
Imports
theorem exists_dense_core
TopologyByExample.Tangora.exists_dense_core
Each core contains a dense subset of the usual line consisting of rational points.
theorem exists_dense_core (x : ℝ) : ∃ d : Set ℝ, Dense d ∧ d ⊆ core x ∧ d ⊆ rational
Proof
:= by
rcases core_cases x with h | h | h
· exact ⟨dyadic, dense_dyadic, (core_of_dyadic h).ge, dyadic_subset_rational⟩
· exact ⟨other, dense_other, (core_of_other h).ge, sdiff_subset⟩
· exact ⟨dyadic, dense_dyadic, (core_of_irrational h) ▸
dyadic_subset_rational.trans (subset_insert _ _), dyadic_subset_rational⟩
theorem exists_open_irrationals_subset_closure
TopologyByExample.Tangora.exists_open_irrationals_subset_closure
Near each point of an open set its closure contains the irrationals of a usual neighbourhood.
theorem exists_open_irrationals_subset_closure {s : Set Tangora} (hs : IsOpen s)
{x : Tangora} (hx : x ∈ s) : ∃ U : Set ℝ, IsOpen U ∧ toReal x ∈ U ∧
∀ c ∈ U, c ∉ rational → toReal.symm c ∈ closure s
Proof
:= by
obtain ⟨U, ⟨hxU, hU⟩, hsub⟩ := (nhds_basis x).mem_iff.1 (hs.mem_nhds hx)
obtain ⟨d, hd, hdc, hdr⟩ := exists_dense_core (toReal x)
refine ⟨U, hU, hxU, fun c hc hci ↦ ?_⟩
apply (mem_closure_iff_nhds_basis (nhds_basis _)).2
intro W hW
obtain ⟨p, ⟨hpU, hpW⟩, hpd⟩ := hd.inter_open_nonempty (U ∩ W) (hU.inter hW.2) ⟨c, hc, hW.1⟩
refine ⟨toReal.symm p, hsub ⟨hpU, hdc hpd⟩, hpW, ?_⟩
simpa [core_of_irrational hci] using (Or.inr (hdr hpd) : p = c ∨ p ∈ rational)
theorem euclidean_open_colour
TopologyByExample.Tangora.euclidean_open_colour
private theorem euclidean_open_colour {s : Set ℝ} (hs : IsOpen s) {u v : Set Tangora}
(hu : IsOpen u) (hv : IsOpen v) (hd : Disjoint u v) (hc : toReal ⁻¹' s ⊆ u ∪ v) :
IsOpen (s ∩ (toReal.symm ⁻¹' u))
Proof
:= by
apply isOpen_iff_forall_mem_open.2
intro x hx
obtain ⟨U, hU, hxU, hUc⟩ := exists_open_irrationals_subset_closure hu hx.2
refine ⟨s ∩ U, ?_, hs.inter hU, hx.1, hxU⟩
intro y hy
refine ⟨hy.1, ?_⟩
rcases hc (show toReal.symm y ∈ toReal ⁻¹' s from hy.1) with h | h
· exact h
obtain ⟨V, hV, hyV, hVc⟩ := exists_open_irrationals_subset_closure hv h
obtain ⟨z, ⟨hz, hzV⟩, hzi⟩ := dense_compl_rational.inter_open_nonempty ((s ∩ U) ∩ V)
((hs.inter hU).inter hV) ⟨y, hy, hyV⟩
rcases hc (show toReal.symm z ∈ toReal ⁻¹' s from hz.1) with hzu | hzv
· exact (Set.disjoint_left.1 (hd.symm.closure_left hu) (hVc z hzV hzi) hzu).elim
· exact (Set.disjoint_left.1 (hd.closure_left hv) (hUc z hz.2 hzi) hzv).elim
theorem isPreconnected_preimage
TopologyByExample.Tangora.isPreconnected_preimage
The inverse image of every Euclidean open preconnected set is preconnected.
theorem isPreconnected_preimage {s : Set ℝ} (hs : IsOpen s) (hp : IsPreconnected s) :
IsPreconnected (toReal ⁻¹' s)
Proof
:= by
apply isPreconnected_iff_subset_of_disjoint.2
intro u v hu hv hcov hd
let A := toReal ⁻¹' s ∩ u
let B := toReal ⁻¹' s ∩ v
have hA : IsOpen A := (hs.preimage continuous_toReal).inter hu
have hB : IsOpen B := (hs.preimage continuous_toReal).inter hv
have hAB : Disjoint A B := Set.disjoint_left.2 fun x hx hy ↦
Set.eq_empty_iff_forall_notMem.1 hd x ⟨hx.1, hx.2, hy.2⟩
have hcov' : toReal ⁻¹' s ⊆ A ∪ B := fun x hx ↦
(hcov hx).elim (fun h ↦ Or.inl ⟨hx, h⟩) (fun h ↦ Or.inr ⟨hx, h⟩)
have h₁ := euclidean_open_colour hs hA hB hAB hcov'
have h₂ := euclidean_open_colour hs hB hA hAB.symm (union_comm A B ▸ hcov')
apply (isPreconnected_iff_subset_of_disjoint.1 hp _ _ h₁ h₂ ?_ ?_).imp
(fun h x hx ↦ (h hx).2.2) (fun h x hx ↦ (h hx).2.2)
· intro x hx
exact (hcov' (show toReal.symm x ∈ toReal ⁻¹' s from hx)).imp (⟨hx, ·⟩) (⟨hx, ·⟩)
· exact eq_empty_iff_forall_notMem.2 fun _ h ↦ Set.disjoint_left.1 hAB h.2.1.2 h.2.2.2
On this site: Tangora's connected space: Connected Euclidean open sets
instance
instance : PreconnectedSpace Tangora
Proof
:=
⟨by simpa using isPreconnected_preimage isOpen_univ isPreconnected_univ⟩
instance
instance : Nonempty Tangora
Proof
:= ⟨toReal.symm 0⟩
instance
instance : Nontrivial Tangora
Proof
:= toReal.symm.injective.nontrivial
theorem not_biconnectedSpace
TopologyByExample.Tangora.not_biconnectedSpace
The two opposite open rays contain disjoint nondegenerate connected subsets.
theorem not_biconnectedSpace : ¬ BiconnectedSpace Tangora
Proof
:= by
intro h
have h₁ := isPreconnected_preimage (isOpen_Iio (a := (0 : ℝ))) isPreconnected_Iio
have h₂ := isPreconnected_preimage (isOpen_Ioi (a := (0 : ℝ))) isPreconnected_Ioi
rcases BiconnectedSpace.subsingleton_or_subsingleton h₁ h₂
(Set.disjoint_left.2 fun _ hx hy ↦ lt_asymm hx hy) with ha | hb
· have he := congrArg toReal (ha (x := toReal.symm (-2)) (y := toReal.symm (-1))
(by change (-2 : ℝ) < 0; norm_num) (by change (-1 : ℝ) < 0; norm_num))
norm_num at he
· have he := congrArg toReal (hb (x := toReal.symm 1) (y := toReal.symm 2)
(by change (0 : ℝ) < 1; norm_num) (by change (0 : ℝ) < 2; norm_num))
norm_num at he
On this site: Tangora's connected space is not biconnected
theorem totallyDisconnected_compl_of_dense
TopologyByExample.Tangora.totallyDisconnected_compl_of_dense
private theorem totallyDisconnected_compl_of_dense {d : Set ℝ} (hd : Dense d) :
IsTotallyDisconnected (toReal ⁻¹' dᶜ)
Proof
:= by
apply isTotallyDisconnected_of_image continuous_toReal.continuousOn toReal.injective
rw [image_preimage_eq _ toReal.surjective]
apply isTotallyDisconnected_iff_lt.2
intro x _ y _ hxy
obtain ⟨z, hzd, hz⟩ := hd.exists_between hxy
exact ⟨z, fun h ↦ h hzd, hz⟩
theorem closed_totallyDisconnected_cover
TopologyByExample.Tangora.closed_totallyDisconnected_cover
Tangora's space is covered by two closed totally disconnected sets.
theorem closed_totallyDisconnected_cover :
IsClosed (toReal ⁻¹' dyadicᶜ) ∧ IsTotallyDisconnected (toReal ⁻¹' dyadicᶜ) ∧
IsClosed (toReal ⁻¹' otherᶜ) ∧ IsTotallyDisconnected (toReal ⁻¹' otherᶜ) ∧
(toReal ⁻¹' dyadicᶜ) ∪ (toReal ⁻¹' otherᶜ) = univ
Proof
:= by
obtain ⟨a, ha⟩ := dense_dyadic.nonempty
obtain ⟨b, hb⟩ := dense_other.nonempty
have hA : IsOpen (toReal ⁻¹' dyadic) := core_of_dyadic ha ▸ isOpen_core a
have hB : IsOpen (toReal ⁻¹' other) := core_of_other hb ▸ isOpen_core b
refine ⟨hA.isClosed_compl, totallyDisconnected_compl_of_dense dense_dyadic,
hB.isClosed_compl, totallyDisconnected_compl_of_dense dense_other, ?_⟩
apply eq_univ_of_forall
intro x
by_cases hx : toReal x ∈ dyadic
· exact Or.inr (fun h ↦ h.2 hx)
· exact Or.inl hx
On this site: Tangora's connected space: A cover by two closed totally disconnected sets