Lean library · module TopologyByExample.Spaces.LexicographicHilbertCube
The lexicographically ordered Hilbert cube
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
definition LexicographicHilbertCube
TopologyByExample.LexicographicHilbertCube
Countable sequences in the unit interval, ordered lexicographically.
def LexicographicHilbertCube
:= Lex (ℕ → unitInterval)
On this site: Space: Lexicographically ordered Hilbert cube
instance
noncomputable instance : CompleteLinearOrder LexicographicHilbertCube
Proof
:=
inferInstanceAs (CompleteLinearOrder (Lex (ℕ → unitInterval)))
instance
The topology is the order topology, not the product topology.
noncomputable instance : TopologicalSpace LexicographicHilbertCube
Proof
:= Preorder.topology _
instance
instance : OrderTopology LexicographicHilbertCube
Proof
:= ⟨rfl⟩
theorem completeLinearOrder
TopologyByExample.LexicographicHilbertCube.completeLinearOrder
The lexicographic cube has a complete linear order with its order topology.
theorem completeLinearOrder : ∃ o : CompleteLinearOrder LexicographicHilbertCube,
letI := o; OrderTopology LexicographicHilbertCube
Proof
:= ⟨inferInstance, inferInstance⟩
On this site: The lexicographically ordered Hilbert cube is the order topology of a complete linear order
instance
instance : DenselyOrdered LexicographicHilbertCube
Proof
:= by
constructor
rintro a b ⟨n, hn, hab⟩
obtain ⟨t, hat, htb⟩ := exists_between hab
refine ⟨toLex (Function.update (fun k => b k) n t), ⟨n, ?_, ?_⟩, ⟨n, ?_, ?_⟩⟩
· intro j hj
simpa [Function.update_of_ne hj.ne] using hn j hj
· simpa using hat
· intro j hj
simp [Function.update_of_ne hj.ne]
· simpa using htb
instance
instance : CompactSpace LexicographicHilbertCube
Proof
:= inferInstance
instance
instance : T2Space LexicographicHilbertCube
Proof
:= inferInstance
instance instConnectedSpace
TopologyByExample.LexicographicHilbertCube.instConnectedSpace
instance instConnectedSpace : ConnectedSpace LexicographicHilbertCube
Proof
where
toNonempty := inferInstance
On this site: The lexicographically ordered Hilbert cube is connected
instance instLocallyConnectedSpace
TopologyByExample.LexicographicHilbertCube.instLocallyConnectedSpace
instance instLocallyConnectedSpace : LocallyConnectedSpace LexicographicHilbertCube
On this site: The lexicographically ordered Hilbert cube is locally connected
definition prefixPoint
TopologyByExample.LexicographicHilbertCube.prefixPoint
Keep a finite prefix, prescribe the next coordinate, and use a constant tail.
def prefixPoint (a : LexicographicHilbertCube) (n : ℕ) (t v : unitInterval) :
LexicographicHilbertCube
:= toLex (fun j => if j < n then a j else if j = n then t else v)
theorem prefixPoint_lt
TopologyByExample.LexicographicHilbertCube.prefixPoint_lt
Varying the prescribed coordinate is strictly monotone.
theorem prefixPoint_lt (a : LexicographicHilbertCube) (n : ℕ)
{s t : unitInterval} (h : s < t) (v w : unitInterval) :
prefixPoint a n s v < prefixPoint a n t w
Proof
:= by
refine ⟨n, fun j hj => ?_, ?_⟩
· simp [prefixPoint, hj]
· simpa [prefixPoint] using h
theorem prefixPoint_tail_lt
TopologyByExample.LexicographicHilbertCube.prefixPoint_tail_lt
With the prefix and next coordinate fixed, a larger constant tail gives a larger point.
theorem prefixPoint_tail_lt (a : LexicographicHilbertCube) (n : ℕ) (t : unitInterval)
{v w : unitInterval} (h : v < w) : prefixPoint a n t v < prefixPoint a n t w
Proof
:= by
refine ⟨n + 1, fun j hj => ?_, ?_⟩
· have hj' : j < n ∨ j = n := by omega
rcases hj' with hj' | rfl <;> simp [prefixPoint, *]
· simpa [prefixPoint] using h
theorem coordinate_eq_of_mem_interval
TopologyByExample.LexicographicHilbertCube.coordinate_eq_of_mem_interval
A point between two equal finite prefixes shares their prescribed coordinate.
theorem coordinate_eq_of_mem_interval {a : LexicographicHilbertCube} {n : ℕ}
{t v w : unitInterval} {z : LexicographicHilbertCube}
(hz : z ∈ Ioo (prefixPoint a n t v) (prefixPoint a n t w)) : z n = t
Proof
:= by
have hprefix : ∀ j ≤ n, z j = prefixPoint a n t v j := by
intro j hj
induction j using Nat.strong_induction_on with
| ind j ih =>
have he (k : ℕ) (hk : k < j) : z k = prefixPoint a n t v k := ih k hk (by omega)
have huv : prefixPoint a n t v j = prefixPoint a n t w j := by
rcases lt_or_eq_of_le hj with h | rfl <;> simp [prefixPoint, *]
apply le_antisymm
· have h := Pi.apply_le_of_toLex hz.2.le (fun k hk => by
rw [he k hk]
have hkn : k < n := by omega
simp [prefixPoint, hkn])
exact h.trans_eq huv.symm
· exact Pi.apply_le_of_toLex hz.1.le (fun k hk => (he k hk).symm)
simpa [prefixPoint] using hprefix n le_rfl
theorem not_joined_of_lt
TopologyByExample.LexicographicHilbertCube.not_joined_of_lt
Distinct ordered points cannot be joined by a path.
theorem not_joined_of_lt {a b : LexicographicHilbertCube} (hab : a < b) : ¬ Joined a b
Proof
:= by
obtain ⟨n, hprefix, hn⟩ := hab
rintro ⟨γ⟩
have hsub : Icc a b ⊆ range γ :=
(isPreconnected_range γ.continuous).Icc_subset ⟨0, γ.source⟩ ⟨1, γ.target⟩
let f : unitInterval → Set unitInterval := fun t =>
γ ⁻¹' Ioo (prefixPoint a n t 0) (prefixPoint a n t 1)
let half : unitInterval := ⟨1 / 2, by norm_num, by norm_num⟩
have hh0 : (0 : unitInterval) < half := by change (0 : ℝ) < 1 / 2; norm_num
have hh1 : half < (1 : unitInterval) := by change (1 : ℝ) / 2 < 1; norm_num
refine UnitInterval.not_countable_Ioo hn (PairwiseDisjoint.countable_of_isOpen (s := f) ?_
(fun t _ => isOpen_Ioo.preimage γ.continuous) fun t ht => ?_)
· intro t _ u _ htu
exact (disjoint_left.mpr fun z hzt hzu => htu
((coordinate_eq_of_mem_interval hzt).symm.trans
(coordinate_eq_of_mem_interval hzu))).preimage γ
· let m := prefixPoint a n t half
have ham : a < m := ⟨n, fun j hj => by simp [m, prefixPoint, hj], by
simpa [m, prefixPoint] using ht.1⟩
have hmb : m < b := ⟨n, fun j hj => by simpa [m, prefixPoint, hj] using hprefix j hj, by
simpa [m, prefixPoint] using ht.2⟩
obtain ⟨s, hs⟩ := hsub ⟨ham.le, hmb.le⟩
refine ⟨s, ?_⟩
change γ s ∈ Ioo (prefixPoint a n t 0) (prefixPoint a n t 1)
rw [hs]
exact ⟨prefixPoint_tail_lt _ _ _ hh0, prefixPoint_tail_lt _ _ _ hh1⟩
instance instTotallyPathDisconnectedSpace
TopologyByExample.LexicographicHilbertCube.instTotallyPathDisconnectedSpace
Every path in the lexicographic cube is constant.
instance instTotallyPathDisconnectedSpace :
TotallyPathDisconnectedSpace LexicographicHilbertCube
Proof
:= by
constructor
intro a b h
rcases lt_trichotomy a b with hab | rfl | hba
· exact (not_joined_of_lt hab h).elim
· rfl
· exact (not_joined_of_lt hba h.symm).elim
On this site: The lexicographically ordered Hilbert cube is totally path disconnected
instance
instance : Nontrivial LexicographicHilbertCube
Proof
:=
inferInstanceAs (Nontrivial (Lex (ℕ → unitInterval)))
theorem not_countableChainCondition
TopologyByExample.LexicographicHilbertCube.not_countableChainCondition
Uncountably many disjoint open intervals violate the countable chain condition.
theorem not_countableChainCondition :
¬ ∀ S : Set (Set LexicographicHilbertCube), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) →
S.PairwiseDisjoint id → S.Countable
Proof
:= by
intro h
let f : unitInterval → Set LexicographicHilbertCube :=
fun t => Ioo (prefixPoint ⊥ 0 t 0) (prefixPoint ⊥ 0 t 1)
have hne (t : unitInterval) : (f t).Nonempty := by
exact nonempty_Ioo.mpr (prefixPoint_tail_lt _ _ _ zero_lt_one)
have hdisj {t u : unitInterval} (htu : t ≠ u) : Disjoint (f t) (f u) :=
disjoint_left.mpr fun z hzt hzu => htu
((coordinate_eq_of_mem_interval hzt).symm.trans (coordinate_eq_of_mem_interval hzu))
have hinj : Function.Injective f := by
intro t u htu
by_contra h
obtain ⟨z, hz⟩ := hne t
exact disjoint_left.mp (hdisj h) hz (htu ▸ hz)
have hc := h (range f) (by rintro _ ⟨t, rfl⟩; exact ⟨isOpen_Ioo, hne t⟩) (by
rintro _ ⟨t, rfl⟩ _ ⟨u, rfl⟩ htu
exact hdisj fun h => htu (h ▸ rfl))
have hc' := hc.preimage_of_injOn hinj.injOn
rw [preimage_range] at hc'
exact not_countable_univ hc'
On this site: The lexicographically ordered Hilbert cube does not satisfy the countable chain condition
instance instFirstCountableTopology
TopologyByExample.LexicographicHilbertCube.instFirstCountableTopology
Rationally approximating the first differing coordinate gives countable local bases.
instance instFirstCountableTopology : FirstCountableTopology LexicographicHilbertCube
Proof
:= by
obtain ⟨D, hDc, hDd⟩ := exists_countable_dense unitInterval
let S (a : LexicographicHilbertCube) : Set LexicographicHilbertCube :=
⋃ n : ℕ, (fun t => prefixPoint a n t 0) '' D
have hSc (a : LexicographicHilbertCube) : (S a).Countable :=
countable_iUnion fun _ => hDc.image _
apply firstCountableTopology_of_countable_cofinal
· intro a
refine ⟨S a ∩ Iio a, inter_subset_right, (hSc a).mono inter_subset_left, ?_⟩
intro y hy
obtain ⟨n, hn, hya⟩ := hy
obtain ⟨t, htD, hyt, hta⟩ := hDd.exists_mem_open isOpen_Ioo (nonempty_Ioo.mpr hya)
let z := prefixPoint a n t 0
have hza : z < a := ⟨n, fun j hj => by simp [z, prefixPoint, hj], by
simpa [z, prefixPoint] using hta⟩
have hyz : y < z := ⟨n, fun j hj => by simpa [z, prefixPoint, hj] using hn j hj, by
simpa [z, prefixPoint] using hyt⟩
exact ⟨z, ⟨mem_iUnion.mpr ⟨n, t, htD, rfl⟩, hza⟩, hyz.le⟩
· intro a
refine ⟨S a ∩ Ioi a, inter_subset_right, (hSc a).mono inter_subset_left, ?_⟩
intro y hy
obtain ⟨n, hn, hay⟩ := hy
obtain ⟨t, htD, hat, hty⟩ := hDd.exists_mem_open isOpen_Ioo (nonempty_Ioo.mpr hay)
let z := prefixPoint a n t 0
have haz : a < z := ⟨n, fun j hj => by simp [z, prefixPoint, hj], by
simpa [z, prefixPoint] using hat⟩
have hzy : z < y := ⟨n, fun j hj => by simpa [z, prefixPoint, hj] using hn j hj, by
simpa [z, prefixPoint] using hty⟩
exact ⟨z, ⟨mem_iUnion.mpr ⟨n, t, htD, rfl⟩, haz⟩, hzy.le⟩
On this site: The lexicographically ordered Hilbert cube is first countable
theorem cardinality_continuum
TopologyByExample.LexicographicHilbertCube.cardinality_continuum
The underlying sequence set has continuum cardinality.
theorem cardinality_continuum : CardinalityContinuum LexicographicHilbertCube
Proof
:= by
change Cardinal.mk (ℕ → unitInterval) = Cardinal.continuum
rw [Cardinal.mk_arrow, Cardinal.mk_nat, Cardinal.lift_aleph0, Cardinal.lift_uzero,
Cardinal.mk_unitInterval, Cardinal.continuum_power_aleph0]
On this site: The lexicographically ordered Hilbert cube has cardinality equal to \(\mathfrak{c}\)