Lean library · module TopologyByExample.Spaces.BoxRealPower
The countable box product of real lines
The basic open sets allow an independent open restriction in every coordinate. The carrier is wrapped to keep this topology distinct from the product topology.
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
structure Space
TopologyByExample.BoxRealPower.Space
Real sequences carrying the box topology.
@[ext] structure Space where
/-- The coordinates of the sequence. -/
coord : ℕ → ℝ
On this site: Space: Countable box product of the reals
definition box
TopologyByExample.BoxRealPower.box
The box with prescribed coordinate sets.
def box (U : ℕ → Set ℝ) : Set Space
:= {x | ∀ n, x.coord n ∈ U n}
definition boxes
TopologyByExample.BoxRealPower.boxes
The family of all open boxes.
def boxes : Set (Set Space)
:= {s | ∃ U, (∀ n, IsOpen (U n)) ∧ s = box U}
instance
instance : TopologicalSpace Space
Proof
:= generateFrom boxes
instance
instance : Inhabited Space
Proof
:= ⟨⟨fun _ ↦ 0⟩⟩
theorem isOpen_box
TopologyByExample.BoxRealPower.isOpen_box
Open boxes are open in the box topology.
theorem isOpen_box {U : ℕ → Set ℝ} (hU : ∀ n, IsOpen (U n)) : IsOpen (box U)
Proof
:=
isOpen_generateFrom_of_mem ⟨U, hU, rfl⟩
theorem univ_mem_boxes
TopologyByExample.BoxRealPower.univ_mem_boxes
The entire space is an open box.
theorem univ_mem_boxes : univ ∈ boxes
Proof
:= by
refine ⟨fun _ ↦ univ, fun _ ↦ isOpen_univ, ?_⟩
ext x
simp [box]
theorem inter_mem_boxes
TopologyByExample.BoxRealPower.inter_mem_boxes
Intersections of two open boxes are open boxes.
theorem inter_mem_boxes {s t : Set Space} (hs : s ∈ boxes) (ht : t ∈ boxes) :
s ∩ t ∈ boxes
Proof
:= by
obtain ⟨U, hU, rfl⟩ := hs
obtain ⟨V, hV, rfl⟩ := ht
refine ⟨fun n ↦ U n ∩ V n, fun n ↦ (hU n).inter (hV n), ?_⟩
ext x
simp only [box, mem_inter_iff, mem_ofPred_eq, forall_and]
theorem basis
TopologyByExample.BoxRealPower.basis
Arbitrary products of real open sets form a basis.
theorem basis : IsTopologicalBasis boxes
Proof
:= by
simpa only [insert_eq_of_mem univ_mem_boxes] using
isTopologicalBasis_of_subbasis_of_inter (r := boxes) rfl (fun _ hs _ ht ↦ inter_mem_boxes hs ht)
theorem continuous_coord
TopologyByExample.BoxRealPower.continuous_coord
Each coordinate projection is continuous.
theorem continuous_coord (i : ℕ) : Continuous (fun x : Space ↦ x.coord i)
Proof
:= by
apply continuous_def.mpr
intro V hV
have he : (fun x : Space ↦ x.coord i) ⁻¹' V =
box (fun n ↦ if n = i then V else univ) := by
ext x
simp only [mem_preimage, box, mem_ofPred_eq]
constructor
· intro hx n
split_ifs with hn
· simpa [hn] using hx
· trivial
· intro hx
simpa using hx i
rw [he]
apply isOpen_box
intro n
split_ifs
· exact hV
· exact isOpen_univ
theorem continuous_toProduct
TopologyByExample.BoxRealPower.continuous_toProduct
Forgetting the box topology gives a continuous map to the ordinary product.
theorem continuous_toProduct : Continuous Space.coord
Proof
:=
continuous_pi continuous_coord
definition coordinateLine
TopologyByExample.BoxRealPower.coordinateLine
Vary one coordinate and keep all other coordinates fixed.
def coordinateLine (x : Space) (i : ℕ) (t : ℝ) : Space
:=
⟨Function.update x.coord i t⟩
theorem continuous_coordinateLine
TopologyByExample.BoxRealPower.continuous_coordinateLine
A coordinate line is continuous for the box topology.
theorem continuous_coordinateLine (x : Space) (i : ℕ) : Continuous (coordinateLine x i)
Proof
:= by
apply basis.continuous_iff.mpr
rintro _ ⟨U, hU, rfl⟩
by_cases hx : ∀ n, n ≠ i → x.coord n ∈ U n
· have he : coordinateLine x i ⁻¹' box U = U i := by
ext t
simp only [mem_preimage, box, mem_ofPred_eq, coordinateLine]
constructor
· intro ht
simpa using ht i
· intro ht n
by_cases hn : n = i
· simpa [hn] using ht
· simpa [Function.update_of_ne hn] using hx n hn
rw [he]
exact hU i
· have he : coordinateLine x i ⁻¹' box U = ∅ := by
apply eq_empty_iff_forall_notMem.mpr
intro t ht
apply hx
intro n hn
simpa [coordinateLine, Function.update_of_ne hn] using ht n
rw [he]
exact isOpen_empty
definition boundedSequences
TopologyByExample.BoxRealPower.boundedSequences
Bounded real sequences inside the box product.
def boundedSequences : Set Space
:= {x | ∃ r : ℝ, ∀ n, |x.coord n| < r}
definition unitBox
TopologyByExample.BoxRealPower.unitBox
The open box of coordinatewise radius one about a sequence.
def unitBox (x : Space) : Set Space
:= box (fun n ↦ Ioo (x.coord n - 1) (x.coord n + 1))
theorem isOpen_unitBox
TopologyByExample.BoxRealPower.isOpen_unitBox
The radius-one box is open.
theorem isOpen_unitBox (x : Space) : IsOpen (unitBox x)
Proof
:=
isOpen_box (fun _ ↦ isOpen_Ioo)
theorem mem_unitBox
TopologyByExample.BoxRealPower.mem_unitBox
Each sequence lies in its radius-one box.
theorem mem_unitBox (x : Space) : x ∈ unitBox x
Proof
:= by
intro n
constructor <;> linarith
theorem mem_unitBox_symm
TopologyByExample.BoxRealPower.mem_unitBox_symm
Coordinatewise distance less than one is symmetric.
theorem mem_unitBox_symm {x y : Space} (h : y ∈ unitBox x) : x ∈ unitBox y
Proof
:= by
intro n
obtain ⟨hl, hu⟩ := h n
constructor <;> linarith
theorem bounded_of_mem_unitBox
TopologyByExample.BoxRealPower.bounded_of_mem_unitBox
A sequence in a radius-one box about a bounded sequence is bounded.
theorem bounded_of_mem_unitBox {x y : Space} (hx : x ∈ boundedSequences)
(hy : y ∈ unitBox x) : y ∈ boundedSequences
Proof
:= by
obtain ⟨r, hr⟩ := hx
refine ⟨r + 1, fun n ↦ abs_lt.mpr ?_⟩
obtain ⟨hl, hu⟩ := abs_lt.mp (hr n)
obtain ⟨hyl, hyu⟩ := hy n
constructor <;> linarith
theorem isOpen_boundedSequences
TopologyByExample.BoxRealPower.isOpen_boundedSequences
Bounded sequences form an open subset of the box product.
theorem isOpen_boundedSequences : IsOpen boundedSequences
Proof
:= by
apply isOpen_iff_mem_nhds.mpr
intro x hx
exact mem_of_superset ((isOpen_unitBox x).mem_nhds (mem_unitBox x))
(fun _ hy ↦ bounded_of_mem_unitBox hx hy)
theorem isOpen_compl_boundedSequences
TopologyByExample.BoxRealPower.isOpen_compl_boundedSequences
Unbounded sequences also form an open subset.
theorem isOpen_compl_boundedSequences : IsOpen boundedSequencesᶜ
Proof
:= by
apply isOpen_iff_mem_nhds.mpr
intro x hx
apply mem_of_superset ((isOpen_unitBox x).mem_nhds (mem_unitBox x))
intro y hy hb
exact hx (bounded_of_mem_unitBox hb (mem_unitBox_symm hy))
theorem isClopen_boundedSequences
TopologyByExample.BoxRealPower.isClopen_boundedSequences
Bounded sequences form a clopen subset.
theorem isClopen_boundedSequences : IsClopen boundedSequences
Proof
:=
⟨isOpen_compl_iff.mp isOpen_compl_boundedSequences, isOpen_boundedSequences⟩
theorem not_preconnected
TopologyByExample.BoxRealPower.not_preconnected
The countable box product of real lines is disconnected.
theorem not_preconnected : ¬PreconnectedSpace Space
Proof
:= by
intro h
have hz : (⟨fun _ ↦ 0⟩ : Space) ∈ boundedSequences := ⟨1, by simp⟩
have hu : (⟨fun n ↦ (n : ℝ)⟩ : Space) ∉ boundedSequences := by
rintro ⟨r, hr⟩
obtain ⟨n, hn⟩ := exists_nat_gt r
have ht := hr n
change |(n : ℝ)| < r at ht
rw [abs_of_nonneg (Nat.cast_nonneg n)] at ht
linarith
rcases isClopen_iff.mp isClopen_boundedSequences with he | he
· simp [he] at hz
· exact hu (he ▸ mem_univ _)
On this site: The countable box product of the reals is not connected
theorem cardinality
TopologyByExample.BoxRealPower.cardinality
The underlying set has cardinality continuum.
theorem cardinality : Cardinal.mk Space = Cardinal.continuum
Proof
:= by
let e : Space ≃ (ℕ → ℝ) := ⟨Space.coord, Space.mk, fun _ ↦ rfl, fun _ ↦ rfl⟩
simp [Cardinal.mk_congr e, Cardinal.mk_real,
Cardinal.continuum_power_aleph0]
On this site: The countable box product of the reals has cardinality equal to \(\mathfrak{c}\)
definition drift
TopologyByExample.BoxRealPower.drift
A sequence with constant linear growth rate.
def drift (r : ℝ) : Space
:= ⟨fun n ↦ (n : ℝ) * r⟩
theorem disjoint_drift_boxes
TopologyByExample.BoxRealPower.disjoint_drift_boxes
Different growth rates have disjoint radius-one boxes.
theorem disjoint_drift_boxes {r s : ℝ} (hrs : r ≠ s) :
Disjoint (unitBox (drift r)) (unitBox (drift s))
Proof
:= by
suffices h : ∀ r s : ℝ, r < s → Disjoint (unitBox (drift r)) (unitBox (drift s)) by
rcases lt_or_gt_of_ne hrs with hlt | hlt
· exact h r s hlt
· exact (h s r hlt).symm
intro r s hrs
apply disjoint_left.mpr
intro x hx hy
obtain ⟨n, hn⟩ := exists_nat_gt (2 / (s - r))
have hmul := (div_lt_iff₀ (sub_pos.mpr hrs)).mp hn
have hupper : x.coord n < (n : ℝ) * r + 1 := (hx n).2
have hlower : (n : ℝ) * s - 1 < x.coord n := (hy n).1
nlinarith
theorem drift_boxes_injective
TopologyByExample.BoxRealPower.drift_boxes_injective
The family of radius-one boxes around the drift sequences is injectively indexed by ℝ.
theorem drift_boxes_injective : Function.Injective (fun r ↦ unitBox (drift r))
Proof
:= by
intro r s he
change unitBox (drift r) = unitBox (drift s) at he
by_contra hrs
exact (disjoint_left.mp (disjoint_drift_boxes hrs)) (mem_unitBox (drift r))
(by rw [← he]; exact mem_unitBox (drift r))
theorem not_countableChainCondition
TopologyByExample.BoxRealPower.not_countableChainCondition
The box product fails the countable chain condition.
theorem not_countableChainCondition :
¬(∀ S : Set (Set Space), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) →
S.PairwiseDisjoint id → S.Countable)
Proof
:= by
intro h
have hc := h (range fun r ↦ unitBox (drift r))
(by rintro _ ⟨r, rfl⟩; exact ⟨isOpen_unitBox _, ⟨_, mem_unitBox _⟩⟩)
(by
rintro _ ⟨r, rfl⟩ _ ⟨s, rfl⟩ hne
exact disjoint_drift_boxes (fun he ↦ hne (he ▸ rfl)))
apply not_countable_univ (α := ℝ)
apply countable_of_injective_of_countable_image drift_boxes_injective.injOn
simpa only [image_univ] using hc
On this site: The countable box product of the reals does not satisfy the countable chain condition
theorem not_totallyPathDisconnected
TopologyByExample.BoxRealPower.not_totallyPathDisconnected
A coordinate line contains a nonconstant path.
theorem not_totallyPathDisconnected : ¬TotallyPathDisconnectedSpace Space
Proof
:= by
intro h
obtain ⟨γ⟩ := PathConnectedSpace.joined (0 : ℝ) 1
have he := h.eq_of_joined _ _ ⟨γ.map (continuous_coordinateLine default 0)⟩
have hc := congrArg (fun x : Space ↦ x.coord 0) he
norm_num [coordinateLine] at hc
On this site: The countable box product of the reals is not totally path disconnected
theorem submetrizable
TopologyByExample.BoxRealPower.submetrizable
The identity into the ordinary countable product makes the box product submetrizable.
theorem submetrizable : SubmetrizableSpace Space
Proof
:=
RealExtension.submetrizableSpace_of_continuous_injective continuous_toProduct
(fun _ _ h ↦ Space.ext h)
On this site: The countable box product of the reals is submetrizable
theorem not_pseudocompact
TopologyByExample.BoxRealPower.not_pseudocompact
The first coordinate is an unbounded continuous real-valued function.
theorem not_pseudocompact : ¬PseudocompactSpace Space
Proof
:=
RealExtension.not_pseudocompactSpace_of_continuous_surjective (continuous_coord 0)
(fun r ↦ ⟨⟨fun _ ↦ r⟩, rfl⟩)
On this site: The countable box product of the reals is not pseudocompact
theorem isClosed_range_drift
TopologyByExample.BoxRealPower.isClosed_range_drift
The drift sequences form a closed subset.
theorem isClosed_range_drift : IsClosed (range drift)
Proof
:= by
have he : range drift = ⋂ n : ℕ, {x : Space | x.coord n = (n : ℝ) * x.coord 1} := by
ext x
simp only [mem_range, mem_iInter, mem_ofPred_eq]
constructor
· rintro ⟨r, rfl⟩ n
simp [drift]
· intro hx
exact ⟨x.coord 1, Space.ext (funext fun n ↦ (hx n).symm)⟩
rw [he]
exact isClosed_iInter fun n ↦ isClosed_eq (continuous_coord n)
(continuous_const.mul (continuous_coord 1))
theorem isDiscrete_range_drift
TopologyByExample.BoxRealPower.isDiscrete_range_drift
A radius-one box isolates its drift sequence among all drift sequences.
theorem isDiscrete_range_drift : IsDiscrete (range drift)
Proof
:= by
apply isDiscrete_iff_forall_mem_exists_isOpen.mpr
rintro _ ⟨r, rfl⟩
refine ⟨unitBox (drift r), isOpen_unitBox _, ?_⟩
ext x
constructor
· rintro ⟨hs, s, rfl⟩
have he : r = s := by
by_contra hne
exact disjoint_left.mp (disjoint_drift_boxes hne) hs (mem_unitBox (drift s))
simp [he]
· rintro rfl
exact ⟨mem_unitBox _, ⟨r, rfl⟩⟩
theorem closedDiscreteContinuum
TopologyByExample.BoxRealPower.closedDiscreteContinuum
The closed discrete drift family has cardinality continuum.
theorem closedDiscreteContinuum : ∃ s : Set Space, IsClosed s ∧ IsDiscrete s ∧
Cardinal.continuum ≤ Cardinal.mk s
Proof
:= by
refine ⟨range drift, isClosed_range_drift, isDiscrete_range_drift, ?_⟩
have hi : Function.Injective drift := by
intro r s he
have hc := congrArg (fun x : Space ↦ x.coord 1) he
simpa [drift] using hc
rw [← Cardinal.mk_real]
exact Cardinal.mk_le_of_injective
(f := fun r ↦ (⟨drift r, mem_range_self r⟩ : range drift))
(fun _ _ he ↦ hi (congrArg Subtype.val he))
On this site: The countable box product of the reals has a closed discrete subset of cardinality \(\mathfrak{c}\)