Lean library · module TopologyByExample.Theorems.HarmonicSequenceIllustrations
Exact illustrations on the convergent reciprocal sequence
A continuous bijection from a discrete countable space, irrational cuts, and the open even reciprocals whose closure is not open.
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.
definition enumeration
TopologyByExample.BookConvergentSequence.enumeration
Zero followed by all positive reciprocals.
def enumeration : ℕ → FortSpaces.harmonicSet
| 0 => ⟨0, mem_insert _ _⟩
| n + 1 => ⟨reciprocal n, mem_insert_of_mem _ (mem_range_self n)⟩
theorem enumeration_bijective
TopologyByExample.BookConvergentSequence.enumeration_bijective
This enumeration is bijective.
theorem enumeration_bijective : Function.Bijective enumeration
Proof
:= by
constructor
· intro n m h
have he := congrArg Subtype.val h
cases n with
| zero =>
cases m with
| zero => rfl
| succ m => exact False.elim ((ne_of_gt (reciprocal_pos m)) he.symm)
| succ n =>
cases m with
| zero => exact False.elim ((ne_of_gt (reciprocal_pos n)) he)
| succ m => exact congrArg Nat.succ (isEmbedding_reciprocal.injective he)
· rintro ⟨x, hx | ⟨n, hn⟩⟩
· exact ⟨0, Subtype.ext hx.symm⟩
· exact ⟨n + 1, Subtype.ext hn⟩
theorem continuous_enumeration
TopologyByExample.BookConvergentSequence.continuous_enumeration
The discrete-domain enumeration is continuous.
theorem continuous_enumeration : Continuous enumeration
Proof
:= continuous_of_discreteTopology
theorem not_homeomorphic
TopologyByExample.BookConvergentSequence.not_homeomorphic
The continuous bijection does not give a homeomorphism of these spaces.
theorem not_homeomorphic : IsEmpty (ℕ ≃ₜ FortSpaces.harmonicSet)
Proof
:= by
let : CompactSpace FortSpaces.harmonicSet :=
isCompact_iff_compactSpace.mp FortSpaces.isCompact_harmonicSet
refine ⟨fun h ↦ ?_⟩
exact (not_compactSpace_iff.mpr (inferInstance : NoncompactSpace ℕ))
(h.symm.surjective.compactSpace h.symm.continuous)
theorem bijection_from_discrete
TopologyByExample.BookConvergentSequence.bijection_from_discrete
Every bijection from an infinite discrete space is continuous but cannot be a homeomorphism.
theorem bijection_from_discrete {X : Type*} [TopologicalSpace X] [DiscreteTopology X]
[Infinite X] (f : X → FortSpaces.harmonicSet) (hf : Function.Bijective f) :
Function.Bijective f ∧ Continuous f ∧ IsEmpty (X ≃ₜ FortSpaces.harmonicSet)
Proof
:= by
let : CompactSpace FortSpaces.harmonicSet :=
isCompact_iff_compactSpace.mp FortSpaces.isCompact_harmonicSet
refine ⟨hf, continuous_of_discreteTopology, ⟨fun h ↦ ?_⟩⟩
let : CompactSpace X := h.symm.surjective.compactSpace h.symm.continuous
have : Finite X := finite_of_compact_of_discrete
exact _root_.not_finite X
theorem irrational_not_mem
TopologyByExample.BookConvergentSequence.irrational_not_mem
No irrational number belongs to the harmonic set.
theorem irrational_not_mem {r : ℝ} (hr : Irrational r) : r ∉ FortSpaces.harmonicSet
Proof
:= by
rintro (h | ⟨n, hn⟩)
· exact hr.ne_zero h
· apply hr.ne_rat (1 / ((n : ℚ) + 1))
simpa using hn.symm
theorem irrational_cut_clopen
TopologyByExample.BookConvergentSequence.irrational_cut_clopen
Cutting the harmonic set at an irrational number gives a clopen set.
theorem irrational_cut_clopen {r : ℝ} (hr : Irrational r) :
IsClopen {x : FortSpaces.harmonicSet | x.val < r}
Proof
:= by
refine ⟨?_, isOpen_lt continuous_subtypeVal continuous_const⟩
apply isOpen_compl_iff.mp
have he : {x : FortSpaces.harmonicSet | x.val < r}ᶜ = {x | r < x.val} := by
ext x
simp only [mem_compl_iff, mem_ofPred_eq, not_lt]
constructor
· intro h
exact lt_of_le_of_ne h (fun he ↦ irrational_not_mem hr (he ▸ x.property))
· exact le_of_lt
rw [he]
exact isOpen_lt continuous_const continuous_subtypeVal
On this site: Ordinal space of a countable successor ordinal above \(\omega\): Irrational cuts of the convergent sequence
definition zeroPoint
TopologyByExample.BookConvergentSequence.zeroPoint
The limit point of the harmonic set.
def zeroPoint : FortSpaces.harmonicSet
:= harmonicHomeomorph ∞
definition evenPoint
TopologyByExample.BookConvergentSequence.evenPoint
The even positive reciprocals, 1/2, 1/4, ....
def evenPoint (n : ℕ) : FortSpaces.harmonicSet
:=
harmonicHomeomorph ((2 * n + 1 : ℕ) : OnePoint ℕ)
definition oddPoint
TopologyByExample.BookConvergentSequence.oddPoint
The intervening odd positive reciprocals, 1, 1/3, ....
def oddPoint (n : ℕ) : FortSpaces.harmonicSet
:=
harmonicHomeomorph ((2 * n : ℕ) : OnePoint ℕ)
theorem tendsto_evenPoint
TopologyByExample.BookConvergentSequence.tendsto_evenPoint
The even subsequence tends to the added zero.
theorem tendsto_evenPoint : Tendsto evenPoint atTop (𝓝 zeroPoint)
Proof
:= by
apply tendsto_subtype_rng.mpr
change Tendsto (fun n ↦ reciprocal (2 * n + 1)) atTop (𝓝 0)
apply tendsto_reciprocal.comp
apply tendsto_atTop_atTop.mpr
intro b
exact ⟨b, fun a ha ↦ by omega⟩
theorem tendsto_oddPoint
TopologyByExample.BookConvergentSequence.tendsto_oddPoint
The odd subsequence also tends to zero.
theorem tendsto_oddPoint : Tendsto oddPoint atTop (𝓝 zeroPoint)
Proof
:= by
apply tendsto_subtype_rng.mpr
change Tendsto (fun n ↦ reciprocal (2 * n)) atTop (𝓝 0)
apply tendsto_reciprocal.comp
apply tendsto_atTop_atTop.mpr
intro b
exact ⟨b, fun a ha ↦ by omega⟩
theorem isOpen_range_evenPoint
TopologyByExample.BookConvergentSequence.isOpen_range_evenPoint
The even reciprocals are open in the convergent sequence.
theorem isOpen_range_evenPoint : IsOpen (range evenPoint)
theorem closure_evenPoint
TopologyByExample.BookConvergentSequence.closure_evenPoint
Their closure adds precisely zero.
theorem closure_evenPoint : closure (range evenPoint) = insert zeroPoint (range evenPoint)
Proof
:= by
apply subset_antisymm
· exact closure_minimal (subset_insert _ _) tendsto_evenPoint.isCompact_insert_range.isClosed
· apply insert_subset_iff.mpr
exact ⟨mem_closure_of_tendsto tendsto_evenPoint (Eventually.of_forall mem_range_self),
subset_closure⟩
theorem oddPoint_not_mem_closure
TopologyByExample.BookConvergentSequence.oddPoint_not_mem_closure
No odd reciprocal belongs to that closure.
theorem oddPoint_not_mem_closure (n : ℕ) : oddPoint n ∉ closure (range evenPoint)
Proof
:= by
rw [closure_evenPoint]
rintro (h | ⟨m, hm⟩)
· have hh := harmonicHomeomorph.injective h
exact OnePoint.coe_ne_infty _ hh
· have hh := OnePoint.coe_injective (harmonicHomeomorph.injective hm)
omega
theorem not_isOpen_closure_evenPoint
TopologyByExample.BookConvergentSequence.not_isOpen_closure_evenPoint
The closure of this open subset is not open.
theorem not_isOpen_closure_evenPoint : ¬IsOpen (closure (range evenPoint))
Proof
:= by
intro h
have hz : zeroPoint ∈ closure (range evenPoint) := by rw [closure_evenPoint]; simp
have he : ∀ᶠ n in atTop, oddPoint n ∈ closure (range evenPoint) :=
tendsto_oddPoint (h.mem_nhds hz)
obtain ⟨n, hn⟩ := he.exists
exact oddPoint_not_mem_closure n hn