English
The rationals form a totally disconnected space.
Русский
Множество рациональных чисел образует полностью разорванное (totally disconnected) пространство.
LaTeX
$$$\text{TotallyDisconnected}(\mathbb{Q})$$$
Lean4
instance : TotallyDisconnectedSpace ℚ := by
clear p s
refine ⟨fun s hsu hs x hx y hy => ?_⟩; clear hsu
by_contra! H : x ≠ y
wlog hlt : x < y
· apply this s hs y hy x hx H.symm <| H.lt_or_gt.resolve_left hlt
rcases exists_irrational_btwn (Rat.cast_lt.2 hlt) with ⟨z, hz, hxz, hzy⟩
have := hs.image _ continuous_coe_real.continuousOn
rw [isPreconnected_iff_ordConnected] at this
have : z ∈ Rat.cast '' s := this.out (mem_image_of_mem _ hx) (mem_image_of_mem _ hy) ⟨hxz.le, hzy.le⟩
exact hz (image_subset_range _ _ this)